The API.SIGNALMONITOR namespace provides a set of interfaces for easily and quickly adds signal monitoring and processing transactions.
- Source
Methods
monitorDigitalSignal(variableObjopt, callbackopt)
Subscribes to a digital 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.monitorDigitalSignal(
{type: 'digitalsignal', name: 'ManualMode'},
(v)=>{
console.log(v);
}
)