erpc_interface/erpc_PLCObject/common.py
changeset 3887 2df45e4bd500
parent 3885 22a009561502
equal deleted inserted replaced
3886:2adfa4c60bff 3887:2df45e4bd500
     1 #
     1 #
     2 # Generated by erpcgen 1.11.0 on Fri Jan 19 08:26:41 2024.
     2 # Generated by erpcgen 1.11.0 on Mon Jan 22 16:49:00 2024.
     3 #
     3 #
     4 # AUTOGENERATED - DO NOT EDIT
     4 # AUTOGENERATED - DO NOT EDIT
     5 #
     5 #
     6 
     6 
     7 
     7 
    10     Empty = 0
    10     Empty = 0
    11     Stopped = 1
    11     Stopped = 1
    12     Started = 2
    12     Started = 2
    13     Broken = 3
    13     Broken = 3
    14     Disconnected = 4
    14     Disconnected = 4
    15 
       
    16 class IECtype_enum:
       
    17     BOOL = 0
       
    18     STEP = 1
       
    19     TRANSITION = 2
       
    20     ACTION = 3
       
    21     SINT = 4
       
    22     USINT = 5
       
    23     BYTE = 6
       
    24     STRING = 7
       
    25     INT = 8
       
    26     UINT = 9
       
    27     WORD = 10
       
    28     DINT = 11
       
    29     UDINT = 12
       
    30     DWORD = 13
       
    31     LINT = 14
       
    32     ULINT = 15
       
    33     LWORD = 16
       
    34     REAL = 17
       
    35     LREAL = 18
       
    36     TIME = 19
       
    37     TOD = 20
       
    38     DATE = 21
       
    39     DT = 22
       
    40 
    15 
    41 
    16 
    42 # Structures data types declarations
    17 # Structures data types declarations
    43 class log_message(object):
    18 class log_message(object):
    44     def __init__(self, msg=None, tick=None, sec=None, nsec=None):
    19     def __init__(self, msg=None, tick=None, sec=None, nsec=None):
   208 
   183 
   209     def __repr__(self):
   184     def __repr__(self):
   210         return self.__str__()
   185         return self.__str__()
   211 
   186 
   212 class trace_order(object):
   187 class trace_order(object):
   213     def __init__(self, idx=None, iectype=None, force=None):
   188     def __init__(self, idx=None, force=None):
   214         self.idx = idx # uint32
   189         self.idx = idx # uint32
   215         self.iectype = iectype # IECtype_enum
       
   216         self.force = force # binary
   190         self.force = force # binary
   217 
   191 
   218     def _read(self, codec):
   192     def _read(self, codec):
   219         self.idx = codec.read_uint32()
   193         self.idx = codec.read_uint32()
   220         self.iectype = codec.read_int32()
       
   221         self.force = codec.read_binary()
   194         self.force = codec.read_binary()
   222         return self
   195         return self
   223 
   196 
   224     def _write(self, codec):
   197     def _write(self, codec):
   225         if self.idx is None:
   198         if self.idx is None:
   226             raise ValueError("idx is None")
   199             raise ValueError("idx is None")
   227         codec.write_uint32(self.idx)
   200         codec.write_uint32(self.idx)
   228         if self.iectype is None:
       
   229             raise ValueError("iectype is None")
       
   230         codec.write_int32(self.iectype)
       
   231         if self.force is None:
   201         if self.force is None:
   232             raise ValueError("force is None")
   202             raise ValueError("force is None")
   233         codec.write_binary(self.force)
   203         codec.write_binary(self.force)
   234 
   204 
   235     def __str__(self):
   205     def __str__(self):
   236         return "<%s@%x idx=%s iectype=%s force=%s>" % (self.__class__.__name__, id(self), self.idx, self.iectype, self.force)
   206         return "<%s@%x idx=%s force=%s>" % (self.__class__.__name__, id(self), self.idx, self.force)
   237 
   207 
   238     def __repr__(self):
   208     def __repr__(self):
   239         return self.__str__()
   209         return self.__str__()
   240 
   210