Commit Graph

248 Commits

Author SHA1 Message Date
eeff 5ecde49f49 Fix persister loading apis to return more fine grain error code 2022-01-20 18:00:00 +08:00
eeff 6102058928 Fix persister_singleton_load_grp_and_tags unused variable warning 2022-01-20 16:52:59 +08:00
gc87 a9b3a2057b Modify libbase's compilation configuration
Add the nng-mqtt switch to the compilation process of libbase
2022-01-20 10:09:22 +08:00
gc87 b496073518 Add nng-based mqtt client implementation 2022-01-20 10:09:22 +08:00
lixiumei 68ab467961 Fix neu_persister_t references 2022-01-19 17:22:26 +08:00
fengzero db914268be the basic info(plugin name, type, kind...) of the plugin is read from the dynamic library
add dynamic library search path configuration, install to
/etc/ld.so.conf.d/

dynamic library search path priority:
  1. driver.path in neuron.yaml
  2. os path
2022-01-19 16:56:10 +08:00
eeff e116ee487c Make default persist adapter load group configs 2022-01-19 10:12:28 +08:00
eeff 5ccbf1bde5 Update neu_manager to forward group config event to persist adapter
1. Forward group config event in neu_manager loop
  2. Handle group config event in persist adapter loop
2022-01-19 10:12:28 +08:00
eeff c0f90596f4 Update adapter command to send group config event
1. Add message type MSG_EVENT_ADD_GRP_CONFIG,
     MSG_EVENT_UPDATE_GRP_CONFIG, MSG_EVENT_DEL_GRP_CONFIG
  2. Send the corresponding message when add/update/del group config
2022-01-19 10:12:28 +08:00
gc87 b1cfb43096 Move mqtt components to the base library 2022-01-18 18:11:58 +08:00
Parker Liu a957732f73 Fix build error of not define PATH_MAX in persist.c 2022-01-18 15:00:08 +08:00
Parker Liu 28adc16926 Reformatting neu_data_expr.c and hash_table.c to pass CI 2022-01-17 17:38:47 +08:00
fengzero 9e60bd2101 plugin: add validate function in plugin funs
check whether the tag conforms to the relevant driver specifications
2022-01-17 17:19:50 +08:00
Parker Liu 4b66b200d2 Fix memory leak issue when load plugins and adapters in persist.c 2022-01-17 17:12:17 +08:00
Parker Liu ac2246d9ec Clean the warning in connection.c and hash_table.c 2022-01-17 16:25:05 +08:00
Parker Liu 6db6271d1c Fix memory leak issue when shared data value 2022-01-17 16:05:52 +08:00
eeff adcdda70e6 Make default persist adapter load adapter setting 2022-01-14 19:10:22 +08:00
eeff e1cd0906db Update neu_manager to forward node setting event to persist adapter
1. Forward set node setting event in neu_manager loop
  2. Handle set node setting event in persist adapter loop
2022-01-14 19:10:22 +08:00
eeff 96e2829d92 Update adapter command to send node setting event
1. Add message type MSG_EVENT_SET_NODE_SETTING
  2. Send the corresponding message when set node setting
2022-01-14 19:10:22 +08:00
eeff 985c29d0ad Make default persist adapter load plugin infos 2022-01-14 18:48:03 +08:00
eeff edefa07116 Update neu_manager to forward plugin event to persist adapter
1. Forward add/update/del plugin event in neu_manager loop
  2. Handle add/update/del plugin event in persist adapter loop
2022-01-14 18:48:03 +08:00
eeff d2e3ef6bfb Update adapter command to send plugin event
1. Add message type MSG_EVENT_ADD_PLUGIN, MSG_EVENT_UPDATE_PLUGIN,
     MSG_EVENT_DEL_PLUGIN
  2. Send the corresponding message when add/update/del plugins
