Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

Common rules

Filter configuration

See Plugins configuration design for examples and details.

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

  • A "exchanged_data" category with the same content as provided to the IEC104 south plugin. This section is mandatory so that the filter plugin can convert the PIVOT type from IEC 104 type.

Notes :

  • 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:

  • The Reading fields "id", "TimeStamp" and "userTimestamp" are unchanged.
  • The "asset_name" field shall be mapped with "exchanged_data.datapoints.label"
  • The Reading field "reading" is updated with a JSON object {'<Root> key' : {...}} . The content of object under '<Root> key' is given below.

The <Root> key of PIVOT object

...

is:

Reading key

Content

PIVOTTS.GTIS
Tele Signal
Status Point
PIVOTTM.GTIM
Tele
Measurement
PIVOTTC.GTIC
Not supported

In the following table: <type> is equal to

...

Command or Set Point

<type> conversion table:

RootCDC ClassIEC 104 Type IDType ID with timetagAlternative format type id
GTISSpsTypM_SP_NA_1M_SP_TA_1,M_SP_TB_1M_PS_NA_1
GTISDpsTypM_DP_NA_1M_DP_TA_1,M_DP_TB_1M_EP_TA_1,M_EP_TD_1
GTIMMvTypM_ME_NA_1M_ME_TA_1,M_ME_TD_1M_ME_ND_1
GTIMMvTypM_ME_NB_1M_ME_TB_1,M_ME_TE_1
GTIMMvTypM_ME_NC_1M_ME_TC_1,M_ME_TF_1
GTIMBscTypM_ST_NAM_ST_TA_1,M_ST_TB
GTICSpcTypC_SC_NA_1C_SC_TA_1
GTICDpcTypC_DC_NA_1C_DC_TA_1
GTICIncTypC_SE_NB_1C_SE_TB_1

GTIC

ApcTyp

C_SE_NA_1, C_SE_NC_1C_SE_TA_1, C_SE_TC_1

GTIC

BscTyp

C_RC_NA_1C_RC_TA_1

Converting monitoring data types

...

The content under <Root> will convert the IEC 104 data objet to a pivot object as follow:

Key

Type

Default Value

iec104.data_object.<...>

Note

<Root>.Cause.stValInteger
Mandatory

do_cotSee Cause of Transmission
<Root>.Confirmation.stValBooleanfalsedo_
confirmation
negative
<Root>.ComingFromString
Mandatorydo_comingfromAny protocol name ("iec104" ,"opcua", ...)


This plugin should always use the value "iec104" when converting to pivot
<Root>.IdentifierString
Mandatory

do_id

do_type

do_id = PIVOT ID

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




The plugin will populate the "exchanged_data.datapoints.pivot_id" using the CA-IOA from the input iec104 data object and the "datapoints.protocols.address" from the exchanged_data configuration


<Root>.<type>{CDC}
do_type

The plugin will populate the "exchanged_data.datapoints.pivot_type" using the ASDU type from the input iec104 data object and the "datapoints.protocols.typeid" from the exchanged_data configuration

(see <type> conversion table above)

Other types not supported in current version.

<Root>.<type>.q.

DetailsQuality

Validity = "questionable"

<Root>.<type>.q

.test

.DetailQuality.overflow = true

Boolean

falsedo_quality_ov = true


<Root>.<type>.q.
operatorBlocked
test

PIVOT : Object
OPCUA : Integer

0do_detail

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

Booleanfalsedo_test
<Root>.<type>.
t
q.
TimeQuality
operatorBlocked
Integer
Boolean
0
falsedo_
ts
quality_
quality

OR-Mask of following values:

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

bl
<Root>.<type>.q.Source = "substituted"String"process"
 
do_quality_
source
sb = true"process" | "substituted"
<Root>.<type>.q.Validity = "invalid"String
Mandatory
"good"do_
value
quality_
quality
iv = true"good" | "invalid" | "reserved" | "questionable"
<Root>.<type>.t.SecondSinceEpochInteger
0

do_ts
<Root>.TmOrg.stValString
Mandatory

do_ts_org"genuine" |  "substituted"
<Root>.TmValidity.stVal = "invalid"String
Mandatory
"good"do_ts_
validity
iv = true"good" | "invalid" | "reserved" | "questionable"

<Root>.<type>.q.Validity = "questionable"

<Root>.<type>.q.DetailQuality.oldData = true

String"false"do_quality_nt = true

<Root>.<type>.q.Validity = "questionable"

