예제 #1
0
void MinefieldQueryPdu::marshal(DataStream& dataStream) const
{
    MinefieldFamilyPdu::marshal(dataStream); // Marshal information in superclass first
    _minefieldID.marshal(dataStream);
    _requestingEntityID.marshal(dataStream);
    dataStream << _requestID;
    dataStream << ( unsigned char )_requestedPerimeterPoints.size();
    dataStream << _pad2;
    dataStream << ( unsigned char )_sensorTypes.size();
    dataStream << _dataFilter;
    _requestedMineType.marshal(dataStream);

     for(size_t idx = 0; idx < _requestedPerimeterPoints.size(); idx++)
     {
        Point x = _requestedPerimeterPoints[idx];
        x.marshal(dataStream);
     }


     for(size_t idx = 0; idx < _sensorTypes.size(); idx++)
     {
        TwoByteChunk x = _sensorTypes[idx];
        x.marshal(dataStream);
     }

}
예제 #2
0
void MinefieldDataPdu::marshal(DataStream& dataStream) const
{
    MinefieldFamilyPdu::marshal(dataStream); // Marshal information in superclass first
    _minefieldID.marshal(dataStream);
    _requestingEntityID.marshal(dataStream);
    dataStream << _minefieldSequenceNumbeer;
    dataStream << _requestID;
    dataStream << _pduSequenceNumber;
    dataStream << _numberOfPdus;
    dataStream << ( unsigned char )_mineLocation.size();
    dataStream << ( unsigned char )_sensorTypes.size();
    dataStream << _pad2;
    dataStream << _dataFilter;
    _mineType.marshal(dataStream);

     for(size_t idx = 0; idx < _sensorTypes.size(); idx++)
     {
        TwoByteChunk x = _sensorTypes[idx];
        x.marshal(dataStream);
     }

    dataStream << _pad3;

     for(size_t idx = 0; idx < _mineLocation.size(); idx++)
     {
        Vector3Float x = _mineLocation[idx];
        x.marshal(dataStream);
     }

}
void GridAxisRecordRepresentation1::marshal(DataStream& dataStream) const
{
    GridAxisRecord::marshal(dataStream); // Marshal information in superclass first
    dataStream << _fieldScale;
    dataStream << _fieldOffset;
    dataStream << ( unsigned short )_dataValues.size();

     for(size_t idx = 0; idx < _dataValues.size(); idx++)
     {
        TwoByteChunk x = _dataValues[idx];
        x.marshal(dataStream);
     }

}