Commit Graph

64 Commits

Author SHA1 Message Date
fengzero 9948e0fd6f fix the node to which the subscribed config stored in the adapter belongs 2021-11-03 03:27:32 +00:00
fengzero 6dc62e1885 Add api: get sub group configs 2021-11-02 18:04:47 +08:00
Parker Liu bd07258233 Rename the NEU_REQRESP_GET_NODE_STATE/NEU_REQRESP_NODE_STATE 2021-10-28 18:20:25 +08:00
fengzero bd5647257e Add node state: running state and link state & api: start/stop node
note start/stop node operation
2021-10-28 18:06:02 +08:00
fengzero bbb9bfc34c Add api: get node setting
store node settings in adapter
2021-10-26 15:31:40 +08:00
fengzero e738e41b5d Add api: get plugin schema & config node
check the param according to the schema
2021-10-25 18:33:28 +08:00
fengzero 21ddcf8bce api modify & plugin param schema
get node: add plugin_id in response
get plugin: add query param plugin_id
2021-10-21 08:53:36 +00:00
fengzero 6eaa2908bf api: read/write subscribe/unsubscribe 2021-10-15 07:20:23 +00:00
fengzero e41594f6c1 api server: support CORS 2021-10-15 02:28:39 +00:00
Parker Liu defa2b38f9 Fix crash issue when stop and unregister adapters 2021-10-14 17:49:47 +08:00
fengzero 34647e8ae0 Add signal processing
Make the program exit normally and make libasan memory detection take
effect
2021-10-14 16:47:37 +08:00
Parker Liu f57880ec89 Improve the implementation of serialize/deserialize data value
* Fix some memory leak in serialize/deserialize function
* Modify unit test case for data value
2021-10-09 18:07:57 +08:00
Parker Liu e6ff008086 Add response message and support result of array for read/write
* Add support MSG_DATA_READ_RESP/MSG_DATA_WRITE_RESP in adapter
  for read/write data
* Add NEU_REQRESP_READ_RESP/NEU_REQRESP_WRITE_RESP in core manager
  for read/write data
* Add return result of array in sample driver plugin for read/write data
* Add handle result of array in sample app plugin for read/write data
2021-09-28 12:08:43 +08:00
fengzero a9c18532ee del add/update group config dst_node_id 2021-09-26 17:24:47 +08:00
Parker Liu 3b369acf25 Add send subscribe node message when Add default group configs 2021-09-26 17:15:59 +08:00
Parker Liu f4ad674df0 Add support subscribe/unsubscribe node in adapter and other functions
* Add subscribe/unsubscribe node in command and request interface.
* Add neuron request structure for subscribe/unsubscribe node.
* Add subscribe node before enter message loop.
* Add unsubscribe node after exit message loop.
* Add compare function for primitive value.
2021-09-23 18:17:39 +08:00
Parker Liu f552b41253 Add forward subscribe/unsubscribe message to driver adapter
* Add vector_find_index/vector_find_item/vector_has_elem util function
  for vector.
* Forward subscribe/unsubsribe message in manager, and make sure to
  forward the subscribe/unsubsribe message only once.
