In both classes: StartResumePdu and StopFreezePdu for DIS7, are processing twice the fields OriginatingEntityID and ReceivingEntityID.
The correct implementation for these methods should be something like this:
void StopFreezePdu::marshal(DataStream& dataStream) const
{
SimulationManagementFamilyPdu::marshal(dataStream); // Marshal information in superclass first
_realWorldTime.marshal(dataStream);
dataStream << _reason;
dataStream << _frozenBehavior;
dataStream << _padding1;
dataStream << _requestID;
}
void StopFreezePdu::unmarshal(DataStream& dataStream)
{
SimulationManagementFamilyPdu::unmarshal(dataStream); // unmarshal information in superclass first
_realWorldTime.unmarshal(dataStream);
dataStream >> _reason;
dataStream >> _frozenBehavior;
dataStream >> _padding1;
dataStream >> _requestID;
}
Also, these attributes:
/** Identifier for originating entity(or simulation) */
EntityID _originatingID;
/** Identifier for the receiving entity(or simulation) */
EntityID _receivingID;
Are not needed as they are already found in the parent class SimulationManagementFamilyPdu. Removing these duplicated attributes affect several other methods of both classes.
Hi.
The following methods:
In both classes: StartResumePdu and StopFreezePdu for DIS7, are processing twice the fields OriginatingEntityID and ReceivingEntityID.
The correct implementation for these methods should be something like this:
Also, these attributes:
Are not needed as they are already found in the parent class SimulationManagementFamilyPdu. Removing these duplicated attributes affect several other methods of both classes.