test_message_def Python Documentation

Functions

unpack_message(buf)

Unpack buffer into message instance based on header UID.

Parameters:

buf (bytes-like) – an array to be unpacked.

Returns:

a message instance.

Raises:
  • UnknownMessage – UID from buffer header is unknown.

  • Various – See individual unpack() methods.

Exceptions

exception UnpackError

General unpack error.

exception UnknownMessage

Bases: UnpackError

Unknown UID in buffer header.

exception IncorrectBufferSize

Bases: UnpackError

Buffer has incorrect length for message.

exception InvalidUid

Bases: UnpackError

Buffer header has incorrect UID for message.

exception InvalidLen

Bases: UnpackError

Buffer header has incorrect length for message.

Enums

The metaclass for enum classes includes implementations for __contains__(), __iter__(), __getitem__(), and __len__() which allows usage such as:

# __contains__
if EnumClass.Value0 in EnumClass:
  pass
elif 'Value0' in EnumClass:
  pass
elif 0 in EnumClass:
  pass

# __iter__
for value in EnumClass:
  pass

# __getitem__
e = EnumClass['Value0']

# __len__
if len(EnumClass) > 100:
  pass

SsMsgType

class SsMsgType

Bases: ctypes.c_int8

Message types.

Class Attributes:

Bitfield2BytesTest = 0

Retrieves an instance of SsMsgType initialized to value Bitfield2BytesTest.

Bitfield4BytesTest = 1

Retrieves an instance of SsMsgType initialized to value Bitfield4BytesTest.

Enum1BytesTest = 2

Retrieves an instance of SsMsgType initialized to value Enum1BytesTest.

Enum2BytesTest = 3

Retrieves an instance of SsMsgType initialized to value Enum2BytesTest.

PrimitiveTest = 4

Retrieves an instance of SsMsgType initialized to value PrimitiveTest.

ArrayTest = 5

This is a message description.

Retrieves an instance of SsMsgType initialized to value ArrayTest.

Unknown = 6

Unknown message type.

Retrieves an instance of SsMsgType initialized to value Unknown.

Instance Attributes:

property name: str

String representation of value. If the integer is not a valid value returns ‘InvalidEnumValue’.

Instance Methods:

is_valid()

Check if value is a valid enum value.

Returns:

a boolean representing whether integer is a valid enum value.

Return type:

bool

SsStatus

class SsStatus

Bases: ctypes.c_int8

Stuff Sack status code.

Class Attributes:

Success = 0

Success.

Retrieves an instance of SsStatus initialized to value Success.

InvalidUid = 1

Invalid message UID.

Retrieves an instance of SsStatus initialized to value InvalidUid.

InvalidLen = 2

Invalid message length.

Retrieves an instance of SsStatus initialized to value InvalidLen.

Instance Attributes:

property name: str

String representation of value. If the integer is not a valid value returns ‘InvalidEnumValue’.

Instance Methods:

is_valid()

Check if value is a valid enum value.

Returns:

a boolean representing whether integer is a valid enum value.

Return type:

bool

Enum1Bytes

class Enum1Bytes

Bases: ctypes.c_int8

Class Attributes:

Value0 = 0

Retrieves an instance of Enum1Bytes initialized to value Value0.

Value1 = 1

Retrieves an instance of Enum1Bytes initialized to value Value1.

Value2 = 2

Retrieves an instance of Enum1Bytes initialized to value Value2.

Value3 = 3

Retrieves an instance of Enum1Bytes initialized to value Value3.

Value4 = 4

Retrieves an instance of Enum1Bytes initialized to value Value4.

Value5 = 5

Retrieves an instance of Enum1Bytes initialized to value Value5.

Value6 = 6

Retrieves an instance of Enum1Bytes initialized to value Value6.

Value7 = 7

Retrieves an instance of Enum1Bytes initialized to value Value7.

Value8 = 8

Retrieves an instance of Enum1Bytes initialized to value Value8.

Value9 = 9

