You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi ~ My understanding per the standard is that packet_type should correlate to bit three and sec_header_flag should correlate to bit four. However, w/ your API it's as if you've got these two swapped around. Hopefully, I've misinterpreted something.
Here's how to replicate my findings. As you'll see below, when I set packet_type to 1 then bit 4 will flip and when I set secondary header flag to 1 then bit 3 will flip.
## TEST PACKET TYPE## Lets set packet_type to one, and leave everything else set to 0>>>hdr=SpacePacketHeader(packet_type=1,apid=0,seq_count=0,data_len=0,sec_header_flag=0, seq_flags=0)
# here we see that bit 4 is set>>>print(','.join([bin(i) foriinhdr.pack()]))
0b10000,0b0,0b0,0b0,0b0,0b0# here is what I think it should be0b1000,0b0,0b0,0b0,0b0,0b0## TEST SECONDARY HEADER FLAG## Lets set sec_header_flag to one and leave everything else set to 0>>>hdr=SpacePacketHeader(packet_type=0,apid=0,seq_count=0,data_len=0,sec_header_flag=1, seq_flags=0)
# here we see that bit 3 is set>>>print(','.join([bin(i) foriinhdr.pack()]))
0b1000,0b0,0b0,0b0,0b0,0b0# here is what I think it should be0b10000,0b0,0b0,0b0,0b0,0b0
I doubt my environment matters but to be thorough here is my complete setup on my laptop including package version, python version, and operating system information.
The output looks correct. The primary header fields are placed contiguously, with the first 3 bits (bit 0 to 2) being the version number, then bit 3 as packet type and bit 4 as secondary header flag.
The first byte is 0b00010000 for the first example , so bit 3 is one, which is correct.
@robamu
@JakobMeier
Hi ~ My understanding per the standard is that
packet_type
should correlate to bit three andsec_header_flag
should correlate to bit four. However, w/ your API it's as if you've got these two swapped around. Hopefully, I've misinterpreted something.Here's how to replicate my findings. As you'll see below, when I set packet_type to 1 then bit 4 will flip and when I set secondary header flag to 1 then bit 3 will flip.
I doubt my environment matters but to be thorough here is my complete setup on my laptop including package version, python version, and operating system information.
The text was updated successfully, but these errors were encountered: