-
Notifications
You must be signed in to change notification settings - Fork 301
/
Copy pathbroadcast.tsp
77 lines (63 loc) · 1.22 KB
/
broadcast.tsp
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
import "@ebusd/ebus-typespec";
import "./_templates.tsp";
import "./opdata_inc.tsp";
using Ebus;
using Ebus.Num;
using Ebus.Dtm;
using Ebus.Str;
namespace Broadcast {
/** default *r */
model r {}
/** default *b */
@passive
@zz(BROADCAST)
model b {}
/** default *w */
@write
@zz(BROADCAST)
model w {}
/** date/time */
@inherit(b)
@ext(0x7, 0)
model Datetime {
outsidetemp: temp2;
time: btime;
date: bdate;
}
model Id is Ebus.Id.Id;
model IdQuery is Ebus.Id.IdQuery;
model IdAnswer is Ebus.Id.IdAnswer;
/** Inquiry of existence */
@inherit(w)
@ext(0x7, 0xfe)
model Queryexistence {}
/** sign of life */
@inherit(b)
@ext(0x7, 0xff)
model Signoflife {}
/** error message */
@inherit(b)
@ext(0xfe, 1)
model Error {
@maxLength(10)
error: STR;
}
@inherit(b)
model RcTarget is Opdata_inc.RcTarget;
@inherit(b)
model RcOperation is Opdata_inc.RcOperation;
@inherit(b)
model ControlCmd is Opdata_inc.ControlCmd;
/** reset network state */
@inherit(b)
@ext(0xff, 0)
model Netresetstate {}
/** reset network config */
@inherit(b)
@ext(0xff, 1)
model Netresetcfg {}
/** network loss */
@inherit(b)
@ext(0xff, 0x2)
model Netloss {}
}