From fcfbf90bed28773888f4b9c9896579b3c79f894d Mon Sep 17 00:00:00 2001 From: liyuxi Date: Thu, 2 Mar 2023 02:17:50 +0000 Subject: [PATCH] feat(schema):add a group_interval field --- plugins/file/file.json | 1 + plugins/modbus/modbus-tcp-community.json | 1 + src/adapter/adapter.c | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/file/file.json b/plugins/file/file.json index fb713cb5..0286d3a1 100644 --- a/plugins/file/file.json +++ b/plugins/file/file.json @@ -5,6 +5,7 @@ "regex": "" } ], + "group_interval": 1000, "file_length": { "name": "file_length", "description": "", diff --git a/plugins/modbus/modbus-tcp-community.json b/plugins/modbus/modbus-tcp-community.json index 65ef7ae8..ac82101a 100644 --- a/plugins/modbus/modbus-tcp-community.json +++ b/plugins/modbus/modbus-tcp-community.json @@ -25,6 +25,7 @@ "regex": "^[0-9]+!([0-1][0-9]+|[3-4][0-9]+\\.([0-9]|[0-1][0-5]))$" } ], + "group_interval": 1000, "host": { "name": "host", "description": "local ip in server mode, remote device ip in client mode", diff --git a/src/adapter/adapter.c b/src/adapter/adapter.c index 202110c0..402a2333 100644 --- a/src/adapter/adapter.c +++ b/src/adapter/adapter.c @@ -1051,10 +1051,10 @@ inline static void reply(neu_adapter_t *adapter, neu_reqresp_head_t *header, int ret = nng_sendmsg(adapter->sock, msg, 0); if (ret != 0) { nng_msg_free(msg); - nlog_warn("%s reply %s to %s, error: %s",header->sender, - neu_reqresp_type_string(header->type), header->receiver, nng_strerror(ret)); + nlog_warn("%s reply %s to %s, error: %s", header->sender, + neu_reqresp_type_string(header->type), header->receiver, + nng_strerror(ret)); } - } inline static void notify_monitor(neu_adapter_t * adapter,