pnp-software / cordetfw-pus

PUS Extension of the CORDET Framework
Mozilla Public License 2.0
2 stars 1 forks source link

Byte Swapping #4

Open pasetti opened 5 years ago

pasetti commented 5 years ago

The CORDET Editor has a "byte swap flag" in the configuration of the Packet Code Generator. If the flag is set, then the packet accessor functions perform a byte swap. As long as data in a packet is accessed using the packet accessor functions, consistency is preserved. There are however two problems here:

(1) The packet accessor functions defined at framework level in CrFwPckt.h do not have a "byte swap flag"

(2) The function CrPsHkConfigUpdateRep which updates the data part of a HK Report calls function getDpValueEx to perform a memcpy from the data pool to the packet and therefore it does not take account of byte ordering.

pasetti commented 5 years ago

This must be treated as a framework configuration issue because all the functions which might have to perform a byte swap are user-defined. I must therefore add the following constraints: