예제 #1
0
        public void ReadData(AcnBinaryReader data, bool tcpTransport)
        {
            //Read Preamble
            if (!tcpTransport)
            {
                PreambleSize  = data.ReadOctet2();
                PostambleSize = data.ReadOctet2();
            }

            string packetId = data.ReadUtf8String(12);

            if (packetId != PacketId)
            {
                throw new InvalidPacketException("The packet ID is not a valid ACN packet Id");
            }

            if (tcpTransport)
            {
                BlockSize = data.ReadOctet4();
            }

            //Read PDU Header
            Length     = data.ReadOctet2();
            Flags      = (byte)((Length & 0xF000) >> 12);
            Length    &= 0xFFF;
            ProtocolId = data.ReadOctet4();

            //Read CID
            SenderId = new Guid(data.ReadBytes(16));
        }
예제 #2
0
 protected override void ReadData(AcnBinaryReader data)
 {
     LeaderId               = new Guid(data.ReadBytes(16));
     ChannelNumber          = data.ReadOctet2();
     MemberId               = data.ReadOctet2();
     ReliableSequenceNumber = data.ReadOctet4();
     ReciprocalChannel      = 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();
     RefuseCode             = (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
파일: StdJoin.cs 프로젝트: AvolitesLtd/ACN
 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
 protected override void ReadData(AcnBinaryReader data)
 {
     RdmData = data.ReadBytes(Length - 3);
 }
예제 #7
0
 protected override void ReadData(AcnBinaryReader data)
 {
     ComponentId = new Guid(data.ReadBytes(16));
 }