Extends
Methods
cmd
(async) cmd(commandId, optsopt): Promise.<any>Transmit a command
Parameters
Name | Type | Description |
---|---|---|
commandId
|
string | The ID of the command, as specified in |
opts
|
object
<optional> |
Transmission options |
repetitions
|
object
<optional> |
A custom amount of repetitions. 1 means 1 transmit in total, 2 means 2 transmits in total, etc. |
device
|
Device
<optional> |
The device being transmitted to |
|
Returns
disableRX
(async) disableRX(): Promise.<void>Stop receiving messages for this signal. This is a shorthand method for ManagerRF#disableSignalRX.
Returns
enableRX
(async) enableRX(): Promise.<void>Start receiving messages for this signal. This is a shorthand method for ManagerRF#enableSignalRX.
Returns
tx
(async) tx(frame, optsopt): Promise.<any>Transmit a frame
Parameters
Name | Type | Description |
---|---|---|
frame
|
Array.<number> | An array of word indexes |
opts
|
object
<optional> |
Transmission options |
repetitions
|
object
<optional> |
A custom amount of repetitions. 1 means 1 transmit in total, 2 means 2 transmits in total, etc. |
device
|
Device
<optional> |
The device being transmitted to |
|
Returns
Events
cmd
.on('cmd')This event is fired when a signal command has been received.
Parameters
Name | Type | Description |
---|---|---|
commandId
|
string | The ID of the command, as specified in |
payload
.on('payload')This event is fired when a signal payload has been received.
Parameters
Name | Type | Description |
---|---|---|
payload
|
Array.<number> | An array of word indexes |
first
|
boolean | If this is the first detected repetition |