Exemplo n.º 1
0
 /**
  * Switch a remote switch on (Type C Intertechno)
  *
  * @param sFamily  Familycode (a..f)
  * @param nGroup   Number of group (1..4)
  * @param nDevice  Number of device (1..4)
  */
 public void SwitchOn(char family, int group, int device)
 {
     SendTriState(CodeWordGenerator.GetCodeWordC(family, group, device, true));
 }
Exemplo n.º 2
0
 private void Send(ulong code, uint length)
 {
     Send(CodeWordGenerator.DecimalToBinary((int)code, (int)length));
 }
Exemplo n.º 3
0
 /**
  * Switch a remote switch on (Type A with 10 pole DIP switches)
  *
  * @param group        Code of the switch group (refers to DIP switches 1..5 where "1" = on and "0" = off, if all DIP switches are on it's "11111")
  * @param channelCode  Number of the switch itself (1..4)
  */
 public void SwitchOn(string group, int channel)
 {
     SendTriState(CodeWordGenerator.GetCodeWordA(group, channel, true));
 }
Exemplo n.º 4
0
 /**
  * Switch a remote switch off (Type A with 10 pole DIP switches), now with real-binary numbering (see comments in getCodeWordA and getCodeWordD)
  *
  * @param sGroup        Code of the switch group (refers to DIP switches 1..5 where "1" = on and "0" = off, if all DIP switches are on it's "11111")
  * @param nChannelCode  Number of the switch itself (1..31)
  */
 public void SwitchOffBinary(string group, int channel)
 {
     SendTriState(CodeWordGenerator.GetCodeWordD(group, channel, false));
 }
Exemplo n.º 5
0
 /**
  * Switch a remote switch off (Type B with two rotary/sliding switches)
  *
  * @param nAddressCode  Number of the switch group (1..4)
  * @param nChannelCode  Number of the switch itself (1..4)
  */
 public void SwitchOff(int addressCode, int channelCode)
 {
     SendTriState(CodeWordGenerator.GetCodeWordB(addressCode, channelCode, false));
 }