author | Edouard Tisserant <edouard@beremiz.fr> |
Fri, 08 Nov 2024 11:34:46 +0100 | |
changeset 4035 | c317fc64035e |
parent 4032 | 1ffff67678ad |
permissions | -rw-r--r-- |
3884
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
1 |
# |
4035 | 2 |
# Generated by erpcgen 1.13.0 on Fri Nov 8 11:06:24 2024. |
3884
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
3 |
# |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
4 |
# AUTOGENERATED - DO NOT EDIT |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
5 |
# |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
6 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
7 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
8 |
# Enumerators data types declarations |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
9 |
class PLCstatus_enum: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
10 |
Empty = 0 |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
11 |
Stopped = 1 |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
12 |
Started = 2 |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
13 |
Broken = 3 |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
14 |
Disconnected = 4 |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
15 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
16 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
17 |
# Structures data types declarations |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
18 |
class log_message(object): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
19 |
def __init__(self, msg=None, tick=None, sec=None, nsec=None): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
20 |
self.msg = msg # string |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
21 |
self.tick = tick # uint32 |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
22 |
self.sec = sec # uint32 |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
23 |
self.nsec = nsec # uint32 |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
24 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
25 |
def _read(self, codec): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
26 |
self.msg = codec.read_string() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
27 |
self.tick = codec.read_uint32() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
28 |
self.sec = codec.read_uint32() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
29 |
self.nsec = codec.read_uint32() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
30 |
return self |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
31 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
32 |
def _write(self, codec): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
33 |
if self.msg is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
34 |
raise ValueError("msg is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
35 |
codec.write_string(self.msg) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
36 |
if self.tick is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
37 |
raise ValueError("tick is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
38 |
codec.write_uint32(self.tick) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
39 |
if self.sec is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
40 |
raise ValueError("sec is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
41 |
codec.write_uint32(self.sec) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
42 |
if self.nsec is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
43 |
raise ValueError("nsec is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
44 |
codec.write_uint32(self.nsec) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
45 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
46 |
def __str__(self): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
47 |
return "<%s@%x msg=%s tick=%s sec=%s nsec=%s>" % (self.__class__.__name__, id(self), self.msg, self.tick, self.sec, self.nsec) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
48 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
49 |
def __repr__(self): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
50 |
return self.__str__() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
51 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
52 |
class PSKID(object): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
53 |
def __init__(self, ID=None, PSK=None): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
54 |
self.ID = ID # string |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
55 |
self.PSK = PSK # string |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
56 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
57 |
def _read(self, codec): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
58 |
self.ID = codec.read_string() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
59 |
self.PSK = codec.read_string() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
60 |
return self |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
61 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
62 |
def _write(self, codec): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
63 |
if self.ID is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
64 |
raise ValueError("ID is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
65 |
codec.write_string(self.ID) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
66 |
if self.PSK is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
67 |
raise ValueError("PSK is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
68 |
codec.write_string(self.PSK) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
69 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
70 |
def __str__(self): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
71 |
return "<%s@%x ID=%s PSK=%s>" % (self.__class__.__name__, id(self), self.ID, self.PSK) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
72 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
73 |
def __repr__(self): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
74 |
return self.__str__() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
75 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
76 |
class PLCstatus(object): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
77 |
def __init__(self, PLCstatus=None, logcounts=None): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
78 |
self.PLCstatus = PLCstatus # PLCstatus_enum |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
79 |
self.logcounts = logcounts # uint32[4] |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
80 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
81 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
82 |
def _read(self, codec): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
83 |
self.PLCstatus = codec.read_int32() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
84 |
self.logcounts = [] |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
85 |
for _i0 in range(4): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
86 |
_v0 = codec.read_uint32() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
87 |
self.logcounts.append(_v0) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
88 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
89 |
return self |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
90 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
91 |
def _write(self, codec): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
92 |
if self.PLCstatus is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
93 |
raise ValueError("PLCstatus is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
94 |
codec.write_int32(self.PLCstatus) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
95 |
if self.logcounts is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
96 |
raise ValueError("logcounts is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
97 |
for _i0 in self.logcounts: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
98 |
codec.write_uint32(_i0) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
99 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
100 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
101 |
def __str__(self): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
102 |
return "<%s@%x PLCstatus=%s logcounts=%s>" % (self.__class__.__name__, id(self), self.PLCstatus, self.logcounts) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
103 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
104 |
def __repr__(self): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
105 |
return self.__str__() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
106 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
107 |
class trace_sample(object): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
108 |
def __init__(self, tick=None, TraceBuffer=None): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
109 |
self.tick = tick # uint32 |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
110 |
self.TraceBuffer = TraceBuffer # binary |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
111 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
112 |
def _read(self, codec): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
113 |
self.tick = codec.read_uint32() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
114 |
self.TraceBuffer = codec.read_binary() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
115 |
return self |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
116 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
117 |
def _write(self, codec): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
118 |
if self.tick is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
119 |
raise ValueError("tick is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
120 |
codec.write_uint32(self.tick) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
121 |
if self.TraceBuffer is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
122 |
raise ValueError("TraceBuffer is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
123 |
codec.write_binary(self.TraceBuffer) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
124 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
125 |
def __str__(self): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
126 |
return "<%s@%x tick=%s TraceBuffer=%s>" % (self.__class__.__name__, id(self), self.tick, self.TraceBuffer) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
127 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
128 |
def __repr__(self): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
129 |
return self.__str__() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
130 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
131 |
class TraceVariables(object): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
132 |
def __init__(self, PLCstatus=None, traces=None): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
133 |
self.PLCstatus = PLCstatus # PLCstatus_enum |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
134 |
self.traces = traces # list<trace_sample> |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
135 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
136 |
def _read(self, codec): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
137 |
self.PLCstatus = codec.read_int32() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
138 |
_n0 = codec.start_read_list() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
139 |
self.traces = [] |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
140 |
for _i0 in range(_n0): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
141 |
_v0 = trace_sample()._read(codec) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
142 |
self.traces.append(_v0) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
143 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
144 |
return self |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
145 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
146 |
def _write(self, codec): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
147 |
if self.PLCstatus is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
148 |
raise ValueError("PLCstatus is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
149 |
codec.write_int32(self.PLCstatus) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
150 |
if self.traces is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
151 |
raise ValueError("traces is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
152 |
codec.start_write_list(len(self.traces)) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
153 |
for _i0 in self.traces: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
154 |
_i0._write(codec) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
155 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
156 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
157 |
def __str__(self): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
158 |
return "<%s@%x PLCstatus=%s traces=%s>" % (self.__class__.__name__, id(self), self.PLCstatus, self.traces) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
159 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
160 |
def __repr__(self): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
161 |
return self.__str__() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
162 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
163 |
class extra_file(object): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
164 |
def __init__(self, fname=None, blobID=None): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
165 |
self.fname = fname # string |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
166 |
self.blobID = blobID # binary |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
167 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
168 |
def _read(self, codec): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
169 |
self.fname = codec.read_string() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
170 |
self.blobID = codec.read_binary() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
171 |
return self |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
172 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
173 |
def _write(self, codec): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
174 |
if self.fname is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
175 |
raise ValueError("fname is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
176 |
codec.write_string(self.fname) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
177 |
if self.blobID is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
178 |
raise ValueError("blobID is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
179 |
codec.write_binary(self.blobID) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
180 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
181 |
def __str__(self): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
182 |
return "<%s@%x fname=%s blobID=%s>" % (self.__class__.__name__, id(self), self.fname, self.blobID) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
183 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
184 |
def __repr__(self): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
185 |
return self.__str__() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
186 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
187 |
class trace_order(object): |
3887
2df45e4bd500
Fix variable forcing. Now works with eRPC. PLCObject API changed.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
3885
diff
changeset
|
188 |
def __init__(self, idx=None, force=None): |
3884
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
189 |
self.idx = idx # uint32 |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
190 |
self.force = force # binary |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
191 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
192 |
def _read(self, codec): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
193 |
self.idx = codec.read_uint32() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
194 |
self.force = codec.read_binary() |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
195 |
return self |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
196 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
197 |
def _write(self, codec): |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
198 |
if self.idx is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
199 |
raise ValueError("idx is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
200 |
codec.write_uint32(self.idx) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
201 |
if self.force is None: |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
202 |
raise ValueError("force is None") |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
203 |
codec.write_binary(self.force) |
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
204 |
|
34da877021d5
Replace PYRO with ERPC. Work In Progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
205 |
def __str__(self): |
3887
2df45e4bd500
Fix variable forcing. Now works with eRPC. PLCObject API changed.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
3885
diff
changeset
|
206 |
return "<%s@%x idx=%s force=%s>" % (self.__class__.__name__, id(self), self.idx, self.force) |
2df45e4bd500
Fix variable forcing. Now works with eRPC. PLCObject API changed.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
3885
diff
changeset
|
207 |
|
2df45e4bd500
Fix variable forcing. Now works with eRPC. PLCObject API changed.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
3885
diff
changeset
|
208 |
def __repr__(self): |
2df45e4bd500
Fix variable forcing. Now works with eRPC. PLCObject API changed.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
3885
diff
changeset
|
209 |
return self.__str__() |
2df45e4bd500
Fix variable forcing. Now works with eRPC. PLCObject API changed.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
3885
diff
changeset
|
210 |