FixedLength¶
- class ccsdspy.FixedLength(fields)[source]¶
Bases:
_BasePacket
Define a fixed length packet to decode binary data.
Fixed length packets correspond to packets that are the same length and layout every time. A common example of this is housekeeping or status messages.
- Parameters:
- fieldslist of
PacketField
orPacketArray
Layout of packet fields contained in the definition.
- fieldslist of
- Raises:
- ValueError
one or more of the arguments are invalid
Methods Summary
load
(file[, include_primary_header])Decode a file-like object containing a sequence of these packets.
Methods Documentation
- load(file, include_primary_header=False)[source]¶
Decode a file-like object containing a sequence of these packets.
- Parameters:
- filestr
Path to file on the local file system, or file-like object
- include_primary_headerbool
If True, provides the primary header in the output
- Returns:
- field_arraysdict, string to NumPy array
dictionary mapping field names to NumPy arrays, with key order matching the order of fields in the packet.
- Warns:
- UserWarning
If the ccsds sequence count is not in order
- UserWarning
If the ccsds sequence count is missing packets
- UserWarning
If there are more than one APID