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 is comprised of attributes that describe the object. All the configuration data are structured using JSON.
Each entry shall be mapped with the corresponding configuration function in the chosen implementation protocol library.
Attributes definition
Attribute | Description | Expected values | Mandatory |
---|---|---|---|
name | this identifies the protocol stack | iec104client, iec104server, tase2client, tase2server, 61850client, 61850server, etc... | Yes |
version | version number of the configuration file | 2 digits x.y => x = major change, y = minor change | Yes |
connections | array of connections | Yes | |
connections.srv_ip | IP address to remote IEC 104 server | IP address | Yes |
connections.port | port number to remote IEC 104 server | default = 6001 | No |
remote_station_addr | remote server station address | 6 bits | Yes |
local_station_addr | local server station address | 6 bits | Yes |
remote_addr_in_local_station | remote address in local station | 0, 1 or 2 | Yes |
Inacc_timeout | timeout before declaring the remote server unreachable | default = 180 (seconds) | No |
max_sarm | max number of SARM messages | default = 30 | No |
to_socket | |||
repeat_path_A | max number of authorized repeats for path A | default = 3 | No |
repeat_path_B | max number of authorized repeats for path B | default = 3 | No |
repeat_timeout | Time allowed for the receiver to acknowledge a frame, After this time, the sender repeats the frame. | default = 3000 | No |
anticipation_ratio | number of frames allowed to be transmitted while waiting for acknowledgement | default = 3 | |
default_msg_period | |||
Test_msg_send | Test message in sending direction | Yes | |
Test_msg_receive | Test message in receiving direction | Yes |
Configuration JSON structure
{ "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":12, "remote_addr_in_local_station":0, "inacc_timeout":180, "max_sarm":30, "to_socket":1, "repeat_path_A":3, "repeat_path_B":3, "repeat_timeout":3000, "anticipation":3, "default_msg_period":0, "Test_msg_send":"1304", "Test_msg_receive":"1304" } } }
HNZ datapoint representation
This is the Datapoint representation of an HNZ message.
Attribute | Description | Expected values | Mandatory |
---|---|---|---|
do_type | message type | TSCE, TSCG, TMA, TMN, ACK_TC, MOD10 | YES |
do_station | station address | YES | |
do_address | message address | YES | |
do_value | value | YES | |
do_valid | validity | valid = 0 or invalid = 1 | YES |
do_ts | time code | 10 ms fraction in the 10 min modulo | YES |
do_ts_iv | timestamp invalid | valid = 0 or invalid = 1 | YES |
do_ts_c | loss of chronology | lost = 0 else = 1 | YES |
do_ts_s | ts not synchronized | synchronized = 0 else = 1 | YES |
Example for a TSCE:
{ "data_object":{ "do_type":"TSCE", "do_station":12, "do_addr":325, "do_value":1, "do_valid":1, "do_ts":80, "do_ts_iv":0, "do_ts_c":0, "do_ts_s":0 } }
Example for a TMA:
{ "data_object":{ "do_type":"TMA", "do_station":12, "do_address":71, "do_value":-15, "do_valid":1 } }
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.