コード例 #1
0
 public static void ExitServiceMode(this MTRFXXAdapter adapter)
 {
     adapter.SendCommand(MTRFXXMode.Service, MTRFXXAction.SendCommand, 0, MTRFXXCommand.None);
 }
コード例 #2
0
 public static void ClearChannel(this MTRFXXAdapter adapter, byte channel)
 {
     adapter.SendCommand(MTRFXXMode.RX, MTRFXXAction.ClearChannel, channel, MTRFXXCommand.None);
 }
コード例 #3
0
 public static void ClearAllChannels(this MTRFXXAdapter adapter)
 {
     adapter.SendCommand(MTRFXXMode.RX, MTRFXXAction.ClearAllChannels, 0, MTRFXXCommand.None,
                         MTRFXXRepeatCount.NoRepeat, MTRFXXDataFormat.NoData, new byte[] { 170, 85, 170, 85 });
 }
コード例 #4
0
 public static void BindStop(this MTRFXXAdapter adapter)
 {
     adapter.SendCommand(MTRFXXMode.RX, MTRFXXAction.StopBinding, 0, MTRFXXCommand.None);
 }
コード例 #5
0
 public static void BindStart(this MTRFXXAdapter adapter, byte channel)
 {
     adapter.SendCommand(MTRFXXMode.RX, MTRFXXAction.StartBinding, channel, MTRFXXCommand.None);
 }
コード例 #6
0
        private static void SendData(MTRFXXAdapter adapter, MTRFXXCommand command, bool useFMode, byte channel, UInt32?deviceId, MTRFXXDataFormat format, params byte[] data)
        {
            var ma = GetModeAndAction(useFMode, deviceId);

            adapter.SendCommand(ma.Item1, ma.Item2, channel, command, MTRFXXRepeatCount.NoRepeat, format, data, deviceId ?? 0);
        }
コード例 #7
0
 private static void SendReadState(this MTRFXXAdapter adapter, byte channel)
 {
     adapter.SendCommand(MTRFXXMode.TXF, MTRFXXAction.SendCommand, channel, MTRFXXCommand.ReadState);
 }
コード例 #8
0
        private static void Send(MTRFXXAdapter adapter, MTRFXXCommand command, bool useFMode, byte channel = 0, UInt32?deviceId = null)
        {
            var ma = GetModeAndAction(useFMode, deviceId);

            adapter.SendCommand(ma.Item1, ma.Item2, channel, command, target: deviceId ?? 0);
        }