...
Configuration JSON structure
Code Block |
---|
|
{
"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,
"inacc_timeout":180,
"max_sarm":30,
"repeat_path_A":3,
"repeat_path_B":3,
"repeat_timeout":3000,
"anticipation":3,
"test_msg_send":"1304",
"test_msg_receive":"1304",
"gi_schedule":"99:99",
"gi_repeat_count":3,
"gi_time":255,
"c_ack_time":10
}
}
} |
...
Attribute | Description | Expected values | Mandatory |
---|
do_type | message type | TSCE, TSCG, TMA, TMN, ACK_TC, ACK_TVC | 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 | YESTS only |
do_ts_iv | timestamp invalid | valid = 0 or invalid = 1 | YESTS only |
do_ts_c | loss of chronology | lost = 0 else = 1 | YESTS only |
do_ts_s | ts not synchronized | synchronized = 0 else = 1 | YESTS only |
Example for a TSCE:
Code Block |
---|
|
{
"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:
Code Block |
---|
|
{
"data_object":{
"do_type":"TMA",
"do_station":12,
"do_address":71,
"do_value":-15,
"do_valid":1
}
} |
Example for a TC ACK:
Code Block |
---|
|
{
"data_object":{
"do_type":"ACK_TC",
"do_station":12,
"do_address":71,
"do_value":1
}
} |
Example for a TVC ACK:
Code Block |
---|
|
{
"data_object":{
"do_type":"ACK_TVC",
"do_station":12,
"do_address":72,
"do_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.
...
This is the command representation of an HNZ message.
Warning |
---|
The actual implementation does not use a json structure, so the order of parameters is mandatory. |
Attribute | Description | Expected values | Mandatory |
---|
co_type | message type | TC, TVC | YES |
co_address | message address |
| YES |
co_value | value |
| YES |
co_val_coding | coding of value | 0 or 1 | YESTVC only |
Example for a TC:
Code Block |
---|
|
{
"command_object":{
"co_type":"TC",
"co_address":325,
"co_value":1
}
} |
Example for a TVC:
Code Block |
---|
|
{
"command_object":{
"co_type":"TCTVC",
"co_address":49,
"co_value":1,
"co_val_coding":0
}
} |
...