Configuration Details

There are three different OSI-PI configuration types:
  • native: Produces output in OSI-PI JSON format
  • time_series: Produces output in Predix Time Series JSON format
  • flat_json: Produces flat JSON output
All three configuration types have the same fields in their config:
FieldTypeRequiredDefault
transport_addrStringYes
data_mapArrayYes
log_levelStringNo'off'
interval_msIntNo1000
usernameStringNo
passwordStringNo
proxy_urlStringNo$https_proxy
validate_certsBoolNoTrue
output_formatStringNoflat_json
digital_output_type String No uint64

transport_addr

The transport_addr field determines the location of the OPC-UA endpoint the block will communicate with. this can be any valid web URL.

data_map

The data_map field defines the registers to retrieve data from on the Modbus endpoint and how to convert that data to flat JSON format. The data_map is an array of objects of the following structure:
FieldTypeRequired
aliasStringyes
webidStringyes
piPointNameStringyes

The alias field of the data_map determines the name of the requested value that should mean something to the target application. Examples are “temperature” and “pressure”.

The webid field of the data_map is the id of the data tag you are trying to read in the server.

The piPointName field of the data_map is the human readable name of the data tag you are trying to read in the server.

Either the webid or the piPointName must be specified in the configuration along with the alias. If both webid and the piPointName are specified, the piPointName is ignored.

log_level and log_name

For details about the log_level and log_name fields, see the Generic CDP Blocks section of the Protocol Adapters documentation page.

interval_ms

The interval_ms field determines the interval (in milliseconds) at which the block will poll its endpoint for data. The default is 1000.

username

The username field is the username for the PiWebApi endpoint. The default is none.

password

The password field is the username for the PiWebApi endpoint. The default is none.

proxy_url

The proxy_url field determines the proxy address used to connect to the PiWebApi endpoint. The default is the environment variable $https_proxy.

validate_certs

The validate_certs field determines whether the adapter will validate the certificates of the PiWebApi endpoint. Use this field if your PiWebApi does not have a valid ceritificate. The default is an empty string.

output_format

The output_format field determines the output format of the data retrieved from the PiWebApi.
  • flat_json will return the data in flat JSON format.
  • time_series will return the data in Predix Time Series format.
  • native will return the data in the native PiWebApi JSON format.

digital_output_type

May be one of:
  • bool: A JSON true/false value is used to report 0, or non-zero values.
  • string: The name of the value is reported.
  • uint64: The ordinal value is left as-is (this is the default).