yamcs / yamcs-scos2k

0 stars 0 forks source link

Wrong handling of field PCDF_VALUE='P' : required bytes are missing in the encoded binary for a TC #4

Open WilfridGonzalez opened 1 year ago

WilfridGonzalez commented 1 year ago

The scos2k ICD provides the following meaning of value PCDFVALUE='P' ‘P’ - Other packet parameter whose value is automatically set by the SCOS-2000 command subsystem (e.g. packet length, source sequence counters)._

The current implementation in org/yamcs/scos2k/TcMibLoader.java silently ignores this case, and thus the bytes corresponding to the parameters are missing in the encoded binary, leaving no place for a dedicated CommandPostProcessor to compute the bytes. The bug was discovered when trying to encode CSSDS PUS TC with a secondary header for which the Source ID field was declared of PCDF_TYPE='P' in the database extract.