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)); }
public static Crc16Command Encapsulate(Command command) { var payload = command.Serialize(); return(new Crc16Command(payload)); }
public static MultiChannelCommand Encapsulate(byte sourceEndpointID, byte targetEndpointID, Command command) { var payload = command.Serialize(); return(new MultiChannelCommand(sourceEndpointID, targetEndpointID, payload)); }