API. SIGNALMONITOR

The API.SIGNALMONITOR namespace provides a set of interfaces for easily and quickly adds signal monitoring and processing transactions.

Methods

monitorDigitalSignal(variableObjopt, callbackopt)

Subscribes to a digital signal.

Parameters:
NameTypeAttributesDescription
variableObjobject<optional>

The signal attributes including the signal name and other necessary information.

callbackfunction<optional>

The callback function that is called when the signal changes.

Example
API.SIGNALMONITOR.monitorDigitalSignal(
 {type: 'digitalsignal', name: 'ManualMode'},
 (v)=>{
   console.log(v);
 }
)