equal
deleted
inserted
replaced
|
1 /* |
|
2 Written by Edouard TISSERANT (C) 2024 |
|
3 This file is part of Beremiz runtime and IDE |
|
4 See COPYING.Runtime and COPYING file for copyrights details. |
|
5 */ |
|
6 |
|
7 program erpc_PLCObject |
|
8 |
|
9 struct PSKID { |
|
10 string ID; |
|
11 string PSK; |
|
12 }; |
|
13 |
|
14 enum PLCstatus_enum { |
|
15 Empty |
|
16 Stopped, |
|
17 Started, |
|
18 Broken, |
|
19 Disconnected |
|
20 } |
|
21 |
|
22 struct PLCstatus { |
|
23 PLCstatus_enum PLCstatus; |
|
24 uint32[4] logcounts; |
|
25 }; |
|
26 |
|
27 struct trace_sample { |
|
28 uint32 tick; |
|
29 binary TraceBuffer; |
|
30 }; |
|
31 |
|
32 struct TraceVariables { |
|
33 PLCstatus_enum PLCstatus; |
|
34 list<trace_sample> traces; |
|
35 }; |
|
36 |
|
37 struct extra_file { |
|
38 string fname; |
|
39 binary blobID; |
|
40 }; |
|
41 |
|
42 struct trace_order { |
|
43 uint32 idx; |
|
44 uint8 iectype; |
|
45 binary force; |
|
46 }; |
|
47 |
|
48 struct log_message { |
|
49 string msg; |
|
50 uint32 tick; |
|
51 uint32 sec; |
|
52 uint32 nsec; |
|
53 }; |
|
54 |
|
55 |
|
56 interface BeremizPLCObjectService { |
|
57 AppendChunkToBlob(in binary data, in binary blobID, out binary newBlobID) -> uint32 |
|
58 GetLogMessage(in uint8 level, in uint32 msgID, out log_message message) -> uint32 |
|
59 GetPLCID(out PSKID plcID) -> uint32 |
|
60 GetPLCstatus(out PLCstatus status) -> uint32 |
|
61 GetTraceVariables(in uint32 debugToken, out TraceVariables traces) -> uint32 |
|
62 MatchMD5(in string MD5, out bool match) -> uint32 |
|
63 NewPLC(in string md5sum, in binary plcObjectBlobID, in list<extra_file> extrafiles, out bool success) -> uint32 |
|
64 PurgeBlobs() -> uint32 |
|
65 /* NOT TO DO : RemoteExec(in ) -> uint32 */ |
|
66 RepairPLC() -> uint32 |
|
67 ResetLogCount() -> uint32 |
|
68 SeedBlob(in binary seed, out binary blobID) -> uint32 |
|
69 SetTraceVariablesList(in list<trace_order> orders) -> uint32 |
|
70 StartPLC() -> uint32 |
|
71 StopPLC() -> uint32 |
|
72 } |