This plugin intends at converting PIVOT data from/to OPCUA north plugin.

The filter implements the Fledge Filter plugin interface (see filter_plugins).

Filter configuration

See Plugins configuration design for examples and details

The "config" parameter of  "plugin_init" call shall include :

Notes :

Filter interface

The <Root> key of PIVOT object can be:

Reading keyContent
PIVOT.GTISTele Signal
PIVOT.GTIMTele Measurement
PIVOT.GTICTele Control

In the following table: <type> is equal to

The "BscTyp" is not supported currently.

Type of data

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 rules for the conversion is:

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"):

{
   "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...>
   }
}


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

KeyTypeDefault Valueopcua.data_object.<...>Note
<Root>.Cause.stValIntegerMandatorydo_cotSee Cause of Transmission
<Root>.Confirmation.stValBooleanfalsedo_confirmation
<Root>.ComingFromStringMandatorydo_comingfromAny protocol name ("iec104" ,"opcua", ...)
<Root>.IdentifierStringMandatory

do_id

do_type

do_id = PIVOT ID

do_type = "opcua_sps" | "opcua_dps" | "opcua_mvi" | "opcua_mvf".

Other types not supported in current version.

<Root>.<type>.q.DetailsQuality

<Root>.<type>.q.test

<Root>.<type>.q.operatorBlocked


PIVOT : Object
OPCUA : Integer


0do_quality

OR-Mask of following values:

0x0001 = badReference 
0x0002 = failure
0x0004 = inconsistent
0x0008 = innaccurate
0x0010 = oldData
0x0020 = oscillatory
0x0040 = outOfRange
0x0080 = overflow
0x1000 = test
0x2000 = operator blocked

<Root>.<type>.t.TimeQualityInteger0do_ts_quality

OR-Mask of following values:

0x01 = clockFailure
0x02 = clockNotSynch
0x04 = leapSecondKnown

<Root>.<type>.q.SourceString"process" do_source"process" | "substituted"
<Root>.<type>.q.ValidityStringMandatorydo_value_quality"good" | "invalid" | "reserved" | "questionable"
<Root>.<type>.t.SecondSinceEpochInteger0do_tsUnit = seconds since Epoch (January, 1st 1970)
<Root>.TmOrg.stValString"genuine" do_ts_org"genuine" |  "substituted"
<Root>.TmValidity.stValString"good"do_ts_validity"good" | "invalid" | "reserved" | "questionable"
<Root>.SpsTyp.stValBooleanMandatory do_value
<Root>.DpsTyp.stValStringMandatory do_value

See CDC double point status (DPSTyp)

<Root>.MvTyp.mag.fFloatMandatory do_value
<Root>.MvTyp.mag.iIntegerMandatory do_value


Converting commands data types

Converting commands implies two different use case:

The conversion rules are details below.

Conversion from opcua_operation to PIVOT.GTIC

opcua_operation.<...>PIVOT field ("PIVOT.GTIC".<...>)TypeDefault valueNote
co_idIdentifierString
PIVOT identifier.
co_seSelect.stValBooleanfalse

- 0 is mapped with false, for Execute

- 1 is mapped with true, for Select before Execute

N.A.ComingFromString"opcua"This plugin always uses the value "opcua" when converting to PIVOT
co_type<type>String

"opcua_spc" | "opcua_dpc".

co_test<type>.q.testBooleanfalse
co_ts<type>.t.SecondSinceEpochInteger

co_value

ApcTyp.ctlVal

Float
Float 32
co_value

DpcTyp.ctlVal

String
intermediate-state | off | on | bad-state
co_valueIncTyp.ctlValInteger
Int 32
co_valueSpcTyp.ctlValBoolean
0 or 1
co_valueBscTyp.ctlValString
stop | lower | higher | reserved

Conversion from PIVOT.GTIC to "opcua_reply"

PIVOT field ("PIVOT.GTIC".<...>)opcua_reply fieldTypeDefault valueNote

Identifier

ro_idString
PIVOT identifier.
Confirmation.stValro_replyBoolean

Converts the values as follow:

  • confirmation.stval = false then ro_reply = 0 (positive confirmation)
  • confirmation.stval = true then ro_reply = 1 (negative confirmation)
<All other fields are ignored>