Commit Graph

108 Commits

Author SHA1 Message Date
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
fengzeroz 43f1c2a1fb Merge pull request #32 from fengzeroz/main
Del unused file
2021-08-18 15:49:12 +08:00
fengzero d46411f08a Del unused file 2021-08-18 07:47:37 +00:00
Parker Liu 401228fd36 Add support static plugin in plugin manager 2021-08-18 15:01:36 +08:00
fengzero 7c0fb80928 Add login api
user management and jwt have not yet been implemented
2021-08-18 10:22:41 +08:00
Parker Liu 16b6ed3aa9 Add googletest to install tool list in install-libs.sh 2021-08-16 11:35:54 +08:00
Yiqun Chen b1e904eca5 chore(ci): add ci support 2021-08-16 10:10:03 +08:00
fengzeroz 6a3aa9031b Merge pull request #29 from fengzeroz/main
format code by clang-format
2021-08-16 09:31:46 +08:00
fengzero d4d1633efe format code by clang-format 2021-08-16 01:30:12 +00:00
gc87 1cd7b4877e Simple implementation of using MQTT commands to control the reading and writing of neuron drive data. 2021-08-15 08:08:36 +08:00
Parker Liu 8d25825b61 cut out the project path from log file path 2021-08-13 21:57:36 +08:00
fengzero 11e0a8e8dc Add unit tests for json api read/write 2021-08-13 17:52:59 +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
gc87 973e0b234f Simple implementation of variable serialize and deserialize and Use list instead of vector to implement task queue. 2021-08-13 17:12:25 +08:00
fengzero 3f85eeae95 Add unit tests for json encode 2021-08-13 15:01:20 +08:00
fengzero 64c35cda0b Add unit tests for json decode 2021-08-13 10:49:32 +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
fengzero e10dea4051 parse read/write 2021-08-12 15:59:14 +08:00
Parker Liu f981f00908 Change malloc.h to stdlib.h for success build in macOS 2021-08-11 18:20:47 +08:00
fengzero 636afc8e18 rest server 2021-08-11 18:11:40 +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 91164074d0 Fix issue of failed build in macOS 2021-08-11 15:45:00 +08:00
gc87 5a98c57d7d Imporve MQTT client and add task queue. 2021-08-11 15:39:47 +08:00
fengzeroz 50556b0e99 Merge pull request #18 from fengzeroz/main
refactor dependent libs
2021-08-11 09:29:08 +08:00