Commit Graph

233 Commits

Author SHA1 Message Date
fengzero 86cdb6ee85 del unused errorcode 2022-02-09 17:43:22 +08:00
fengzero ef78632f50 ft: modbus and mqtt network exception 2022-02-09 17:43:22 +08:00
gc87 da831249c4 Refactoring mqtt_send_loop 2022-01-27 15:42:50 +08:00
gc87 7a5af05601 Implement mqtt's start and stop processing 2022-01-27 15:42:50 +08:00
gc87 320eb6ab87 Fix mqtt write return value type error
Int32 -> errorcode
2022-01-24 18:21:01 +08:00
eeff a640fd3e39 Update mqtt plugin to notify tags add/del/update events 2022-01-21 18:58:34 +08:00
eeff 1d7f343363 Update restful plugin to notify tags add/del/update events 2022-01-21 18:58:34 +08:00
Parker Liu ebb533ce61 Fix the sample app can not be normal exiting when exit neuron 2022-01-21 14:33:35 +08:00
eeff 967a7a309d Fix mqtt plugin del tags command error handling 2022-01-19 17:35:55 +08:00
eeff b694cdfc87 Fix mqtt plugin add tags command error handling 2022-01-19 17:35:55 +08:00
eeff 092dbee9af Fix restful del tags handler error handling 2022-01-19 17:24:20 +08:00
eeff 657049b879 Fix restful add tags handle error handling 2022-01-19 17:24:20 +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
gc87 b1cfb43096 Move mqtt components to the base library 2022-01-18 18:11:58 +08:00
gc87 e08e686ffa Refactoring the mqttc client
Modify function names
Modify the source file name
Modify the name of the structure
2022-01-18 18:11:58 +08:00
gc87 e1b4951b05 Add mqtt client interface layer
By adding an interface layer, you can easily support different mqtt clients, including MQTT-C and nng-mqtt
2022-01-18 18:11:58 +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
eeff 75a3ab32f2 Add dummy plugin 2022-01-13 18:04:20 +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
Parker Liu d1d251bc4f Add group config into node after all ids added into group config 2022-01-11 12:30:35 +08:00
fengzero ca37d290a8 mqtt group clone 2022-01-11 12:13:52 +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 d8e9ac3687 Fix use after free issue when mqtt plugin write data to driver 2021-12-31 17:23:23 +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 d4fd6b1848 fix to read the free data when unsubscribing 2021-12-29 17:10:10 +08:00
fengzero e4f947f2d2 install plugin to lib/neuron, install public header to include/neuron 2021-12-29 17:10:10 +08:00
eeff 32c289c5db Fix mqtt api to return response when request json decode fails 2021-12-28 14:43:10 +08:00
eeff 81d7838656 Fix mqtt api NEU_MQTT_OP_GET_NODES error handling
1. When node type is NEU_NODE_TYPE_UNKNOWN, success vacuously
  2. When node type is invalid, return NEU_ERR_PARAM_IS_WRONG
2021-12-27 22:51:01 +08:00
eeff daee5c2592 Fix mqtt api read function
Fix mqtt plugin to check error code when handling NEU_MQTT_OP_READ,
  so that the plugin could send back an error message.
2021-12-27 22:33:14 +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
Parker Liu 4241829ce2 Add install step in CMakeLists.txt file for install neuron output files 2021-12-16 15:32:27 +08:00
gc87 e934239b5d MQTT connection state update 2021-12-16 11:52:33 +08:00
eeff d837ca94bf Fix use-after-free in mqtt api GET_SUBSCRIBE_GROUP_CONFIG 2021-12-14 17:40:58 +08:00
gc87 5e69ec99f4 Set mqtt connection parameters through the web UI 2021-12-13 11:31:21 +08:00
gc87 4cfaf3fcd0 Use web UI to set OPC-UA connection parameters 2021-12-13 11:28:09 +08:00
Parker Liu 6de377cc29 Change the send/recv buffer size of mqttc client to 8192 2021-12-11 11:38:17 +08:00
gc87 572bd046cd MQTT-C client buffer size 2048->20480 2021-12-11 11:38:17 +08:00
Parker Liu f69610ed1e Fix issue of failed write bool and uint8 to opc ua device
* The opc ua plugin hasn't support bool and byte type value, add bool
  and byte type value in function write_request_vector_generate in
  opcua_handle.c file.
* The simulator of opc ua device lack of uint8 type data in register
  area, add uint8 type data in it.
* The function tester of opc ua has a mistake that write a string to a
  bool type value with json, repace it by bool value.
2021-12-10 18:46:00 +08:00
lixiumei 654ba660d2 Adding functional tests for opcua RW 2021-12-09 19:07:26 +08:00
Parker Liu 8b78fef7db Fix issue of failed building arm32/arm64 target for simulator 2021-12-09 14:05:53 +08:00
eeff d720015c59 Fix opcua plugin handler opcua_handle_unsubscribe to check NULL pointer 2021-12-09 11:23:28 +08:00
eeff 935b20eb40 Fix usage of http_get_param_int 2021-12-08 14:39:33 +08:00
eeff eb25ff64c1 Fix restful plugin http query parameter parsing.
Previously the function get_param used a static variable to store
  parsed data which is not re-entrant, and thus cause bugs.

  1. fix get_param and http_get_param to return pointer and len
  2. Remove http_get_param_int
  3. Add http_get_param_uintmax
  4. Add http_get_param_uint32
  5. add http_get_param_node_id
  6. add http_get_param_node_type
2021-12-08 14:39:33 +08:00
gc87 03f2ac2fa1 Add Device error code in opcua 2021-12-08 14:32:51 +08:00
Parker Liu 2e889bda3b Fix error of clang-format and remove sudo in dev.yml 2021-12-08 11:36:59 +08:00
Parker Liu 80337b6b30 Fix crash issue of setting config to opcua adapter 2021-12-07 14:59:38 +08:00
lixiumei 373aa2f167 Improve modbus tcp function test 2021-12-06 14:34:23 +08:00