get_packet_total_bytes¶
- ccsdspy.utils.get_packet_total_bytes(primary_header_bytes)[source]¶
Parse the number of bytes in a packet from the bytes associated with a packet’s primary header.
- Parameters:
- primary_header_bytesbytes
Bytes associated with the packet primary header, of length
ccsdspy.constants.PRIMARY_HEADER_NUM_BYTES
.
- Returns:
- num_bytesint
Total number of bytes in the packet, including the primary header.
- Raises:
- ValueError
The number of bytes in the supplied argument is too short. It must be of length
ccsdspy.constants.PRIMARY_HEADER_NUM_BYTES
.