Service: Objects
Functions
| Result | Name / Params | Comment | ||
|---|---|---|---|---|
| StaticExtObject[] | ext.object.Query | Returns all Objects configured for the requesting Extension. | ||
| void | ext.object.Sync | Creates new Objects or fully updates existing Objects. | ||
| object | StaticExtObject[] | Complete Objects, including all Properties. | ||
| void | ext.object.Delete | Removes the Objects with the indicated URLs. | ||
| url | string[] | (Value: AopUrl) URLs of Objects to be deleted. | ||
| void | ext.object.Set | Sets specific Properties of an Object. Other Properties remain unchanged. | ||
| url | string | (Value: AopUrl) Object URL. | ||
| props | value{} | (Key: PropertyPath) The updated Property values. Any partial aspects of the Property can be addressed via property path. | ||
| void | ext.object.state.Set | Sets specific States of an Object. Other States remain unchanged. | ||
| url | string | (Value: AopUrl) Object URL. | ||
| states | value{} | (Key: Symbol) The updated State values. Transmitting a State with value 'null' indicates removal of the State. As an option, a ExtState object can be transferred as a value if there is additional information about the State. | ||
| void | ext.object.state.Sync | Synchronizes the States and Events of one or more Objects completely. | ||
| object | ExtObjectSync[] | For each Object, transmits the complete set of States and Events. Anything not included is considered removed. | ||
| void | ext.object.event.Set | Sets specific Events of an Object. Other Events remain unchanged. | ||
| url | string | (Value: AopUrl) Object URL. | ||
| events | ExtEvent{} | Key is an Event key which is an arbitrary string to uniquely identify the instance of the Event type. Value is an ExtEvent object to create or update the respective Event, or 'null' to clear the Event. Events are always transferred completely, even in case of partial changes. | ||
| void | ext.object.event.Clear | Clears specific Events of an Object. Only the indicated Events will be removed. | ||
| url | string | (Value: AopUrl) Object URL. | ||
| events | ExtEvent{} | Key is an Event key which is an arbitrary string to uniquely identify the instance of the Event type. Value is an ExtEvent object to indicate the final state of the Event before removing. | ||
| void | ext.object.event.Notify | Transmits one or more Notification Events for an Object. | ||
| url | string | (Value: AopUrl) Object URL. | ||
| event | ExtEvent[] | Notification Events to transmit. These Events do not have to be cleared. | ||
Notifications
| Name / Params | Comment | ||
|---|---|---|---|
| ext.object.Created | New Objects have been created at the host. | ||
| object | StaticExtObject[] | List of newly created Objects. | |
| ext.object.Updated | Properties of Objects have been changed at the host. | ||
| object | StaticExtObject[] | List of updated Objects. The complete Objects are transferred, containing all Properties including unchanged ones. | |
| ext.object.Deleted | Objects have been removed at the host. | ||
| url | string[] | (Value: AopUrl) List of URLs of the removed Objects. | |
All notifications can contain one or more Objects or URLs. In most cases, however, the passed array will have only one entry.
An Extension can, but does not have to, react to the notifications ext.object.Updated and ext.object.Deleted to reconfigure itself. If it does not react, such changes will only be applied after a restart of the Extension. The implemented behavior should be documented for the Extension.
Objects
ExtObject
| Property | Type | Description |
|---|---|---|
| Url | string | (Value: AopUrl) This Object’s unique URL identifier. |
| Type | string | (Value: SymbolPath) Type of the Object. |
| Props | value{} | (Key: Symbol) List of Properties. |
| States | value{} | (Key: Symbol) List of States. Values are either the State values themselves or ExtState objects. |
| Events | ExtEvent{} | List of currently active Events. Map key is an Event key which is an arbitrary string to uniquely identify the instance of the Event type. |
💡All individual Properties of EXT Objects are summarized as Props to separate them from the general Properties such as Url and Type.
💡This definition includes all possible ExtObject Properties. APIs will declare StaticExtObject or ExtObjectSync instead to better indicate which Properties are actually used by the respective function or notification.
Special Props prefixed with “@” are optional and have a special meaning.
| Property | Type | Description |
|---|---|---|
| @path | string[] | Defines a logical hierarchy for browsing the Objects. Used instead of the URL for building the hierarchy in automatic data supply. |
| @minval | same type as the State | Defines a minimum value for the input range of a value Object’s State. Useful if the range is only known at runtime. |
| @maxval | same type as the State | Defines a maximum value for the input range of a value Object’s State. Useful if the range is only known at runtime. |
| @valueinfo | ValueInfo | Defines information about the value (unit, precision, savehistory). |
| @valuetransformation | ValueTransformation | Defines the transformation of the value (@minval and @maxval are part of this transformation). |
| @valuemapping | ValueMapping[] | Defines an array of value mappings. |
StaticExtObject
Statically configured/persisted parts of an Adapter Object.
| Property | Type | Description |
|---|---|---|
| Url | string | (Value: AopUrl) This Object’s unique URL identifier. |
| Type | string | (Value: SymbolPath) Type of the Object. |
| Props | value{} | (Key: Symbol) List of Properties. |
ExtObjectSync
Represents a full synchronization of States and Events of an Adapter Object. States and Events not included in the synchronization are considered removed.
| Property | Type | Description |
|---|---|---|
| Url | string | (Value: AopUrl) This Object’s unique URL identifier. |
| States | value{} | (Key: Symbol) Complete list of States. Values are either the State values themselves or ExtState objects. |
| Events | ExtEvent{} | Complete list of currently active Events. Map key is an Event key which is an arbitrary string to uniquely identify the instance of the Event type. |
ExtState
| Property | Type | Description |
|---|---|---|
| Value | value | Value of the State. Type depends on the specific State. |
| Time | time | (Optional) Time of the status change. If not set, the current time is used. |
| IoTag | string | (Optional) Tag to associate the State with corresponding Extension or IO log entries. |
| Props | value{} | (Key: Symbol, Optional) List of Properties. |
| Resources | Resource{} | (Key: Symbol, Optional) List of resources. Key is the resource Id. |
💡 ExtState is only used to transmit a State if one of the optional additional specifications is set.
ExtEvent
| Property | Type | Description |
|---|---|---|
| Type | string | (Value: Symbol) Type of the Event. |
| Time | time | (Optional) Time of occurrence. If not set, the current time is used. |
| IoTag | string | (Optional) Tag to associate the Event with corresponding Extension or IO log entries. |
| Props | value{} | (Key: Symbol, Optional) List of Properties. |
| Resources | Resource{} | (Key: Symbol, Optional) List of resources. Key is the resource Id. |
💡 If Props contains “Latitude”/“Longitude” (of type float) and the triggering Object has the “Locatable” Functionality, WinGuard will store this geo-position in the resulting App Event, rather than the current values of the Object’s “Latitude”/“Longitude” States.