Beispiel #1
0
class DefaultValuePacket(SerdepaPacket):
    _fields_ = [
        ("header", nx_uint8, 1),
        ("timestamp", nx_uint32, 12345),
        ("length", Length(nx_uint8, "data")),
        ("data", List(nx_uint8), [1, 2, 3, 4]),
        ("tail", List(nx_uint8), [5, 6])
    ]
Beispiel #2
0
class OnePacket(SerdepaPacket):
    _fields_ = [
        ("header", nx_uint8),
        ("timestamp", nx_uint32),
        ("length", Length(nx_uint8, "data")),
        ("data", List(nx_uint8)),
        ("tail", List(nx_uint8))
    ]
Beispiel #3
0
class BeatRecord(SerdepaPacket):
    _fields_ = [
        ("clockstamp", nx_uint32),
        ("nodes_in_beat", Length(nx_uint8, "nodes")),
        ("beats_in_cycle", Length(nx_uint8, "routers")),
        ("my_beat_id", nx_uint32),
        ("nodes", List(MyNodes)),
        ("routers", List(MyRouters))
    ]
Beispiel #4
0
class AnotherPacket(SerdepaPacket):
    _fields_ = [
        ("header", nx_uint8),
        ("timestamp", nx_uint32),
        ("origin", PointStruct),
        ("points", Length(nx_uint8, "data")),
        ("data", List(PointStruct))
    ]
Beispiel #5
0
 class TestPacket(SerdepaPacket):
     _fields_ = (('testfield', List(nx_int8)), )
Beispiel #6
0
 class TestPacket(SerdepaPacket):
     _fields_ = (('length_field', Length(nx_uint8, 'list_field')),
                 ('list_field', List(nx_uint8)))
Beispiel #7
0
class OneTailPacket(SerdepaPacket):
    _fields_ = [
        ("header", nx_uint8),
        ("timestamp", nx_uint32),
        ("tail", List(nx_uint8))
    ]