Retrieves an instance of Enum1Bytes initialized to value Value9.

Value10 = 10

Retrieves an instance of Enum1Bytes initialized to value Value10.

Value11 = 11

Retrieves an instance of Enum1Bytes initialized to value Value11.

Value12 = 12

Retrieves an instance of Enum1Bytes initialized to value Value12.

Value13 = 13

Retrieves an instance of Enum1Bytes initialized to value Value13.

Value14 = 14

Retrieves an instance of Enum1Bytes initialized to value Value14.

Value15 = 15

Retrieves an instance of Enum1Bytes initialized to value Value15.

Value16 = 16

Retrieves an instance of Enum1Bytes initialized to value Value16.

Value17 = 17

Retrieves an instance of Enum1Bytes initialized to value Value17.

Value18 = 18

Retrieves an instance of Enum1Bytes initialized to value Value18.

Value19 = 19

Retrieves an instance of Enum1Bytes initialized to value Value19.

Value20 = 20

Retrieves an instance of Enum1Bytes initialized to value Value20.

Value21 = 21

Retrieves an instance of Enum1Bytes initialized to value Value21.

Value22 = 22

Retrieves an instance of Enum1Bytes initialized to value Value22.

Value23 = 23

Retrieves an instance of Enum1Bytes initialized to value Value23.

Value24 = 24

Retrieves an instance of Enum1Bytes initialized to value Value24.

Value25 = 25

Retrieves an instance of Enum1Bytes initialized to value Value25.

Value26 = 26

Retrieves an instance of Enum1Bytes initialized to value Value26.

Value27 = 27

Retrieves an instance of Enum1Bytes initialized to value Value27.

Value28 = 28

Retrieves an instance of Enum1Bytes initialized to value Value28.

Value29 = 29

Retrieves an instance of Enum1Bytes initialized to value Value29.

Value30 = 30

Retrieves an instance of Enum1Bytes initialized to value Value30.

Value31 = 31

Retrieves an instance of Enum1Bytes initialized to value Value31.

Value32 = 32

Retrieves an instance of Enum1Bytes initialized to value Value32.

Value33 = 33

Retrieves an instance of Enum1Bytes initialized to value Value33.

Value34 = 34

Retrieves an instance of Enum1Bytes initialized to value Value34.

Value35 = 35

Retrieves an instance of Enum1Bytes initialized to value Value35.

Value36 = 36

Retrieves an instance of Enum1Bytes initialized to value Value36.

Value37 = 37

Retrieves an instance of Enum1Bytes initialized to value Value37.

Value38 = 38

Retrieves an instance of Enum1Bytes initialized to value Value38.

Value39 = 39

Retrieves an instance of Enum1Bytes initialized to value Value39.

Value40 = 40

Retrieves an instance of Enum1Bytes initialized to value Value40.

Value41 = 41

Retrieves an instance of Enum1Bytes initialized to value Value41.

Value42 = 42

Retrieves an instance of Enum1Bytes initialized to value Value42.

Value43 = 43

Retrieves an instance of Enum1Bytes initialized to value Value43.

Value44 = 44

Retrieves an instance of Enum1Bytes initialized to value Value44.

Value45 = 45

Retrieves an instance of Enum1Bytes initialized to value Value45.

Value46 = 46

Retrieves an instance of Enum1Bytes initialized to value Value46.

Value47 = 47

Retrieves an instance of Enum1Bytes initialized to value Value47.

Value48 = 48

Retrieves an instance of Enum1Bytes initialized to value Value48.

Value49 = 49

Retrieves an instance of Enum1Bytes initialized to value Value49.

Value50 = 50

Retrieves an instance of Enum1Bytes initialized to value Value50.

Value51 = 51

Retrieves an instance of Enum1Bytes initialized to value Value51.

Value52 = 52

Retrieves an instance of Enum1Bytes initialized to value Value52.

Value53 = 53

Retrieves an instance of Enum1Bytes initialized to value Value53.

Value54 = 54

