remove auto json

This commit is contained in:
fengzero
2022-03-31 09:01:08 +00:00
parent cfc44903c1
commit ca59cfdfe4
16 changed files with 0 additions and 521 deletions
-15
View File
@@ -1,15 +0,0 @@
#!/bin/sh
source_dir=${outc_dir:-"../../src/parser"}
header_dir=${outh_dir:-"../../include/json"}
json-autotype --clang --no-autounify --debug -t json_error ./neu_json_error.json -o neu_json_error.c
json-autotype --clang --no-autounify --debug -t json_group_config ./neu_json_group_config.json -o neu_json_group_config.c
json-autotype --clang --no-autounify --debug -t json_node ./neu_json_node.json -o neu_json_node.c
json-autotype --clang --no-autounify --debug -t json_plugin ./neu_json_plugin.json -o neu_json_plugin.c
json-autotype --clang --no-autounify --debug -t json_rw ./neu_json_rw.json -o neu_json_rw.c
json-autotype --clang --no-autounify --debug -t json_tag ./neu_json_tag.json -o neu_json_tag.c
json-autotype --clang --no-autounify --debug -t json_tty ./neu_json_tty.json -o neu_json_tty.c
mv *.c ${source_dir}/
mv *.h ${header_dir}/
-5
View File
@@ -1,5 +0,0 @@
{
"error_resp": {
"error": 0
}
}
-57
View File
@@ -1,57 +0,0 @@
{
"add_group_config_req": {
"name": "modbus-tcp-config1",
"node_id": 1,
"interval": 10000
},
"del_group_config_req": {
"node_id": 1,
"name": "gconfig1"
},
"update_group_config_req": {
"name": "modbus-tcp-config1",
"interval": 20000,
"node_id": 4
},
"get_group_config_req": {
"node_id": 1
},
"get_group_config_resp": {
"group_configs": [
{
"name": "config_modbus_tcp_sample_2",
"interval": 2000,
"pipe_count": 1,
"tag_count": 0
},
{
"name": "gconfig1",
"interval": 10000,
"pipe_count": 0,
"tag_count": 0
}
]
},
"subscribe_req": {
"src_node_id": 4,
"dst_node_id": 5,
"name": "gconfig1"
},
"unsubscribe_req": {
"src_node_id": 4,
"dst_node_id": 5,
"name": "gconfig1"
},
"get_subscribe_resp": {
"groups": [
{
"node_id": 1,
"group_config_name": "g1name"
},
{
"node_id": 2,
"group_config_name": "g2name"
}
]
}
}
-18
View File
@@ -1,18 +0,0 @@
{
"set_license_req": {
"license": "xxxxx"
},
"get_license_resp": {
"error": 0,
"license_type": "trial",
"valid": true,
"valid_since": "2021-05-13 09:36:56",
"valid_until": "2022-05-13 09:36:56",
"max_nodes": 100,
"max_node_tags": 1000,
"enabled_plugins": [
"modbus-plus-tcp",
"modbus-rtu"
]
}
}
-9
View File
@@ -1,9 +0,0 @@
{
"get_log_resp": {
"error": 0,
"page_count": 1,
"rows": [
"2022-02-11 15:30:57 WARN [neuron] src/main.c:90: recv sig: 2"
]
}
}
-52
View File
@@ -1,52 +0,0 @@
{
"add_node_req": {
"type": 1,
"name": "modbus-tcp-node",
"plugin_name": "modbus-plugin-tcp"
},
"del_node_req": {
"id": 7
},
"update_node_req": {
"id": 1,
"name": "modbus-tcp-node"
},
"get_nodes_req": {
"node_type": 1
},
"get_nodes_resp": {
"nodes": [
{
"name": "sample-driver-adapter",
"id": 1,
"plugin_id": 1
},
{
"name": "modbus-tcp-adapter",
"id": 4,
"plugin_id": 2
},
{
"name": "opcua-adapter",
"id": 6,
"plugin_id": 3
},
{
"name": "modbus-tcp-test",
"id": 7,
"plugin_id": 4
}
]
},
"node_setting_req": {
"node_id": 4
},
"get_node_state_resp": {
"running": 2,
"link": 1
},
"node_ctl_req": {
"id": 4,
"cmd": 0
}
}
-22
View File
@@ -1,22 +0,0 @@
{
"add_plugin_req": {
"lib_name": "plugin_name.so"
},
"del_plugin_req": {
"id": 1
},
"get_plugin_req": {
"id": 1
},
"get_plugin_resp": {
"plugin_libs": [
{
"id": 1,
"kind": 1,
"node_type": 1,
"name": "plugin_name",
"lib_name": "plugin_lib_name"
}
]
}
}
-43
View File
@@ -1,43 +0,0 @@
{
"read_resp": {
"tags": [
{
"id": 1,
"error": 2014,
"value": 123
},
{
"id": 2,
"error": 0,
"value": 2.2
},
{
"id": 3,
"error": 0,
"value": true
}
]
},
"write_req": {
"node_id": 4,
"group_config_name": "config_modbus_tcp_sample_2",
"tags": [
{
"id": 1,
"value": "wrhello"
},
{
"id": 2,
"value": 2.2
},
{
"id": 3,
"value": true
}
]
},
"read_req": {
"node_id": 4,
"group_config_name": "config_modbus_tcp_sample_2"
}
}
-86
View File
@@ -1,86 +0,0 @@
{
"add_tags_req": {
"node_id": 4,
"group_config_name": "config_modbus_tcp_sample_2",
"tags": [
{
"name": "tag1",
"address": "1!400001",
"attribute": 1,
"type": 4
},
{
"name": "tag2",
"address": "1!00001",
"attribute": 3,
"type": 14
},
{
"name": "tag3",
"address": "1!400009",
"attribute": 3,
"type": 11
}
]
},
"get_tags_req": {
"node_id": 4,
"group_config_name": "config_modbus_tcp_sample_2"
},
"get_tags_resp": {
"tags": [
{
"name": "tag1",
"type": 4,
"address": "1!400001",
"attribute": 1,
"group_config_name": "config_modbus_tcp_sample_2",
"id": 1
},
{
"name": "tag2",
"type": 14,
"address": "1!00001",
"attribute": 3,
"group_config_name": "config_modbus_tcp_sample_2",
"id": 4
},
{
"name": "tag3",
"type": 11,
"address": "1!400009",
"attribute": 3,
"group_config_name": "config_modbus_tcp_sample_2",
"id": 5
}
]
},
"update_tags_req": {
"node_id": 4,
"group_config_name": "test-group",
"tags": [
{
"id": 4,
"name": "tag1",
"type": 6,
"attribute": 0,
"address": "1!400001"
},
{
"id": 5,
"name": "tag2",
"type": 6,
"attribute": 0,
"address": "1!400002"
}
]
},
"del_tags_req": {
"group_config_name": "config_modbus_tcp_sample_2",
"node_id": 4,
"ids": [
4,
5
]
}
}
-8
View File
@@ -1,8 +0,0 @@
{
"get_tty_resp": {
"ttys": [
"/dev/tty0",
"/dev/tty1"
]
}
}
@@ -1,12 +0,0 @@
#!/bin/sh
outdir=${outc_dir:-"../../src/persist/json"}
json-autotype --clang --no-autounify --debug -t json_node ./json_adapter.json -o persist_json_adapter.c
json-autotype --clang --no-autounify --debug -t json_datatags ./json_datatags.json -o persist_json_datatags.c
json-autotype --clang --no-autounify --debug -t json_group_configs ./json_group_configs.json -o persist_json_group_configs.c
json-autotype --clang --no-autounify --debug -t json_plugin ./json_plugin.json -o persist_json_plugin.c
json-autotype --clang --no-autounify --debug -t json_subscriptions ./json_subs.json -o persist_json_subs.c
find -iname \*.c |xargs sed -i 's/json\/persist/persist/g'
mv *.c *.h ${outdir}/
-52
View File
@@ -1,52 +0,0 @@
{
"node_req": {
"nodes": [
{
"id": 1,
"state": 1,
"type": 1,
"name": "sample-driver-adapter",
"plugin_name": "sample-drv-plugin"
},
{
"id": 2,
"state": 2,
"type": 5,
"name": "sample-app-adapter",
"plugin_name": "sample-app-plugin"
},
{
"id": 3,
"state": 3,
"type": 3,
"name": "mqtt-adapter",
"plugin_name": "mqtt-plugin"
}
]
},
"node_resp": {
"nodes": [
{
"id": 1,
"state": 1,
"type": 1,
"name": "sample-driver-adapter",
"plugin_name": "sample-drv-plugin"
},
{
"id": 2,
"state": 2,
"type": 5,
"name": "sample-app-adapter",
"plugin_name": "sample-app-plugin"
},
{
"id": 3,
"state": 3,
"type": 3,
"name": "mqtt-adapter",
"plugin_name": "mqtt-plugin"
}
]
}
}
-46
View File
@@ -1,46 +0,0 @@
{
"datatag_req": {
"tags": [
{
"attribute": 1,
"type": 3,
"address": "1!400001",
"name": "modbus1"
},
{
"attribute": 1,
"type": 4,
"address": "1!400002",
"name": "modbus2"
},
{
"attribute": 1,
"type": 5,
"address": "2!Channel1.Device1.Tag00000001",
"name": "opcua1"
}
]
},
"datatag_resp": {
"tags": [
{
"attribute": 1,
"type": 3,
"address": "1!400001",
"name": "modbus1"
},
{
"attribute": 1,
"type": 4,
"address": "1!400002",
"name": "modbus2"
},
{
"attribute": 1,
"type": 5,
"address": "2!Channel1.Device1.Tag00000001",
"name": "opcua1"
}
]
}
}
@@ -1,12 +0,0 @@
{
"group_configs_req": {
"adapter_name": "modbus_tcp_adapter",
"group_config_name": "config_modbus_tcp_sample_2",
"read_interval": 2000
},
"group_configs_resp": {
"adapter_name": "modbus_tcp_adapter",
"group_config_name": "config_modbus_tcp_sample_2",
"read_interval": 2000
}
}
-14
View File
@@ -1,14 +0,0 @@
{
"plugin_req": {
"plugins": [
"libplugin-mqtt.so",
"libplugin-modbus-tcp.so"
]
},
"plugin_resp": {
"plugins": [
"libplugin-mqtt.so",
"libplugin-modbus-tcp.so"
]
}
}
-70
View File
@@ -1,70 +0,0 @@
{
"subscriptions_req": {
"subscriptions": [
{
"sub_adapter_name": "sample-app-adapter",
"group_config_name": "config_drv_sample",
"src_adapter_name": "sample-driver-adapter",
"read_interval": 2000
},
{
"sub_adapter_name": "sample-driver-adapter",
"group_config_name": "config_app_sample",
"src_adapter_name": "config_app_sample",
"read_interval": 2000
},
{
"sub_adapter_name": "mqtt-adapter",
"group_config_name": "config_mqtt_sample",
"src_adapter_name": "sample-driver-adapter",
"read_interval": 2000
},
{
"sub_adapter_name": "mqtt-adapter",
"group_config_name": "config_modbus_tcp_sample_2",
"src_adapter_name": "modbus_tcp_adapter",
"read_interval": 2000
},
{
"sub_adapter_name": "mqtt_adapter",
"group_config_name": "config_opcua_sample",
"src_adapter_name": "opcua-adapter",
"read_interval": 2000
}
]
},
"subscriptions_resp": {
"subscriptions": [
{
"sub_adapter_name": "sample-app-adapter",
"group_config_name": "config_drv_sample",
"src_adapter_name": "sample-driver-adapter",
"read_interval": 2000
},
{
"sub_adapter_name": "sample-driver-adapter",
"group_config_name": "config_app_sample",
"src_adapter_name": "config_app_sample",
"read_interval": 2000
},
{
"sub_adapter_name": "mqtt-adapter",
"group_config_name": "config_mqtt_sample",
"src_adapter_name": "sample-driver-adapter",
"read_interval": 2000
},
{
"sub_adapter_name": "mqtt-adapter",
"group_config_name": "config_modbus_tcp_sample_2",
"src_adapter_name": "modbbus_tcp_adapter",
"read_interval": 2000
},
{
"sub_adapter_name": "mqtt_adapter",
"group_config_name": "config_opcua_sample",
"src_adapter_name": "opcua-adapter",
"read_interval": 2000
}
]
}
}