public override void Unmarshal(DataInputStream dis)
        {
            base.Unmarshal(dis);

            if (dis != null)
            {
                try
                {
                    this._radioEntityType.Unmarshal(dis);
                    this._transmitState = dis.ReadUnsignedByte();
                    this._inputSource   = dis.ReadUnsignedByte();
                    this._padding1      = dis.ReadUnsignedShort();
                    this._antennaLocation.Unmarshal(dis);
                    this._relativeAntennaLocation.Unmarshal(dis);
                    this._antennaPatternType         = dis.ReadUnsignedShort();
                    this._antennaPatternCount        = dis.ReadUnsignedShort();
                    this._frequency                  = dis.ReadUnsignedLong();
                    this._transmitFrequencyBandwidth = dis.ReadFloat();
                    this._power = dis.ReadFloat();
                    this._modulationType.Unmarshal(dis);
                    this._cryptoSystem             = dis.ReadUnsignedShort();
                    this._cryptoKeyId              = dis.ReadUnsignedShort();
                    this._modulationParameterCount = dis.ReadUnsignedByte();
                    this._padding2 = dis.ReadUnsignedShort();
                    this._padding3 = dis.ReadUnsignedByte();

                    for (int idx = 0; idx < this.ModulationParameterCount; idx++)
                    {
                        Vector3Float anX = new Vector3Float();
                        anX.Unmarshal(dis);
                        this._modulationParametersList.Add(anX);
                    }

                    for (int idx = 0; idx < this.AntennaPatternCount; idx++)
                    {
                        Vector3Float anX = new Vector3Float();
                        anX.Unmarshal(dis);
                        this._antennaPatternList.Add(anX);
                    }
                }
                catch (Exception e)
                {
                    if (PduBase.TraceExceptions)
                    {
                        Trace.WriteLine(e);
                        Trace.Flush();
                    }

                    this.RaiseExceptionOccured(e);

                    if (PduBase.ThrowExceptions)
                    {
                        throw e;
                    }
                }
            }
        }
Esempio n. 2
0
        public virtual void Unmarshal(DataInputStream dis)
        {
            if (dis != null)
            {
                try
                {
                    this._recordType           = dis.ReadUnsignedInt();
                    this._recordLength         = dis.ReadUnsignedByte();
                    this._recordSpecificFields = dis.ReadUnsignedLong();
                }
                catch (Exception e)
                {
#if DEBUG
                    Trace.WriteLine(e);
                    Trace.Flush();
#endif
                    this.OnException(e);
                }
            }
        }
        public virtual void Unmarshal(DataInputStream dis)
        {
            if (dis != null)
            {
                try
                {
                    this._recordType      = dis.ReadUnsignedByte();
                    this._changeIndicator = dis.ReadUnsignedByte();
                    this._partAttachedTo  = dis.ReadUnsignedShort();
                    this._parameterType   = dis.ReadUnsignedInt();
                    this._parameterValue  = dis.ReadUnsignedLong();
                }
                catch (Exception e)
                {
#if DEBUG
                    Trace.WriteLine(e);
                    Trace.Flush();
#endif
                    this.OnException(e);
                }
            }
        }