예제 #1
0
        public override int GetMarshalledSize()
        {
            int marshalSize = 0;

            marshalSize  = base.GetMarshalledSize();
            marshalSize += this._minefieldID.GetMarshalledSize();        // this._minefieldID
            marshalSize += this._requestingEntityID.GetMarshalledSize(); // this._requestingEntityID
            marshalSize += 2;                                            // this._minefieldSequenceNumbeer
            marshalSize += 1;                                            // this._requestID
            marshalSize += 1;                                            // this._pduSequenceNumber
            marshalSize += 1;                                            // this._numberOfPdus
            marshalSize += 1;                                            // this._numberOfMinesInThisPdu
            marshalSize += 1;                                            // this._numberOfSensorTypes
            marshalSize += 1;                                            // this._pad2
            marshalSize += 4;                                            // this._dataFilter
            marshalSize += this._mineType.GetMarshalledSize();           // this._mineType
            for (int idx = 0; idx < this._sensorTypes.Count; idx++)
            {
                TwoByteChunk listElement = (TwoByteChunk)this._sensorTypes[idx];
                marshalSize += listElement.GetMarshalledSize();
            }

            marshalSize += 1;  // this._pad3
            for (int idx = 0; idx < this._mineLocation.Count; idx++)
            {
                Vector3Float listElement = (Vector3Float)this._mineLocation[idx];
                marshalSize += listElement.GetMarshalledSize();
            }

            return(marshalSize);
        }
예제 #2
0
        public override int GetMarshalledSize()
        {
            int marshalSize = 0;

            marshalSize  = base.GetMarshalledSize();
            marshalSize += this._minefieldID.GetMarshalledSize();        // this._minefieldID
            marshalSize += this._requestingEntityID.GetMarshalledSize(); // this._requestingEntityID
            marshalSize += 1;                                            // this._requestID
            marshalSize += 1;                                            // this._numberOfPerimeterPoints
            marshalSize += 1;                                            // this._pad2
            marshalSize += 1;                                            // this._numberOfSensorTypes
            marshalSize += 4;                                            // this._dataFilter
            marshalSize += this._requestedMineType.GetMarshalledSize();  // this._requestedMineType
            for (int idx = 0; idx < this._requestedPerimeterPoints.Count; idx++)
            {
                Point listElement = (Point)this._requestedPerimeterPoints[idx];
                marshalSize += listElement.GetMarshalledSize();
            }

            for (int idx = 0; idx < this._sensorTypes.Count; idx++)
            {
                TwoByteChunk listElement = (TwoByteChunk)this._sensorTypes[idx];
                marshalSize += listElement.GetMarshalledSize();
            }

            return(marshalSize);
        }
        public override int GetMarshalledSize()
        {
            int marshalSize = 0;

            marshalSize  = base.GetMarshalledSize();
            marshalSize += 4;  // this._fieldScale
            marshalSize += 4;  // this._fieldOffset
            marshalSize += 2;  // this._numberOfValues
            for (int idx = 0; idx < this._dataValues.Count; idx++)
            {
                TwoByteChunk listElement = (TwoByteChunk)this._dataValues[idx];
                marshalSize += listElement.GetMarshalledSize();
            }

            return(marshalSize);
        }