API. SIGNALMONITOR

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

Members

monitorDigitalSignal

Subscribes to a digital signal.

Deprecated
  • Please use this.monitorSignal instead
Example
API.SIGNALMONITOR.monitorDigitalSignal(
 {type: 'digitalsignal', name: 'ManualMode'},
 (v)=>{
   console.log(v);
 }
)

Methods

monitorSignal(variableObjopt, callbackopt)

Subscribes to a 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.monitorSignal(
 {type: 'digitalsignal', name: 'ManualMode', network: 'Network1', device: 'Device1'},
 (v)=>{
   console.log(v);
 }
)