Beispiel #1
0
 protected override void WriteData(AcnBinaryWriter data)
 {
     data.WriteUtf8String(SourceName, 64);
     data.WriteOctet(SequenceNumber);
     data.WriteOctet(EndpointID);
     data.BaseStream.Seek(1, SeekOrigin.Current);
 }
Beispiel #2
0
        public void WriteData(AcnBinaryWriter data, bool tcpTransport)
        {
            ValidatePacket();

            if (!tcpTransport)
            {
                data.WriteOctet(PreambleSize);
                data.WriteOctet(PostambleSize);
            }

            data.WriteUtf8String(PacketId, 12);

            //PDU Block Size
            if (tcpTransport)
            {
                data.BaseStream.Seek(4, System.IO.SeekOrigin.Current);
            }

            //Save the position of the length so we can come back and fill it in.
            lengthPosition = data.BaseStream.Position;

            data.WriteOctet((short)((Flags << 12) + Length));
            data.WriteOctet(ProtocolId);
            data.Write(SenderId.ToByteArray());
        }
 protected override void WriteData(AcnBinaryWriter data)
 {
     data.WriteUtf8String(SourceName, 64);
     data.Write(Priority);
     data.WriteOctet(SyncPacketAddress);
     data.Write(SequenceNumber);
     data.Write(Options);
     data.WriteOctet(Universe);
 }
Beispiel #4
0
 /// <summary>
 /// Write the PDU information to the packet data to be transmitted.
 /// </summary>
 /// <param name="data">The packet data to be sent.</param>
 protected override void WriteData(AcnBinaryWriter data)
 {
     data.WriteUtf8String(SourceName, 64);
     data.BaseStream.Seek(4, SeekOrigin.Current);
 }
Beispiel #5
0
 protected override void WriteData(AcnBinaryWriter data)
 {
     data.WriteOctet(StatusCode);
     data.WriteUtf8String(StatusMessage, StatusMessage.Length);
 }