<Root>.<type>.q.DetailQuality.overflow = true

String"false"do_quality_ov = true

<Root>.<type>.q.Validity = "questionable"

<Root>.<type>.q.DetailQuality.inconsistent = true

String"false"do_quality_iv = true

<Root>.<type>.q.Validity = "questionable"

<Root>.<type>.q.DetailQuality.inaccurate = true

String"false"do_quality_iv = true
<Root>.SpsTyp.stValBoolean
Mandatory 

do_value
<Root>.DpsTyp.stValString
Mandatory 

do_value
See CDC double point status (DPSTyp)
intermediate-state | off | on | bad-state
<Root>.MvTyp.mag.fFloat
Mandatory 

do_valueFloat 32
<Root>.MvTyp.mag.iInteger
do_valueInt 32
<Root>.BscTyp.valWTr.posValInteger
Mandatory do_value

do_valueInt 8
<Root>.BscTyp.valWTr.transIndBoolean
do_valueBoolean

Filter rules

STATION => (ASDU) IEC104 SOUTH => (IEC104 DP) IEC104TOPIVOT =>(PIVOT DP) PIVOTTOIEC104 => (IEC104 DP) IEC104 NORTH => (ASDU) CENTER

Rule 1: if the incoming IEC104 data object has not the attribute or has the default value then we don't have to create the corresponding attribute in the pivot object.

Rule 2: If the received pivot object has not an expected attribute then we create the attribute of the protocol specific datapoint with default value.

Rule 3: Case when ASDU timestamp is not received:

A the IEC104TOPIVOT step:
If the received ASDU is without timestamp Then
    We create a pivot object With timestamp = current system time
    And <>.TmOrg.stVal = substituted

On the PIVOTTOIEC104 step:
We create an IEC104 datapoint with timestamp and do_ts_sub = true

IEC104 NORTH step:
If the Datapoint configured in the exchanged data has not IEC104 timestamp typeid
Then we create an ASDU with a typeid with no timestamp
If the Datapoint configured in the exchanged data has IEC104 timestamp typeid
Then we create an ASDU with a timestamp typeid, ASDU timestamp = do_ts And subtituted = do_ts_sub

Converting commands data types

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

Key

Order

Type

Default Value

iec104.data_object.<...>

Note

<Root>.Cause.stVal
Integer
co_cotSee Cause of Transmission
<Root>.ComingFrom
String

This plugin should always use the value "iec104" when converting to pivot
<Root>.Identifier
String


The plugin will populate the "exchanged_data.datapoints.pivot_id" using the CA-IOA from the input iec104 command object and the "datapoints.protocols.address" from the exchanged_data configuration


<Root>.Select.stVal
Booleanfalseco_se

- 0 is mapped with false, for Execute

- 1 is mapped with true, for Select before Execute

<Root>.<type>
{CDC}
co_type

The plugin will populate the "exchanged_data.datapoints.pivot_type" using the ASDU type from the input iec104 command object and the "datapoints.protocols.typeid" from the exchanged_data configuration

(see <type> conversion table above)

<Root>.<type>.q.test
Booleanfalseco_test
<Root>.<type>.t.SecondSinceEpoch
Integer
co_ts
<Root>.SpcTyp.ctlVal
Boolean
co_value0 or 1
<Root>.DpcTyp.ctlVal
String
co_valueintermediate-state | off | on | bad-state
<Root>.IncTyp.ctlVal
Integer
co_valueInt 32
<Root>.ApcTyp.ctlVal
Float
co_valueFloat 32
<Root>.BscTyp.ctlVal
String
co_valuestop | lower | higher | reserved


Filter rules

CENTER => (ASDU) IEC104 NORTH => (IEC104 DP) IEC104TOPIVOT =>(PIVOT DP) PIVOTTOIEC104 => (IEC104 DP) IEC104 SOUTH=> (ASDU) STATION

Rule 1: if the incoming IEC104 command object has not the attribute or has the default value then we don't have to create the corresponding attribute in the pivot object.

Rule 2: If the received pivot object has not an expected attribute then we create the attribute of the protocol specific command with default value.

Rule 3: the timestamp of the original command issued by the Center must be transmitted as is to the Station.

Rule 4: Case when IEC104 command object timestamp is not received for ASDU type with timestamp, then IEC104 command object is rejected with error message.

Rule 5: Case when IEC104 command object for ASDU type without timestamp is received then:

A the IEC104TOPIVOT step:
If the received ASDU is without timestamp Then We create a pivot object With timestamp = current system time