Actions

RESTful API: Add MTP3 Point Codes: Difference between revisions

No edit summary
No edit summary
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:RESTful API: Add MTP3 Point Codes}}
{{DISPLAYTITLE:RESTful API: Add MTP3 Point Codes}}
== Add MTP3 Point Codes with tbconfig commands ==
== Add MTP3 Point Codes using tbconfig commands ==
=== DisplayMTP3 point codes list  ===
=== DisplayMTP3 point codes list  ===
To show the MTP3 point codes list in general it will be:
To show the MTP3 point codes list, in general, enter:
   tbconfig -u root -p root /configurations/main_config/point_codes  
   tbconfig -u root -p root /configurations/main_config/point_codes  
<<<<Note: Change the “main_config” to your configuration name
</br>'''Note''': Change “main_config” to the name of your configuration.


=== Export the current point codes table to a json file ===
=== Export the current point codes table to a json file ===
tbconfig  /configurations/main_config/point_codes pc.json -r
tbconfig  /configurations/main_config/point_codes pc.json -r
<<<<Note: Change the “main_config” to your configuration name


The file pc.json will look something like this:
</br>'''Note''': Change “main_config” to the name of your configuration.
{
 
  "MTP3_2_2_2" : {
 
    "advanced_parameters" : {
The file pc.json will resemble the following:
      "broadcast" : false,
 
      "route_to_adjacent" : false,
{
      "sls_selector_bit1" : true,
 
      "sls_selector_bit2" : false,
"DPC_2_2_2" : {
      "sls_selector_bit3" : false,
  "length" : "24bits format=8.8.8",
      "sls_selector_bit4" : false,
  "name" : "DPC_2_2_2",
      "support_multi_message_prio" : false,
  "point_code" : "2.2.2",
      "support_route_congestion_test" : true
  "type" : "DPC"
    },
},
    "mtp3_linksets" : [
"OPC_1_1_1" : {
      "MTP3_LS_ANSI"
  "length" : "24bits format=8.8.8",
    ],
  "name" : "OPC_1_1_1",
    "name" : "MTP3_2_2_2",
  "point_code" : "1.1.1",
    "point_code" : "DPC_2_2_2",
  "type" : "OPC"
    "point_code_type" : "SP",
},
    "sls_range" : "ANSI 5 bits",
"***meta***" : {
    "timers" : {
  "src_path" : "",
      "t6_timer" : "800 milliseconds",
  "version" : "3.2.55"
      "t8_timer" : "800 milliseconds",
}
      "t10_timer" : "30 seconds",
      "t11_timer" : "30 seconds",
      "t18_timer" : 11000,
      "t19_timer" : "67 seconds",
      "t21_timer" : "63 seconds",
      "t25_timer" : "30 seconds",
      "tc_timer" : "500 milliseconds"
    }
  },
  "MTP3_LOCAL" : {
    "advanced_parameters" : {
      "broadcast" : false,
      "route_to_adjacent" : false,
      "sls_selector_bit1" : true,
      "sls_selector_bit2" : false,
      "sls_selector_bit3" : false,
      "sls_selector_bit4" : false,
      "support_multi_message_prio" : false,
      "support_route_congestion_test" : true
    },
    "mtp3_linksets" : [
      "MTP3_LS_ANSI"
    ],
    "name" : "MTP3_LOCAL",
    "point_code" : "OPC_1_1_1",
    "point_code_type" : "SP",
    "sls_range" : "ANSI 5 bits",
    "timers" : {
      "t6_timer" : "800 milliseconds",
      "t8_timer" : "800 milliseconds",
      "t10_timer" : "30 seconds",
      "t11_timer" : "30 seconds",
      "t18_timer" : 11000,
      "t19_timer" : "67 seconds",
      "t21_timer" : "63 seconds",
      "t25_timer" : "30 seconds",
      "tc_timer" : "500 milliseconds"
    }
  },
  "***meta***" : {
    "src_path" : "",
    "version" : "3.2.55"
  }
}
}


=== Add the new point codes and save it as pc_new.json ===  
=== Add the new point codes and save it as pc_new.json ===  
Line 84: Line 39:
tbconfig  /configurations/main_config/point_codes pc_new.json -U  
tbconfig  /configurations/main_config/point_codes pc_new.json -U  


<<<<Note: Change the “main_config” to your configuration name
</br>'''Note''': Change “main_config” to the name of your configuration.
 


=== Example of pc.json and pc_new.json  ===  
=== Example of pc.json and pc_new.json  ===  
*[[:File:pc.json|Click here to download pc.json]]
*[[Media:pc.zip|Click to download pc.json]]
*[[:File:pc_new.json|Click here to download pc_new.json]]
*[[Media:pc_new.zip|Click to download pc_new.json]]

Latest revision as of 17:36, 22 November 2023

Add MTP3 Point Codes using tbconfig commands

DisplayMTP3 point codes list

To show the MTP3 point codes list, in general, enter:

 tbconfig -u root -p root /configurations/main_config/point_codes 


Note: Change “main_config” to the name of your configuration.

Export the current point codes table to a json file

tbconfig /configurations/main_config/point_codes pc.json -r


Note: Change “main_config” to the name of your configuration.


The file pc.json will resemble the following:

{
"DPC_2_2_2" : {
  "length" : "24bits format=8.8.8",
  "name" : "DPC_2_2_2",
  "point_code" : "2.2.2",
  "type" : "DPC"
},
"OPC_1_1_1" : {
  "length" : "24bits format=8.8.8",
  "name" : "OPC_1_1_1",
  "point_code" : "1.1.1",
  "type" : "OPC"
},
"***meta***" : {
  "src_path" : "",
  "version" : "3.2.55"
}

}

Add the new point codes and save it as pc_new.json

Import pc_new.json

tbconfig /configurations/main_config/point_codes pc_new.json -U


Note: Change “main_config” to the name of your configuration.


Example of pc.json and pc_new.json