IPWorks IoT 2020 Python Edition

Questions / Feedback?

client_property_value_type Property

The table property's value type.

Syntax

def get_client_property_value_type(client_property_index: int) -> int: ...
def set_client_property_value_type(client_property_index: int, value: int) -> None: ...

Default Value

17

Remarks

The table field's value type.

This property specifies the table field's value type (and thus, the format of the data in the client_property_value property). Acceptable value types are:

Value Type JSON Value TypeDescriptionValue Format
fvtBoolean (0) boolean Boolean "True" or "False"
fvtByte (1) byte Byte -128 to 127
fvtUbyte (2) ubyte Unsigned byte 0 to 255
fvtShort (3) short Short -32768 to 32767
fvtUshort (4) ushort Unsigned short 0 to 65535
fvtInt (5) int Integer -2147483648 to 2147483647
fvtUint (6) uint Unsigned integer 0 to 4294967295
fvtLong (7) long Long -9223372036854775808 to 9223372036854775807
fvtUlong (8) ulong Unsigned long 0 to 18446744073709551615
fvtFloat (9) float Float IEEE 754 32-bit floating point number
fvtDouble (10) double Double IEEE 754 64-bit floating point number
fvtDecimal (11) decimal Decimal Hex-encoded byte string
fvtSstring (12) sstring Short string UTF-8 string data, limited to 255 bytes; may not contain null bytes (\0)
fvtString (13) string String String data
fvtArray (14) array Array JSON array of type-value pairs
fvtTimestamp (15) timestamp Timestamp Number of milliseconds since the Unix epoch (January 1, 1970 00:00:00 UTC)
fvtTable (16) table Table JSON object containing name-type-value tuples
fvtNull (17 - default)null Null N/A (client_property_value is ignored)

Note: The fvtUlong (8) and fvtSstring (12) value types are not supported when the RabbitMQCompatible configuration setting is enabled.

For the fvtArray (14) value type, the client_property_value should be specified as a JSON array of type-value pairs; for example:

[
  { "type": "int", "value": 23 },
  { "type": "int", "value": -52 },
  { "type": "int", "value": 153325 }
]

For the fvtTable (16) value type, the client_property_value should be specified as a JSON object containing name-type-value tuples; for example:

{
  { "name": "Test1", "type": "long", "value": 12345678901234 },
  { "name": "Test2", "type": "boolean", "value": "false" },
  { "name": "Test3", "type": "string", "value": "This is a test." }
}

Notes regarding fvtArray (14) and fvtTable (16) type client_property_values:

  • All "type" fields in the JSON content must be set to one of the value types in the table above.
  • For fvtTable (16) type client_property_values, all "name" fields must adhere to the rules described by the client_property_key documentation.
  • Nesting and mixing multiple levels of arrays and tables in the JSON is allowed.

The client_property_index parameter specifies the index of the item in the array. The size of the array is controlled by the client_property_count property.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IoT 2020 Python Edition - Version 20.0 [Build 8265]