-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontrol_node_serial.dot
More file actions
106 lines (79 loc) · 2.89 KB
/
control_node_serial.dot
File metadata and controls
106 lines (79 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
digraph g {
graph [
rankdir = "LR"
splines = "polyline"
ratio = 0.70
];
node [
fontsize = "16"
shape = "record"
];
"command_reader" [
label = "<f0> command_reader | <f1> ---- encode ---\> | <f2> | <f3> \<--- decode ----"
];
"serial" [
label = "<f0> serial | <f1>"
];
"measures_handler" [
label = "<f0> measures_handler | <f1> config_ack_pkt:\nset_time \nconfig_pw \nconfig_radio | <f2> power_pkt \| radio_pkt"
];
"decode" [
label = "<f0> decode | <f1> \<--answer | <f2> measure"
];
"oml" [
label = "OML"
];
/* external components */
"gateway_manager" [
shape = "Mrecord"
label = "<f0> gateway_manager | <f1> STDIN---\> | <f2> STDOUT\<--- "
];
"control_node" [
shape = "Mrecord"
label = "<f0> control_node | <f1>"
];
"user_home_directory" [
shape = "Mrecord"
label = "User homedir"
];
"empty" [ style=invis ]
/* edges */
"main" -> "command_reader" [style=dotted, label="start", constraint=False, minlen=2]
"main" -> "serial" [style=dotted, label="start", headport="n"]
"main" -> "decode" [style=invis]
// packets routes
"command_reader":f1 -> "serial":f0 [label = "send_command", weight=0]
"decode":f0 -> "serial":f1 [label = "rx_packet", weight = 10, dir=back]
"command_reader":f3 -> "decode":f1 [label = "command_answer", weight = 5, dir=back]
// measures handler
"decode" -> "measures_handler" [label = "measure_pkt", constraint=False, headport="n", tailport="s", minlen=2, labelfloat=True]
"measures_handler" -> "oml" [constraint=False]
subgraph cluster_control_node_serial {
label = control_node_serial;
command_reader;
serial;
decode;
oml;
main;
measures_handler;
empty;
style = dotted;
}
/* external edges */
"gateway_manager":f1 -> "command_reader":f1 [minlen=2]
"gateway_manager":f2 -> "command_reader":f3 [dir=back, label="text protocol"]
"serial":f0 -> "control_node":f0 [label = "/dev/tty"] //, minlen = 2]
"control_node":f1 -> "serial":f1 [label = "encoded protocol"]
// "oml" -> "user_home_directory" [label = "measure file", minlen=2]
// BUG: without dir=back arrow is in reverse side
"oml" -> "user_home_directory" [label = "measure file", minlen=2, dir=back]
// placement hacks. "user_home_directory" under "oml"
"command_reader" -> "user_home_directory" [style=invis]
"empty" -> "command_reader" [style=invis, constraint=False, minlen=10]
"empty" -> "oml" [style=invis]
"empty" -> "measures_handler" [style=invis]
"empty" -> "user_home_directory" [style=invis]
"user_home_directory" -> "serial" [style=invis]
"measures_handler" -> "serial" [style=invis]
"command_reader" -> "measures_handler" [style=invis]
}