diff --git a/src/components/FlowsPanel.vue b/src/components/FlowsPanel.vue
index 41740c9..8611804 100644
--- a/src/components/FlowsPanel.vue
+++ b/src/components/FlowsPanel.vue
@@ -2,11 +2,10 @@
import { ref, watch, nextTick } from 'vue'
import { Network } from '@/hooks/useStates'
-
const columns: any = [
{
key: 'flow_id',
- title: 'Flow ID',
+ title: 'ID',
dataKey: 'flow_id',
width: 60,
align: 'center',
diff --git a/src/components/NodeStats.vue b/src/components/NodeStats.vue
index 47af0b0..19820d5 100644
--- a/src/components/NodeStats.vue
+++ b/src/components/NodeStats.vue
@@ -16,8 +16,8 @@ import { Network, SelectedNode } from '@/hooks/useStates'
- {{ SelectedNode == 1 ? 'Raspberry Pi 4B' : 'CC2650 SensorTag' }}
- TX: {{ Network.Nodes.value[SelectedNode].tx_cnt }} , RX:
{{ Network.Nodes.value[SelectedNode].rx_cnt }}
- - Queue length: {{ Network.Nodes.value[SelectedNode].queueLen }}
- - Rank in topology: {{ Network.Nodes.value[SelectedNode].rank }}
+
diff --git a/src/components/PacketSniffer.vue b/src/components/PacketSniffer.vue
index abce5d4..925919c 100644
--- a/src/components/PacketSniffer.vue
+++ b/src/components/PacketSniffer.vue
@@ -164,4 +164,4 @@ Row.inheritAttrs = false
width: 100%;
text-align: center;
}
-
\ No newline at end of file
+
diff --git a/src/hooks/useDrawMiniMap.ts b/src/hooks/useDrawMiniMap.ts
index c42db5d..3496659 100644
--- a/src/hooks/useDrawMiniMap.ts
+++ b/src/hooks/useDrawMiniMap.ts
@@ -3,7 +3,8 @@ import * as echarts from 'echarts'
import { Network } from './useStates'
import { MiniMapMode } from './useStates'
-import { LINK_TYPE } from '@/networks/common'
+import { LINK_TYPE, NETWORK_TYPE } from '@/networks/common'
+import type { TSCHNodeMeta } from '@/networks/TSCH/typedefs'
export function useDrawMiniMap(chartDom: HTMLElement) {
const chart = echarts.init(chartDom, { useDirtyRect: true })
@@ -110,17 +111,8 @@ export function useDrawMiniMap(chartDom: HTMLElement) {
for (const l of Object.values(Network.Links.value)) {
if (drawnLinks[l.uid] == undefined) {
drawnLinks[l.uid] = true
- let coord1: [number, number], coord2: [number, number]
- if (l.v1 <= Network.TopoConfig.value.num_nodes) {
- coord1 = Network.Nodes.value[l.v1].pos
- } else {
- coord1 = Network.EndSystems.value[l.v1 - Network.TopoConfig.value.num_nodes - 1].pos
- }
- if (l.v2 <= Network.TopoConfig.value.num_nodes) {
- coord2 = Network.Nodes.value[l.v2].pos
- } else {
- coord2 = Network.EndSystems.value[l.v2 - Network.TopoConfig.value.num_nodes - 1].pos
- }
+ const coord1 = Network.Nodes.value[l.v1].pos
+ const coord2 = Network.Nodes.value[l.v2].pos
option.series[0].markLine.data.push([
{
@@ -142,13 +134,13 @@ export function useDrawMiniMap(chartDom: HTMLElement) {
}
function drawMinimapTree() {
for (const n of Network.Nodes.value) {
- if (n.joined && n.parent != 0) {
+ if (n.type==NETWORK_TYPE.TSCH && (n).joined && (n).parent != 0) {
if (treeNodes[n.id] == undefined) {
treeNodes[n.id] = { name: n.id, children: [] }
- if (treeNodes[n.parent] != undefined) {
- treeNodes[n.parent].children.push(treeNodes[n.id])
+ if (treeNodes[(n).parent] != undefined) {
+ treeNodes[(n).parent].children.push(treeNodes[n.id])
} else {
- treeNodes[n.parent] = { name: n.id, children: [treeNodes[n.id]] }
+ treeNodes[(n).parent] = { name: n.id, children: [treeNodes[n.id]] }
}
}
}
diff --git a/src/hooks/useDrawTopology.ts b/src/hooks/useDrawTopology.ts
index 0d02050..823f984 100644
--- a/src/hooks/useDrawTopology.ts
+++ b/src/hooks/useDrawTopology.ts
@@ -467,7 +467,7 @@ export function useDrawTopology(dom: HTMLElement) {
1.6,
Network.Nodes.value[l.v2].pos[1]
)
-
+
const x2 = (p1.x + p3.x) / 2
const z2 = (p1.z + p3.z) / 2
const h = 5
diff --git a/src/networks/5G/network.ts b/src/networks/5G/network.ts
index 6c47f3e..d9b3cc9 100644
--- a/src/networks/5G/network.ts
+++ b/src/networks/5G/network.ts
@@ -1,5 +1,5 @@
import { ref } from 'vue'
-import { LINK_TYPE, NETWORK_TYPE, NODE_TYPE } from '../common'
+import { LINK_TYPE, NETWORK_TYPE, NODE_TYPE } from '../common'
import type { ScheduleConfig, FiveGNodeMeta } from './typedefs'
import { KDNode } from '../kdtree'
import { Network } from '../network'
diff --git a/src/networks/TSCH/node.ts b/src/networks/TSCH/node.ts
index 22dd9f8..1d40b62 100644
--- a/src/networks/TSCH/node.ts
+++ b/src/networks/TSCH/node.ts
@@ -84,7 +84,11 @@ class TSCHNode {
}
respondAck(pkt: Packet) {
- if (pkt.mac_dst != ADDR.BROADCAST && pkt.mac_src != ADDR.CONTROLLER && pkt.type != TSCH_PKT_TYPE.ACK) {
+ if (
+ pkt.mac_dst != ADDR.BROADCAST &&
+ pkt.mac_src != ADDR.CONTROLLER &&
+ pkt.type != TSCH_PKT_TYPE.ACK
+ ) {
const ack: Packet = { ...pkt }
ack.type = TSCH_PKT_TYPE.ACK
ack.mac_src = this.id
@@ -138,7 +142,9 @@ class TSCHNode {
for (const cell of this.schedule[slot]) {
if (
cell != undefined &&
- (cell.mac_src == pkt.mac_src || pkt.mac_dst == ADDR.BROADCAST || cell.type == CELL_TYPES.SHARED)
+ (cell.mac_src == pkt.mac_src ||
+ pkt.mac_dst == ADDR.BROADCAST ||
+ cell.type == CELL_TYPES.SHARED)
) {
this.rx_cnt++
return true
diff --git a/src/networks/TSN/network.ts b/src/networks/TSN/network.ts
index 30b4f59..ce573c5 100644
--- a/src/networks/TSN/network.ts
+++ b/src/networks/TSN/network.ts
@@ -1,5 +1,5 @@
import { ref, toRaw } from 'vue'
-import { NETWORK_TYPE, NODE_TYPE, type Message, LINK_TYPE, MSG_TYPE } from '../common'
+import { NETWORK_TYPE, NODE_TYPE, type Message, LINK_TYPE, MSG_TYPE } from '../common'
import { type ScheduleConfig, type TSNNodeMeta, type TSN_INIT_MSG_PAYLOAD } from './typedefs'
import { KDNode } from '../kdtree'
import { Network } from '../network'
diff --git a/src/networks/common.ts b/src/networks/common.ts
index 70ba4b6..e202f30 100644
--- a/src/networks/common.ts
+++ b/src/networks/common.ts
@@ -37,7 +37,6 @@ export enum LINK_TYPE {
WIRELESS
}
-
export interface FlowMeta {
id: number
src: number