2021-09-22 18:28:32 +08:00
Parker Liu 19aaceadda Add int-val and string-val pair structue for data value
* Add neu_int_val_t and neu_string_val_t structures and functions
* Add functions for set/get int-val and string-val in data value
* Add functions for supoort serial/deserial int-val and string-val
2021-09-17 19:59:02 +08:00
Parker Liu 74f1c33968 Add periodic read command and subscribe/unsubscribe driver command
* Add commands for start/stop periodic read and support in manager
* Add commands for subscribe/unsubscribe driver and support in manager
* Add commands for group config changed and support in manager
2021-09-16 19:12:05 +08:00
Parker Liu 7b89528f85 Add anchor/unanchor functions for tag group config 2021-09-16 14:19:17 +08:00
lixiumei123 22c8ea8fdd add plugin manager test (#77)
* add plugin manager test

* Plugin manager test add a check if the plugin_info is equal to param_update
2021-09-16 11:04:41 +08:00
Parker Liu 8df731b7ce Add a new data value type with serialize/deserialize function
* Add a structure for fixed array
* Add a structure for bytes
* Add unit test cases of neuron data type
2021-09-13 09:03:46 +08:00
gc87 112f9fe0f3 Add opcua plugin support
1. Update README.md
2. Update install-lib.sh
3. Add the key field to the variable
4. Use config to read
5. It works
2021-09-12 22:58:51 +08:00
lixiumei d91f506e2c fix the problems of test plugin api interface functionality 2021-09-11 10:53:33 +08:00
Parker Liu ce36e2e5dd Fix issue of stuck on waiting for bind adapter when add group config
The nng_dial function sometimes returned after call the callback
function manager_bind_adapter by nng_pipe_notify. This causes the
manager_bind_adapter function to be called with another missing adapter,
the bind_count of current bound adapter should not be changed, so it
will be stuck on waiting for the bind adapter.
2021-09-08 19:25:40 +08:00
Parker Liu 8cc26fd524 Add a judgment to prevent register a adapter with same name 2021-09-08 17:03:26 +08:00
gc87 f7eb237354 [WIP]Create a series of APIs about group config
1. Rewrite get_group_config
2. Add add_group_config/update_group_config/delete_group_config
3. Fix neu_datatag_mng_update_grp_config and
neu_datatag_mng_del_grp_config
2021-09-07 15:50:24 +08:00
Parker Liu 94aed75898 Add functions of add/del/update/get plugin lib for plugin lib
* Add functions of add/del/update/get plugin lib in plugin_manager.c
* Add command of add/del/update/get plugin lib in adapter.c
2021-09-03 19:21:52 +08:00
fengzero 288175996c Add plugin cmd function
add NEU_REQRESP_GET_SELF_NODE_ID cmd
add get_datatags_table func
define neu_addt_str_t
fix compile warning
add magic number and check function in neu_plugin_common_t
2021-09-02 11:22:51 +08:00
gc87 ebe450e303 Read and write Modbus driver through MQTT driver
1. Add config cmd to neu_manager
2. Modify MQTT driver to read and write
3. Fix modbus response
2021-08-28 16:43:47 +08:00
Parker Liu 7d6cd69c2e Add a waiting for get group configs in sample app plugin 2021-08-27 16:47:14 +08:00
Parker Liu 0013a64ba3 Fix issue of mqtt plugin can't get databuf response from driver
* Sometimes add subscription pipe to group config will be executed before
  bind adapter, the wrong pipe will be subscribe in group config. So we
  wait for complete binding adapter and then add subscription pipe.
* Fix issue of failed to build with gcc 10.3.0
2021-08-26 14:26:33 +08:00
fengzero 2707499b17 remove tcp epoll, add modbus tcp plugin
send/receive data synchronously
2021-08-25 11:38:06 +08:00
Parker Liu f14dadb4e3 Add support sync command of add/del/update node and group config
* Support these sync command in adapter.c
* Add some interface functions in neu_manager.c to support these command
* Add enum type of error code for neuron
2021-08-24 19:21:57 +08:00
Parker Liu dacb0d112f Remove parameter manager in function neu_adapter_start and neu_adapter_stop 2021-08-20 17:29:26 +08:00
Parker Liu b250cca377 Fix issue of crash in manager_bind_adapter
If we set manager to adapter in function neu_adapter_start, then the
source code "adapter->manager = manager" sometimes running after get
manager in function manager_bind_adapter.
So we set manager to adapter in function neu_adapter_create.
2021-08-20 16:04:35 +08:00
Parker Liu c5681f6dfc Add sample code for get nodes/grp_configs/tagtable command
* Move source files of datatag table and tag group config to base
* Fix memleak when execute command of get nodes/grp_configs/tagtable
2021-08-20 15:48:24 +08:00
Parker Liu 437ae67c47 Add message NEU_REQRESP_GET_DATATAGS for get datatag table
* Add two message NEU_REQRESP_GET_DATATAGS and NEU_REQRESP_DATATAGS
* Add get datatag table function in bus manager and datatag manager
2021-08-19 18:47:35 +08:00
Parker Liu 5ba72cefb6 Add a sender adapter id for command message
* Change the node_id to dst_node_id in plugin request
2021-08-19 16:12:46 +08:00
Parker Liu 0a82c55dab Implement a static plugin of default dashboard in rest.c 2021-08-18 17:46:57 +08:00
Parker Liu 401228fd36 Add support static plugin in plugin manager 2021-08-18 15:01:36 +08:00
Parker Liu c791bc301a Add support write data command and dispatch transfer data
Support the write data command in sample plugin, adapter and manager.
Add the default subsribe pipes for dispatch transfer data.
2021-08-13 17:13:31 +08:00
Parker Liu 1536034cf0 Fix issue of store missing pipe for bind adapter 2021-08-13 17:13:31 +08:00
Parker Liu 62b35e1285 Add some request/resposne/command for adapter and plugin
Add structure definition for request/response/command, add get nodes
function and get group configs function in manager.
2021-08-12 19:29:25 +08:00
Parker Liu e699329d14 Add sample app plugin and add message dispatcher
Add some message/request/event for improvement transfer data
2021-08-11 16:11:32 +08:00
Parker Liu d7d07cb643 Update plugin_manager.c 2021-08-09 17:18:00 +08:00
fengzero 3d034ba9c6 OS X support AddressSanitizer 2021-08-09 17:18:00 +08:00
gc87 4229a7c283 Implementation of MQTT plug-in. 2021-08-09 14:20:57 +08:00
fengzero 16ce3f5702 fix print databuf 2021-08-09 14:09:04 +08:00
Parker Liu 7da6954f77 Improvement the datatag manager and name of plugin/adapter 2021-08-09 07:55:06 +08:00