Repository navigation
Expand file tree
/
Copy pathrun-timeline.sysml
More file actions
71 lines (57 loc) · 1.72 KB
/
Copy pathrun-timeline.sysml
File metadata and controls
71 lines (57 loc) · 1.72 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
package RunTimeline {
private import ScalarValues::*;
private import SI::*;
item def Ping {
attribute seq : Integer;
}
item def Ack {
attribute seq : Integer;
}
port def ControllerLink {
out item ping : Ping;
in item ack : Ack;
}
port def InstrumentLink {
in item ping : Ping;
out item ack : Ack;
}
part def Controller {
port link : ControllerLink;
exhibit state modes parallel {
state communication {
entry; then waiting;
state waiting;
state sending {
entry send new Ping(seq = 1) via link;
}
state acknowledged;
transition first waiting accept after 1 [s] then sending;
transition first sending accept Ack via link then acknowledged;
transition first acknowledged accept after 1 [s] then waiting;
}
state power {
entry; then charged;
state charged;
}
}
}
part def Instrument {
port link : InstrumentLink;
exhibit state modes {
entry; then waiting;
state waiting;
state acknowledged;
transition first waiting
accept ping : Ping via link
do send new Ack(seq = ping.seq) via link
then acknowledged;
transition first acknowledged accept after 1.5 [s] then waiting;
}
}
part def Mission {
part controller : Controller;
part instrument : Instrument;
connect controller.link to instrument.link;
}
part mission : Mission;
}