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
voidSignalPdu::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.
The text was updated successfully, but these errors were encountered:
@crhowell3 I believe you are correct about it being a bug in SignalPDU. We saw the same problem in the Java implementation and fixed it. Note that I think this has been logged before against the CPP implementation, see this issue #10 for more info and how it was fixed in Java. A PR would be very welcome
I was going to mark as a duplicate of #10, but this one mentions the problem affects not only Signal Pdu but also Intercom Signal Pdu, so I will leave this as a separate issue.
There is an issue related to the PDUs that inherit from the
RadioCommunicationsFamilyPdu
(theIntercomSignalPdu
andSignalPdu
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.
The text was updated successfully, but these errors were encountered: