Method | Description | |
---|---|---|
Dispose ( ) : void |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Call Dispose when you are finished using the CyrusBuilt.MonoPi.Devices.RCSwitch.RCSwitchDevice. The Dispose method leaves the CyrusBuilt.MonoPi.Devices.RCSwitch.RCSwitchDevice in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Devices.RCSwitch.RCSwitchDevice so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Devices.RCSwitch.RCSwitchDevice was occupying. |
|
GetSwitchGroupAddress ( String address ) : BitSet |
Convenience method for converting a string like "11011" to a CyrusBuilt.MonoPi.BitSet.
|
|
RCSwitchDevice ( IRaspiGpio transmitPin ) : System |
Initializes a new instance of the CyrusBuilt.MonoPi.Devices.RCSwitch.RCSwitchDevice class with the pin to use to transmit codes with.
|
|
Send ( char codeWord ) : void |
Transmits the specified code word to the device.
|
|
Send ( long code, |
Transmits the specified code word to the device.
|
|
SendTriState ( char codeWord ) : void |
Sends a code word.
|
|
SwitchOff ( AddressCode address, ChannelCode channel ) : void |
Switch a remote switch off (Type B with two rotary/sliding switches).
|
|
SwitchOff ( BitSet switchGroupAddress, RCSwitchDevNum device ) : void |
Switch a remote switch off (Type A with 10 pole DIP switches).
|
|
SwitchOn ( AddressCode address, ChannelCode channel ) : void |
Switch a remote switch on (Type B with two rotary/sliding switches).
|
|
SwitchOn ( BitSet switchGroupAddress, RCSwitchDevNum device ) : void |
Switch a remote switch on (Type A with 10 pole DIP switches).
|
Method | Description | |
---|---|---|
Dec2BinWzeroFill ( long dec, |
Converts a decimal value into its binary representation.
|
|
GetCodeWordA ( BitSet groupAddress, ChannelCode chan, System.Boolean status ) : String |
Returns a 13 character array, representing the code word to be sent. A code word consists of 9 address bits, 3 data bits, and on sync bit but in our case, only the first 8 address bits and the last 2 data bits are used. A code bit can have 4 different states: "F" (floating), "1" (high), "0" (low), and "S" (synchronous bit).
|
|
GetCodeWordB ( AddressCode address, ChannelCode chan, System.Boolean status ) : String |
Returns a 13 character array, representing the code word to be sent. A code word consists of 9 address bits, 3 data bits, and on sync bit but in our case, only the first 8 address bits and the last 2 data bits are used. A code bit can have 4 different states: "F" (floating), "1" (high), "0" (low), and "S" (synchronous bit).
|
|
Send0 ( ) : void |
Sends a "0" bit.
|
|
Send1 ( ) : void |
Sends a "1" bit.
|
|
SendSync ( ) : void |
Sends a "Sync" bit.
|
|
SendT0 ( ) : void |
Sends a tri-state "0" bit.
|
|
SendT1 ( ) : void |
Sends a tri-state "1" bit.
|
|
SendTF ( ) : void |
Sends a tri-state "F" bit.
|
|
Transmit ( |
Trasmits the specified number of high and low pulses
|
public static GetSwitchGroupAddress ( String address ) : BitSet | ||
address | String | /// The a string containing the address bits in sequence. /// |
return | BitSet |
public RCSwitchDevice ( IRaspiGpio transmitPin ) : System | ||
transmitPin | IRaspiGpio | /// The native pin to use to transmit codes. /// |
return | System |
public Send ( char codeWord ) : void | ||
codeWord | char | /// The code word to transmit. /// |
return | void |
public Send ( long code, |
||
code | long | /// A long represents the bits of the address. /// |
length | /// The length of bits (count) to send. /// | |
return | void |
public SendTriState ( char codeWord ) : void | ||
codeWord | char | /// The code word to send. /// |
return | void |
public SwitchOff ( AddressCode address, ChannelCode channel ) : void | ||
address | AddressCode | /// The address of the switch group. /// |
channel | ChannelCode | /// The channel (switch) itself. /// |
return | void |
public SwitchOff ( BitSet switchGroupAddress, RCSwitchDevNum device ) : void | ||
switchGroupAddress | BitSet | /// 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"). /// |
device | RCSwitchDevNum | /// The switch device number. /// |
return | void |
public SwitchOn ( AddressCode address, ChannelCode channel ) : void | ||
address | AddressCode | /// The address of the switch group. /// |
channel | ChannelCode | /// The channel (switch) itself. /// |
return | void |
public SwitchOn ( BitSet switchGroupAddress, RCSwitchDevNum device ) : void | ||
switchGroupAddress | BitSet | /// 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"). /// |
device | RCSwitchDevNum | /// The switch device number. /// |
return | void |