This class provides a set of interfaces for managing and interacting with signals on the controller. It includes methods for creating, retrieving, and updating signal configurations, subscribing to signal changes, and searching for signals based on various filters. This class simplifies signal management and enables seamless integration with the controller's configuration and runtime environment.
| Name | Type | Description |
|---|---|---|
Signal | API. |
- Source
Classes
Methods
createSignal(name, attr) → {Promise.<API.SIGNAL.Signal>}
Creates a new signal in the configuration database if there is no one existed. If there is an existing one, the attributes of the new signal will inherit from those of the existing one.
| Name | Type | Description |
|---|---|---|
name | string | Signal name. |
attr | * | Signal attributes. |
- Source
- Type:
- Promise.<API.SIGNAL.Signal>
await API.SIGNAL.createSignal("TestDO2",{SignalType:"DO", Access:'All'})getSignal(name, network, device) → {Promise.<object>}
Gets an instance of API.CONFIG.Signal connected to an existing signal . If no existing signal is found, a Promise.reject is returned
| Name | Type | Description |
|---|---|---|
name | string | The signal name. |
network | string | The network name. |
device | string | The device name. |
- Source
await API.SIGNAL.getSignal("TestDO1")
- Type:
- Promise.<object>
search(filter) → {Promise.<(Array.<object>|Array.<string>)>}
Searches for available signals in the controller.
| Name | Type | Description |
|---|---|---|
filter | API. | The result can be filtered by using an object with the following possible elements: Searches the system for signals that meet the filter conditions. The signal name can be a fuzzy matching, which means that the name of any signal containing a filter value will be returned. The filter type can contain multiple types by using the values within '[', ']' and separated by ',', e.g. '["DI","DO"]'. Example: var filter = { name: 'TestDI', } |
- Source
- List of API.CONFIG.SIGNAL.Signal instances
- Type:
- Promise.<(Array.<object>|Array.<string>)>