Commit 7c2879b5 authored by Peter Waher's avatar Peter Waher

Concentrato capabilities

parent 860d97f4
......@@ -47,5 +47,81 @@ to address nodes in a concentrator. If the request does not include these attrib
Each node in a concentrator is at least identified by its *node identity*, provided in the `id` attribute. A concentrator might choose to group nodes
with similar properties in data/node *sources*. If so, the *source identity* is provided using the `src` attribute. Large concentrators might need to
sub-divide sources in *partitions*. If so, the partition is identified using the `pt` attribute. If an attribute is not provided, it is assumed to have
sub-divide sources in *partitions*. If so, the partition is identified using the `pt` attribute. If an attribute is not provided, it is assumed to have
the value of the empty string. The quadruple (JID, `id`, `src`, `pt`) should always be unique.
**Note**: The same attributes can be used in sensor-data and control operations, with the same meaning.
Identities
--------------
The concentrator is free to authorize requests based on the identities provided by the caller. Apart from the JID the caller uses, and the implicit
domain och which the caller has an account, each call can also be annotated using tokens. There are three different types of tokens that can be used:
| Attribute | Type | Description |
|:-----------|:--------------|:-------------------|
| `dt` | `xs:string` | Device token(s). |
| `st` | `xs:string` | Service token(s). |
| `ut` | `xs:string` | User token(s). |
If multiple tokens of the same type are used, they are simply separated using the space character.
**Note**: The same attributes can be used in sensor-data and control operations, with the same meaning.
Capabilities
-----------------
The concentrator interface consists of one mandatoy operation (`getCapabilities`), and a set of optional operations. It is up to the concentrator to define
which optional operations are supported. Clients can ask what operatiosn are supported by sending the `getCapabilities` element in an `iq get` to the
concentrator. The response will contain a `strings` element containing a set of `value` child elements, each one containing a name of an operation it
supports.
The following table lists defined operations. It also suggests what types of concentrators would implement each one.
| Operation | Small/static (PLC) | Bridge/Gateway | Subsystem |
|:---------------------------------|:------------------:|:--------------:|:----------|
| getCapabilities | x | x | x |
| getAllDataSources | x | x | x |
| getRootDataSources | | x | x |
| getChildDataSources | | x | x |
| containsNode | x | x | x |
| containsNodes | | | x |
| getNode | x | x | x |
| getNodes | | | x |
| getAllNodes | x | x | x |
| getNodeInheritance | | x | x |
| getRootNodes | x | x | x |
| getChildNodes | x | x | x |
| getAncestors | | x | x |
| getNodeParametersForEdit | | x | x |
| setNodeParametersAfterEdit | | x | x |
| getCommonNodeParametersForEdit | | | x |
| setCommonNodeParametersAfterEdit | | | x |
| getAddableNodeTypes | | x | x |
| getParametersForNewNode | | x | x |
| createNewNode | | x | x |
| destroyNode | | x | x |
| moveNodeUp | | x | x |
| moveNodeDown | | x | x |
| moveNodesUp | | x | x |
| moveNodesDown | | x | x |
| subscribe | | x | x |
| unsubscribe | | x | x |
| getNodeCommands | x | x | x |
| getCommandParameters | (x) | x | x |
| executeNodeCommand | x | x | x |
| executeNodeQuery | (x) | x | x |
| getCommonNodeCommands | | | x |
| getCommonCommandParameters | | | x |
| executeCommonNodeCommand | | | x |
| executeCommonNodeQuery | | | x |
| abortNodeQuery | (x) | x | x |
| abortCommonNodeQuery | | x | x |
| registerSniffer | | x | x |
| unregisterSniffer | | x | x |
**Note**: Some operation exist in both in singular and plural forms. When managing large systems, sets of nodes must be possible to administer. Such
operations might be unnecessary to implement for smaller concentrators. Clients supporting both large and small concentratorsr can iterate the singular
operation over the set of nodes, for concentrators not supporting the plural versions.
......@@ -94,18 +94,21 @@ purposes.
</xs:annotation>
<xs:attribute name='dt' type='xs:string' use='optional'>
<xs:annotation>
<xs:documentation>A token for the device originating the stanza.</xs:documentation>
</xs:annotation>
<xs:documentation>Token(s) for the device(s) originating the stanza.</xs:documentation>
<xs:documentation>Multiple tokens are separated using the space character.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name='st' type='xs:string' use='optional'>
<xs:annotation>
<xs:documentation>A token for the service originating the stanza.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name='ut' type='xs:string' use='optional'>
<xs:annotation>
<xs:documentation>A token for the user originating the stanza.</xs:documentation>
</xs:annotation>
<xs:documentation>Token(s) for the service(s) originating the stanza.</xs:documentation>
<xs:documentation>Multiple tokens are separated using the space character.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name='ut' type='xs:string' use='optional'>
<xs:annotation>
<xs:documentation>Token(s) for the user(s) originating the stanza.</xs:documentation>
<xs:documentation>Multiple tokens are separated using the space character.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment