Xentara WebSocket API Specification v2.0.4
User Manual
Meta Data Command

Command

OpCodeNameDescription
2meta_dataGets the Meta Data for a Xentara Element.

Parameters

The parameter object outlined in request packet for this command includes:

IDNameOptionalDescription
0element_uuidnoA UUID specifying the UUID of the Xentara Element.
1identifiersnoAn array of integers containing values from the meta data identifiers.

Response

The response item outlined in response packet for this command includes:

Name Type Description
Meta Data Object An object containing the meta data of the Xentara Element (see below).

The meta data object contains the requested meta data identifiers as keys, paired with their respective values. For the attribute list identifier (key 2), the value is an array containing attribute metadata objects. The detailed definition of these objects is provided below:

IDNameDescription
0attribute_nameA string specifying the name of the Xentara attribute.
1attribute_idA value consisting of integer from the attribute identifier or the attribute UUID.
2attribute_accessAn integer indicating the attribute's access level, as defined by the access identifier.
3attribute_data_typeAn integer indicating the attribute's data type, as defined by the data type identifier.

If an error occurs, the response will include an error packet with detailed error information.

Errors

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

Examples

Request

Below is an example for the request to get the meta data of a Xentara element with the UUID "e3ee1071-4d88-4ba1-8e5d-0f1e4ce25ee8". This example makes the request for primary key, category, attribute list, and a flag indicating whether the requested Xentara Element has children, using the relevant meta data identifiers. The message id 65 is an arbitrary number assigned for this particular request.

[
  0,                                              # Request Packet
  65,                                             # Message Id
  2,                                              # Meta Data OpCode
  {                                               # Meta Data Object
    0: 37('E3EE10714D884BA18E5D0F1E4CE25EE8'),    # Xentara Element UUID
    1: [0,1,2,3]                                  # Array of Meta Data identifiers
  }
]

Response

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. Furthermore, the response includes an object containing the primary key, element category identifier, array of attribute meta data objects, and a flag indicating whether the requested Xentara element has children.

[
  1,                                                 # Packet Type - Success Response
  65,                                                # Message Id
  {                                                  # Meta Data Response Object
    0: "Group 1.Data Point 1",                       # Primary Key of Xentara Element
    1: 2,                                            # Category Type of Xentara Element
    2: [                                             # Array of Attribute Meta Data of the Element
         {0: "type", 1: 3, 2: 0, 3: 11},             
         {0: "category", 1: 4, 2: 0, 3: 19},         
         {0: "name", 1: 1, 2: 0, 3: 11},             
         {0: "key", 1: 0, 2: 0, 3: 11},              
         {0: "UUID", 1: 2, 2: 0, 3: 17},             
         {0: "value", 1: 11, 2: 2, 3: 0},            
         {0: "quality", 1: 9, 2: 0, 3: 18},          
         {0: "updateTime", 1: 6, 2: 0, 3: 16},       
         {0: "changeTime", 1: 7, 2: 0, 3: 16},       
         {0: "writeTime", 1: 8, 2: 0, 3: 16}         
       ],                                            
    3: false                                         # Flag for indicating if the requested Element has children
  }
]