Versions Compared

Key

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

HNZ connexion initialization

When the HNZ south plugin establishes a new connection with a HNZ device, it will automatically send the following messages to the device:

  • A set date and a set time: Those two messages will synchronize the date and time of the device with the one from the south plugin machine.
  • A CG request: This message will request all TS to be sent by the device in CG format (equivalent of GI request of iec104).

HNZ Protocol stack configuration

The HNZ protocol stack configuration specifies communication parameters and is a collection of entries containing information about OSI Transport and OSI Application layers objects.

...

Each entry shall be mapped with the corresponding configuration function in the chosen implementation protocol library.

The present specification corresponds to the HNZ B1/TR mode working on a TCP/IP connection.

Attributes definition

AttributeDescriptionExpected valuesMandatory
namethis identifies the protocol stackiec104client, iec104server, tase2client, tase2server, 61850client, 61850server, etc...Yes
versionversion number of the configuration file2 digits x.y => x = major change, y = minor changeYes
connectionsarray of connections
Yes
connections.srv_ipIP address to remote
IEC 104
HNZ serverIP addressYes
connections.port

port number to remote

IEC 104 server

HNZ server

default = 6001No
remote_station_addrremote server station address6 bitsYes
local_station_addrlocal server station address6 bitsYesremote_addr_in_local_stationremote address in local station0, 1 or 2Yes
Inacc_timeouttimeout before declaring the remote server unreachable (DF.GLOB.TS)default = 180 (seconds)No
Max
max_sarmmax number of SARM messages before handing over to the passive path (A/B)default = 30No
To
repeat_
socketRepeat_
path_Amax number of authorized repeats for path Adefault = 3No
Repeat
repeat_path_Bmax number of authorized repeats for path Bdefault = 3No
Repeat
repeat_timeouttime allowed for the receiver to acknowledge a frame, after this time, the sender repeats the frame.default = 3000No
Anticipation
anticipation_ratio
max
number of
messages send without ACK
frames allowed to be received without acknowledgement default = 3
Default_msg_period
No
test
Test
_msg_send
Test
test message code in sending directiondefault = 1304
Yes
No
Test
test_msg_receive
Test
test message code in receiving direction
Yes
default = 1304No
gi_schedulescheduled time for General Interrogation sendingdefault = 99:99 (disabled)No
gi_repeat_countrepeat GI for this number of times in case it is incompletedefault = 3No
gi_timetime to wait for General Interrogation (GI) completiondefault = 255 (seconds)No
c_ack_timetime to wait before receving a acknowledgement for a control commanddefault = 10 (seconds)No

cmd_recv_timeout

time to wait for bytes when receiving data from the HNZ devicedefault = 100000 (microseconds)No
south_monitoring.asset

asset name used to send the connection and gi status information to the north

default = "CONNECTION-1"No

Configuration JSON structure

Code Block
languagejspy
{
   "protocol_stack":{
      "name":"hnzclient",
      "version":"1.0",
      "transport_layer":{
         "connections":[
            {
               "srv_ip":"192.168.0.10",
               "port":6001
            },
            {
               "srv_ip":"192.168.0.11",
               "port":6002
            }
         ]
      },
      "application_layer":{
         "remote_station_addr":12,
         "local_station_addr":12inacc_timeout":180,
         "max_sarm":30,
         "remoterepeat_addr_in_local_station":0path_A":3,
         "repeat_path_B":3,
         "inaccrepeat_timeout":1803000,
         "maxanticipation_sarmratio":303,
         "totest_msg_socketsend":1"1304",
         "repeattest_pathmsg_Areceive":3"1304",
         "repeat_path_B":3gi_schedule":"99:99",
         "gi_repeat_timeoutcount":30003,
         "anticipationgi_time":3255,
         "defaultc_msgack_periodtime":010,
         "Testcmd_msgrecv_sendtimeout":"1304",100000
      },
      "south_monitoring":{
         "Test_msg_receiveasset":"1304CONNECTION-1"
      }
    }
}

HNZ datapoint representation

This is the Datapoint representation of an HNZ message.

AttributeDescriptionExpected valuesMandatory
do_typemessage typeTS, TM, TC, TVCYES
do_stationstation address
YES
do_addressmessage address
YES
do_valuevalue

TM (do_an = TMA): [-127..127]

TM (do_an = TM8): [0..255]

TM (do_an = TM16): [-32768..32767]

TS: [0..1]

TC: [1..2] (01b = on, 10b = off)

TVC: [-255..255]

