Xentara WebSocket API Specification v2.0.4
User Manual
|
OpCode | Name | Description |
---|---|---|
1 | browse | Browse the Xentara model tree. |
The parameter object outlined in request packet for this command includes:
ID | Name | Optional | Description |
---|---|---|---|
0 | element_uuid | no | A UUID specifying the UUID of the Xentara element. To request the entire Xentara model tree, set the element_uuid parameter to a nil UUID (00000000-0000-0000-0000-000000000000). |
1 | depth | yes | An unsigned integer indicating the desired depth on the Xentara model tree. If the depth is not specified, all the children of the above mentioned element_uuid will be added in the response. |
2 | element_category | yes | An array of integers containing values from the element categories. If the element_category is not specified, all the children of the above mentioned element_uuid will be added in the response. |
The response item outlined in response packet for this command includes:
Name | Type | Description |
---|---|---|
Array of Entry | Array | An array that contains entry objects (see below). |
The definition of entry object is as follows:
ID | Name | Description |
---|---|---|
0 | primary_key | A string specifying the primary key of the Xentara element. |
1 | element_uuid | A UUID specifying the UUID of the Xentara element. |
2 | element_category | An integer specifying the element category. |
If an error occurs, the response will include an error packet with detailed error information.
Below is the list of the potential errors that may be encountered with this command. Further details regarding errors in the Xentara WebSocket interface can be accessed here.
Sr. No. | Error Code | Error Description |
---|---|---|
1 | -32700 | Parse Error |
2 | -32603 | Internal Error |
3 | -32602 | Invalid Parameter |
4 | -32600 | Invalid Request |
5 | -32000 | Missing Client Hello Request |
6 | -32100 | Unknown Element |
Below is an example for the request to browse the Xentara model tree for the element with the UUID "e3ee1071-4d88-4ba1-8e5d-0f1e4ce25ee8". The request should retrieve information up to the second layer of depth and include categories "Element Group" and "Data Point". The message id 65 is an arbitrary number assigned for this particular request.
[ 0, # Request Packet 65, # Message Id 1, # Browse OpCode { # Browse Object 0: 37('E3EE10714D884BA18E5D0F1E4CE25EE8'), # Xentara Element UUID 1: 2, # Depth Layer 2: [1,2] # Request Categories } ]
Below is an example of the successful response to the aforementioned request. It indicates a package type of 1, signifying a successful response. The provided Message ID is intended for matching with the corresponding request. The response also includes an array of objects based on the specified depth and categories in the request. Each of these objects contains primary key, UUID and category of the Xentara element.
[ 1, # Packet Type - Success Response 65, # Message Id [ # Array of Browsed Objects { 0: "Boolean", # Xentara Element Primary Key 1: 37(h'8CD2CDBFD8C44F689A83F9386B1803A9'), # Xentara Element UUID 2: 2 # Xentara Element Category }, { 0:"Integer 32", # Xentara Element Primary Key 1: 37(h'4F69E71215B04C5AACFDB5DCE43457D3'), # Xentara Element UUID 2: 2 # Xentara Element Category }, { 0:"TimeStamp", # Xentara Element Primary Key 1: 37(h'1C0E845A8FFB484A92FF7322EB81ABF2'), # Xentara Element UUID 2: 2 # Xentara Element Category } ] # Close Array of Browsed Objects ]