Retrieves an instance of Enum1Bytes initialized to value Value54.

Value55 = 55

Retrieves an instance of Enum1Bytes initialized to value Value55.

Value56 = 56

Retrieves an instance of Enum1Bytes initialized to value Value56.

Value57 = 57

Retrieves an instance of Enum1Bytes initialized to value Value57.

Value58 = 58

Retrieves an instance of Enum1Bytes initialized to value Value58.

Value59 = 59

Retrieves an instance of Enum1Bytes initialized to value Value59.

Value60 = 60

Retrieves an instance of Enum1Bytes initialized to value Value60.

Value61 = 61

Retrieves an instance of Enum1Bytes initialized to value Value61.

Value62 = 62

Retrieves an instance of Enum1Bytes initialized to value Value62.

Value63 = 63

Retrieves an instance of Enum1Bytes initialized to value Value63.

Value64 = 64

Retrieves an instance of Enum1Bytes initialized to value Value64.

Value65 = 65

Retrieves an instance of Enum1Bytes initialized to value Value65.

Value66 = 66

Retrieves an instance of Enum1Bytes initialized to value Value66.

Value67 = 67

Retrieves an instance of Enum1Bytes initialized to value Value67.

Value68 = 68

Retrieves an instance of Enum1Bytes initialized to value Value68.

Value69 = 69

Retrieves an instance of Enum1Bytes initialized to value Value69.

Value70 = 70

Retrieves an instance of Enum1Bytes initialized to value Value70.

Value71 = 71

Retrieves an instance of Enum1Bytes initialized to value Value71.

Value72 = 72

Retrieves an instance of Enum1Bytes initialized to value Value72.

Value73 = 73

Retrieves an instance of Enum1Bytes initialized to value Value73.

Value74 = 74

Retrieves an instance of Enum1Bytes initialized to value Value74.

Value75 = 75

Retrieves an instance of Enum1Bytes initialized to value Value75.

Value76 = 76

Retrieves an instance of Enum1Bytes initialized to value Value76.

Value77 = 77

Retrieves an instance of Enum1Bytes initialized to value Value77.

Value78 = 78

Retrieves an instance of Enum1Bytes initialized to value Value78.

Value79 = 79

Retrieves an instance of Enum1Bytes initialized to value Value79.

Value80 = 80

Retrieves an instance of Enum1Bytes initialized to value Value80.

Value81 = 81

Retrieves an instance of Enum1Bytes initialized to value Value81.

Value82 = 82

Retrieves an instance of Enum1Bytes initialized to value Value82.

Value83 = 83

Retrieves an instance of Enum1Bytes initialized to value Value83.

Value84 = 84

Retrieves an instance of Enum1Bytes initialized to value Value84.

Value85 = 85

Retrieves an instance of Enum1Bytes initialized to value Value85.

Value86 = 86

Retrieves an instance of Enum1Bytes initialized to value Value86.

Value87 = 87

Retrieves an instance of Enum1Bytes initialized to value Value87.

Value88 = 88

Retrieves an instance of Enum1Bytes initialized to value Value88.

Value89 = 89

Retrieves an instance of Enum1Bytes initialized to value Value89.

Value90 = 90

Retrieves an instance of Enum1Bytes initialized to value Value90.

Value91 = 91

Retrieves an instance of Enum1Bytes initialized to value Value91.

Value92 = 92

Retrieves an instance of Enum1Bytes initialized to value Value92.

Value93 = 93

Retrieves an instance of Enum1Bytes initialized to value Value93.

Value94 = 94

Retrieves an instance of Enum1Bytes initialized to value Value94.

Value95 = 95

Retrieves an instance of Enum1Bytes initialized to value Value95.

Value96 = 96

Retrieves an instance of Enum1Bytes initialized to value Value96.

Value97 = 97

Retrieves an instance of Enum1Bytes initialized to value Value97.

Value98 = 98

Retrieves an instance of Enum1Bytes initialized to value Value98.

