Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Rework for controls and replies (cot TBC!)

...

  • All types not listed in this table are not supported in current version.
  • The current implementation provides a default mapping rule for each known type, but some new rules might be added in the future and configured using the "alternate_mapping_rule" option in its parameters.

Filter interface

The "plugin_ingest" call will convert each "reading" of "reading_set" as follow:

...

  • While converting from PIVOT to OPCUA, the PIVOT object is "standalone" and the plugin does not need any configuration from this transformation. The "Exchanged Data" section is only used by conversion from OPCUA to PIVOT.

Filter interface

The <Root> key of PIVOT object can be:

Reading keyContent
PIVOT.GTISTele Signal
PIVOT.GTIMTele Measurement
PIVOT.GTICTele ControlNot supported

In the following table: <type> is equal to

...

The "BscTyp" is not supported currently.

Type of data

The pugin can receive either PIVOT readings that are converted to OPCUA readings or receive OPCUA readings that are converted to PIVOT readings.The plugin is not responsible for checking that the conversion matches its actual role: typically if the plugin is attached to a North OPCUA service, it will be expected to convert OPCUA to PIVOT, but will anyway convert PIVOT to OPCUA if receiving PIVOT instead of OPCUA as reading. This consistency must be ensured by configuration.

Thus the ruls rules for the conversion is:

  • For each object in the reading is modified as follow:
    • If the object name is "PIVOT" and contains the "GTIM"or "GTIS" key, then the reading must be converted from a PIVOT object to an OPCUA "data object".
    • If the object name is "PIVOT" and contains the "GTIC" key, then the reading must be converted from a PIVOT object to an OPCUA "reply object"., convert the PIVOT reading to OPCUA
    • If the object name is "controlopcua_objectoperation", convert the OPCUA reading to PIVOT then the reading must be converted from an OPCUA control request (operation) to a PIVOT object.
    • Otherwise the reading is not modified.

Converting monitoring data types

For TM/TS, the filter receives PIVOT reading (from south) and creates a corresponding OPC UA reading. The created OPCUA reading has the following JSON equivalent format ("data object"):

Code Block
languagepy
{
   "data_object":{
      "do_cot": <int>,
      "do_confirmation": <int>,
      "do_comingfrom": <string>,
      "do_id":  <string>,
      "do_type":  <string>,
      "do_quality": <int>,
      "do_ts_quality": <int>,
      "do_value_quality": <string>,
      "do_source": <string>,
      "do_ts": <int>,
      "do_ts_org": <string>,
      "do_ts_validity": <string>,
      "do_value": <depends on data type...>
   }
}

...

Converting commands data types

For TC, the filter receives OPCUA reading (from north) and creates a corresponding PIVOT reading.

The content under <Root> will convert the OPCUA command objet to a pivot object as follow:

Converting commands implies two different use case:

  • While sending a Fledge "operation" (from North to South). In that case the filter converts an "opcua_operation" into a "PIVOT.GTIC" object.
  • While receiving an acknowledgement for a previous "operation" (from South to North).  In that case, the filter converts a "PIVOT.GTIC" into a "opcua_reply" object.

The conversion rules are details below.

Conversion from opcua_operation to PIVOT.GTIC

Stringts
opcua_operation.<...>PIVOT field ("PIVOT.GTIC"KeyTypeDefault valueopcua.control_object.<...>)Note<Root>.IdentifierTypeDefault valueNote
co_idIdentifierString
PIVOT identifier.
co_se<Root>.Select.stValBooleanfalseco_se

- 0 is mapped with false, for Execute

- 1 is mapped with true, for Select before Execute

<Root>N.A.ComingFromString"opcua"N.A.This plugin should always use uses the value "opcua" when converting to pivotPIVOT
co_type<Root>.<type>Stringco_type

(see <type> conversion table above)

co_test<Root>.<type>.q.testBooleanfalse
co_testts<Root>.<type>.t.SecondSinceEpochInteger

co_value

<Root>.ApcTyp.ctlVal

Float
Float 32
co_valueFloat 32

<Root>.DpcTyp.ctlVal

Stringco_value
intermediate-state | off | on | bad-state
co_value<Root>.IncTyp.ctlValInteger
Int 32
co_valueInt 32<Root>.SpcTyp.ctlValBoolean
0 or 1
co_value0 or 1<Root>.BscTyp.ctlValStringco_value
stop | lower | higher | reserved

Conversion from PIVOT.GTIC to "opcua_reply"

PIVOT field ("PIVOT.GTIC".<...>)opcua_reply fieldTypeDefault valueNote
Identifierro_idString
PIVOT identifier.
Cause.stValro_replyInteger

Converts the values as follow:

  • cot =7 => ro_reply=1
  • cot =9 => ro_reply=0
  • other values => ro_reply=-1
<All other fields are ignored>