API.SIGNAL. Signal

new Signal(name, signal, config, attr)

The Singal class contains all the relevant elements to access the signal and its configurations. Instance of this class can be created by API.SIGNAL.createSignal() when creating a new signal or API.SIGNAL.getSignal() when looking for an existing one.

Parameters:
NameTypeDescription
namestring

The signal name.

signalstring | object

Instance of a RWS.IO.getSignal(name)

configobject

Object from RWS.CFG.getInstanceByName( API.CONFIG.DOMAIN.EIO, API.CONFIG.TYPE.SIGNAL, name);

attrObject

The signal attributes. Please refer the response of config.getAttributes().

To Do
  • define the config object returne from RWS
Example
const mySignal = await API.SIGNAL.getSignal('signal_name');