Value99 = 99

Retrieves an instance of Enum1Bytes initialized to value Value99.

Value100 = 100

Retrieves an instance of Enum1Bytes initialized to value Value100.

Value101 = 101

Retrieves an instance of Enum1Bytes initialized to value Value101.

Value102 = 102

Retrieves an instance of Enum1Bytes initialized to value Value102.

Value103 = 103

Retrieves an instance of Enum1Bytes initialized to value Value103.

Value104 = 104

Retrieves an instance of Enum1Bytes initialized to value Value104.

Value105 = 105

Retrieves an instance of Enum1Bytes initialized to value Value105.

Value106 = 106

Retrieves an instance of Enum1Bytes initialized to value Value106.

Value107 = 107

Retrieves an instance of Enum1Bytes initialized to value Value107.

Value108 = 108

Retrieves an instance of Enum1Bytes initialized to value Value108.

Value109 = 109

Retrieves an instance of Enum1Bytes initialized to value Value109.

Value110 = 110

Retrieves an instance of Enum1Bytes initialized to value Value110.

Value111 = 111

Retrieves an instance of Enum1Bytes initialized to value Value111.

Value112 = 112

Retrieves an instance of Enum1Bytes initialized to value Value112.

Value113 = 113

Retrieves an instance of Enum1Bytes initialized to value Value113.

Value114 = 114

Retrieves an instance of Enum1Bytes initialized to value Value114.

Value115 = 115

Retrieves an instance of Enum1Bytes initialized to value Value115.

Value116 = 116

Retrieves an instance of Enum1Bytes initialized to value Value116.

Value117 = 117

Retrieves an instance of Enum1Bytes initialized to value Value117.

Value118 = 118

Retrieves an instance of Enum1Bytes initialized to value Value118.

Value119 = 119

Retrieves an instance of Enum1Bytes initialized to value Value119.

Value120 = 120

Retrieves an instance of Enum1Bytes initialized to value Value120.

Value121 = 121

Retrieves an instance of Enum1Bytes initialized to value Value121.

Value122 = 122

Retrieves an instance of Enum1Bytes initialized to value Value122.

Value123 = 123

Retrieves an instance of Enum1Bytes initialized to value Value123.

Value124 = 124

Retrieves an instance of Enum1Bytes initialized to value Value124.

Value125 = 125

Retrieves an instance of Enum1Bytes initialized to value Value125.

Value126 = 126

Retrieves an instance of Enum1Bytes initialized to value Value126.

Instance Attributes:

property name: str

String representation of value. If the integer is not a valid value returns ‘InvalidEnumValue’.

Instance Methods:

is_valid()

Check if value is a valid enum value.

Returns:

a boolean representing whether integer is a valid enum value.

Return type:

bool

Enum2Bytes

class Enum2Bytes

Bases: ctypes.c_int16

This is an enum description.

Class Attributes:

Value0 = 0

This is a enum value description

Retrieves an instance of Enum2Bytes initialized to value Value0.

Value1 = 1

Retrieves an instance of Enum2Bytes initialized to value Value1.

Value2 = 2

Retrieves an instance of Enum2Bytes initialized to value Value2.

Value3 = 3

Retrieves an instance of Enum2Bytes initialized to value Value3.

Value4 = 4

Retrieves an instance of Enum2Bytes initialized to value Value4.

Value5 = 5

Retrieves an instance of Enum2Bytes initialized to value Value5.

Value6 = 6

Retrieves an instance of Enum2Bytes initialized to value Value6.

Value7 = 7

Retrieves an instance of Enum2Bytes initialized to value Value7.

Value8 = 8

Retrieves an instance of Enum2Bytes initialized to value Value8.

Value9 = 9

Retrieves an instance of Enum2Bytes initialized to value Value9.

Value10 = 10

Retrieves an instance of Enum2Bytes initialized to value Value10.

Value11 = 11

Retrieves an instance of Enum2Bytes initialized to value Value11.

Value12 = 12

