public async static Task Reset(this ITransceiver transceiver) { var message = new InterfaceControlMessage(InterfaceControlCommand.Reset); await transceiver.Send(message); await Task.Delay(50); }
public async static Task SetMode(this ITransceiver transceiver, TransceiverType transceiverType, params Protocol[] protocols) { var messages = Buffer.Empty(9); messages[0] = transceiverType; messages[2] = (byte)protocols.Where(protocol => protocol.MessageNumber == 3).Sum(protocol => protocol.Value); messages[3] = (byte)protocols.Where(protocol => protocol.MessageNumber == 4).Sum(protocol => protocol.Value); messages[4] = (byte)protocols.Where(protocol => protocol.MessageNumber == 5).Sum(protocol => protocol.Value); await transceiver.Send(new InterfaceControlMessage(InterfaceControlCommand.SetMode, messages)); }
public async static Task GetStatus(this ITransceiver transceiver) { await transceiver.Send(new InterfaceControlMessage(InterfaceControlCommand.GetStatus)); }
public async static Task SendChime(this ITransceiver transceiver, ChimeSubType subType, ChimeSound sound) { var message = new ChimeMessage(subType, 0x00, 0x00, 0x00, sound, 0x00); await transceiver.Send(message); }