|
When these properties are bound at the ThingWorx Platform, it respects the template settings. However, if changes to the push and cache settings are made at the platform, those settings override the local template settings.
|
Use
|
To
|
||
---|---|---|---|
properties.nameOfProperty
|
Declare a property.
|
||
baseType
|
Required. Specify the base type of the property.
|
||
dataChangeType
|
Provide a default value for the Data Change Type field of the property definition on the ThingWorx Platform, if the property is initially created using the Manage Bindings feature of ThingWorx Composer. Valid values include:
• ALWAYS
• VALUE
• ON
• OFF
• NEVER
|
||
dataChangeThreshold
|
Provide a default value for the Data Change Threshold field of the property definition on the ThingWorx Platform, if the property is initially created using the Manage Bindings feature of ThingWorx Composer.
|
||
pushType
|
Specify whether the property should push new values upon change to the ThingWorx Platform. Valid values include:
• ALWAYS
• VALUE
• NEVER
The default is NEVER.
A pushType of NEVER does not push data to the platform, so when a property with pushType=NEVER is queried on the ThingWorx Platform, the platform queries the software of the edge device for the data value.
A pushType of ALWAYS pushes the data every time the property is read at the edge device, which is determined by the scanRate parameter. If the scanRate is not set on the property, the scanRate from the Lua Script Resource configuration file is used. If not defined in either location, a default of 60000 milliseconds (1 minute) is used. The Edge device pushes all properties that have a pushType of ALWAYS and the same scan rate in one call, rather than make individual calls per property.
For NUMBER or INTEGER property types, a pushType of VALUE pushes data to the ThingWorx Platform only when the data value change exceeds the DataChangeThreshold setting.
|
||
pushThreshold
|
For properties with a baseType of NUMBER, and a pushType of VALUE. specify how much a property value must change before the new value is pushed to the ThingWorx Platform.
|
||
handler
|
Specify the name of the handler to use for property reads/writes. Valid values include:
• script
• inmemory
• http
• https
• generator
The default handler is inmemory. The script, http, and https handlers use the key field to determine the endpoint where their read/writes are to be executed.
|
||
key
|
Define a key that the handler can use to look up or set the value of the property. In the case of a script handler, this key is a URL path. For http or https handlers, this key should be a URL and not the protocol.
This parameter is not required for inmemory or nil handlers.
|
||
value
|
Specify the default value of the property. The value is updated as the value changes on the Edge device. The default value is 0.
|
||
time
|
Specify the last time the value of the property was updated, in milliseconds since the beginning of the epoch.
When things are created from this template, the current time is set automatically, unless a default value is provided in the definition of the property.
|
||
quality
|
Specify the quality of the value of the property. A default value should be provided for the quality. Otherwise, the value defaults to GOOD for properties without a handler, and UNKNOWN for properties with a handler.
|
||
scanRate
|
Specify the frequency of checking the property for a change event, in milliseconds. The default value is 5000 milliseconds (every 5 seconds).
If you do not define a scanRate, the scanRate in the Lua Script Resource configuration file is used. Defining the scanRate within the property overrides the scanRate setting in the configuration file. Refer to Configuring the scanRateResolution.
|
||
cacheTime
|
Initialize the cache time of the value for the property at the ThingWorx Platform. The default value is –1 if the dataChangeType is NEVER, and is 0 when dataChangeType is ALWAYS or VALUE.
If a value that is greater than 0 is specified, it is used by the ThingWorx Platform as the initial value for the cache time, and is applied only when using the browse functionality of ThingWorx Composer to bind the property.
|