1 module puppeteer.communication.communicator_messages;
2 
3 package
4 {
5     struct CommunicationEstablishedMessage
6     {
7         bool success;
8 
9         this(bool success)
10         {
11             this.success = success;
12         }
13     }
14 
15     struct CommunicationEndedMessage
16     {
17 
18     }
19 
20     struct EndCommunicationMessage
21     {
22 
23     }
24 
25     struct PinMonitorMessage
26     {
27         enum Action
28         {
29             start,
30             stop
31         }
32 
33         Action action;
34         ubyte pin;
35 
36         this(Action action, ubyte pin)
37         {
38             this.action = action;
39             this.pin = pin;
40         }
41     }
42 
43     struct VarMonitorMessage
44     {
45         import puppeteer.var_monitor_utils : VarMonitorTypeCode;
46 
47         enum Action
48         {
49             start,
50             stop
51         }
52 
53         Action action;
54         ubyte varIndex;
55         VarMonitorTypeCode varTypeCode;
56 
57         this(Action action, ubyte varIndex, VarMonitorTypeCode varTypeCode)
58         {
59             this.action = action;
60             this.varIndex = varIndex;
61             this.varTypeCode = varTypeCode;
62         }
63     }
64 
65     struct SetPWMMessage
66     {
67         ubyte pin;
68         ubyte value;
69 
70         this(ubyte pin, ubyte value)
71         {
72             this.pin = pin;
73             this.value = value;
74         }
75     }
76 
77 }