fengzero
f291fceeab
fix clang-format
2021-09-07 08:58:40 +00:00
fengzero
bb4ebdd75e
refactor api server, add datatag api
...
use different server process api and web
rename tags field
merge json read/write
2021-09-07 16:56:33 +08:00
fengzero
1d974b7120
Add add/del/update/get plugin function
2021-09-07 16:56:33 +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
gc87
7fea1b495d
Refactor the MQTT driver
...
1. Split source code files
2. Add copyright information
3. Split parser into different files
4. Use the interface function in neu_plugin_common
2021-09-03 18:36:08 +08:00
fengzero
d204f8f633
refactor http api server
...
default response header
static var plugin
http request macro
2021-09-03 14:38:05 +08:00
fengzeroz
4f624ec001
Merge pull request #57 from fengzeroz/main
...
fix send msg assert buf len
2021-09-03 14:17:30 +08:00
fengzero
091a41bfd5
fix send msg assert buf len
2021-09-03 06:16:52 +00:00
fengzeroz
9cc0ad22b1
Merge pull request #56 from fengzeroz/main
...
fix get tag table return value
2021-09-03 14:10:18 +08:00
fengzero
73c23664df
fix get tag table return value
2021-09-03 06:09:18 +00:00
fengzero
363a04e1c5
Add process msg macro
...
get nodes/config return vector_t
2021-09-03 11:22:13 +08:00
fengzero
be1d8919b5
Add plugin cmd function
...
add/del/update/get node
add/del/update/get group config
send read/write cmd
response trans data
get self node id
2021-09-02 15:56:30 +08:00
Parker Liu
31b158af53
Add a definition of NEU_PLUGIN_MAGIC_NUMBER for magic number of plugin
2021-09-02 12:07:36 +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
fengzero
fb14067105
Add http response function
...
refactor handle response
2021-09-01 15:13:15 +08:00
gc87
6872879c22
Add tags operation api
...
Modify modbus-tcp read and write type
2021-08-31 18:41:45 +08:00
gc87
3659c04cca
Fix early return
2021-08-30 21:42:54 +08:00
gc87
52d3e49482
Add tag group config list query
2021-08-30 21:42:54 +08:00
fengzero
152302f68b
del macro DEMO, find read/write tag from group config
2021-08-30 18:14:33 +08:00
Parker Liu
3c3edda5c6
Add call config function of plugin when receive pong message
2021-08-30 16:15:16 +08:00
Parker Liu
91a1b94fbe
Remove include bits/pthreadtypes.h for building in macOS
2021-08-30 14:58:12 +08:00
Parker Liu
e1eeb63e1a
Add judgement of cplusplus in all header files of include
2021-08-30 14:36:44 +08:00
lixiumei
7bb6562b19
Add datatag table tag JSON analysis and test modifications
2021-08-30 11:39:53 +08:00
lixiumei
bc35514856
Add datatag table test
2021-08-30 11:39:53 +08:00
fengzero
3200d1423a
Fix encode read/write function code
2021-08-29 16:04:15 +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
fengzero
1be8327439
read/write fixed value for demo
2021-08-28 14:15:04 +08:00
Parker Liu
2595b673e4
Fix issue of clang-format failed in types.c
2021-08-27 17:17:44 +08:00
gc87
ef2b27a4a7
Improve variable interface
...
1. Add neu_variable_next interface
2. Add ubyte get/set interface
3. Add boolean get/set interface
4. Add word get/set interface
5. Add uword get/set interface
6. Add dword get/set interface
7. Add udword get/set interface
2021-08-27 17:06:26 +08:00
fengzero
e09963911d
Add unit test for modbus point
...
sort modbus point for optimizing read efficiency
read modbus point(coil, input, hold reg, input reg)
write modbus point(coil, hold reg)
2021-08-27 17:04:15 +08:00
Parker Liu
7d6cd69c2e
Add a waiting for get group configs in sample app plugin
2021-08-27 16:47:14 +08:00
fengzero
18eb2c9123
CI: Add release workflow and run unit test
...
run unit test when push or pull_request
2021-08-26 18:45:31 +08:00
fengzero
8194e2b2c7
Add write operation for modbus tcp, and process NEU_REQRESP_READ_DATA/NEU_REQRESP_WRITE_DATA
...
NEU_REQRESP_READ_DATA:
interval > 0: just parse modbus point
interval ==0: read modbus point
2021-08-26 15:39:34 +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
8f72ec0c7e
refactor: modbus tcp read point
...
use point module process modbus point order
remove timerfd epoll
2021-08-25 18:38:39 +08:00
Parker Liu
9c42cdea41
Fix failed build in macOS by remove using epoll
...
The modbus tcp plugin can not work good because we use replace some functions
with empty function.
2021-08-25 16:24:28 +08:00
gc87
11f7141af2
Improve MQTT driver and Variable
...
1. Variable array serialization and deserialization support
2. Variable basic data type setting
3. Variable export function unit test
4. Integrate MQTT and Variable
5. Delete the work queue in the MQTT driver
2021-08-25 12:10:30 +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
fengzero
2abc5a6f27
Add tcp for connecting device and add modbus tcp plugin
...
*use epoll process tcp connection
*define modbus protocol struct and pack function
2021-08-24 11:52:22 +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
d9691c68d8
Do clang-format for src/types.c
2021-08-20 15:58:25 +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
fengzero
5b2d7476ff
set json encode JSON_REAL_PRECISION to 16
...
11.223 encode to 11.223, not 11.223000000001
2021-08-18 18:40:18 +08:00
Parker Liu
0a82c55dab
Implement a static plugin of default dashboard in rest.c
2021-08-18 17:46:57 +08:00
gc87
8ece52398e
Improve the connection stability of paho client
...
* Change Modify the subscription list from vector to list.
* Fix the problem of reconnection block.
* Refactor connection_lost_callback function.
2021-08-18 16:08:03 +08:00