Data Type Presentation and Formatting
This page describes how IAP handles invalid values, out-of-range values, rounding, and unknown types. This information applies to all data types or fields within data types, on all protocols.
Invalid Values
To set a value to its designated invalid value, the IAP client can assign the string "invalid". The processing engine recognizes this keyword and converts it to the data type's designated invalid value. Likewise, when an edge datapoint is read by the engine and reports the designated invalid value, the value is presented with the "invalid" keyword string.
Note: Not all types have a designated invalid value. Assigning the "invalid" keyword to a value implementing such a type, or to a field within a value implementing such a type, yields an invalid value error.
Assignment of explicit or implicit invalid values such as -1 or NaN is not supported. Always use the "invalid" keyword.
Out-of-Range Values
Out-of-range value assignments, or otherwise invalid value assignments, are rejected with an error, and the previous value will not be changed when assigned through IAP/MQ. When an out-of-range value is received from the edge device, the engine indicates the error and provides a reasonable presentation: present the out-of-range value even if it exceeds the valid value range, if possible, or clip to the nearest edge of the valid value range.
Rounding
Values can have finite resolution, and valid value assignments can be rounded to the nearest acceptable value.
For example, the SNVT_angle_deg type has scaling factors A, B, C = +2, -2, 0 for a resolution of 0.02. An assignment of 20.1234 would be rounded to the nearest acceptable value: 20.12.
Unknown Types
It is possible that the processing engine encounters data without applicable data type information. In this case the engine must flag the error and presents the data using a "raw hex string" format in the implementation byte order.
For example, if data of an unknown type is received as a set of three bytes with hexadecimal values 0x10, 0x20, 0x30, this can be presented as "10 20 30". Data presented in this manner must accept value assignments through IAP that use the same format, such as "11 22 33", but data with known data types does not accept such a generic value.