Beispiel #1
0
        void IPayloadSerializable.Write(PayloadWriter writer)
        {
            if (writer == null)
            {
                throw new ArgumentNullException(nameof(writer));
            }

            writer.WriteByte(NodeID);

            var payload = Command.Serialize();

            writer.WriteByte((byte)payload.Length);
            writer.WriteObject(payload);

            writer.WriteByte((byte)(TransmitOptions.Ack | TransmitOptions.AutoRoute | TransmitOptions.Explore));
        }
Beispiel #2
0
        public static Crc16Command Encapsulate(Command command)
        {
            var payload = command.Serialize();

            return(new Crc16Command(payload));
        }
Beispiel #3
0
        public static MultiChannelCommand Encapsulate(byte sourceEndpointID, byte targetEndpointID, Command command)
        {
            var payload = command.Serialize();

            return(new MultiChannelCommand(sourceEndpointID, targetEndpointID, payload));
        }