Retrieves an instance of Enum2Bytes initialized to value Value12.

Value13 = 13

Retrieves an instance of Enum2Bytes initialized to value Value13.

Value14 = 14

Retrieves an instance of Enum2Bytes initialized to value Value14.

Value15 = 15

Retrieves an instance of Enum2Bytes initialized to value Value15.

Value16 = 16

Retrieves an instance of Enum2Bytes initialized to value Value16.

Value17 = 17

Retrieves an instance of Enum2Bytes initialized to value Value17.

Value18 = 18

Retrieves an instance of Enum2Bytes initialized to value Value18.

Value19 = 19

Retrieves an instance of Enum2Bytes initialized to value Value19.

Value20 = 20

Retrieves an instance of Enum2Bytes initialized to value Value20.

Value21 = 21

Retrieves an instance of Enum2Bytes initialized to value Value21.

Value22 = 22

Retrieves an instance of Enum2Bytes initialized to value Value22.

Value23 = 23

Retrieves an instance of Enum2Bytes initialized to value Value23.

Value24 = 24

Retrieves an instance of Enum2Bytes initialized to value Value24.

Value25 = 25

Retrieves an instance of Enum2Bytes initialized to value Value25.

Value26 = 26

Retrieves an instance of Enum2Bytes initialized to value Value26.

Value27 = 27

Retrieves an instance of Enum2Bytes initialized to value Value27.

Value28 = 28

Retrieves an instance of Enum2Bytes initialized to value Value28.

Value29 = 29

Retrieves an instance of Enum2Bytes initialized to value Value29.

Value30 = 30

Retrieves an instance of Enum2Bytes initialized to value Value30.

Value31 = 31

Retrieves an instance of Enum2Bytes initialized to value Value31.

Value32 = 32

Retrieves an instance of Enum2Bytes initialized to value Value32.

Value33 = 33

Retrieves an instance of Enum2Bytes initialized to value Value33.

Value34 = 34

Retrieves an instance of Enum2Bytes initialized to value Value34.

Value35 = 35

Retrieves an instance of Enum2Bytes initialized to value Value35.

Value36 = 36

Retrieves an instance of Enum2Bytes initialized to value Value36.

Value37 = 37

Retrieves an instance of Enum2Bytes initialized to value Value37.

Value38 = 38

Retrieves an instance of Enum2Bytes initialized to value Value38.

Value39 = 39

Retrieves an instance of Enum2Bytes initialized to value Value39.

Value40 = 40

Retrieves an instance of Enum2Bytes initialized to value Value40.

Value41 = 41

Retrieves an instance of Enum2Bytes initialized to value Value41.

Value42 = 42

Retrieves an instance of Enum2Bytes initialized to value Value42.

Value43 = 43

Retrieves an instance of Enum2Bytes initialized to value Value43.

Value44 = 44

Retrieves an instance of Enum2Bytes initialized to value Value44.

Value45 = 45

Retrieves an instance of Enum2Bytes initialized to value Value45.

Value46 = 46

Retrieves an instance of Enum2Bytes initialized to value Value46.

Value47 = 47

Retrieves an instance of Enum2Bytes initialized to value Value47.

Value48 = 48

Retrieves an instance of Enum2Bytes initialized to value Value48.

Value49 = 49

Retrieves an instance of Enum2Bytes initialized to value Value49.

Value50 = 50

Retrieves an instance of Enum2Bytes initialized to value Value50.

Value51 = 51

Retrieves an instance of Enum2Bytes initialized to value Value51.

Value52 = 52

Retrieves an instance of Enum2Bytes initialized to value Value52.

Value53 = 53

Retrieves an instance of Enum2Bytes initialized to value Value53.

Value54 = 54

Retrieves an instance of Enum2Bytes initialized to value Value54.

Value55 = 55

Retrieves an instance of Enum2Bytes initialized to value Value55.

Value56 = 56

Retrieves an instance of Enum2Bytes initialized to value Value56.

