Пример #1
0
void MinefieldQueryPdu::unmarshal(DataStream& dataStream)
{
    MinefieldFamilyPdu::unmarshal(dataStream); // unmarshal information in superclass first
    _minefieldID.unmarshal(dataStream);
    _requestingEntityID.unmarshal(dataStream);
    dataStream >> _requestID;
    dataStream >> _numberOfPerimeterPoints;
    dataStream >> _pad2;
    dataStream >> _numberOfSensorTypes;
    dataStream >> _dataFilter;
    _requestedMineType.unmarshal(dataStream);

     _requestedPerimeterPoints.clear();
     for(size_t idx = 0; idx < _numberOfPerimeterPoints; idx++)
     {
        Point x;
        x.unmarshal(dataStream);
        _requestedPerimeterPoints.push_back(x);
     }

     _sensorTypes.clear();
     for(size_t idx = 0; idx < _numberOfSensorTypes; idx++)
     {
        TwoByteChunk x;
        x.unmarshal(dataStream);
        _sensorTypes.push_back(x);
     }
}
Пример #2
0
void MinefieldDataPdu::unmarshal(DataStream& dataStream)
{
    MinefieldFamilyPdu::unmarshal(dataStream); // unmarshal information in superclass first
    _minefieldID.unmarshal(dataStream);
    _requestingEntityID.unmarshal(dataStream);
    dataStream >> _minefieldSequenceNumbeer;
    dataStream >> _requestID;
    dataStream >> _pduSequenceNumber;
    dataStream >> _numberOfPdus;
    dataStream >> _numberOfMinesInThisPdu;
    dataStream >> _numberOfSensorTypes;
    dataStream >> _pad2;
    dataStream >> _dataFilter;
    _mineType.unmarshal(dataStream);

     _sensorTypes.clear();
     for(size_t idx = 0; idx < _numberOfSensorTypes; idx++)
     {
        TwoByteChunk x;
        x.unmarshal(dataStream);
        _sensorTypes.push_back(x);
     }
    dataStream >> _pad3;

     _mineLocation.clear();
     for(size_t idx = 0; idx < _numberOfMinesInThisPdu; idx++)
     {
        Vector3Float x;
        x.unmarshal(dataStream);
        _mineLocation.push_back(x);
     }
}
void GridAxisRecordRepresentation1::unmarshal(DataStream& dataStream)
{
    GridAxisRecord::unmarshal(dataStream); // unmarshal information in superclass first
    dataStream >> _fieldScale;
    dataStream >> _fieldOffset;
    dataStream >> _numberOfValues;

     _dataValues.clear();
     for(size_t idx = 0; idx < _numberOfValues; idx++)
     {
        TwoByteChunk x;
        x.unmarshal(dataStream);
        _dataValues.push_back(x);
     }
}