2022-01-14 18:48:03 +08:00
eeff 01664677d2 Fix adapter command NEU_REQRESP_DEL_NODE handling 2022-01-14 18:47:44 +08:00
eeff 719152427b Remove direct usage of C11 <threads.h> for portability 2022-01-14 15:17:54 +08:00
eeff 790f0ebb0d Make default persist adapter load persistence data at startup 2022-01-13 18:04:20 +08:00
eeff 3cf9030283 Update neu_manager to forward node event to persist adapter
1. Forward add/update/del node event in neu_manager loop
  2. Handle add/update/del node event in persist adapter loop
2022-01-13 18:04:20 +08:00
eeff 434ce97f2b Update adapter command to send node event
1. Add message type MSG_EVENT_ADD_NODE, MSG_EVENT_UPDATE_NODE,
     MSG_EVENT_DEL_NODE
  2. Send the corresponding message when add/update/del nodes
2022-01-13 18:04:20 +08:00
eeff 9e9c10f85a Add default persist adapter 2022-01-13 18:04:20 +08:00
eeff 75a3ab32f2 Add dummy plugin 2022-01-13 18:04:20 +08:00
lixiumei bcc57f4034 Fixing problems with neu_json_tty.c and json_group_configs.c autogenerated code 2022-01-13 16:51:19 +08:00
lixiumei e610c8f431 Add persistence json and api 2022-01-12 16:47:35 +08:00
gc87 20415e5e81 Move schema.h to include directory 2022-01-12 11:11:36 +08:00
gc87 258f0a828a Remove the libplugin-opcua project 2022-01-12 11:11:36 +08:00
eeff c6365fd30c Fix plugin_manager_get_all_plugins 2022-01-11 12:13:19 +08:00
fengzero b800280314 connection api: udp/tcp/tty 2022-01-10 17:42:49 +08:00
fengzero 477a66a5ff fix conflicts when multiple threads access group config 2022-01-10 17:42:49 +08:00
Parker Liu 10c7aec8b6 Add function neu_datatag_tbl_to_vector for store datatag table 2022-01-10 16:45:51 +08:00
Parker Liu aeb020e885 Send a Exit message to manager for ensure quit the manager
* Create a main adapter for send message to neuron manager
2022-01-05 18:32:59 +08:00
Parker Liu acb14bcdf3 Add shared data value mode for transfer data between adapters
* Add a function neu_dvalue_to_owned for owner all values in data value
  and sub data values in it.
* Add a neu_trans_buf struct for wrap shared data value and
  core_databuf.
* replace core_databuf with neu_trans_buf in read/write/transfer
  message.
2021-12-31 15:01:25 +08:00
fengzero 99816cb1e2 fix: only when rv==0 and need_forward==1, the unsubscribe message is forwarded 2021-12-31 10:22:01 +08:00
eeff 322464c54b Fix memory leak in macro ADAPTER_RESP_CODE 2021-12-30 11:16:44 +08:00
eeff f41559bd73 Fix mqtt api get node setting
Fix handling of NEU_MQTT_OP_GET_NODE_SETTING to return the setting.
2021-12-22 18:59:27 +08:00
Parker Liu a7088140ad Fix issue of it sometimes crashed when cycle read datatag in modbus tcp plugin 2021-12-17 11:20:39 +08:00
lixiumei 268e6b568b Fix auto-code generation header file with #include json/json.h 2021-12-09 19:07:26 +08:00
Parker Liu 2e889bda3b Fix error of clang-format and remove sudo in dev.yml 2021-12-08 11:36:59 +08:00
eeff 400e0f6934 Fix subscribe group config
This fix neu_manager to add the group config to the subscribing node
  when north app subscribe for group config.
2021-12-06 15:22:27 +08:00
Parker Liu 1f5d56e2ba Fix memory leak of subscribing a group config 2021-12-03 18:23:35 +08:00
eeff 4b6e9acc1e Fix datatag name uniqueness checking 2021-12-03 17:30:55 +08:00
eeff 3b606a10b4 Add neu_datatag_alloc and neu_datatag_free 2021-12-03 17:30:55 +08:00
eeff 33cd14a117 Add hash table utils 2021-12-03 17:30:55 +08:00