Value57 = 57

Retrieves an instance of Enum2Bytes initialized to value Value57.

Value58 = 58

Retrieves an instance of Enum2Bytes initialized to value Value58.

Value59 = 59

Retrieves an instance of Enum2Bytes initialized to value Value59.

Value60 = 60

Retrieves an instance of Enum2Bytes initialized to value Value60.

Value61 = 61

Retrieves an instance of Enum2Bytes initialized to value Value61.

Value62 = 62

Retrieves an instance of Enum2Bytes initialized to value Value62.

Value63 = 63

Retrieves an instance of Enum2Bytes initialized to value Value63.

Value64 = 64

Retrieves an instance of Enum2Bytes initialized to value Value64.

Value65 = 65

Retrieves an instance of Enum2Bytes initialized to value Value65.

Value66 = 66

Retrieves an instance of Enum2Bytes initialized to value Value66.

Value67 = 67

Retrieves an instance of Enum2Bytes initialized to value Value67.

Value68 = 68

Retrieves an instance of Enum2Bytes initialized to value Value68.

Value69 = 69

Retrieves an instance of Enum2Bytes initialized to value Value69.

Value70 = 70

Retrieves an instance of Enum2Bytes initialized to value Value70.

Value71 = 71

Retrieves an instance of Enum2Bytes initialized to value Value71.

Value72 = 72

Retrieves an instance of Enum2Bytes initialized to value Value72.

Value73 = 73

Retrieves an instance of Enum2Bytes initialized to value Value73.

Value74 = 74

Retrieves an instance of Enum2Bytes initialized to value Value74.

Value75 = 75

Retrieves an instance of Enum2Bytes initialized to value Value75.

Value76 = 76

Retrieves an instance of Enum2Bytes initialized to value Value76.

Value77 = 77

Retrieves an instance of Enum2Bytes initialized to value Value77.

Value78 = 78

Retrieves an instance of Enum2Bytes initialized to value Value78.

Value79 = 79

Retrieves an instance of Enum2Bytes initialized to value Value79.

Value80 = 80

Retrieves an instance of Enum2Bytes initialized to value Value80.

Value81 = 81

Retrieves an instance of Enum2Bytes initialized to value Value81.

Value82 = 82

Retrieves an instance of Enum2Bytes initialized to value Value82.

Value83 = 83

Retrieves an instance of Enum2Bytes initialized to value Value83.

Value84 = 84

Retrieves an instance of Enum2Bytes initialized to value Value84.

Value85 = 85

Retrieves an instance of Enum2Bytes initialized to value Value85.

Value86 = 86

Retrieves an instance of Enum2Bytes initialized to value Value86.

Value87 = 87

Retrieves an instance of Enum2Bytes initialized to value Value87.

Value88 = 88

Retrieves an instance of Enum2Bytes initialized to value Value88.

Value89 = 89

Retrieves an instance of Enum2Bytes initialized to value Value89.

Value90 = 90

Retrieves an instance of Enum2Bytes initialized to value Value90.

Value91 = 91

Retrieves an instance of Enum2Bytes initialized to value Value91.

Value92 = 92

Retrieves an instance of Enum2Bytes initialized to value Value92.

Value93 = 93

Retrieves an instance of Enum2Bytes initialized to value Value93.

Value94 = 94

Retrieves an instance of Enum2Bytes initialized to value Value94.

Value95 = 95

Retrieves an instance of Enum2Bytes initialized to value Value95.

Value96 = 96

Retrieves an instance of Enum2Bytes initialized to value Value96.

Value97 = 97

Retrieves an instance of Enum2Bytes initialized to value Value97.

Value98 = 98

Retrieves an instance of Enum2Bytes initialized to value Value98.

Value99 = 99

Retrieves an instance of Enum2Bytes initialized to value Value99.

Value100 = 100

Retrieves an instance of Enum2Bytes initialized to value Value100.

Value101 = 101

Retrieves an instance of Enum2Bytes initialized to value Value101.