YES except in quality update readings
do_validvalidityvalid = 0 or invalid = 1YES
do_anTM type (analogic / numeric)"TMA", "TM8", "TM16"TM only
do_cgTS sourceCG = 1 or CE = 0TS only
do_outdatedOutdated message (after connection loss)up to date =0, outdated = 1TM and TS only
do_tstimestampepoch timestamp in millisecondsTS CE only
do_ts_ivtimestamp invalidvalid = 0 or invalid = 1 (from bit HNV)TS CE only
do_ts_closs of chronologylost = 1 else = 0 (from bit CV)TS CE only
do_ts_sts not synchronizedsynchronized = 0 else = 1  (from bit S)TS CE only

Example for a TS from CE:

Code Block
languagejspy
{
    "data_object":{
        "do_type":"M_SP_TB_1",
       "do_ca":18325"TS",
        "do_station":12,
        "do_addr":325,
        "do_value":1,
        "do_valid":0,
        "do_cg":0,
        "do_outdated":0, 
        "do_ts":1685019425432,
        "do_ts_oaiv":0,
        "do_cotts_c":30,
        "do_test":false,
_ts_s":0
    }
 }

Example for a TS from CG:

Code Block
languagepy
{
    "data_object":{
        "do_type":"TS",
        "do_negativestation":false12,
        "do_ioaaddr":6468178325,
        "do_value":1,
        "do_quality_iv":truevalid":0,
        "do_cg":1,
        "do_outdated":0
    }
 }

Example for a TS quality update:

Code Block
languagepy
{
    "data_object":{
        "do_type":"TS",
 _bl":false,
       "do_quality_ov":falsestation":12,
        "do_addr":325,
        "do_quality_sb":falsevalid":0,
        "do_cg":0,
        "do_quality_nt":false,
outdated":1, 
        "do_ts":1685019425432,
        "do_ts_iv":16534843302390,
        "do_ts_ivc":true0,
        "do_ts_su":false_s":0
    }
 }

Example for a TMA:

Code Block
languagepy
{
    "data_object":{
        "do_type":"TM",
        "do_station":12,
        "do_addr":71,
        "do_value":-15,
        "do_valid":0,
        "do_an":"TMA",
        "do_outdated":0
    }
}

Example for a TMN 8 bits (TM8):

Code Block
languagepy
{
    "data_object":{
        "do_type":"TM",
        "do_station":12,
        "do_addr":71,
        "do_value":42,
        "do_valid":0,
        "do_an":"TM8",
        "do_outdated":0
    }
}

Example for a TMN 16 bits (TM16):

Code Block
languagepy
{
    "data_object":{
        "do_type":"TM",
        "do_station":12,
        "do_addr":71,
        "do_value":420,
        "do_valid":0,
        "do_an":"TM16",
        "do_outdated":0
    }
}

Example for a TM quality update:

Code Block
languagepy
{
    "data_object":{
        "do_type":"TM",
        "do_station":12,
        "do_addr":71,
        "do_valid":0,
        "do_an":"TMA",
        "do_outdated":1
    }
}

Example for a TC (after receiving ACK):

Code Block
languagepy
{
    "data_object":{
        "do_type":"TC",
        "do_station":12,
        "do_addr":71,
        "do_valid":0
     }
 }

Example for a TVC (after receiving ACK):

Code Block
languagepy
{
    "data_object":{
        "do_type":"TVC",
        "do_station":12,
        "do_addr":31,
       "do_ts_sub":false
    }
 } "do_valid":0
     }
 }

NB: if an attribute is not required, then it is not put in the output data object, which means that the output object structure always fits the protocol model object type.

HNZ command representation

This is the command representation of an HNZ message.

Warning

The current implementation does not use a json structure, so the order of parameters is mandatory.


OrderAttributeDescriptionExpected valuesMandatory
0co_typemessage typeTC, TVCYES
1co_addrmessage address

[0..255][0..7] (ADO + ADB) for a TC, [0..31] for a TVC

YES
2co_valuevalue[1..2] (01b = on, 10b = off)YES

The processing of FLEDGE commands should evolve. Below is an example of JSON format :

Example for a TC:

Code Block
languagepy
{
    "co_type":"TC",
    "co_addr":325,
    "co_value":1
}

Example for a TVC:

Code Block
languagepy
{
    "co_type":"TVC",
    "co_addr":31,
    "co_value":42
}

NB: if an attribute is not required, then it is not put in the output data object, which means that the output object structure always fits the protocol model object type.

HNZ south event representation

South events are special messages used to communicate information about the state of the connection and GI requests between south and north plugins.

Their behivior and structure is defined here.

Path exploration

In redundant network configuration or generally in cases where several communication paths exist between one client and one server, the path checking exploration mechanism allows the client to try all the paths one by one without making any difference between them. The client uses the first available path. On disconnection this procedure starts again from the beginning.