Versions Compared

Key

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

...

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,
         "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
      }
   }
}

...

AttributeDescriptionExpected valuesMandatory
do_typemessage typeTSCE, TSCG, TMA, TMN, ACK_TC, ACK_TVCYES
do_stationstation address
YES
do_addressmessage address
YES
do_valuevalue
YES
do_validvalidityvalid = 0 or invalid = 1YES
do_tstime code10 ms fraction in the 10 min moduloYESTS only
do_ts_ivtimestamp invalidvalid = 0 or invalid = 1YESTS only
do_ts_closs of chronologylost = 0 else = 1YESTS only
do_ts_sts not synchronizedsynchronized = 0 else = 1YESTS only

Example for a TSCE:

Code Block
languagejspy
{
    "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
languagejspy
{
    "data_object":{
       "do_type":"TMA",
       "do_station":12,
       "do_address":71,
       "do_value":-15,
       "do_valid":1
    }
 }

Example for a TC ACK:

Code Block
languagepy
{
    "data_object":{
       "do_type":"ACK_TC",
       "do_station":12,
       "do_address":71,
       "do_value":1
    }
 }

Example for a TVC ACK:

Code Block
languagepy
{
    "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.


AttributeDescriptionExpected valuesMandatory
co_typemessage typeTC, TVCYES
co_addressmessage address
YES
co_valuevalue
YES
co_val_codingcoding of value0 or 1YESTVC only

Example for a TC:

Code Block
languagejspy
{
    "command_object":{
       "co_type":"TC",
       "co_address":325,
       "co_value":1
     }
 }

Example for a TVC:

Code Block
languagejspy
{
    "command_object":{
       "co_type":"TCTVC",
       "co_address":49,
       "co_value":1,
       "co_val_coding":0
     }
 }

...