summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Reiss <jreiss@multitech.com>2017-11-10 08:05:44 -0600
committerJason Reiss <jreiss@multitech.com>2017-11-10 08:05:44 -0600
commit3160bf3a91d042d00441c77db32be6f51b7100e2 (patch)
tree97410e1ee93a1784ad240e97ca581861e805075d
parent58c303129c5dde8c2e819cc248e237da4f7295f1 (diff)
downloadlora-query-3160bf3a91d042d00441c77db32be6f51b7100e2.tar.gz
lora-query-3160bf3a91d042d00441c77db32be6f51b7100e2.tar.bz2
lora-query-3160bf3a91d042d00441c77db32be6f51b7100e2.zip
remove node commands, use -x or --command to interface network server and use new format1.0.4
lora-query -x help to show command options for network server
-rw-r--r--main.cpp41
1 files changed, 1 insertions, 40 deletions
diff --git a/main.cpp b/main.cpp
index 4156126..78f5c77 100644
--- a/main.cpp
+++ b/main.cpp
@@ -413,10 +413,6 @@ void parseOptions(int argc, char** argv) {
{ "stats", no_argument, 0, 's' },
{ "stats-reset", no_argument, 0, 'r' },
{ "node-list", no_argument, 0, 'n' },
- { "node-config", required_argument, 0, 'c' },
- { "node-add", required_argument, 0, 'a' },
- { "node-update", required_argument, 0, 'u' },
- { "node-delete", required_argument, 0, 'd' },
{ "command", required_argument, 0, 'x' },
{ "json", no_argument, 0, 'j' },
{ "timeout", required_argument, 0, 't' },
@@ -448,31 +444,6 @@ void parseOptions(int argc, char** argv) {
++opt_get_nodelist;
break;
}
- case 'c': {
- ++opt_get_nodeconfig;
- node_config_addr = optarg;
- break;
- }
- case 'a': {
- ++opt_add_node;
- node_add_args[node_add_count++] = optarg;
- for (int i = optind; i < argc; i++) {
- node_add_args[node_add_count++] = argv[i];
- }
- break;
- }
- case 'u': {
- ++opt_update_node;
- node_update_addr = optarg;
- node_update_field = argv[optind];
- node_update_value = argv[optind + 1];
- break;
- }
- case 'd': {
- ++opt_delete_node;
- node_delete_addr = optarg;
- break;
- }
case 'j': {
++opt_get_json;
break;
@@ -504,20 +475,10 @@ void printHelp(const std::string& sApp) {
printf("\t--stats (s) : get LoRa Network server statistics\n");
printf("\t--stats-reset (r) : reset LoRa Network server statistics\n");
printf("\t--node-list (n) : get Node List\n");
- printf("\t--node-config (c) : get Node config\n");
- printf("\t\tex: --node-config <NODE-ADDR>\n");
- printf("\t--node-add (a) : add node\n");
- printf("\t\tusage: --node-add <NODE-ADDR> [CLASS] <APP-EUI> <DEV-EUI> ([APP-KEY] | [NET-SKEY] [APP-SKEY])\n");
- printf("\t\tex: --node-add 00000001 A 16ea76f6ab663d80 4c194e20d396b5f7d3e1551e4cd320de\n");
- printf("\t--node-update (u) : update node info\n");
- printf("\t\tusage: --node-update <NODE-ADDR> <FIELD-NAME> <VALUE>\n");
- printf("\t\tex: --node-update 00000001 class C\n");
- printf("\t\tex: --node-update 00000001 appkey 4c194e20d396b5f7d3e1551e4cd320de\n");
- printf("\t--node-delete (d) : delete a Node\n");
- printf("\t\tex: --node-delete <NODE-ADDR>\n");
printf("\t--command (x) : send command string to network server\n");
printf("\t\tusage: --command <COMMAND-NAME> <COMMAND-OPTIONS> ...\n");
printf("\t\tex: --command device list json\n");
+ printf("\t\tex: -x help\n");
printf("\t--json (j) : data in json format\n");
printf("\t--help (?) : returns this message\n");
printf("\t--version (v) : print version\n");