Пример #1
0
 protected override void ReadData(AcnBinaryReader data)
 {
     SourceName        = data.ReadUtf8String(64);
     Priority          = data.ReadByte();
     SyncPacketAddress = data.ReadOctet2();
     SequenceNumber    = data.ReadByte();
     Options           = data.ReadByte();
     Universe          = data.ReadOctet2();
 }
Пример #2
0
            /// <summary>
            /// Reads the PDU information from the recieved packet data.
            /// </summary>
            /// <param name="data">The recieved packet data.</param>
            protected override void ReadData(AcnBinaryReader data)
            {
                Page       = data.ReadByte();
                TotalPages = data.ReadByte();

                for (int n = 2; n < Length; n += 2)
                {
                    Universes.Add(data.ReadOctet2());
                }
            }
Пример #3
0
 protected override void ReadData(AcnBinaryReader data)
 {
     LeaderId               = new Guid(data.ReadBytes(16));
     ChannelNumber          = data.ReadOctet2();
     MemberId               = data.ReadOctet2();
     ReliableSequenceNumber = data.ReadOctet4();
     ReasonCode             = (ReasonCodes)data.ReadByte();
 }
Пример #4
0
        protected override void ReadData(AcnBinaryReader data)
        {
            AddressType          = data.ReadByte();
            FirstPropertyAddress = data.ReadOctet2();
            AddressIncrement     = data.ReadOctet2();

            int propertyLength = data.ReadOctet2();

            PropertyData = data.ReadBytes(propertyLength);
        }
Пример #5
0
 protected override void ReadData(AcnBinaryReader data)
 {
     ComponentId            = new Guid(data.ReadBytes(16));
     MemberId               = data.ReadOctet2();
     ChannelNumber          = data.ReadOctet2();
     ReciprocalChannel      = data.ReadOctet2();
     TotalSequenceNumber    = data.ReadOctet4();
     ReliableSequenceNumber = data.ReadOctet4();
     DestinationAddress     = SdtAddress.ReadData(data);
     ChannelParameterBlock  = ChannelParameterBlock.ReadData(data);
     AdHocExpiry            = data.ReadByte();
 }
Пример #6
0
        public static SdtAddress ReadData(AcnBinaryReader data)
        {
            switch ((SdtAddressTypes)data.ReadByte())
            {
            case SdtAddressTypes.Null:
                return(new NullAddress());

            case SdtAddressTypes.IPv4:
                return(new IPv4Address());

            case SdtAddressTypes.IPv6:
                return(new IPv6Address());

            default:
                throw new InvalidOperationException("Unknown address STD type.");
            }
        }
Пример #7
0
        public virtual void ReadPdu(AcnBinaryReader data)
        {
            //Read PDU Header
            Length  = data.ReadOctet2();
            Flags   = (PduFlags)((Length & 0xF000) >> 12);
            Length &= 0xFFF;

            switch (vectorLength)
            {
            case 1:
                Vector = data.ReadByte();
                break;

            case 4:
                Vector = data.ReadOctet4();
                break;
            }

            ReadData(data);
        }
Пример #8
0
 protected override void ReadData(AcnBinaryReader data)
 {
     AddressType = data.ReadByte();
 }
Пример #9
0
 protected override void ReadData(AcnBinaryReader data)
 {
     ProtocolId = data.ReadOctet4();
     Reason     = (ReasonCodes)data.ReadByte();
 }
 /// <summary>
 /// Reads the PDU information from the recieved packet data.
 /// </summary>
 /// <param name="data">The recieved packet data.</param>
 protected override void ReadData(AcnBinaryReader data)
 {
     SequenceNumber         = data.ReadByte();
     SynchronizationAddress = data.ReadOctet2();
     data.BaseStream.Seek(2, SeekOrigin.Current);
 }