Breadcrumbs

WritableRestPointProxyExt

Summary

The WritableRestPointProxyExt is responsible for the RestQuery request frequency. A RestQuery will use the highest frequency of all its RestPointProxyExt dependents as the polling frequency.

It allows conversions to be applied on the value received. It first applies a status to the final value based on the value read in the JSON, and then performs a conversion of the value to get the final data that will be written to the point. These Conversions are specific to the standard data types received in the Web APIs.


It also allows to send a request on the modification of its Write Value

 

The main difference with the RestpointProxyExt is the presence of a WritableHttpConfig allowing to send a request on the modification of its Write Value


image2020-8-18_12-26-37.png

Implementation

The WritableRestPointProxyExt is automatically inserted into the Writable points created by the RestPointManager. The three types of points accepted by the RestPointDeviceExt are also available in a palette with the RestPointProxyExt.

To configure it:

  1. Specify a selector to filter the received data to just the desired field.

  2. Configure the Status Conversions

  3. Configure the Value Conversions

Properties

  • Status: Returns the status of the point.

  • Fault Cause: Indicates the point fault reason.

  • Enabled: Configures the status of the point. A disabled point will not receive data from RestQuery.

  • Device Facets: Configures the input value facets.

  • Conversion: Allows application of a standard conversion. This conversion is the one available in all Niagara ProxyExts.

  • Read Value: The value received by a RestQuery, filtered by the Selector and converted as shown below. If the value is a final value (String, Numeric or Boolean) then it is converted to a Niagara value. If this value is an Object then the slot receives a text representing the list of the keys for the object. If it is an Array, then it receives a number representing the length of the array. If the value is Null, then the slot receives the text: "null".

  • Write Value: Not currently used.

  • Poll Frequency: Configures the frequency of data recovery. (See RestNetwork)

  • Selector: Specifies the JSON Key Selector to filter the received data.

  • Received Type: Provides an indication of the type of data received before the conversions.

  • Status Conversion: Container used to configure the status of the value that will be written to the point. (See Status Conversions).

  • Value Conversion: Container used to modify the value to be written in the point. The conversion output values must match the control point type. (See Value Conversions).

  • Writable Http Config: Configures the HTTP request. For more details, see the article Writable Http Config.