pyrtma.core_defs.StructArray
- class StructArray(msg_struct, len)[source]
Bases:
FieldValidator
,Sequence
,Generic
[_S
]Validator for structure arrays
Validator for structure arrays
- Parameters:
msg_struct (Type[_S]) – Structure class
len (int) – Array length
Methods
Raises ValueError if the value is not present.
Generate formatted string for structure array
Validate structure array
Validate multiple structures
Validate a structure
- count(value) integer -- return number of occurrences of value
- index(value[, start[, stop]]) integer -- return first index of value.
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- validate_array(value)[source]
Validate structure array
- Parameters:
value (StructArray[_S]) – StructArray to validate
- Raises:
TypeError – Wrong type