Classes | Fonctions membres publiques | Liste de tous les membres
Référence de la classe RCSwitch

#include <RCSwitch.h>

Classes

struct  HighLow
 
struct  Protocol
 

Fonctions membres publiques

 RCSwitch ()
 
void switchOn (int nGroupNumber, int nSwitchNumber)
 
void switchOff (int nGroupNumber, int nSwitchNumber)
 
void switchOn (const char *sGroup, int nSwitchNumber)
 
void switchOff (const char *sGroup, int nSwitchNumber)
 
void switchOn (char sFamily, int nGroup, int nDevice)
 
void switchOff (char sFamily, int nGroup, int nDevice)
 
void switchOn (const char *sGroup, const char *sDevice)
 
void switchOff (const char *sGroup, const char *sDevice)
 
void switchOn (char sGroup, int nDevice)
 
void switchOff (char sGroup, int nDevice)
 
void sendTriState (const char *sCodeWord)
 
void send (unsigned long code, unsigned int length)
 
void send (const char *sCodeWord)
 
void enableTransmit (int nTransmitterPin)
 
void disableTransmit ()
 
void setPulseLength (int nPulseLength)
 
void setRepeatTransmit (int nRepeatTransmit)
 
void setProtocol (Protocol protocol)
 
void setProtocol (int nProtocol)
 
void setProtocol (int nProtocol, int nPulseLength)
 

Documentation des constructeurs et destructeur

◆ RCSwitch()

RCSwitch::RCSwitch ( )

Documentation des fonctions membres

◆ disableTransmit()

void RCSwitch::disableTransmit ( )

Disable transmissions

◆ enableTransmit()

void RCSwitch::enableTransmit ( int  nTransmitterPin)

Set Receiving ToleranceEnable transmissions

Paramètres
nTransmitterPinArduino Pin to which the sender is connected to

◆ send() [1/2]

void RCSwitch::send ( unsigned long  code,
unsigned int  length 
)

Transmit the first 'length' bits of the integer 'code'. The bits are sent from MSB to LSB, i.e., first the bit at position length-1, then the bit at position length-2, and so on, till finally the bit at position 0.

◆ send() [2/2]

void RCSwitch::send ( const char *  sCodeWord)
Paramètres
sCodeWorda binary code word consisting of the letter 0, 1

◆ sendTriState()

void RCSwitch::sendTriState ( const char *  sCodeWord)
Paramètres
sCodeWorda tristate code word consisting of the letter 0, 1, F

◆ setProtocol() [1/3]

void RCSwitch::setProtocol ( Protocol  protocol)

Sets the protocol to send.

◆ setProtocol() [2/3]

void RCSwitch::setProtocol ( int  nProtocol)

Sets the protocol to send, from a list of predefined protocols

◆ setProtocol() [3/3]

void RCSwitch::setProtocol ( int  nProtocol,
int  nPulseLength 
)

Sets the protocol to send with pulse length in microseconds.

◆ setPulseLength()

void RCSwitch::setPulseLength ( int  nPulseLength)

Sets pulse length in microseconds

◆ setRepeatTransmit()

void RCSwitch::setRepeatTransmit ( int  nRepeatTransmit)

Sets Repeat Transmits

◆ switchOff() [1/5]

void RCSwitch::switchOff ( int  nAddressCode,
int  nChannelCode 
)

Switch a remote switch off (Type B with two rotary/sliding switches)

Paramètres
nAddressCodeNumber of the switch group (1..4)
nChannelCodeNumber of the switch itself (1..4)

◆ switchOff() [2/5]

void RCSwitch::switchOff ( const char *  sGroup,
int  nChannel 
)

Deprecated, use switchOff(const char* sGroup, const char* sDevice) instead! Switch a remote switch off (Type A with 10 pole DIP switches)

Paramètres
sGroupCode 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")
nChannelCodeNumber of the switch itself (1..5)

◆ switchOff() [3/5]

void RCSwitch::switchOff ( char  sFamily,
int  nGroup,
int  nDevice 
)

Switch a remote switch off (Type C Intertechno)

Paramètres
sFamilyFamilycode (a..f)
nGroupNumber of group (1..4)
nDeviceNumber of device (1..4)

◆ switchOff() [4/5]

void RCSwitch::switchOff ( const char *  sGroup,
const char *  sDevice 
)

Switch a remote switch off (Type A with 10 pole DIP switches)

Paramètres
sGroupCode 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")
sDeviceCode of the switch device (refers to DIP switches 6..10 (A..E) where "1" = on and "0" = off, if all DIP switches are on it's "11111")

◆ switchOff() [5/5]

void RCSwitch::switchOff ( char  sGroup,
int  nDevice 
)

Switch a remote switch off (Type D REV)

Paramètres
sGroupCode of the switch group (A,B,C,D)
nDeviceNumber of the switch itself (1..3)

◆ switchOn() [1/5]

void RCSwitch::switchOn ( int  nAddressCode,
int  nChannelCode 
)

Switch a remote switch on (Type B with two rotary/sliding switches)

Paramètres
nAddressCodeNumber of the switch group (1..4)
nChannelCodeNumber of the switch itself (1..4)

◆ switchOn() [2/5]

void RCSwitch::switchOn ( const char *  sGroup,
int  nChannel 
)

Deprecated, use switchOn(const char* sGroup, const char* sDevice) instead! Switch a remote switch on (Type A with 10 pole DIP switches)

Paramètres
sGroupCode 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")
nChannelCodeNumber of the switch itself (1..5)

◆ switchOn() [3/5]

void RCSwitch::switchOn ( char  sFamily,
int  nGroup,
int  nDevice 
)

Switch a remote switch on (Type C Intertechno)

Paramètres
sFamilyFamilycode (a..f)
nGroupNumber of group (1..4)
nDeviceNumber of device (1..4)

◆ switchOn() [4/5]

void RCSwitch::switchOn ( const char *  sGroup,
const char *  sDevice 
)

Switch a remote switch on (Type A with 10 pole DIP switches)

Paramètres
sGroupCode 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")
sDeviceCode of the switch device (refers to DIP switches 6..10 (A..E) where "1" = on and "0" = off, if all DIP switches are on it's "11111")

◆ switchOn() [5/5]

void RCSwitch::switchOn ( char  sGroup,
int  nDevice 
)

Switch a remote switch on (Type D REV)

Paramètres
sGroupCode of the switch group (A,B,C,D)
nDeviceNumber of the switch itself (1..3)