Datapoint Type
Represents the data type for a datapoint. A data type defines the size, encoding, scaling, range, resolution, and units for data values of the specified type. Known data types are initially published on the IAP/MQ feedback channel by the resource publisher.
Two examples of data types:
A simple data type for a percentage value can specify a one-byte unsigned-integer value with a range from 0 to 100 in steps of 0.01 and a unit of “%”.
A more complex example including a physical measurement unit is a 2-byte signed integer temperature value with a range from 273.15 to 7000 degrees Kelvin in steps of 0.01 degrees.
More examples are listed below.
IAP/MQ Mapping
For mapping the GET request to IAP/MQ, see Data Type Definitions. For mapping the PUT request to IAP/MQ, support for changeable types for a datapoint is supported if the protocol is LON and the datapoint has a property with a SCPTnvType or nvType type. To change the type, fetch the type metadata based on the new type identifier, and write the new type metadata to the type_program_id, type_scope, type_index, type_category, type_length, scaling_factor_a, scaling_factor_b, and scaling_factor_c fields of the SCPTnvType or nvType type property.
URI Definition
Method | URI and Fields |
GET
| /iap/devs/{id}/if/{block}/{block_index}/{datapoint_name}/type |
Returns the data type of the specified datapoints. XIFname vs Instance Name
Path ParametersThe value_param path element allows you to specify a value. The optional path parameters for the id, block, block_index, and datapoint_name path elements are listed on the Path Parameters page. Query Parameters
Success ResponseCollections of datapoints types. Exampleshttps://localhost/iap/devs/2/if/*/*/*+name=+^nvoP/type
RESPONSE:
[
{
"deviceId": "2",
"blocks": [
{
"block": "device/0",
"datapoints": [
{
"name": "nvoPsumtotal_kW",
"type": {
"id": "SNVT_count_f"
}
},
{
"name": "nvoPMaxxl_LM",
"type": {
"id": "SNVT_trans_table"
}
},
{
"name": "nvoPsum_kW",
"type": {
"id": "SNVT_count_f"
}
},
{
"name": "nvoPsumtotal_kW2",
"type": {
"id": "SNVT_count_f"
}
},
{
"name": "nvoPower",
"type": {
"id": "SNVT_str_int"
}
},
{
"name": "nvoPF",
"type": {
"id": "SNVT_trans_table"
}
},
{
"name": "nvoPF_2",
"type": {
"id": "SNVT_trans_table"
}
},
{
"name": "nvoP",
"type": {
"id": "SNVT_trans_table"
}
},
{
"name": "nvoPowerAlarm",
"type": {
"id": "SNVT_state_64"
}
},
{
"name": "nvoP_2",
"type": {
"id": "SNVT_trans_table"
}
},
{
"name": "nvoPMaxxl",
"type": {
"id": "SNVT_trans_table"
}
}
]
}
]
}
] | |
PUT
| /iap/devs/{id}/if/{block}/{block_index}/{datapoint_name}/type |
Updates the type of the specified datapoints for datapoints that support changeable types. XIFname vs Instance Name
Path ParametersThe type path element allows you to specify a type that will be applied to specified datapoints. The optional path parameters for the id, block, block_index, and datapoint_name path elements are listed on the Path Parameters page. Success ResponseResponse code 200 in case of success or some error code otherwise. Exampleshttps://localhost:8443/iap/devs/2/if/device/0/nvoPower/type
REQUEST BODY:
SNVT_str_int
RESPONSE:
Response code 200 |
Queries
You can include queries with your IAP/REST request to specify a selection rule for your request. As described in Queries and Parameters, you can specify a query as a query parameter appended to the end of your URI preceded with a "?" character, or as a path parameter within a path element of the path component.
The optional path parameters for the id, block, block_index, and datapoint_name path elements are listed on the Path Parameters page.