open-dis / open-dis-python

Python implementation of the IEEE-1278.1 Distributed Interactive Simulation (DIS) application protocol v7

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EmissionSystemBeamRecord.serialize incorrectly contains outputStream read calls instead of write

jason-mckinney opened this issue · comments

def serialize(self, outputStream):
outputStream.read_unsigned_byte(self.beamDataLength);
outputStream.read_unsigned_byte(self.beamIDNumber);
outputStream.read_unsigned_short(self.beamParameterIndex);
self.fundamentalParameterData.serialize(outputStream);
outputStream.read_unsigned_byte(self.beamFunction);
outputStream.read_unsigned_byte(self.numberOfTargetsInTrackJam);
outputStream.read_unsigned_byte(self.highDensityTrackJam);
outputStream.read_unsigned_byte(0); # 8 bit padding
outputStream.read_unsigned_int(self.jammingModeSequence);

EmissionSystemBeamRecord's serialize function implementation is incorrectly attempting to call outputStream.read_unsigned_byte and outputStream.read_unsigned_short, which do not exist, and should be writes.

The read calls need to be replaced with the correct write calls: outputStream.write_unsigned_byte and outputStream.write_unsigned_short