-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Labels
Description
void SignalPdu::marshal(DataStream &dataStream) const {
RadioCommunicationsFamilyPdu::marshal(
dataStream); // Marshal information in superclass first
dataStream << _encodingScheme;
dataStream << _tdlType;
dataStream << _sampleRate;
dataStream << (short)_data.size(); // ISSUE
dataStream << _samples;
for (auto byte : _data) {
dataStream << byte;
}
}There is an issue related to the PDUs that inherit from the RadioCommunicationsFamilyPdu (the IntercomSignalPdu and SignalPdu classes) where the size of the data being marshaled into the datastream is incorrect and not compliant with the DIS Standard. The data length should be the size of the data in bits (as per the SISO-STD-001-2015 standard), whereas the size being marshaled in currently is in bytes. I will open a PR to fix this issue.
It is possible that this issue is present elsewhere in the code, so I will do a once-over before requesting merge.