I noticed when doing some testing that when I created a PacketArray and then printed it that the string representation said PacketField instead of PacketArray. I don't think this was intended, but feel free to close the issue if it was.
import ccsdspy
from ccsdspy import PacketField, PacketArray
pkt = [
PacketField(
name='SHCOARSE',
data_type='uint',
bit_length=32
),
PacketArray(
name="data",
data_type="uint",
bit_length=16,
array_shape="expand", # makes the data field expand
),
PacketField(
name="checksum",
data_type="uint",
bit_length=16
),
]
print(pkt[1])
the output is:
PacketField(name='data', data_type='uint', bit_length=16, bit_offset=None, byte_order='big')
instead of PacketArray(name='data', data_type='uint', bit_length=16, bit_offset=None, byte_order='big')
Issue
I noticed when doing some testing that when I created a
PacketArray
and then printed it that the string representation saidPacketField
instead ofPacketArray
. I don't think this was intended, but feel free to close the issue if it was.Relevant area of code:
https://github.com/CCSDSPy/ccsdspy/blob/0d19cd9a6a146bf608b2c62e8c20e2b2bdc731bc/ccsdspy/packet_fields.py#L74
Simple example:
the output is:
PacketField(name='data', data_type='uint', bit_length=16, bit_offset=None, byte_order='big')
instead ofPacketArray(name='data', data_type='uint', bit_length=16, bit_offset=None, byte_order='big')