Value102 = 102

Retrieves an instance of Enum2Bytes initialized to value Value102.

Value103 = 103

Retrieves an instance of Enum2Bytes initialized to value Value103.

Value104 = 104

Retrieves an instance of Enum2Bytes initialized to value Value104.

Value105 = 105

Retrieves an instance of Enum2Bytes initialized to value Value105.

Value106 = 106

Retrieves an instance of Enum2Bytes initialized to value Value106.

Value107 = 107

Retrieves an instance of Enum2Bytes initialized to value Value107.

Value108 = 108

Retrieves an instance of Enum2Bytes initialized to value Value108.

Value109 = 109

Retrieves an instance of Enum2Bytes initialized to value Value109.

Value110 = 110

Retrieves an instance of Enum2Bytes initialized to value Value110.

Value111 = 111

Retrieves an instance of Enum2Bytes initialized to value Value111.

Value112 = 112

Retrieves an instance of Enum2Bytes initialized to value Value112.

Value113 = 113

Retrieves an instance of Enum2Bytes initialized to value Value113.

Value114 = 114

Retrieves an instance of Enum2Bytes initialized to value Value114.

Value115 = 115

Retrieves an instance of Enum2Bytes initialized to value Value115.

Value116 = 116

Retrieves an instance of Enum2Bytes initialized to value Value116.

Value117 = 117

Retrieves an instance of Enum2Bytes initialized to value Value117.

Value118 = 118

Retrieves an instance of Enum2Bytes initialized to value Value118.

Value119 = 119

Retrieves an instance of Enum2Bytes initialized to value Value119.

Value120 = 120

Retrieves an instance of Enum2Bytes initialized to value Value120.

Value121 = 121

Retrieves an instance of Enum2Bytes initialized to value Value121.

Value122 = 122

Retrieves an instance of Enum2Bytes initialized to value Value122.

Value123 = 123

Retrieves an instance of Enum2Bytes initialized to value Value123.

Value124 = 124

Retrieves an instance of Enum2Bytes initialized to value Value124.

Value125 = 125

Retrieves an instance of Enum2Bytes initialized to value Value125.

Value126 = 126

Retrieves an instance of Enum2Bytes initialized to value Value126.

Value127 = 127

Retrieves an instance of Enum2Bytes initialized to value Value127.

Instance Attributes:

property name: str

String representation of value. If the integer is not a valid value returns ‘InvalidEnumValue’.

Instance Methods:

is_valid()

Check if value is a valid enum value.

Returns:

a boolean representing whether integer is a valid enum value.

Return type:

bool

Bitfields

Bitfield2Bytes

class Bitfield2Bytes

Bases: ctypes.Structure

Fields:

field0: ctypes.c_uint16

Bits: 3

field1: ctypes.c_uint16

Bits: 5

field2: ctypes.c_uint16

Bits: 8

Bitfield4Bytes

class Bitfield4Bytes

Bases: ctypes.Structure

This is a bitfield description.

Fields:

field0: ctypes.c_uint32

This is a bitfield field description.

Bits: 3

field1: ctypes.c_uint32

Bits: 5

field2: ctypes.c_uint32

Bits: 9

Structures

SsHeader

class SsHeader

Bases: ctypes.Structure

Message header.

Fields:

uid: ctypes.c_uint32

Message unique id.

len: ctypes.c_uint16

Message length.

ArrayElem

class ArrayElem

Bases: ctypes.Structure

This is a struct description.

Fields:

field0: ctypes.c_bool

This is a struct field description.

field1: ctypes.c_uint16

Messages

Bitfield2BytesTest

class Bitfield2BytesTest

Bases: ctypes.Structure

Fields:

ss_header: SsHeader

Message header.

bitfield: Bitfield2Bytes

Class Attributes:

packed_size = 8

Class Methods:

classmethod get_buffer()

Get buffer of correct size for message.

Returns:

an array of length packed_size.

Return type:

ctypes.c_uint8

