The API.SIGNALMONITOR namespace provides a set of interfaces for easily and quickly adds signal monitoring and processing transactions.
- Source
Members
monitorDigitalSignal
Subscribes to a digital signal.
- Deprecated
- Please use this.monitorSignal instead
- Source
API.SIGNALMONITOR.monitorDigitalSignal(
{type: 'digitalsignal', name: 'ManualMode'},
(v)=>{
console.log(v);
}
)Methods
monitorSignal(variableObjopt, callbackopt)
Subscribes to a signal.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
variableObj | object | <optional> | The signal attributes including the signal name and other necessary information. |
callback | function | <optional> | The callback function that is called when the signal changes. |
- Source
Example
API.SIGNALMONITOR.monitorSignal(
{type: 'digitalsignal', name: 'ManualMode', network: 'Network1', device: 'Device1'},
(v)=>{
console.log(v);
}
)