... | ... | @@ -13,8 +13,8 @@ |
|
|
<dd><p>Class represents a connection to motorcortex server</p>
|
|
|
</dd>
|
|
|
<dt><a href="#MessageTypes">MessageTypes</a></dt>
|
|
|
<dd><p>Class for handling motorcortex data types, load proto files and hash files,
|
|
|
creates a dictionary with all available data types, resolves data types by,
|
|
|
<dd><p>Class for handling motorcortex data types: load proto and hash files,
|
|
|
creates a dictionary with all available data types, resolves data types by
|
|
|
name or by hash, performs encoding and decoding of the messages.</p>
|
|
|
</dd>
|
|
|
<dt><a href="#Request">Request</a></dt>
|
... | ... | @@ -193,10 +193,10 @@ switch (type) { |
|
|
<a name="module_motorcortex.getPermission"></a>
|
|
|
|
|
|
### motorcortex.getPermission ⇒ <code>number</code>
|
|
|
Returns type of the parameter permission. Available parameters' permissions.
|
|
|
There are situations when users from the different groups need access to the
|
|
|
protected parts of the parameter tree. Permission flags allows fine-tuning an
|
|
|
access level of the group. Motorcortex Permissions have similar to Unix structure.
|
|
|
Returns type of the parameter permission. Different users/groups may require
|
|
|
access to different and/or protected parts of the parameter tree.
|
|
|
Permission flags allow fine-tuning access levels of the groups.
|
|
|
The Motorcortex permissions structure is similar to that of Unix file permissions.
|
|
|
Permissions are represented either in symbolic notation or in octal notation.
|
|
|
(Note: User rights are not yet implemented, instead use Group rights)
|
|
|
|
... | ... | @@ -238,7 +238,7 @@ switch (type) { |
|
|
<a name="module_motorcortex.getStatusCode"></a>
|
|
|
|
|
|
### motorcortex.getStatusCode ⇒ <code>number</code>
|
|
|
Returns a status code of the operation.
|
|
|
Returns a status code of the requested operation.
|
|
|
|
|
|
**Kind**: static property of [<code>motorcortex</code>](#module_motorcortex)
|
|
|
**Returns**: <code>number</code> - Id of status.
|
... | ... | @@ -363,8 +363,8 @@ Stop connection |
|
|
<a name="MessageTypes"></a>
|
|
|
|
|
|
## MessageTypes
|
|
|
Class for handling motorcortex data types, load proto files and hash files,
|
|
|
creates a dictionary with all available data types, resolves data types by,
|
|
|
Class for handling motorcortex data types: load proto and hash files,
|
|
|
creates a dictionary with all available data types, resolves data types by
|
|
|
name or by hash, performs encoding and decoding of the messages.
|
|
|
|
|
|
**Kind**: global class
|
... | ... | @@ -412,7 +412,7 @@ type_load_done.then(function () { |
|
|
<a name="MessageTypes+createType"></a>
|
|
|
|
|
|
### messageTypes.createType(type_name, [payload]) ⇒ <code>object</code>
|
|
|
Returns an instance of the loaded data type and filles it with payload.
|
|
|
Returns an instance of the loaded data type and fills it with payload.
|
|
|
|
|
|
**Kind**: instance method of [<code>MessageTypes</code>](#MessageTypes)
|
|
|
**Returns**: <code>object</code> - Instance of the requested type, filled with payload.
|
... | ... | @@ -496,7 +496,7 @@ Actual Request/reply connection state. |
|
|
CONNECTING 0 The connection is not yet open
|
|
|
OPEN 1 The connection is open and ready to communicate
|
|
|
CLOSING 2 The connection is in the process of closing
|
|
|
CLOSED 3 The connection is closed or couldn't be opened
|
|
|
CLOSED 3 The connection is closed or could not be opened
|
|
|
```
|
|
|
<a name="Request+connect"></a>
|
|
|
|
... | ... | @@ -505,7 +505,7 @@ Opens a request connection. |
|
|
|
|
|
**Kind**: instance method of [<code>Request</code>](#Request)
|
|
|
**Returns**: <code>Promise.<string></code> - A promise, which completes when connection is ready.
|
|
|
If connection is failed, short error description is passed to the cathe method.
|
|
|
If connection fails, a short error description is passed to the catch method.
|
|
|
|
|
|
| Param | Type | Description |
|
|
|
| --- | --- | --- |
|
... | ... | @@ -557,7 +557,7 @@ Sends an encoded request to the server |
|
|
|
|
|
**Kind**: instance method of [<code>Request</code>](#Request)
|
|
|
**Returns**: <code>Promise.<Object></code> - Returns a Promise, which completes when reply from the server is received.
|
|
|
If request fails, cache callback is triggered.
|
|
|
If request fails, catch callback is triggered.
|
|
|
|
|
|
| Param | Type | Description |
|
|
|
| --- | --- | --- |
|
... | ... | @@ -582,7 +582,7 @@ Sends a login request to the server |
|
|
|
|
|
**Kind**: instance method of [<code>Request</code>](#Request)
|
|
|
**Returns**: <code>Promise.<StatusMsg></code> - Returns a Promise, which resolves if login is successful and fails otherwise.
|
|
|
Return message has a status code, which indicates a status of the login.
|
|
|
Returned message has a status code, which indicates a status of the login.
|
|
|
**See**: motorcortex.proto, StatusMsg, StatusCode
|
|
|
|
|
|
| Param | Type | Description |
|
... | ... | @@ -861,7 +861,7 @@ group_handle.catch( function(group) { |
|
|
Request a server to save a parameter tree in the file.
|
|
|
|
|
|
**Kind**: instance method of [<code>Request</code>](#Request)
|
|
|
**Returns**: <code>Promise.<StatusMsg></code> - Returns a Promise, which resolves when save operation is complete,
|
|
|
**Returns**: <code>Promise.<StatusMsg></code> - Returns a Promise, which resolves when save operation is completed,
|
|
|
fails otherwise.
|
|
|
**See**: motorcortex.proto, StatusMsg, StatusCode
|
|
|
|
... | ... | @@ -1023,7 +1023,7 @@ for (let parameter of parameters) { |
|
|
<a name="Parameter+getValue"></a>
|
|
|
|
|
|
### parameter.getValue() ⇒ <code>DataType</code>
|
|
|
Gets parameter value/
|
|
|
Gets parameter value
|
|
|
|
|
|
**Kind**: instance method of [<code>Parameter</code>](#Parameter)
|
|
|
**Returns**: <code>DataType</code> - Returns parameter value.
|
... | ... | @@ -1223,7 +1223,7 @@ Actual Publish/Subscribe connection state. |
|
|
CONNECTING 0 The connection is not yet open
|
|
|
OPEN 1 The connection is open and ready to communicate
|
|
|
CLOSING 2 The connection is in the process of closing
|
|
|
CLOSED 3 The connection is closed or couldn't be opened
|
|
|
CLOSED 3 The connection is closed or could not be opened
|
|
|
```
|
|
|
<a name="Subscribe+connect"></a>
|
|
|
|
... | ... | @@ -1334,3 +1334,4 @@ This callback notifies when subscription is updated with new values. |
|
|
| Param | Type | Description |
|
|
|
| --- | --- | --- |
|
|
|
| parameters | [<code>Array.<Parameter></code>](#Parameter) | A list of values and timestamps, ordered according to the group layout. |
|
|
|
|