classmethod unpack(buf)

Unpack array into message.

Parameters:

buf (bytes-like) – array of packed_size to be unpacked.

Returns:

the unpacked message.

Return type:

Bitfield2BytesTest

Raises:

Instance Methods:

pack()

Pack message into array.

Returns:

a packed array of length packed_size.

Return type:

ctypes.c_uint8

Bitfield4BytesTest

class Bitfield4BytesTest

Bases: ctypes.Structure

Fields:

ss_header: SsHeader

Message header.

bitfield: Bitfield4Bytes

Class Attributes:

packed_size = 10

Class Methods:

classmethod get_buffer()

Get buffer of correct size for message.

Returns:

an array of length packed_size.

Return type:

ctypes.c_uint8

classmethod unpack(buf)

Unpack array into message.

Parameters:

buf (bytes-like) – array of packed_size to be unpacked.

Returns:

the unpacked message.

Return type:

Bitfield4BytesTest

Raises:

Instance Methods:

pack()

Pack message into array.

Returns:

a packed array of length packed_size.

Return type:

ctypes.c_uint8

Enum1BytesTest

class Enum1BytesTest

Bases: ctypes.Structure

Fields:

ss_header: SsHeader

Message header.

enumeration: Enum1Bytes

Class Attributes:

packed_size = 7

Class Methods:

classmethod get_buffer()

Get buffer of correct size for message.

Returns:

an array of length packed_size.

Return type:

ctypes.c_uint8

classmethod unpack(buf)

Unpack array into message.

Parameters:

buf (bytes-like) – array of packed_size to be unpacked.

Returns:

the unpacked message.

Return type:

Enum1BytesTest

Raises:

Instance Methods:

pack()

Pack message into array.

Returns:

a packed array of length packed_size.

Return type:

ctypes.c_uint8

Enum2BytesTest

class Enum2BytesTest

Bases: ctypes.Structure

Fields:

ss_header: SsHeader

Message header.

enumeration: Enum2Bytes

Class Attributes:

packed_size = 8

Class Methods:

classmethod get_buffer()

Get buffer of correct size for message.

Returns:

an array of length packed_size.

Return type:

ctypes.c_uint8

classmethod unpack(buf)

Unpack array into message.

Parameters:

buf (bytes-like) – array of packed_size to be unpacked.

Returns:

the unpacked message.

Return type:

Enum2BytesTest

Raises:

Instance Methods:

pack()

Pack message into array.

Returns:

a packed array of length packed_size.

Return type:

ctypes.c_uint8

PrimitiveTest

class PrimitiveTest

Bases: ctypes.Structure

Fields:

Class Attributes:

packed_size = 49

Class Methods:

classmethod get_buffer()

Get buffer of correct size for message.

Returns:

an array of length packed_size.

Return type:

ctypes.c_uint8

classmethod unpack(buf)

Unpack array into message.

Parameters:

buf (bytes-like) – array of packed_size to be unpacked.

Returns:

the unpacked message.

Return type:

PrimitiveTest

Raises:

Instance Methods:

pack()

Pack message into array.

Returns:

a packed array of length packed_size.

Return type:

ctypes.c_uint8

ArrayTest

class ArrayTest

Bases: ctypes.Structure

This is a message description.

Fields:

ss_header: SsHeader

Message header.

array_1d: ArrayElem[3]

This is a message field description.

array_2d: ArrayElem[2][3]
array_3d: ArrayElem[1][2][3]

Class Attributes:

packed_size = 51

Class Methods:

classmethod get_buffer()

Get buffer of correct size for message.

Returns:

an array of length packed_size.

Return type:

ctypes.c_uint8

classmethod unpack(buf)

Unpack array into message.

Parameters:

buf (bytes-like) – array of packed_size to be unpacked.

Returns:

the unpacked message.

Return type:

ArrayTest

Raises:

Instance Methods:

pack()

Pack message into array.

Returns:

a packed array of length packed_size.

Return type:

ctypes.c_uint8