Compare commits

..
309 Commits
Author SHA1 Message Date
fengzeroz ee9da15891 Merge pull request #2739 from vulgraph/backport/CVE-2024-10964-v2.6
v2.6: bound plugin-library copy (CVE-2024-10964)
2026-09-24 09:39:39 +08:00
xiang.zhou 80caae1095 plugin:buffer overflow
(cherry picked from commit 3e3a583d72)
2026-04-24 00:27:38 +08:00
fengzeroz ec00415177 Merge pull request #2555 from fengzeroz/v2.6
#2501: Prevent the creation of monitor node
2025-08-27 17:24:18 +08:00
fengzero ae36da9c94 #2501: Prevent the creation of monitor node 2025-08-27 09:23:33 +00:00
fengzeroz 2225e71b66 Merge pull request #2488 from hxy7yx/v2.6-1
[v2.6]feat(modbus):support endianess of 8-Byte data
2025-06-16 10:55:26 +08:00
hxy7yx 1f37d12c8e feat(modbus):support endianess of 8-Byte data 2025-06-15 06:10:48 -07:00
fengzeroz 80bdc5bf1e Merge pull request #2209 from fengzeroz/v2.6
ci: clang-format
2024-09-09 11:11:45 +08:00
fengzero c656eb1775 ci: clang-format 2024-09-09 03:01:03 +00:00
fengzeroz 77e4cf67d9 Merge pull request #2188 from hxy7yx/v2.6-1
[v2.6]chore(mqtt): add reason for connection & disconnection
2024-08-20 16:19:00 +08:00
hxy7yx c5510e22af chore(mqtt): add reason for connection & disconnection 2024-08-20 14:44:59 +08:00
fengzeroz 91776516b1 Merge pull request #2180 from fengzeroz/v2.6
version: 2.6.9
2024-08-15 13:52:21 +08:00
fengzero 46b5a3b61a version: 2.6.9 2024-08-15 05:49:02 +00:00
fengzeroz b5bc952543 Merge pull request #2179 from hxy7yx/v2.6-1
[v2.6]guard against empty mqtt subscription topic
2024-08-15 10:02:31 +08:00
hxy7yx f5976f95dc guard against empty mqtt subscription topic 2024-08-14 14:31:49 +08:00
fengzeroz cd9da5afef Merge pull request #2124 from eeff/v2.6
Pick to v2.6 chore: add error code `NEU_ERR_BODY_TOO_BIG`
2024-07-01 11:14:26 +08:00
fengzeroz 1c7bd2193a Merge pull request #2125 from fengzeroz/v2.6
version: 2.6.8
2024-07-01 11:14:02 +08:00
fengzero 36b5e491e4 version: 2.6.8 2024-07-01 03:13:20 +00:00
eeff 642e832d5c chore: add error code NEU_ERR_BODY_TOO_BIG 2024-07-01 10:59:36 +08:00
fengzeroz b46ef37d51 Merge pull request #2117 from fengzeroz/v2.6
fix(core): ready to running
2024-06-25 10:45:27 +08:00
fengzero 04d2a78e7a fix(core): ready to running 2024-06-25 02:44:49 +00:00
fengzeroz 841680a00e Merge pull request #2097 from eeff/v2.6
Pick to v2.6 feat(core): add `interval` field to struct neu_plugin_group
2024-06-13 15:25:12 +08:00
eeff 691c51bcb1 feat(core): add interval field to struct neu_plugin_group 2024-06-13 15:13:16 +08:00
fengzeroz 2dce709f2d Merge pull request #2030 from eeff/v2.6
Pick to v2.6 fix: reset metrics when node stopped
2024-05-28 15:03:54 +08:00
eeff d28f4430d9 fix: start/stop group timer when driver started/stopped 2024-05-28 14:46:47 +08:00
eeff 6a810d616b feat: add metric type no reset flag 2024-05-28 14:33:18 +08:00
eeff 801d369d6a fix(restful): force clean stale rolling metrics 2024-05-28 14:32:45 +08:00
eeff 5179001d32 refactor(metrics): add lock to avoid data race 2024-05-28 14:29:58 +08:00
eeff 889f69b57d fix: rolling counter integer overflow 2024-05-28 14:29:16 +08:00
eeff 7790b2cdd2 fix(metrics): correct registered rolling counter entry ref count 2024-05-28 14:28:50 +08:00
eeff 9ed033ee84 feat(metrics): support distribution counter 2024-05-28 14:28:22 +08:00
eeff fb8463d9bf test: rolling counter unit tests 2024-05-28 14:25:27 +08:00
eeff ce8b1612d4 feat: add rolling counter utility 2024-05-28 14:22:21 +08:00
hxy 8d372d3e13 Merge pull request #2025 from hxy7yx/v2.6-1
Revert "test"
2024-05-24 18:22:29 +08:00
hxy7yx f91b937b18 Revert "test"
This reverts commit 3ad51811ff.
2024-05-24 18:21:04 +08:00
hxy 555707c666 Merge pull request #2024 from hxy7yx/v2.6-1
test
2024-05-24 18:08:10 +08:00
hxy7yx 3ad51811ff test 2024-05-24 18:06:47 +08:00
fengzeroz 92d4ee84d9 Merge pull request #1962 from fengzeroz/v2.6
fix json parse string
2024-04-25 13:54:41 +08:00
fengzero 5f5e9ac123 fix json parse string 2024-04-25 05:31:01 +00:00
fengzeroz 0a54b13022 Merge pull request #1955 from hxy7yx/v2.6-1
locating core dump files
2024-04-22 09:36:42 +08:00
hxy7yx 527b434374 locating core dump files, adapting to NeuronEX 2024-04-19 17:59:33 +08:00
fengzeroz 66c373e539 Merge pull request #1928 from fengzeroz/v2.6
version: 2.6.7
2024-03-27 14:57:39 +08:00
fengzero 2821d91247 version: 2.6.7 2024-03-27 06:57:08 +00:00
fengzeroz 374dfa13d4 Merge pull request #1927 from eeff/v2.6
Pick to v2.6 fix(ekuiper): memory leak and data race
2024-03-27 10:01:35 +08:00
eeff 45b3aeda9a fix(ekuiper): check received aio data race 2024-03-26 22:10:06 +08:00
eeff e1429d95c8 fix(ekuiper): configuration validation 2024-03-26 22:10:00 +08:00
eeff 62da33b352 fix(ekuiper): json parser memory leak 2024-03-26 22:09:55 +08:00
fengzeroz eff4bc7886 Merge pull request #1917 from fengzeroz/v2.6
fix(conn): check offset reset
2024-03-21 09:44:22 +08:00
fengzero bef72d2f2b fix(conn): check offset reset 2024-03-21 01:36:48 +00:00
fengzeroz a7da8ec66c Merge pull request #1908 from hxy7yx/v2.6-1
plugin(modbus): fix invalid message check
2024-03-14 16:56:16 +08:00
hxy7yx eeeca7144b plugin(modbus): fix invalid message check 2024-03-14 16:55:53 +08:00
fengzeroz b8890b708a Merge pull request #1903 from hxy7yx/v2.6-1
plugin(modbus): fix modbus rtu slave check
2024-03-13 16:31:48 +08:00
hxy7yx f0fbfa6500 plugin(modbus): fix modbus rtu slave check 2024-03-13 16:19:33 +08:00
fengzeroz 07ff0444ac Merge pull request #1896 from fengzeroz/v2.6
rm atomic
2024-03-11 10:22:35 +08:00
fengzero f9e3e6b9e8 rm atomic 2024-03-11 02:21:28 +00:00
fengzeroz 0fe5c37dcd Merge pull request #1887 from fengzeroz/v2.6
version: 2.6.6
2024-03-08 14:14:29 +08:00
fengzero 7498cf9399 version: 2.6.6 2024-03-08 06:13:49 +00:00
fengzeroz feacf066cc Merge pull request #1871 from eeff/v2.6
Pick to v2.6 fix: notify north app about driver group deletion
2024-03-06 09:42:57 +08:00
eeff 8b11ae008e fix(ekuiper): handle NEU_REQ_DEL_GROUP 2024-03-05 18:09:19 +08:00
eeff a6e190b349 fix(mqtt): handle NEU_REQ_DEL_GROUP 2024-03-05 18:08:30 +08:00
eeff 108a9d3e57 fix(core): notify app about driver group deletion 2024-03-05 18:08:30 +08:00
fengzeroz dd2d535c55 Merge pull request #1868 from gc87/type_ptr-leak-v2.6
[v2.6]fix(driver): neu_type_ptr leak
2024-03-05 09:54:02 +08:00
gc87 dcbd9ebd87 fix(driver): neu_type_ptr leak 2024-03-04 22:26:45 +08:00
fengzeroz 2a5d3b7443 Merge pull request #1863 from eeff/v2.6
Pick to v2.6 chore: remove useless code
2024-02-27 10:28:35 +08:00
eeff 83f544a506 chore: remove useless code 2024-02-26 23:32:42 +08:00
fengzeroz 1f11c23d59 Merge pull request #1835 from hxy7yx/v2.6-1
remove api: file
2024-01-31 17:37:36 +08:00
fengzeroz 9d5f20c77a Merge pull request #1837 from eeff/v2.6
Pick to v2.6 build: cmake link libatomic
2024-01-31 17:37:20 +08:00
eeff 8bdc80bf86 build: cmake link libatomic 2024-01-31 17:33:14 +08:00
hxy7yx 166efb1e90 remove api: file 2024-01-31 15:14:25 +08:00
fengzeroz f879058d27 Merge pull request #1829 from ZhouBox/v2.6
[v2.6]judge cache type when report group
2024-01-29 14:37:04 +08:00
xiang.zhou 556b1f7ceb feat:judge cache type when report group 2024-01-29 14:19:18 +08:00
fengzeroz 0f45692205 Merge pull request #1826 from fengzeroz/v2.6
version: 2.6.5
2024-01-26 13:53:59 +08:00
fengzero d94aa03f89 version: 2.6.5 2024-01-26 05:53:03 +00:00
fengzeroz 8d6723bf0e Merge pull request #1801 from fengzeroz/v2.6
version: 2.6.4
2024-01-05 09:50:11 +08:00
fengzero 4693d2d368 version: 2.6.4 2024-01-05 01:49:40 +00:00
fengzeroz 57a0bcd75f Merge pull request #1789 from hxy7yx/v2.6-1
increase the size of EVENT_SIZE
2024-01-03 10:03:44 +08:00
hxy7yx 88532f8401 increase the size of EVENT_SIZE 2024-01-02 18:06:04 +08:00
fengzeroz 338216e5f4 Merge pull request #1785 from fengzeroz/v2.6
msg q
2023-12-29 15:47:34 +08:00
fengzero 87cf190da4 msg q 2023-12-29 06:53:57 +00:00
fengzeroz fa051f068c Merge pull request #1781 from fengzeroz/v2.6
lock tag table
2023-12-29 11:06:31 +08:00
fengzero 531c918b10 lock tag table 2023-12-29 02:02:24 +00:00
fengzeroz 8bad15fffa Merge pull request #1778 from fengzeroz/v2.6
fix event leak
2023-12-25 11:04:07 +08:00
fengzero 65d8fd00ab Revert "x"
This reverts commit 37b0659207.
2023-12-25 02:50:31 +00:00
fengzero 4a7b4ec527 event log 2023-12-25 02:46:49 +00:00
fengzero 9e20cf05e5 fix(event): timer/io index set 2023-12-25 02:43:14 +00:00
fengzero 37b0659207 x 2023-12-25 02:43:14 +00:00
fengzeroz 80a3baf7d7 Merge pull request #1775 from eeff/v2.6
Pick to v2.6 fix(core): replace path separator char in adapter log category
2023-12-22 14:50:43 +08:00
eeff 7043c1b4a6 fix(core): replace path separator char in adapter log category 2023-12-22 14:48:11 +08:00
fengzeroz 1c5bf86297 Merge pull request #1752 from gc87/fix-write-float-tags
[v2.6]fix: write tags api int->float type
2023-12-15 09:30:04 +08:00
gc87 697633fd3c fix: write tags api int->float type 2023-12-14 11:36:09 +08:00
fengzeroz eeb73c22a5 Merge pull request #1749 from fengzeroz/v2.6
event: log
2023-12-12 15:30:02 +08:00
fengzero 0e9c33bdde event: log 2023-12-12 07:22:11 +00:00
fengzeroz e89bd94d81 Merge pull request #1745 from fengzeroz/v2.6
fix write tag
2023-12-12 10:14:22 +08:00
fengzero 74538cc804 fix write tag 2023-12-12 02:13:41 +00:00
fengzeroz b223aec78a Merge pull request #1742 from fengzeroz/v2.6
fix write tag in arm64
2023-12-11 18:26:35 +08:00
fengzero 7c5b1114c7 fix write tag in arm64 2023-12-11 10:25:48 +00:00
fengzeroz 288c2a2c4d Merge pull request #1741 from fengzeroz/v2.6
fix write tag in arm64
2023-12-11 18:23:15 +08:00
fengzero 972b311a79 fix write tag in arm64 2023-12-11 10:22:36 +00:00
fengzeroz 9de2ceb232 Merge pull request #1739 from fengzeroz/v2.6
reg sigkill
2023-12-11 17:06:31 +08:00
fengzero 9155532e62 reg sigkill 2023-12-11 09:03:20 +00:00
fengzeroz 8afa18df91 Merge pull request #1726 from eeff/v2.6
Pick to v2.6: fix(mqtt): memory double free and leak
2023-12-07 14:40:54 +08:00
eeff 9f01e71053 refactor(mqtt): reduce write req handler duplicate code 2023-12-07 14:38:05 +08:00
eeff 5f9614848c fix(mqtt): memory double free and leak 2023-12-07 14:37:36 +08:00
fengzeroz cca3ab6670 Merge pull request #1725 from fengzeroz/v2.6
fix(conn): block link abnormal connection
2023-12-07 11:14:18 +08:00
fengzero f397afa4fa fix(conn): block link abnormal connection 2023-12-07 03:08:25 +00:00
fengzeroz 2e04cd4887 Merge pull request #1721 from emqx/revert-1717-write_tags_int2d64-v26
Revert "[v2.6]fix: write tags api int->double type"
2023-12-06 16:45:22 +08:00
Gao Chun 8d71afb543 Revert "[v2.6]fix: write tags api int->double type" 2023-12-06 16:44:24 +08:00
fengzeroz be8548813c Merge pull request #1717 from gc87/write_tags_int2d64-v26
[v2.6]fix: write tags api int->double type
2023-12-06 15:45:42 +08:00
gc87 413d48c580 fix: write tags api int->double type 2023-12-06 15:06:20 +08:00
fengzeroz 137ff855d0 Merge pull request #1716 from eeff/v2.6
fix(core): memory corruption
2023-12-06 14:39:15 +08:00
eeff d260740a1b fix(core): memory corruption 2023-12-06 14:36:08 +08:00
fengzeroz ab7d6c4b52 Merge pull request #1710 from eeff/v2.6
Pick to v2.6 fix(core): send unsubscribe group message when deleting app
2023-12-04 17:45:33 +08:00
eeff 33c566ce8a fix(core): send unsubscribe group message when deleting app 2023-12-04 17:44:29 +08:00
fengzeroz 6ea4464a0d Merge pull request #1706 from fengzeroz/v2.6
version: 2.6.3
2023-12-01 17:15:19 +08:00
fengzeroz 83e798874d Merge pull request #1707 from eeff/v2.6
Pick to V2.6 refactor: send msg by pointer
2023-12-01 17:12:39 +08:00
eeff 08712028fb fix: memory used after free 2023-12-01 17:04:07 +08:00
eeff 271faf34a0 refactor: send msg by pointer 2023-12-01 17:04:07 +08:00
eeff af379b1048 refactor: add neu_msg_t for internal messaging 2023-12-01 17:04:07 +08:00
fengzero ccade70b2c version: 2.6.3 2023-12-01 07:06:07 +00:00
fengzeroz ec62065b78 Merge pull request #1698 from eeff/eeff/fix
Pick to v2.6 fix(core): send correct node name when del node
2023-11-27 09:55:47 +08:00
eeff 59220b12a4 fix(core): send correct node name when del node 2023-11-24 16:26:33 +08:00
fengzeroz 242770fb64 Merge pull request #1693 from fengzeroz/v2.6
default group interval 1000
2023-11-23 11:31:56 +08:00
fengzero ac08674550 default group interval 1000 2023-11-23 03:15:04 +00:00
fengzeroz 9ff2bdeb8c Merge pull request #1690 from eeff/v2.6
Pick to v2.6 feat: syslog message add priority
2023-11-23 09:55:33 +08:00
eeff 3eddbd09e1 feat: syslog message add priority 2023-11-22 11:36:52 +08:00
fengzeroz e088de9dbf Merge pull request #1685 from eeff/v2.6
Pick to v2.6 fix: pid file work around fs.protected_regular
2023-11-22 10:07:01 +08:00
eeff f80df71d67 fix: pid file work around fs.protected_regular 2023-11-21 14:42:26 +08:00
fengzeroz d98d344bf0 Merge pull request #1683 from fengzeroz/v2.6
event: size 1024
2023-11-21 14:14:51 +08:00
fengzero 45a89ec1d8 event: size 1024 2023-11-21 06:13:46 +00:00
fengzeroz 4e0b307923 Merge pull request #1681 from fengzeroz/v2.6
chore(log): default size
2023-11-21 13:46:16 +08:00
fengzero c0d7795da8 chore(log): default size 2023-11-21 03:42:15 +00:00
fengzeroz 4da4f3e7e0 Merge pull request #1678 from eeff/v2.6
Pick v2.6 refactor: reduce message size
2023-11-20 14:06:17 +08:00
eeff 4c1bb772e7 refactor: reduce write gtags message size 2023-11-20 11:56:34 +08:00
eeff 5f818d792c refactor: reduce write tags message size 2023-11-20 11:56:34 +08:00
eeff cddd225c84 refactor: reduce write tag messages size 2023-11-20 11:56:34 +08:00
eeff 14e45c8ccc refactor: reduce read group message size 2023-11-20 11:56:34 +08:00
eeff a194e07cee refactor: reduce trans data message size 2023-11-20 11:56:34 +08:00
eeff ca09852279 refactor: move request and response types into separate header 2023-11-20 11:32:59 +08:00
fengzeroz b6a5c00b98 Merge pull request #1674 from hxy7yx/v2.6-1
delete user error and password error code
2023-11-16 03:28:05 -06:00
hxy7yx 5041a32238 delete user error and password error code 2023-11-16 17:26:46 +08:00
fengzeroz b7484b6f9d Merge pull request #1673 from hxy7yx/v2.6-1
merge user&password error code
2023-11-16 03:17:07 -06:00
hxy7yx cc906a0a88 merge user&password error code 2023-11-16 17:16:15 +08:00
fengzeroz 83ba53d235 Merge pull request #1663 from fengzeroz/v2.6
chore(log): type con
2023-11-10 04:45:57 -06:00
fengzero e094664006 chore(log): type con 2023-11-10 10:44:51 +00:00
fengzeroz 7bf9a013d4 Merge pull request #1661 from fengzeroz/v2.6
log: only update core level
2023-11-10 04:41:18 -06:00
fengzero f10090d18c log: only update core level 2023-11-10 10:08:57 +00:00
fengzeroz 3a1a1521dd Merge pull request #1660 from fengzeroz/v2.6
log: reduce alloc
2023-11-10 03:58:15 -06:00
fengzero 52f87be032 chore: remove neuron in description 2023-11-10 09:50:53 +00:00
fengzero de31fb549f log: reduce alloc 2023-11-10 09:46:24 +00:00
fengzeroz 8ada62e80d Merge pull request #1659 from fengzeroz/v2.6
fix(log): protocol log
2023-11-10 02:47:56 -06:00
fengzero 52a92fa9d7 fix(log): protocol log 2023-11-10 08:39:35 +00:00
fengzeroz d43fcb2fc5 Merge pull request #1657 from fengzeroz/v2.6
driver: report trans data immeditely when subscribe
2023-11-10 01:41:03 -06:00
fengzero 5863dee984 driver: report trans data immeditely when subscribe 2023-11-10 07:25:34 +00:00
fengzeroz 086d47a84a Merge pull request #1656 from fengzeroz/v2.6
improve: core/adapter log level
2023-11-10 00:40:34 -06:00
fengzero eda15d1886 improve: core/adapter log level 2023-11-10 06:31:45 +00:00
fengzeroz c771d8e814 Merge pull request #1651 from fengzeroz/v2.6
fix(core): free tags after free req
2023-11-08 00:03:59 -06:00
fengzero 7d8b348458 fix(core): free tags after free req 2023-11-08 06:02:42 +00:00
fengzeroz a5015e4f50 Merge pull request #1649 from fengzeroz/v2.6
core: msg dup
2023-11-07 21:42:24 -06:00
fengzero b792cdf79d core: msg dup 2023-11-08 03:41:31 +00:00
fengzeroz 06e4782d6d Merge pull request #1647 from eeff/v2.6
Pick to v2.6 feat: add error code `NEU_ERR_LICENSE_TOKEN_NOT_FOUND`
2023-11-06 21:39:10 -06:00
eeff 03e835760b feat: add error code NEU_ERR_LICENSE_TOKEN_NOT_FOUND 2023-11-07 11:37:09 +08:00
fengzeroz 7795bdbd9e Merge pull request #1645 from eeff/v2.6
Pick to v2.6 fix: utarray_steal dangling pointer
2023-11-06 01:26:48 -06:00
eeff 92558c6e29 fix: utarray_steal dangling pointer 2023-11-06 15:18:57 +08:00
fengzeroz e41ab1c15f Merge pull request #1644 from fengzeroz/v2.6
version: 2.6.2
2023-11-02 20:55:56 -05:00
fengzero 0e9d151a09 version: 2.6.2 2023-11-03 01:55:12 +00:00
fengzeroz 06831915e1 Merge pull request #1642 from fengzeroz/v2.6
build: O0
2023-11-02 03:39:22 -05:00
fengzero 0a69a903b2 build: O0 2023-11-02 08:25:29 +00:00
fengzeroz b131255c4c Merge pull request #1638 from hxy7yx/v2.6-1
fix memory leaks when get node state without any nodes
2023-11-01 04:36:05 -05:00
fengzeroz af47848875 Merge pull request #1640 from fengzeroz/v2.6
Revert "debug delay 100ms"
2023-11-01 04:35:47 -05:00
fengzero d51b5d5438 Revert "debug delay 100ms"
This reverts commit b73a1cefc3.
2023-11-01 08:58:18 +00:00
fengzeroz 87474d76da Merge pull request #1639 from fengzeroz/v2.6
chore(conn): disconnect if udp recv error
2023-11-01 03:49:41 -05:00
fengzero d1d02d7413 chore(conn): disconnect if udp recv error 2023-11-01 08:48:09 +00:00
hxy7yx 178630bfac fix memory leaks when get node state without any nodes 2023-11-01 16:39:04 +08:00
fengzeroz 2ac8e80145 Merge pull request #1636 from fengzeroz/v2.6
debug delay 100ms
2023-11-01 03:36:33 -05:00
fengzero b73a1cefc3 debug delay 100ms 2023-11-01 08:35:37 +00:00
fengzeroz 79a619631d Merge pull request #1635 from fengzeroz/v2.6
debug(connection): delay 50ms
2023-11-01 02:39:10 -05:00
fengzero d16562d2a5 debug(connection): delay 50ms 2023-11-01 07:37:54 +00:00
fengzeroz 22f462bf28 Merge pull request #1632 from hxy7yx/v2.6-1
log api supports independent core log
2023-11-01 09:52:07 +08:00
hxy7yx 5c856007f3 log api supports independent core log 2023-11-01 09:50:00 +08:00
fengzeroz 78e9ffac48 Merge pull request #1629 from ZhouBox/v2.6
[v2.6]fixbug:value err using float type
2023-10-31 09:38:47 +08:00
xiang.zhou a48a6e0897 fixbug:value err using float type 2023-10-31 08:08:16 +08:00
fengzeroz 0904a1591a Merge pull request #1625 from fengzeroz/v2.6
event: log get event fail
2023-10-27 17:09:50 +08:00
fengzero f10e66aeec event: log get event fail 2023-10-27 09:05:25 +00:00
fengzeroz 9c67060eeb Merge pull request #1624 from fengzeroz/v2.6
event: timer size 512
2023-10-27 17:02:23 +08:00
fengzero 4d0bd66e01 event: timer size 512 2023-10-27 09:01:47 +00:00
fengzeroz 2b38b137c3 Merge pull request #1623 from fengzeroz/v2.6
drive: default interval 100ms
2023-10-27 16:30:16 +08:00
fengzero f31a7fc2c3 drive: default interval 100ms 2023-10-27 08:29:45 +00:00
fengzeroz 805a16ae81 Merge pull request #1622 from fengzeroz/v2.6
debug: delay 20ms
2023-10-27 16:28:48 +08:00
fengzero d3a100e394 debug: delay 20ms 2023-10-27 08:28:12 +00:00
fengzeroz 592dfa3ef9 Merge pull request #1620 from fengzeroz/v2.6
Revert "debug: write performance"
2023-10-27 15:10:51 +08:00
fengzero 77c1aeb6b3 Revert "debug: write performance"
This reverts commit cfa8b4d543.
2023-10-27 07:07:59 +00:00
fengzeroz 614630dde7 Merge pull request #1616 from fengzeroz/v2.6
delay 10ms
2023-10-26 18:55:00 +08:00
fengzero ed80c76b10 delay 10ms 2023-10-26 10:54:35 +00:00
fengzeroz 16934e4c3c Merge pull request #1615 from fengzeroz/v2.6
delay 10ms
2023-10-26 18:52:32 +08:00
fengzero 3fb0bba684 delay 10ms 2023-10-26 10:51:40 +00:00
fengzeroz f3964780a4 Merge pull request #1611 from fengzeroz/v2.6
array deep clone
2023-10-26 17:47:39 +08:00
fengzero f9e111980b fix manager unused timer 2023-10-26 09:44:15 +00:00
fengzero 25a38c05cb array deep clone 2023-10-26 03:18:10 +00:00
fengzeroz 76ddcc4392 Merge pull request #1609 from fengzeroz/v2.6
fix cppcheck
2023-10-25 18:34:24 +08:00
fengzero 997553abea fix cppcheck 2023-10-25 10:30:26 +00:00
fengzeroz 9e25a3b880 Merge pull request #1608 from fengzeroz/v2.6
V2.6
2023-10-25 18:21:18 +08:00
fengzero 5cf74cf581 write multiple group tag 2023-10-25 10:20:42 +00:00
fengzeroz d595b03476 Merge pull request #1606 from fengzeroz/v2.6
debug: write performance
2023-10-25 14:59:37 +08:00
fengzero cfa8b4d543 debug: write performance 2023-10-25 06:54:27 +00:00
fengzeroz 03404a148d Merge pull request #1605 from fengzeroz/v2.6
group: default 300ms
2023-10-25 11:29:38 +08:00
fengzero eadffb5cf4 group: default 300ms 2023-10-25 03:28:00 +00:00
fengzeroz 58001c6b54 Merge pull request #1597 from eeff/v2.6
Pick to v2.6 feat(restful): tag read api support synchronous mode
2023-10-16 10:15:46 +08:00
eeff a8e4715ebe test: add modbus sync read functionality tests 2023-10-13 18:02:16 +08:00
eeff 4467132af2 feat(mqtt): read request support synchronous read 2023-10-13 18:02:16 +08:00
eeff 5cb150a1ef feat(restful): tag read api support synchronous mode 2023-10-13 18:02:16 +08:00
eeff fbc1ec4708 feat(core): support plugin synchronous read 2023-10-13 18:02:16 +08:00
fengzeroz ca95e1c7d6 Merge pull request #1589 from fengzeroz/v2.6
version: 2.6.1
2023-10-11 15:13:10 +08:00
fengzero 742e41dd9a version: 2.6.1 2023-10-11 07:12:43 +00:00
fengzeroz db7a59f5d7 Merge pull request #1585 from hxy7yx/v2.6-2
verify that the length of modbus bytes point is even
2023-10-11 15:07:03 +08:00
hxy7yx 75a8cb23f6 verify that the length of modbus bytes point is even 2023-10-11 11:56:17 +08:00
fengzeroz 97cc025cbc Merge pull request #1529 from hxy7yx/v2.6-2
Switch the log level and no longer automatically switch back
2023-10-11 10:48:58 +08:00
hxy7yx 4766081eb7 resolve merge conflicts 2023-10-11 10:40:00 +08:00
fengzeroz d057c63c35 Merge pull request #1582 from fengzeroz/v2.6
log level
2023-10-10 11:27:13 +08:00
fengzero 8523df1a5a log level 2023-10-10 03:26:17 +00:00
fengzeroz 37f85d49c6 Merge pull request #1581 from fengzeroz/v2.6
log report tag size
2023-10-10 11:17:40 +08:00
fengzero 74bda5b0ba log report tag size 2023-10-10 03:16:36 +00:00
fengzeroz 1835fb7951 Merge pull request #1580 from fengzeroz/v2.6
chore: replace nng_mtx with pthread_mtx
2023-10-10 10:53:00 +08:00
fengzero 0192b1504f chore: replace nng_mtx with pthread_mtx 2023-10-10 02:38:55 +00:00
fengzeroz d405368c33 Merge pull request #1577 from eeff/v2.6
Pick to v2.6 feat: support logs to remote syslog server
2023-10-09 15:07:53 +08:00
eeff 9bc9312af8 feat: support logs to remote syslog server 2023-10-09 14:52:01 +08:00
fengzeroz ce0800a7d0 Merge pull request #1575 from fengzeroz/v2.6
fix(trans): memory leak
2023-10-09 11:28:57 +08:00
fengzero 97e69e23c0 fix(trans): memory leak 2023-10-09 03:17:57 +00:00
eeff 9996d02beb feat: add syslog_host and syslog_port options 2023-10-09 10:12:42 +08:00
hxy7yx 8c78faafe8 Switch the log level to debug/notice and no longer automatically switch back 2023-10-08 10:13:11 +08:00
fengzeroz 6ece977535 Merge pull request #1567 from fengzeroz/v2.6
core: using lo udp replace nng pair1
2023-10-08 09:19:49 +08:00
fengzero f73280dd04 feat(core): trans_data msg are sent using a separate channel 2023-10-07 09:05:40 +00:00
fengzero 63854443be fix(connection): server consume 2023-09-28 07:46:09 +00:00
fengzero e1a751614f core: using lo udp replace pair1 2023-09-28 07:23:41 +00:00
fengzero 175f23ad21 Revert "core: using nng_send_aio"
This reverts commit c7aaf234feebf0a5f69ede76953cb4be1630ea19.
2023-09-28 07:23:41 +00:00
fengzero f27b7b9da6 core: using nng_send_aio 2023-09-28 07:23:41 +00:00
fengzeroz 9f4b04a021 Merge pull request #1569 from eeff/v2.6
Pick to v2.6 fix: guard against empty mqtt subscription topic
2023-09-28 15:23:31 +08:00
eeff 5fb50e1d84 test: add ft test case for empty mqtt subscription topic 2023-09-28 15:10:50 +08:00
eeff 37fa663f7c fix: guard against empty mqtt subscription topic 2023-09-28 15:10:50 +08:00
fengzeroz 2693e59508 Merge pull request #1565 from fengzeroz/v2.6
Revert "adapter/manager recv list timeout"
2023-09-26 13:45:43 +08:00
fengzero fa219c1850 Revert "adapter/manager recv list timeout"
This reverts commit b7bafef1e0.
2023-09-26 05:45:18 +00:00
fengzeroz 35f2a1e28b Merge pull request #1563 from fengzeroz/v2.6
adapter/manager recv list timeout
2023-09-25 16:50:39 +08:00
fengzero b7bafef1e0 adapter/manager recv list timeout 2023-09-25 08:39:57 +00:00
fengzeroz 717cfcb756 Merge pull request #1559 from fengzeroz/v2.6
fix(event): lock event loop
2023-09-22 18:12:08 +08:00
fengzero 1ed77c631a fix(timer): stop after callback done 2023-09-22 09:56:12 +00:00
fengzeroz 041b7423c8 Merge pull request #1555 from eeff/v2.6
Pick to v2.6 feat(monitor): move metrics api to restful plugin and remove singleton property
2023-09-22 17:54:25 +08:00
fengzero 53089af902 fix(event): lock event loop 2023-09-22 09:28:05 +00:00
fengzeroz ce747b57d4 Merge pull request #1556 from fengzeroz/v2.6
fix(connection): compile warning
2023-09-22 13:55:28 +08:00
fengzero e6674f1eef fix(connection): compile warning 2023-09-22 05:53:19 +00:00
fengzeroz a352e75863 Merge pull request #1554 from fengzeroz/v2.6
fix(timer): use after free
2023-09-22 11:43:48 +08:00
fengzero d16051a3c7 fix(timer): use after free 2023-09-22 03:36:30 +00:00
eeff 78cd5f5105 ci: run pyft depending on branch 2023-09-22 10:52:40 +08:00
eeff b87da6154c test: remove update node name test for monitor 2023-09-22 10:52:40 +08:00
eeff e8dffb1ee2 feat(monitor): make as non-singleton plugin 2023-09-22 10:52:40 +08:00
eeff 812cc72a6c feat(monitor): remove metrics http api 2023-09-22 10:52:40 +08:00
eeff e201ba6a3e feat(restful): add metrics api 2023-09-22 10:52:40 +08:00
fengzeroz 507842b8a2 Merge pull request #1524 from hxy7yx/v2.6-1
core&modbus support ipv6
2023-09-21 19:42:01 +08:00
fengzeroz 3fc48541c7 Merge pull request #1550 from fengzeroz/v2.6
ci: create and update daily
2023-09-21 16:38:19 +08:00
fengzero 834ab49ebf ci: create and update daily 2023-09-21 08:34:35 +00:00
hxy7yx 2470e915fb core&modbus support ipv6 2023-09-21 15:50:41 +08:00
fengzeroz 219db4f571 Merge pull request #1546 from eeff/v2.6
Pick to v2.6 chore: remove compiler warning
2023-09-21 10:54:06 +08:00
eeff 2163a6aabe chore: remove compiler warning 2023-09-21 10:51:06 +08:00
fengzeroz 48b2e29434 Merge pull request #1544 from hxy7yx/v2.6-3
fix(modbus):rtu server recv&send
2023-09-21 10:46:36 +08:00
hxy7yx 93c2c09049 fix(modbus):rtu server recv&send 2023-09-21 09:58:48 +08:00
fengzeroz d2701f1772 Merge pull request #1541 from fengzeroz/v2.6
start report after read timer
2023-09-19 16:42:35 +08:00
fengzero 4e44ff19e4 start report after read timer 2023-09-19 08:41:29 +00:00
fengzeroz 68bd9245b8 Merge pull request #1540 from fengzeroz/v2.6
log millisecond
2023-09-19 15:20:09 +08:00
fengzero bf3276a857 log millisecond 2023-09-19 07:13:48 +00:00
fengzeroz b8b4dc55fd Merge pull request #1538 from fengzeroz/v2.6
version: 2.6.0
2023-09-15 18:11:47 +08:00
fengzero 65a5c9e0c5 version: 2.6.0 2023-09-15 10:11:17 +00:00
fengzeroz d165a0caf1 Merge pull request #1537 from eeff/v2.6
Pick to v2.6 fix(monitor): group update json event encoding
2023-09-15 09:28:51 +08:00
eeff d251eb9409 fix(monitor): group update json event encoding 2023-09-14 18:10:42 +08:00
fengzeroz 428f65a53e Merge pull request #1535 from fengzeroz/v2.6
fix(driver): validate tag when loading tags
2023-09-14 14:50:08 +08:00
fengzero e68d469e3d fix(driver): validate tag when loading tags 2023-09-14 06:40:04 +00:00
fengzeroz f2026ac304 Merge pull request #1532 from fengzeroz/v2.6
fix(event): check io is null
2023-09-14 11:33:56 +08:00
fengzero e427211c63 fix(event): check io is null 2023-09-14 03:16:18 +00:00
fengzeroz 09adbcdd4d Merge pull request #1527 from eeff/v2.6
Pick to v2.6 fix: zero out trailing hash key string
2023-09-13 10:57:56 +08:00
eeff bb77c59e2b fix: zero out trailing hash key string 2023-09-13 10:48:09 +08:00
fengzeroz 71885810ca Merge pull request #1522 from fengzeroz/v2.6
fix(driver): check tags size
2023-09-11 16:26:08 +08:00
fengzero 911d7d7f8c fix(driver): check tags size 2023-09-11 08:18:45 +00:00
fengzeroz 9c5c41b264 Merge pull request #1520 from eeff/v2.6
Pick to v2.6 feat: add virtual license sql schema
2023-09-11 09:32:05 +08:00
eeff 636cb69c65 feat: add virtual license sql schema 2023-09-08 18:11:57 +08:00
fengzeroz bd75e295ba Merge pull request #1517 from eeff/v2.6
Pick to v2.6 fix(mqtt): enable SNI only when configured host is not IP address
2023-09-07 14:49:49 +08:00
eeff 1860519927 fix(mqtt): enable SNI only when configured host is not IP address 2023-09-07 14:14:26 +08:00
fengzeroz c817c0d4f4 Merge pull request #1514 from ZhouBox/v2.6
fixbug:buffer size too small,host:port be truncated
2023-09-07 09:30:45 +08:00
fengzeroz e7b960e71b Merge pull request #1513 from eeff/v2.6
Pick to v2.6 feat(restful): support update template group name
2023-09-07 09:30:17 +08:00
xiang.zhou 71e820674f fixbug:buffer size too small,host:port be truncated 2023-09-06 19:00:58 +08:00
eeff 57dc135db7 test: add ft for template group name update 2023-09-06 18:21:53 +08:00
eeff 5993b6e28c feat(restful): support update template group name 2023-09-06 18:21:53 +08:00
eeff 076f63e87b feat(core): support update template group name 2023-09-06 18:21:53 +08:00
eeff 4d22cb60b4 feat: add json parser for updating template group 2023-09-06 18:21:53 +08:00
fengzeroz 5801cf213f Merge pull request #1511 from ZhouBox/v2.6
feat:add tag cache type
2023-09-06 18:20:35 +08:00
xiang.zhou b9cac5b4a7 feat:add tag cache type 2023-09-06 17:39:51 +08:00
fengzeroz 69eaca2046 Merge pull request #1510 from eeff/v2.6
Pick to v2.6 fix(metrics): update NEU_METRIC_TAGS_TOTAL when deleting group
2023-09-06 17:33:15 +08:00
eeff f1cf74ffe3 fix(metrics): update NEU_METRIC_TAGS_TOTAL when deleting group 2023-09-06 17:23:43 +08:00
fengzeroz d5cf105c2e Merge pull request #1502 from eeff/v2.6
Pick to v2.6 fix(core): trigger group change when updating group name
2023-09-05 18:00:23 +08:00
fengzeroz 0b922f98c5 Merge pull request #1504 from ZhouBox/v2.6
[v2.6]fixbug:send sigkill when stop timeout
2023-09-05 18:00:09 +08:00
fengzeroz bb4ce7ba0c Merge pull request #1507 from fengzeroz/v2.6
reduce retry time
2023-09-05 17:59:52 +08:00
fengzero 11fadeee4d reduce retry time 2023-09-05 09:58:33 +00:00
xiang.zhou 52b74ee3a2 fixbug:send sigkill when stop timeout 2023-09-05 17:30:44 +08:00
eeff d1401c88d1 fix(core): trigger group change when updating group name 2023-09-05 14:45:40 +08:00
fengzeroz 1ed6dbba14 Merge pull request #1499 from ZhouBox/v2.6
[v2.6]fixbug:log file name filtering error
2023-09-05 10:24:42 +08:00
xiang.zhou 98ac2456e3 fixbug:log file name filtering error 2023-09-05 09:56:30 +08:00
fengzeroz e4f30a5cb2 Merge pull request #1497 from ZhouBox/v2.6
[v2.6]fixbug:index error when endian in BL or LB
2023-09-05 09:48:47 +08:00
xiang.zhou c6be6f8018 fixbug:index error when endian in BL or LB 2023-09-05 08:53:15 +08:00
fengzeroz 7c1680f285 Merge pull request #1495 from fengzeroz/v2.6
fix workflow
2023-09-04 15:34:00 +08:00
fengzero ab4bc4cdc4 fix workflow 2023-09-04 07:00:45 +00:00
fengzeroz 6fb94430b2 Merge pull request #1494 from fengzeroz/v2.6
branch v2.6
2023-09-04 14:55:55 +08:00
fengzero bce294d7f1 branch v2.6 2023-09-04 06:55:29 +00:00
fengzeroz 2205e60dc2 Merge pull request #1493 from fengzeroz/v2.6
fix(core): trans data dup
2023-09-04 14:26:40 +08:00
fengzero e7beacb632 fix(core): trans data dup 2023-09-04 06:24:32 +00:00
424 changed files with 449689 additions and 21198 deletions
+28
View File
@@ -0,0 +1,28 @@
name: Check helm version
on:
push:
paths:
- deploy/charts/neuron/templates/**
pull_request:
paths:
- deploy/charts/neuron/templates/**
jobs:
check-helm-version:
runs-on: ubuntu-latest
steps:
- run: minikube start
- uses: actions/checkout@v2
- name: Update helm
run: |
helm repo add emqx https://repos.emqx.io/charts
helm repo update
- name: Check helm version
run: |
old=$(helm show chart emqx/neuron |egrep "^version" | sed -r 's|^version:[[:space:]]([0-9]+.[0-9]+.[0-9]+)$|\1|g')
now=$(egrep "^version" deploy/charts/neuron/Chart.yaml | sed -r 's|^version:[[:space:]]([0-9]+.[0-9]+.[0-9]+)$|\1|g')
if [ "$old" = "$now" ];then
echo "Need update version for Chart.yaml"
exit 1
fi
+89 -42
View File
@@ -9,7 +9,7 @@ on:
jobs:
clang_format_check:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
# checkout
@@ -18,7 +18,7 @@ jobs:
submodules: recursive
- name: Run clang-format style check for C/C++ programs.
uses: DoozyX/clang-format-lint-action@v0.12
uses: DoozyX/clang-format-lint-action@v0.18
with:
source: 'src plugins include tests'
exclude: 'include/neuron/utils/uthash.h include/neuron/utils/utarray.h include/neuron/utils/utlist.h include/neuron/utils/zlog.h'
@@ -29,22 +29,22 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
with:
submodules: recursive
- name: cppcheck
run: |
sudo apt install cppcheck
cppcheck --enable=all --error-exitcode=2 --inline-suppr --suppress=missingInclude --suppress=unusedFunction ./plugins ./src
cppcheck --enable=all --error-exitcode=2 --inline-suppr --suppress=missingInclude --suppress=variableScope ./simulator
cppcheck --enable=all --error-exitcode=2 --inline-suppr --suppress=missingInclude --suppress=unusedFunction ./plugins ./simulator ./src
ut:
runs-on: ubuntu-20.04
container: ghcr.io/neugates/build:x86_64-v2.9
container: ghcr.io/neugates/build:x86_64-v2.6
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
with:
submodules: recursive
@@ -58,52 +58,99 @@ jobs:
- name: unit test
run: |
cd build
ctest --output-on-failure
sudo apt-get update
sudo apt install -y lcov
ctest --output-on-failure -O tests/reports/ut.log --output-junit tests/reports/output.xml
lcov --capture --directory . --output-file testneuron.info --test-name testneuron
genhtml -o result testneuron.info
pft:
- uses: actions/upload-artifact@v3
with:
name: ut_result
path: |
build/tests/reports/ut.log
build/tests/reports/output.xml
build/result/index.html
build/neuron.log
ft:
runs-on: ubuntu-20.04
container: ghcr.io/neugates/build:x86_64-v2.9
strategy:
matrix:
plugin: [core, ekuiper, modbus, mqtt, azure, metrics]
container: ghcr.io/neugates/build:x86_64-v2.6
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
with:
submodules: recursive
- name: setup dependencies
run: |
if [ "${{ matrix.plugin }}" = "mqtt" ] || [ "${{ matrix.plugin }}" = "azure" ]; then
sudo apt-get install -y mosquitto
fi
pip install -U pytest requests prometheus-client gmqtt pynng sniffio
sudo apt-get install -y socat
- name: compile
run: |
git config --global --add safe.directory $(pwd)
mkdir -p build && cd build
cmake -DUSE_GCOV=1 .. -DCMAKE_TOOLCHAIN_FILE=../cmake/x86_64-linux-gnu.cmake
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/x86_64-linux-gnu.cmake
make -j4
- name: function test
run: |
if [ "${{ matrix.plugin }}" = "core" ]; then
pytest -s -v tests/ft \
--ignore=tests/ft/app/test_ekuiper.py \
--ignore=tests/ft/app/test_mqtt.py \
--ignore=tests/ft/app/test_azure.py \
--ignore=tests/ft/driver/test_modbus.py \
--ignore=tests/ft/metrics/test_metrics.py
elif [ "${{ matrix.plugin }}" = "ekuiper" ]; then
pytest -s -v tests/ft/app/"test_ekuiper.py"
elif [ "${{ matrix.plugin }}" = "modbus" ]; then
pytest -s -v tests/ft/driver/"test_modbus.py"
elif [ "${{ matrix.plugin }}" = "mqtt" ]; then
pytest -s -v tests/ft/app/"test_mqtt.py"
elif [ "${{ matrix.plugin }}" = "azure" ]; then
pytest -s -v tests/ft/app/"test_azure.py"
else
pytest -s -v tests/ft/metrics/"test_metrics.py"
fi
sudo apt-get install -y mosquitto
mosquitto -v &
python3 -m pip install -U pip
python3 -m pip install -r ft/requirements.txt
python3 -m robot --maxerrorlines=600 -P ft/ -d ft/reports ft
- uses: actions/upload-artifact@v3
with:
name: ft_result
path: |
ft/reports/log.html
ft/reports/output.xml
ft/reports/report.html
build/neuron.log
pyft:
runs-on: ubuntu-20.04
container: ghcr.io/neugates/build:x86_64-v2.6
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: compile
run: |
git config --global --add safe.directory $(pwd)
mkdir -p build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/x86_64-linux-gnu.cmake
make -j4
- name: get neuron current branch
shell: bash
run: |
if [ '${{ github.event_name }}' == 'push' ]; then
branch=${{ github.ref_name }}
elif [ '${{ github.event_name }}' == 'pull_request' ]; then
branch=${{ github.event.pull_request.base.ref }}
elif [ '${{ github.event_name }}' == 'release' ]; then
branch=${{ github.event.release.target_commitish }}
fi
echo "BRANCH=$branch" >> $GITHUB_ENV
echo "neuron current branch is $branch"
- name: fetch neu-ft
uses: actions/checkout@v2
with:
repository: neugates/neu-ft
path: neu-ft
ref: ${{ env.BRANCH }}
- name: function test
run: |
pip install -U pytest
pip install requests
pytest -s neu-ft/neuron
- uses: actions/upload-artifact@v3
with:
name: pyft_result
path: |
neu-ft/neuron/report
+12 -12
View File
@@ -8,20 +8,20 @@ on:
- published
env:
VERSION: 2.9.0
UI_VERSION: 2.6.1
BRANCH: v2.9
VERSION: 2.6.9
UI_VERSION: 2.6.3
BRANCH: v2.6
jobs:
cross-build:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
matrix:
arch:
- [aarch64-linux-gnu, aarch64, arm64]
- [arm-linux-gnueabihf, armv4, armhf]
- [x86_64-linux-gnu, x86_64, amd64]
container: ghcr.io/neugates/build:${{ matrix.arch[1] }}-v2.9
container: ghcr.io/neugates/build:${{ matrix.arch[1] }}-v2.6
steps:
- uses: actions/checkout@v4
@@ -52,19 +52,19 @@ jobs:
run: |
./package-sdk.sh -p ${{ matrix.arch[2] }} -n neuron-sdk-$VERSION
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: neuron-sdk
name: neuron-sdk-${{ matrix.arch[2] }}
path: |
neuron-sdk-*.tar.gz
build-debug-sdk:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
matrix:
arch:
- [x86_64-linux-gnu, x86_64, amd64]
container: ghcr.io/neugates/build:${{ matrix.arch[1] }}-v2.9
container: ghcr.io/neugates/build:${{ matrix.arch[1] }}-v2.6
steps:
- uses: actions/checkout@v4
@@ -83,7 +83,7 @@ jobs:
run: |
./package-sdk.sh -p ${{ matrix.arch[2] }} -n neuron-sdk-debug-$VERSION
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: neuron-sdk
path: |
@@ -102,7 +102,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: neuron-sdk
@@ -115,4 +115,4 @@ jobs:
draft: false
prerelease: true
files: |
neuron-sdk-*
neuron-sdk-*
+44
View File
@@ -0,0 +1,44 @@
name: Release neuron
on:
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check appVersion for helm
run: |
appVersion=$(egrep "^appVersion" deploy/charts/neuron/Chart.yaml | sed -r 's|^appVersion:[[:space:]]([0-9]+.[0-9]+.[0-9]+)$|\1|g')
if [ "$appVersion" != "${GITHUB_REF##*/}" ]; then
echo "Need update appVersion for Chart.yaml"
exit 1
fi
helm:
runs-on: self-hosted
if: github.repository_owner == 'emqx'
needs:
- release
steps:
- uses: actions/checkout@v2
- name: Check appVersion for helm
working-directory: deploy/charts/neuron
run: |
appVersion=$(egrep "^appVersion" Chart.yaml | sed -r 's|^appVersion:[[:space:]]([0-9]+.[0-9]+.[0-9]+)$|\1|g')
if [ "$appVersion" != "${GITHUB_REF##*/}" ]; then
echo "Need update appVersion for Chart.yaml"
exit 1
fi
- name: Update helm repo
uses: emqx/push-helm-action@v1
with:
charts_dir: "${{ github.workspace }}/deploy/charts/neuron"
version: ${{ github.ref_name }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: "us-west-2"
aws_bucket_name: "repos-emqx-io"
+10 -20
View File
@@ -33,7 +33,7 @@ endif()
if(USE_GCOV)
message(STATUS "using gcov")
SET(GCC_COVERAGE_COMPILE_FLAGS "-fprofile-arcs -ftest-coverage -O0")
SET(GCC_COVERAGE_COMPILE_FLAGS "-fprofile-arcs -ftest-coverage")
SET(GCC_COVERAGE_LINK_FLAGS "-lgcov")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
@@ -66,7 +66,6 @@ endif()
set(PERSIST_SOURCES
src/persist/persist.c
src/persist/sqlite.c
src/persist/json/persist_json_plugin.c)
aux_source_directory(src/parser NEURON_SRC_PARSE)
set(NEURON_BASE_SOURCES
@@ -76,6 +75,7 @@ set(NEURON_BASE_SOURCES
src/base/group.c
src/base/metrics.c
src/base/msg.c
src/base/template.c
src/connection/connection.c
src/connection/connection_eth.c
src/connection/mqtt_client.c
@@ -85,9 +85,11 @@ set(NEURON_BASE_SOURCES
src/utils/json.c
src/utils/http.c
src/utils/http_handler.c
src/utils/http_proxy.c
src/utils/neu_jwt.c
src/utils/base64.c
src/utils/async_queue.c
src/utils/mem_cache.c
src/utils/log.c
${PERSIST_SOURCES})
@@ -97,24 +99,13 @@ if (SMART_LINK)
set(NEURON_BASE_SOURCES ${NEURON_BASE_SOURCES} src/connection/smart_link.c)
endif()
if (CLIB)
message(STATUS "set clib")
add_definitions(-DNEU_CLIB=${CLIB})
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Release")
message(STATUS "build release")
add_definitions(-DNEU_RELEASE)
endif()
add_library(neuron-base SHARED)
target_sources(neuron-base PRIVATE ${NEURON_BASE_SOURCES} ${NEURON_SRC_PARSE})
target_include_directories(neuron-base
PRIVATE include/neuron src)
target_link_libraries(neuron-base libssl.a libcrypto.a)
target_link_libraries(neuron-base nng libzlog.so jansson jwt
${CMAKE_THREAD_LIBS_INIT} -lm)
${CMAKE_THREAD_LIBS_INIT})
add_dependencies(neuron-base neuron-version)
# dependency imposed by nng
@@ -130,6 +121,7 @@ set(NEURON_SOURCES
src/core/subscribe.c
src/core/plugin_manager.c
src/core/node_manager.c
src/core/template_manager.c
src/core/storage.c
src/adapter/msg_q.c
src/adapter/storage.c
@@ -142,12 +134,13 @@ set(NEURON_SOURCES
plugins/restful/normal_handle.c
plugins/restful/rw_handle.c
plugins/restful/adapter_handle.c
plugins/restful/ndriver_handle.c
plugins/restful/datatag_handle.c
plugins/restful/global_config_handle.c
plugins/restful/group_config_handle.c
plugins/restful/plugin_handle.c
plugins/restful/template_handle.c
plugins/restful/version_handle.c
plugins/restful/scan_handle.c
plugins/restful/rest.c
plugins/restful/user.c)
@@ -173,17 +166,14 @@ file(COPY ${CMAKE_SOURCE_DIR}/default_plugins.json DESTINATION ${CMAKE_BINARY_DI
add_subdirectory(plugins/modbus)
add_subdirectory(plugins/mqtt)
add_subdirectory(plugins/ekuiper)
add_subdirectory(plugins/monitor)
add_subdirectory(simulator)
if(NOT DISABLE_UT)
add_subdirectory(tests/ut)
add_subdirectory(tests)
endif()
add_subdirectory(tests/plugins/c1)
add_subdirectory(tests/plugins/s1)
add_subdirectory(tests/plugins/sc1)
# Set sane defaults for multi-lib linux systems
include(GNUInstallDirs)
if(UNIX)
+2 -3
View File
@@ -2,7 +2,6 @@
[![GitHub Release](https://img.shields.io/github/release/emqx/neuron?color=brightgreen&label=Release)](https://github.com/emqx/neuron/releases)
[![Docker Pulls](https://img.shields.io/docker/pulls/emqx/neuron?label=Docker%20Pulls)](https://hub.docker.com/r/emqx/neuron)
[![codecov](https://codecov.io/gh/emqx/neuron/graph/badge.svg?token=X95RD0NUT0)](https://codecov.io/gh/emqx/neuron)
[![Slack](https://img.shields.io/badge/Slack-Neuron-39AE85?logo=slack)](https://slack-invite.emqx.io/)
[![Discord](https://img.shields.io/discord/931086341838622751?label=Discord&logo=discord)](https://discord.gg/xYGf3fQnES)
[![Twitter](https://img.shields.io/badge/Follow-EMQ-1DA1F2?logo=twitter)](https://twitter.com/EMQTech)
@@ -20,10 +19,10 @@ The following are some important features of Neuron:
- Support numerous protocols for industrial devices, including Modbus, OPCUA, Ethernet/IP, IEC104, BACnet and [more](https://neugates.io/docs/en/latest/configuration/south-devices/south-devices.html).
- Support simultaneous connection of a large number of industrial devices with different protocols.
- Combine with the rule engine function provided by [eKuiper](https://www.lfedge.org/projects/ekuiper) to quickly implement rule-based device control or AI/ML analytics.
- Support data access to industrial applications, such as MES or ERP, SCADA, historian and data analytics software via [SparkplugB](https://neugates.io/docs/en/latest/use-cases/sparkplug/sparkplug.html) solution.
- Support data access to industrial applications, such as MES or ERP, SCADA, historian and data analytics software via [SparkplugB](https://neugates.io/docs/en/latest/use-cases/use_cases.html#mqtt-sparkplugb-solution) solution.
- Has very low memory footprint, less than 10M, and CPU usage, can run on limited resource hardware like ARM, x86 and RISC-V.
- Support installation of native executable or deployed in containerized enviornment.
- Control industrial devices, and make changes to the parameters and data tags through [HTTP API](https://neugates.io/docs/en/latest/api/configuration.html) and [MQTT API](https://neugates.io/docs/en/latest/configuration/north-apps/mqtt/api.html) services.
- Control industrial devices, and make changes to the parameters and data tags through [HTTP API](https://neugates.io/docs/en/latest/http-api/http-api.html) and [MQTT API](https://neugates.io/docs/en/latest/configuration/north-apps/mqtt/api.html) services.
- Highly integrated with other EMQ products, including [EMQX](https://www.emqx.com/en/products/emqx), [NanoMQ](https://nanomq.io/), [eKuiper](https://ekuiper.org/).
- The code of the core framework and Modbus, MQTT and eKuiper are licensed under open source LGPLv3. Commercial modules require a [EMQ License](https://neugates.io/docs/en/latest/installation/license-install/license-install.html) to run.
+1 -1
View File
@@ -1,7 +1,7 @@
set(CMAKE_SYSTEM_NAME Linux)
set(COMPILER_PREFIX aarch64-linux-gnu)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(LIBRARY_DIR /home/neuron/v2.9/libs)
set(LIBRARY_DIR /home/neuron/v2.6/libs)
set(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
+1 -1
View File
@@ -1,7 +1,7 @@
set(CMAKE_SYSTEM_NAME Linux)
set(COMPILER_PREFIX arm-linux-gnueabi)
set(CMAKE_SYSTEM_PROCESSOR armv5tejl)
set(LIBRARY_DIR /home/neuron/v2.9/libs)
set(LIBRARY_DIR /home/neuron/v2.6/libs)
set(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
+1 -1
View File
@@ -1,7 +1,7 @@
set(CMAKE_SYSTEM_NAME Linux)
set(COMPILER_PREFIX arm-linux-gnueabihf)
set(CMAKE_SYSTEM_PROCESSOR armv7l)
set(LIBRARY_DIR /home/neuron/v2.9/libs)
set(LIBRARY_DIR /home/neuron/v2.6/libs)
set(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
-7
View File
@@ -21,10 +21,3 @@ link_directories(${CMAKE_STAGING_PREFIX})
if(CMAKE_SYSTEM_PROCESSOR MATCHES "mips32")
link_libraries(atomic)
endif()
if(CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64")
link_libraries(atomic)
endif()
if(CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64")
link_libraries(atomic)
endif()
+1 -1
View File
@@ -1,7 +1,7 @@
set(CMAKE_SYSTEM_NAME Linux)
set(COMPILER_PREFIX x86_64-linux-gnu)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(LIBRARY_DIR /home/neuron/v2.9/libs)
set(LIBRARY_DIR /home/neuron/v2.6/libs)
set(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
-54
View File
@@ -1,54 +0,0 @@
#!/bin/bash
# core trace
lcov -c -d build/CMakeFiles/neuron-base.dir/src -o cov_report/cov-neuron-base.info
lcov -c -d build/CMakeFiles/neuron.dir/src -o cov_report/cov-neuron.info
lcov -c -d build/CMakeFiles/neuron.dir/plugins/restful -o cov_report/cov-restful.info
# always with core trace
function gen_trace () {
lcov -a cov-neuron-base.info -a cov-neuron.info -a cov-restful.info $@;
}
case $1 in
(ut)
rm -f cov_report/cov-neuron.info cov_report/cov-restful.info
for dir in build/tests/ut/CMakeFiles/*_test.dir; do
test_name=$(basename ${dir} "_test.dir")
lcov -c -d ${dir} -o "cov_report/cov-${test_name}_test.info"
done
cd cov_report
lcov $(for file in cov-*.info; do echo "-a $file "; done) -a cov-neuron-base.info -o cov-ut.info;;
(ft)
lcov -c -d build/plugins/mqtt/CMakeFiles/plugin-mqtt.dir -o cov_report/cov-mqtt.info
lcov -c -d build/plugins/modbus/CMakeFiles/plugin-modbus-rtu.dir -o cov_report/cov-modbus-rtu.info
lcov -c -d build/plugins/modbus/CMakeFiles/plugin-modbus-tcp.dir -o cov_report/cov-modbus-tcp.info
cd cov_report
gen_trace -a cov-mqtt.info -a cov-modbus-rtu.info -a cov-modbus-tcp.info -o cov-ft.info;;
(ekuiper)
lcov -c -d build/plugins/ekuiper/CMakeFiles/plugin-ekuiper.dir -o cov_report/cov-ekuiper.info
cd cov_report
gen_trace -a cov-ekuiper.info -o cov-ekuiper.info;;
(modbus)
lcov -c -d build/plugins/modbus/CMakeFiles/plugin-modbus-rtu.dir -o cov_report/cov-modbus-rtu.info
lcov -c -d build/plugins/modbus/CMakeFiles/plugin-modbus-tcp.dir -o cov_report/cov-modbus-tcp.info
lcov -c -d build/simulator/CMakeFiles/modbus_simulator.dir -o cov_report/cov-simulator-modbus.info
cd cov_report
gen_trace -a cov-simulator-modbus.info -a cov-modbus-rtu.info -a cov-modbus-tcp.info -o cov-modbus.info;;
(mqtt)
lcov -c -d build/plugins/mqtt/CMakeFiles/plugin-mqtt.dir -o cov_report/cov-mqtt.info
cd cov_report
gen_trace -a cov-mqtt.info -o cov-mqtt.info;;
(azure)
lcov -c -d build/plugins/mqtt/CMakeFiles/plugin-azure-iot.dir -o cov_report/cov-azure.info
cd cov_report
gen_trace -a cov-azure.info -o cov-azure.info;;
(core)
cd cov_report
gen_trace -o cov-core.info;;
(metrics)
cd cov_report
gen_trace -o cov-metrics.info;;
(*)
lcov -c -d build/plugins/$1/CMakeFiles/plugin-$1.dir -o cov_report/cov-$1.info;;
esac
+2 -3
View File
@@ -1,10 +1,9 @@
{
"plugins": [
"libplugin-mqtt.so",
"libplugin-aws-iot.so",
"libplugin-azure-iot.so",
"libplugin-ekuiper.so",
"libplugin-monitor.so",
"libplugin-modbus-tcp.so",
"libplugin-modbus-rtu.so"
]
}
}
+1 -1
View File
@@ -6,7 +6,7 @@ file perms = 666
stdout_format = "%d:%ms [%V] [%c] %f:%L %m%n"
file_format = "%d:%ms [%V] %f:%L %m%n"
syslog = "<P>%d(%Y-%m-%dT%T%z) %H neuron[%p]: level=%v msg="[%c] %m" file="%f:%L"%n"
syslog = "<P>%d:%ms %H neuron[%p]: [%V] [%c] %f:%L %m%n"
[rules]
@@ -2,41 +2,48 @@ import asyncio
import time
from collections import defaultdict, deque
from robot.api import logger
from robot.api.deco import keyword, library
from gmqtt import Client as MQTTClient, Subscription
from gmqtt.mqtt.constants import MQTTv311
def info(msg):
print(msg)
ROBOT_AUTO_KEYWORDS = False
@library
class Client:
"""
"""A keyword library for Robot Framework. It provides keywords for
performing various operations on an MQTT broker. See http://mqtt.org/
for more details on MQTT specification.
This library uses gmqtt: Python async MQTT client. For more information
on underlying methods and documentation, see:
https://github.com/wialon/gmqtt
"""
def __init__(self, reconnect_retries=-1, reconnect_delay=0.1):
ROBOT_LIBRARY_SCOPE = "GLOBAL"
ROBOT_LIBRARY_VERSION = "0.1.0"
def __init__(self, reconnect_retries=5, reconnect_delay=0):
"""
`reconnect_retries` number of reconnect attempt in case of lost
connections, default to -1
connections, default to 5
`reconnect_delay` delay between reconnect attemps in seconds,
default to 0.1
default to 0
"""
self._client = None
self._reconnect_retries = reconnect_retries
self._reconnect_delay = reconnect_delay
self._messages = defaultdict(deque)
self._handlers = {}
self._subcribed = asyncio.Event()
self._unsubcribed = asyncio.Event()
self._recved = asyncio.Event()
self._run = asyncio.get_event_loop().run_until_complete
@keyword
def connect(
self,
host,
@@ -64,6 +71,17 @@ class Client:
`clean_session` specifies the clean session flag for the connection
Examples:
Connect to a broker with default port and client id
| Connect | 127.0.0.1 |
Connect to a broker by specifying the port and client id explicitly
| Connect | 127.0.0.1 | 1883 | test.client |
Connect to a broker with clean session flag set to false
| Connect | 127.0.0.1 | clean_session=${false} |
"""
client = MQTTClient(client_id, clean_session=clean_session)
client.on_connect = self._on_connect
@@ -81,22 +99,26 @@ class Client:
self._run(self._client.connect(host, port, version=MQTTv311))
@keyword
def disconnect(self):
"""Disconnect from MQTT Broker."""
"""Disconnect from MQTT Broker.
Example:
| Disconnect |
"""
self._run(self._client.disconnect())
self._messages.clear()
self._handlers.clear()
@keyword
def unsubscribe_all_and_clear_messages(self):
"""Unsubscribe all subscriptions and clear all messages in queue."""
for topic in self._messages:
self.unsubscribe(topic)
self._messages.clear()
self._handlers.clear()
def subscribe(
self, topic, qos=0, timeout=1, handler=None, no_except=False
):
@keyword
def subscribe(self, topic, qos=0, timeout=1):
"""Subscribe to a topic and return a message payload received
within the specified time.
@@ -106,47 +128,38 @@ class Client:
`timeout` duration of subscription, default to 1 second
`handler` callback on received message, should take one parameter `payload`
Examples:
`no_except` indicate to not throw exception
Subscribe and get a list of all messages received within 5 seconds
| ${messages}= | Subscribe | test/test | qos=1 | timeout=5 |
"""
timeout = 1 if timeout < 1 else timeout
self._client.subscribe(Subscription(topic, qos))
if self._wait(self._subcribed, timeout=timeout):
if no_except:
info(
f"WARN: MQTT client subscribe timeout, topic={topic} qos={qos}"
)
else:
raise Exception(
f"MQTT client subscribe timeout, topic={topic} qos={qos}"
)
info(f"MQTT client subscribed to topic={topic} qos={qos}")
if handler:
self._handlers[topic] = handler
raise Exception(
"MQTT client subscribe timeout topic=%s qos=%s" % (topic, qos))
logger.info("MQTT client subscribed to topic=%s qos=%s" % (topic, qos))
def unsubscribe(self, topic, timeout=1, no_except=False):
@keyword
def unsubscribe(self, topic, timeout=1):
"""Unsubscribe the client from the specified topic.
`topic` topic to unsubscribe from
`timeout` duration of unsubscription, default to 1 second
`no_except` indicate to not throw exception
Example:
| Unsubscribe | test/mqtt_test |
"""
timeout = 1 if timeout < 1 else timeout
self._client.unsubscribe(topic)
if self._wait(self._unsubcribed, timeout=timeout):
if no_except:
info(f"WARN: MQTT client unsubscribe timeout, topic={topic}")
else:
raise Exception(
f"MQTT client unsubscribe timeout, topic={topic}"
)
self._messages[topic].clear()
self._handlers.pop(topic, None)
info(f"MQTT client unsubscribed topic={topic}")
raise Exception("MQTT client unsubscribe timeout topic=%s" % topic)
logger.info("MQTT client unsubscribed topic=%s" % topic)
@keyword
def publish(self, topic, payload, qos=0, retain=False):
"""Publish a message to a topic with specified qos and retained flag.
It is required that a connection has been established using `Connect`
@@ -160,9 +173,14 @@ class Client:
`retain` retained flag
Examples:
| Publish | test/test | test message | 1 | ${false} |
"""
self._client.publish(topic, payload, qos=qos, retain=retain)
@keyword
def listen(self, topic, timeout=1):
"""Listen to a topic and return a message payload received within the
specified time. Requires an Subscribe to have been called previously.
@@ -171,8 +189,14 @@ class Client:
`timeout` duration to listen, default to 1 second
Examples:
Listen and get a message received within 5 seconds
| ${messages}= | Listen | test/test | timeout=5 |
"""
start = time.time_ns()
timeout = 1 if timeout < 1 else timeout
start = time.time()
while True:
if topic in self._messages and self._messages[topic]:
msg = self._messages[topic].popleft()
@@ -180,7 +204,7 @@ class Client:
if (
self._wait(self._recved, timeout=timeout)
or (time.time_ns() - start) >= timeout * 1_000_000_000
or (time.time() - start) >= timeout
):
break
@@ -189,29 +213,23 @@ class Client:
Returns true on timeout, false otherwise."""
try:
self._run(asyncio.wait_for(event.wait(), timeout))
event.clear()
except asyncio.TimeoutError:
return True
finally:
event.clear()
return False
def _on_connect(self, client, flags, rc, properties):
info("MQTT client connected")
logger.info("MQTT client connected")
def _on_message(self, client, topic, payload, qos, properties):
info(
"MQTT client received: topic=%s qos=%s payload=%s"
% (topic, qos, payload)
)
if topic in self._handlers:
self._handlers[topic](payload=payload.decode())
else:
self._messages[topic].append(payload.decode())
logger.info("MQTT client received: topic=%s qos=%s payload=%s" %
(topic, qos, payload))
self._messages[topic].append(payload.decode())
self._recved.set()
return 0
def _on_disconnect(self, client, packet, exc=None):
info("MQTT client disconnected")
logger.info("MQTT client disconnected")
def _on_subscribe(self, client, mid, qos, properties):
self._subcribed.set()
@@ -221,6 +239,9 @@ class Client:
if __name__ == "__main__":
# import logging
# logging.basicConfig(level=logging.DEBUG)
host = "127.0.0.1"
topic = "test/test_mqtt"
client = Client()
+235
View File
@@ -0,0 +1,235 @@
from os import remove
import os
import random
import subprocess
import shutil
import time
def prepare_persistence_dir():
os.system("mkdir -p build/persistence")
class Neuron(object):
process = 0
profiler_process = None
def __init__(self):
pass
def Start_Neuron(self):
prepare_persistence_dir()
self.process = subprocess.Popen(['./neuron', '--log'], cwd='build/')
return self.process
def Stop_Neuron(self, remove_persistence_data=True):
if self.profiler_process is not None:
# wait for plotting
time.sleep(5)
self.process.kill()
if remove_persistence_data:
os.system("rm build/persistence/sqlite.db")
prepare_persistence_dir()
def End_Neuron(self, process):
process.kill()
def Remove_Persistence(self):
os.system("rm build/persistence/sqlite.db")
prepare_persistence_dir()
def Profile_Neuron(self, interval, result_dir):
cmd = [
'psrecord', str(self.process.pid),
'--interval', str(interval),
'--plot', result_dir + '/cpu_mem.svg'
]
self.profiler_process = subprocess.Popen(cmd)
class Tool(object):
def __init__(self):
pass
def Array_Len(self, array):
return len(array)
class Plugin(object):
def __init__(self):
pass
def Get_Plugin_By_Name(self, splugins, name):
for plugin in splugins:
if plugin['name'] == name:
return plugin['id']
return 0
def Plugin_With_Name_Sholud_Exist(self, splugins, name):
assert 0 != self.Get_Plugin_By_Name(splugins, name)
def Plugin_With_Name_Should_Not_Exist(self, splugins, name):
assert 0 == self.Get_Plugin_By_Name(splugins, name)
class GrpConfig(object):
def __init__(self):
pass
def Get_Interval_In_Group_Config(self, gconfigs, gname):
for gconfig in gconfigs[0]:
if gconfig['name'] == gname:
return gconfig['interval']
return 0
def Group_Config_Size(self, gconfigs):
size = 0
for gconfig in gconfigs[0]:
size = size + 1
return size
def Get_Random_Group_Config(self, gconfigs):
return random.choice(gconfigs)['name']
def Group_Config_Check(self, gconfigs, name, interval):
ret = -1
for gconfig in gconfigs:
if gconfig['name'] == name:
if gconfig['interval'] == int(interval):
ret = 0
break
return ret
def Get_Group_Config_By_Name(self, sgconfigs, name):
for gconfig in sgconfigs:
if gconfig['name'] == name:
return gconfig['name']
return 0
class Node(object):
def __init__(self):
pass
def Get_Node_By_Name(self, snodes, name):
for node in snodes:
if node['name'] == name:
return True
return False
def Node_Should_Exist(self, snodes, name):
assert True == self.Get_Node_By_Name(snodes, name)
def Node_Should_Not_Exist(self, snodes, name):
assert False == self.Get_Node_By_Name(snodes, name)
def Node_With_Name_Should_Not_Exist(self, snodes, name):
assert 0 == self.Get_Node_By_Name(snodes, name)
def Get_Random_Node(self, snodes):
return random.choice(snodes)['id']
class Tag(object):
def __init__(self):
pass
def Tag_Check(self, tags, name, type, group_config_name, attribute, address):
ret = -1
for tag in tags:
if tag['name'] == name:
if tag['type'] == int(type) and tag['group_config_name'] == group_config_name and tag['attribute'] == int(attribute) and tag['address'] == address:
ret = 0
break
return ret
def Tag_Find_By_Name(self, tags, name):
for tag in tags:
if tag['name'] == name:
return tag
return None
class Subscribe(object):
def __init__(self):
pass
def Subscribe_Check(self, groups, node_id, group_config_name):
ret = -1
for group in groups:
if group['node_id'] == int(node_id) and group['group_config_name'] == group_config_name:
ret = 0
break
return ret
class Read(object):
def __init__(self):
pass
def Compare_Tag_Value_Bool(self, tags, name, value):
ret = -1
for tag in tags:
if tag['name'] == name:
if isinstance(value, str):
if (tag['value'] == False and value.lower() == "false" or
tag['value'] == True and value.lower() == "true"):
ret = 0
elif tag['value'] == int(value):
ret = 0
break
return ret
def Compare_Tag_Value_Int(self, tags, name, value):
ret = -1
for tag in tags:
if tag['name'] == name:
if int(tag['value']) == int(value):
ret = 0
break
return ret
def Compare_Tag_Value_Float(self, tags, name, value):
ret = -1
for tag in tags:
if tag['name'] == name:
if float(tag['value']) <= float(value) + 0.1 and float(tag['value']) >= float(value) - 0.1:
ret = 0
break
return ret
def Compare_Tag_Value_String(self, tags, name, value):
ret = -1
for tag in tags:
if tag['name'] == name:
if tag['value'] == str(value):
ret = 0
break
return ret
def Compare_Tag_Value_Strings(self, tags, name, value):
ret = -1
for tag in tags:
if tag['name'] == name:
if "\"" + tag['value'] + "\"" == str(value):
ret = 0
break
return ret
def Check_Tag_Error(self, tags, name, value):
ret = -1
for tag in tags:
if tag['name'] == name:
if int(tag['error']) == int(value):
ret = 0
break
return ret
+35
View File
@@ -0,0 +1,35 @@
# Functional test
Functional testing uses the robotframework automated testing framework, providing templates for each test case of the northbound APP and southbound DRIVER types.
Testing is divided into the following categories.
|Test case|Description|
|-----|----------|
|Core interface test|Mainly including the addition, deletion, modification, query, subscription, and other operations of the HTTP API interface for core data(PLUGIN, NODE, GROUP, TAG)|
|Southbound DRIVER test||
|Northbound APP test||
|Plugin specific test case|Such as OPC UA specific device discovery, can different devices be connected normally|
To run all functional testers
Enter the neuron/build directory.
Install Mosquito software.
```shell
$ sudo apt-get install -y mosquitto
```
Start the mosquitto server.
```shell
$ mosquitto -v &
```
Install requirements.
```shell
$ python3 -m pip install -U pip
$ python3 -m pip install -r ft/requirements.txt
```
Run functional tests and generate test reports.
```shell
$ python3 -m robot --maxerroelines=600 -P ft/ -d ft/reports ft
```
@@ -0,0 +1,10 @@
{
"nodes": [
{
"type": 1,
"plugin_name": "modbus-tcp",
"name": "modbus-tcp-0000",
"state": 1
}
]
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0000",
"adapter_name": "modbus-tcp-0000"
}
@@ -0,0 +1,7 @@
{
"params": {
"host": "127.0.0.1",
"port": 60502,
"connection_mode": 0
}
}
@@ -0,0 +1,11 @@
{
"params": {
"req-topic": "Neuron/req",
"res-topic": "Neuron/resp",
"ssl": "false",
"host": "127.0.0.1",
"port": 1883,
"username": "",
"password": ""
}
}
@@ -0,0 +1,10 @@
{
"subscriptions": [
{
"sub_adapter_name": "mqtt-0000",
"group_config_name": "group-0000",
"src_adapter_name": "modbus-tcp-0000",
"read_interval": 1000
}
]
}
@@ -0,0 +1,3 @@
{
"plugins": []
}
@@ -0,0 +1,10 @@
{
"nodes": [
{
"type": 1,
"plugin_name": "modbus-tcp",
"name": "modbus-tcp-0000",
"state": 1
}
]
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0000",
"adapter_name": "modbus-tcp-0000"
}
@@ -0,0 +1,7 @@
{
"params": {
"host": "127.0.0.1",
"port": 60502,
"connection_mode": 0
}
}
@@ -0,0 +1,11 @@
{
"params": {
"req-topic": "Neuron/req",
"res-topic": "Neuron/resp",
"ssl": "false",
"host": "127.0.0.1",
"port": 1883,
"username": "",
"password": ""
}
}
@@ -0,0 +1,10 @@
{
"subscriptions": [
{
"sub_adapter_name": "mqtt-0000",
"group_config_name": "group-0000",
"src_adapter_name": "modbus-tcp-0000",
"read_interval": 1000
}
]
}
@@ -0,0 +1,3 @@
{
"plugins": []
}
+124
View File
@@ -0,0 +1,124 @@
{
"nodes": [
{
"type": 1,
"plugin_name": "modbus-tcp",
"name": "modbus-tcp-0000",
"state": 1
},
{
"type": 1,
"plugin_name": "modbus-tcp",
"name": "modbus-tcp-0001",
"state": 1
},
{
"type": 1,
"plugin_name": "modbus-tcp",
"name": "modbus-tcp-0002",
"state": 1
},
{
"type": 1,
"plugin_name": "modbus-tcp",
"name": "modbus-tcp-0003",
"state": 1
},
{
"type": 1,
"plugin_name": "modbus-tcp",
"name": "modbus-tcp-0004",
"state": 1
},
{
"type": 1,
"plugin_name": "modbus-tcp",
"name": "modbus-tcp-0005",
"state": 1
},
{
"type": 1,
"plugin_name": "modbus-tcp",
"name": "modbus-tcp-0006",
"state": 1
},
{
"type": 1,
"plugin_name": "modbus-tcp",
"name": "modbus-tcp-0007",
"state": 1
},
{
"type": 1,
"plugin_name": "modbus-tcp",
"name": "modbus-tcp-0008",
"state": 1
},
{
"type": 1,
"plugin_name": "modbus-tcp",
"name": "modbus-tcp-0009",
"state": 1
},
{
"type": 1,
"plugin_name": "neuron-opcua-plugin",
"name": "opcua-0000",
"state": 1
},
{
"type": 1,
"plugin_name": "neuron-opcua-plugin",
"name": "opcua-0001",
"state": 1
},
{
"type": 1,
"plugin_name": "neuron-opcua-plugin",
"name": "opcua-0002",
"state": 1
},
{
"type": 1,
"plugin_name": "neuron-opcua-plugin",
"name": "opcua-0003",
"state": 1
},
{
"type": 1,
"plugin_name": "neuron-opcua-plugin",
"name": "opcua-0004",
"state": 1
},
{
"type": 1,
"plugin_name": "neuron-opcua-plugin",
"name": "opcua-0005",
"state": 1
},
{
"type": 1,
"plugin_name": "neuron-opcua-plugin",
"name": "opcua-0006",
"state": 1
},
{
"type": 1,
"plugin_name": "neuron-opcua-plugin",
"name": "opcua-0007",
"state": 1
},
{
"type": 1,
"plugin_name": "neuron-opcua-plugin",
"name": "opcua-0008",
"state": 1
},
{
"type": 1,
"plugin_name": "neuron-opcua-plugin",
"name": "opcua-0009",
"state": 1
}
]
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0000",
"adapter_name": "modbus-tcp-0000"
}
@@ -0,0 +1,604 @@
{
"tags": [
{
"type": 4,
"name": "modbus1",
"attribute": 3,
"address": "1!400001"
},
{
"type": 4,
"name": "modbus2",
"attribute": 3,
"address": "1!400002"
},
{
"type": 4,
"name": "modbus3",
"attribute": 3,
"address": "1!400003"
},
{
"type": 4,
"name": "modbus4",
"attribute": 3,
"address": "1!400004"
},
{
"type": 4,
"name": "modbus5",
"attribute": 3,
"address": "1!400005"
},
{
"type": 4,
"name": "modbus6",
"attribute": 3,
"address": "1!400006"
},
{
"type": 4,
"name": "modbus7",
"attribute": 3,
"address": "1!400007"
},
{
"type": 4,
"name": "modbus8",
"attribute": 3,
"address": "1!400008"
},
{
"type": 4,
"name": "modbus9",
"attribute": 3,
"address": "1!400009"
},
{
"type": 4,
"name": "modbus10",
"attribute": 3,
"address": "1!400010"
},
{
"type": 4,
"name": "modbus11",
"attribute": 3,
"address": "1!400011"
},
{
"type": 4,
"name": "modbus12",
"attribute": 3,
"address": "1!400012"
},
{
"type": 4,
"name": "modbus13",
"attribute": 3,
"address": "1!400013"
},
{
"type": 4,
"name": "modbus14",
"attribute": 3,
"address": "1!400014"
},
{
"type": 4,
"name": "modbus15",
"attribute": 3,
"address": "1!400015"
},
{
"type": 4,
"name": "modbus16",
"attribute": 3,
"address": "1!400016"
},
{
"type": 4,
"name": "modbus17",
"attribute": 3,
"address": "1!400017"
},
{
"type": 4,
"name": "modbus18",
"attribute": 3,
"address": "1!400018"
},
{
"type": 4,
"name": "modbus19",
"attribute": 3,
"address": "1!400019"
},
{
"type": 4,
"name": "modbus20",
"attribute": 3,
"address": "1!400020"
},
{
"type": 4,
"name": "modbus21",
"attribute": 3,
"address": "1!400021"
},
{
"type": 4,
"name": "modbus22",
"attribute": 3,
"address": "1!400022"
},
{
"type": 4,
"name": "modbus23",
"attribute": 3,
"address": "1!400023"
},
{
"type": 4,
"name": "modbus24",
"attribute": 3,
"address": "1!400024"
},
{
"type": 4,
"name": "modbus25",
"attribute": 3,
"address": "1!400025"
},
{
"type": 4,
"name": "modbus26",
"attribute": 3,
"address": "1!400026"
},
{
"type": 4,
"name": "modbus27",
"attribute": 3,
"address": "1!400027"
},
{
"type": 4,
"name": "modbus28",
"attribute": 3,
"address": "1!400028"
},
{
"type": 4,
"name": "modbus29",
"attribute": 3,
"address": "1!400029"
},
{
"type": 4,
"name": "modbus30",
"attribute": 3,
"address": "1!400030"
},
{
"type": 4,
"name": "modbus31",
"attribute": 3,
"address": "1!400031"
},
{
"type": 4,
"name": "modbus32",
"attribute": 3,
"address": "1!400032"
},
{
"type": 4,
"name": "modbus33",
"attribute": 3,
"address": "1!400033"
},
{
"type": 4,
"name": "modbus34",
"attribute": 3,
"address": "1!400034"
},
{
"type": 4,
"name": "modbus35",
"attribute": 3,
"address": "1!400035"
},
{
"type": 4,
"name": "modbus36",
"attribute": 3,
"address": "1!400036"
},
{
"type": 4,
"name": "modbus37",
"attribute": 3,
"address": "1!400037"
},
{
"type": 4,
"name": "modbus38",
"attribute": 3,
"address": "1!400038"
},
{
"type": 4,
"name": "modbus39",
"attribute": 3,
"address": "1!400039"
},
{
"type": 4,
"name": "modbus40",
"attribute": 3,
"address": "1!400040"
},
{
"type": 4,
"name": "modbus41",
"attribute": 3,
"address": "1!400041"
},
{
"type": 4,
"name": "modbus42",
"attribute": 3,
"address": "1!400042"
},
{
"type": 4,
"name": "modbus43",
"attribute": 3,
"address": "1!400043"
},
{
"type": 4,
"name": "modbus44",
"attribute": 3,
"address": "1!400044"
},
{
"type": 4,
"name": "modbus45",
"attribute": 3,
"address": "1!400045"
},
{
"type": 4,
"name": "modbus46",
"attribute": 3,
"address": "1!400046"
},
{
"type": 4,
"name": "modbus47",
"attribute": 3,
"address": "1!400047"
},
{
"type": 4,
"name": "modbus48",
"attribute": 3,
"address": "1!400048"
},
{
"type": 4,
"name": "modbus49",
"attribute": 3,
"address": "1!400049"
},
{
"type": 4,
"name": "modbus50",
"attribute": 3,
"address": "1!400050"
},
{
"type": 4,
"name": "modbus51",
"attribute": 3,
"address": "1!400051"
},
{
"type": 4,
"name": "modbus52",
"attribute": 3,
"address": "1!400052"
},
{
"type": 4,
"name": "modbus53",
"attribute": 3,
"address": "1!400053"
},
{
"type": 4,
"name": "modbus54",
"attribute": 3,
"address": "1!400054"
},
{
"type": 4,
"name": "modbus55",
"attribute": 3,
"address": "1!400055"
},
{
"type": 4,
"name": "modbus56",
"attribute": 3,
"address": "1!400056"
},
{
"type": 4,
"name": "modbus57",
"attribute": 3,
"address": "1!400057"
},
{
"type": 4,
"name": "modbus58",
"attribute": 3,
"address": "1!400058"
},
{
"type": 4,
"name": "modbus59",
"attribute": 3,
"address": "1!400059"
},
{
"type": 4,
"name": "modbus60",
"attribute": 3,
"address": "1!400060"
},
{
"type": 4,
"name": "modbus61",
"attribute": 3,
"address": "1!400061"
},
{
"type": 4,
"name": "modbus62",
"attribute": 3,
"address": "1!400062"
},
{
"type": 4,
"name": "modbus63",
"attribute": 3,
"address": "1!400063"
},
{
"type": 4,
"name": "modbus64",
"attribute": 3,
"address": "1!400064"
},
{
"type": 4,
"name": "modbus65",
"attribute": 3,
"address": "1!400065"
},
{
"type": 4,
"name": "modbus66",
"attribute": 3,
"address": "1!400066"
},
{
"type": 4,
"name": "modbus67",
"attribute": 3,
"address": "1!400067"
},
{
"type": 4,
"name": "modbus68",
"attribute": 3,
"address": "1!400068"
},
{
"type": 4,
"name": "modbus69",
"attribute": 3,
"address": "1!400069"
},
{
"type": 4,
"name": "modbus70",
"attribute": 3,
"address": "1!400070"
},
{
"type": 4,
"name": "modbus71",
"attribute": 3,
"address": "1!400071"
},
{
"type": 4,
"name": "modbus72",
"attribute": 3,
"address": "1!400072"
},
{
"type": 4,
"name": "modbus73",
"attribute": 3,
"address": "1!400073"
},
{
"type": 4,
"name": "modbus74",
"attribute": 3,
"address": "1!400074"
},
{
"type": 4,
"name": "modbus75",
"attribute": 3,
"address": "1!400075"
},
{
"type": 4,
"name": "modbus76",
"attribute": 3,
"address": "1!400076"
},
{
"type": 4,
"name": "modbus77",
"attribute": 3,
"address": "1!400077"
},
{
"type": 4,
"name": "modbus78",
"attribute": 3,
"address": "1!400078"
},
{
"type": 4,
"name": "modbus79",
"attribute": 3,
"address": "1!400079"
},
{
"type": 4,
"name": "modbus80",
"attribute": 3,
"address": "1!400080"
},
{
"type": 4,
"name": "modbus81",
"attribute": 3,
"address": "1!400081"
},
{
"type": 4,
"name": "modbus82",
"attribute": 3,
"address": "1!400082"
},
{
"type": 4,
"name": "modbus83",
"attribute": 3,
"address": "1!400083"
},
{
"type": 4,
"name": "modbus84",
"attribute": 3,
"address": "1!400084"
},
{
"type": 4,
"name": "modbus85",
"attribute": 3,
"address": "1!400085"
},
{
"type": 4,
"name": "modbus86",
"attribute": 3,
"address": "1!400086"
},
{
"type": 4,
"name": "modbus87",
"attribute": 3,
"address": "1!400087"
},
{
"type": 4,
"name": "modbus88",
"attribute": 3,
"address": "1!400088"
},
{
"type": 4,
"name": "modbus89",
"attribute": 3,
"address": "1!400089"
},
{
"type": 4,
"name": "modbus90",
"attribute": 3,
"address": "1!400090"
},
{
"type": 4,
"name": "modbus91",
"attribute": 3,
"address": "1!400091"
},
{
"type": 4,
"name": "modbus92",
"attribute": 3,
"address": "1!400092"
},
{
"type": 4,
"name": "modbus93",
"attribute": 3,
"address": "1!400093"
},
{
"type": 4,
"name": "modbus94",
"attribute": 3,
"address": "1!400094"
},
{
"type": 4,
"name": "modbus95",
"attribute": 3,
"address": "1!400095"
},
{
"type": 4,
"name": "modbus96",
"attribute": 3,
"address": "1!400096"
},
{
"type": 4,
"name": "modbus97",
"attribute": 3,
"address": "1!400097"
},
{
"type": 4,
"name": "modbus98",
"attribute": 3,
"address": "1!400098"
},
{
"type": 4,
"name": "modbus99",
"attribute": 3,
"address": "1!400099"
},
{
"type": 4,
"name": "modbus100",
"attribute": 3,
"address": "1!400100"
}
]
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0001",
"adapter_name": "modbus-tcp-0000"
}
@@ -0,0 +1,604 @@
{
"tags": [
{
"type": 4,
"name": "modbus101",
"attribute": 3,
"address": "1!400101"
},
{
"type": 4,
"name": "modbus102",
"attribute": 3,
"address": "1!400102"
},
{
"type": 4,
"name": "modbus103",
"attribute": 3,
"address": "1!400103"
},
{
"type": 4,
"name": "modbus104",
"attribute": 3,
"address": "1!400104"
},
{
"type": 4,
"name": "modbus105",
"attribute": 3,
"address": "1!400105"
},
{
"type": 4,
"name": "modbus106",
"attribute": 3,
"address": "1!400106"
},
{
"type": 4,
"name": "modbus107",
"attribute": 3,
"address": "1!400107"
},
{
"type": 4,
"name": "modbus108",
"attribute": 3,
"address": "1!400108"
},
{
"type": 4,
"name": "modbus109",
"attribute": 3,
"address": "1!400109"
},
{
"type": 4,
"name": "modbus110",
"attribute": 3,
"address": "1!400110"
},
{
"type": 4,
"name": "modbus111",
"attribute": 3,
"address": "1!400111"
},
{
"type": 4,
"name": "modbus112",
"attribute": 3,
"address": "1!400112"
},
{
"type": 4,
"name": "modbus113",
"attribute": 3,
"address": "1!400113"
},
{
"type": 4,
"name": "modbus114",
"attribute": 3,
"address": "1!400114"
},
{
"type": 4,
"name": "modbus115",
"attribute": 3,
"address": "1!400115"
},
{
"type": 4,
"name": "modbus116",
"attribute": 3,
"address": "1!400116"
},
{
"type": 4,
"name": "modbus117",
"attribute": 3,
"address": "1!400117"
},
{
"type": 4,
"name": "modbus118",
"attribute": 3,
"address": "1!400118"
},
{
"type": 4,
"name": "modbus119",
"attribute": 3,
"address": "1!400119"
},
{
"type": 4,
"name": "modbus120",
"attribute": 3,
"address": "1!400120"
},
{
"type": 4,
"name": "modbus121",
"attribute": 3,
"address": "1!400121"
},
{
"type": 4,
"name": "modbus122",
"attribute": 3,
"address": "1!400122"
},
{
"type": 4,
"name": "modbus123",
"attribute": 3,
"address": "1!400123"
},
{
"type": 4,
"name": "modbus124",
"attribute": 3,
"address": "1!400124"
},
{
"type": 4,
"name": "modbus125",
"attribute": 3,
"address": "1!400125"
},
{
"type": 4,
"name": "modbus126",
"attribute": 3,
"address": "1!400126"
},
{
"type": 4,
"name": "modbus127",
"attribute": 3,
"address": "1!400127"
},
{
"type": 4,
"name": "modbus128",
"attribute": 3,
"address": "1!400128"
},
{
"type": 4,
"name": "modbus129",
"attribute": 3,
"address": "1!400129"
},
{
"type": 4,
"name": "modbus130",
"attribute": 3,
"address": "1!400130"
},
{
"type": 4,
"name": "modbus131",
"attribute": 3,
"address": "1!400131"
},
{
"type": 4,
"name": "modbus132",
"attribute": 3,
"address": "1!400132"
},
{
"type": 4,
"name": "modbus133",
"attribute": 3,
"address": "1!400133"
},
{
"type": 4,
"name": "modbus134",
"attribute": 3,
"address": "1!400134"
},
{
"type": 4,
"name": "modbus135",
"attribute": 3,
"address": "1!400135"
},
{
"type": 4,
"name": "modbus136",
"attribute": 3,
"address": "1!400136"
},
{
"type": 4,
"name": "modbus137",
"attribute": 3,
"address": "1!400137"
},
{
"type": 4,
"name": "modbus138",
"attribute": 3,
"address": "1!400138"
},
{
"type": 4,
"name": "modbus139",
"attribute": 3,
"address": "1!400139"
},
{
"type": 4,
"name": "modbus140",
"attribute": 3,
"address": "1!400140"
},
{
"type": 4,
"name": "modbus141",
"attribute": 3,
"address": "1!400141"
},
{
"type": 4,
"name": "modbus142",
"attribute": 3,
"address": "1!400142"
},
{
"type": 4,
"name": "modbus143",
"attribute": 3,
"address": "1!400143"
},
{
"type": 4,
"name": "modbus144",
"attribute": 3,
"address": "1!400144"
},
{
"type": 4,
"name": "modbus145",
"attribute": 3,
"address": "1!400145"
},
{
"type": 4,
"name": "modbus146",
"attribute": 3,
"address": "1!400146"
},
{
"type": 4,
"name": "modbus147",
"attribute": 3,
"address": "1!400147"
},
{
"type": 4,
"name": "modbus148",
"attribute": 3,
"address": "1!400148"
},
{
"type": 4,
"name": "modbus149",
"attribute": 3,
"address": "1!400149"
},
{
"type": 4,
"name": "modbus150",
"attribute": 3,
"address": "1!400150"
},
{
"type": 4,
"name": "modbus151",
"attribute": 3,
"address": "1!400151"
},
{
"type": 4,
"name": "modbus152",
"attribute": 3,
"address": "1!400152"
},
{
"type": 4,
"name": "modbus153",
"attribute": 3,
"address": "1!400153"
},
{
"type": 4,
"name": "modbus154",
"attribute": 3,
"address": "1!400154"
},
{
"type": 4,
"name": "modbus155",
"attribute": 3,
"address": "1!400155"
},
{
"type": 4,
"name": "modbus156",
"attribute": 3,
"address": "1!400156"
},
{
"type": 4,
"name": "modbus157",
"attribute": 3,
"address": "1!400157"
},
{
"type": 4,
"name": "modbus158",
"attribute": 3,
"address": "1!400158"
},
{
"type": 4,
"name": "modbus159",
"attribute": 3,
"address": "1!400159"
},
{
"type": 4,
"name": "modbus160",
"attribute": 3,
"address": "1!400160"
},
{
"type": 4,
"name": "modbus161",
"attribute": 3,
"address": "1!400161"
},
{
"type": 4,
"name": "modbus162",
"attribute": 3,
"address": "1!400162"
},
{
"type": 4,
"name": "modbus163",
"attribute": 3,
"address": "1!400163"
},
{
"type": 4,
"name": "modbus164",
"attribute": 3,
"address": "1!400164"
},
{
"type": 4,
"name": "modbus165",
"attribute": 3,
"address": "1!400165"
},
{
"type": 4,
"name": "modbus166",
"attribute": 3,
"address": "1!400166"
},
{
"type": 4,
"name": "modbus167",
"attribute": 3,
"address": "1!400167"
},
{
"type": 4,
"name": "modbus168",
"attribute": 3,
"address": "1!400168"
},
{
"type": 4,
"name": "modbus169",
"attribute": 3,
"address": "1!400169"
},
{
"type": 4,
"name": "modbus170",
"attribute": 3,
"address": "1!400170"
},
{
"type": 4,
"name": "modbus171",
"attribute": 3,
"address": "1!400171"
},
{
"type": 4,
"name": "modbus172",
"attribute": 3,
"address": "1!400172"
},
{
"type": 4,
"name": "modbus173",
"attribute": 3,
"address": "1!400173"
},
{
"type": 4,
"name": "modbus174",
"attribute": 3,
"address": "1!400174"
},
{
"type": 4,
"name": "modbus175",
"attribute": 3,
"address": "1!400175"
},
{
"type": 4,
"name": "modbus176",
"attribute": 3,
"address": "1!400176"
},
{
"type": 4,
"name": "modbus177",
"attribute": 3,
"address": "1!400177"
},
{
"type": 4,
"name": "modbus178",
"attribute": 3,
"address": "1!400178"
},
{
"type": 4,
"name": "modbus179",
"attribute": 3,
"address": "1!400179"
},
{
"type": 4,
"name": "modbus180",
"attribute": 3,
"address": "1!400180"
},
{
"type": 4,
"name": "modbus181",
"attribute": 3,
"address": "1!400181"
},
{
"type": 4,
"name": "modbus182",
"attribute": 3,
"address": "1!400182"
},
{
"type": 4,
"name": "modbus183",
"attribute": 3,
"address": "1!400183"
},
{
"type": 4,
"name": "modbus184",
"attribute": 3,
"address": "1!400184"
},
{
"type": 4,
"name": "modbus185",
"attribute": 3,
"address": "1!400185"
},
{
"type": 4,
"name": "modbus186",
"attribute": 3,
"address": "1!400186"
},
{
"type": 4,
"name": "modbus187",
"attribute": 3,
"address": "1!400187"
},
{
"type": 4,
"name": "modbus188",
"attribute": 3,
"address": "1!400188"
},
{
"type": 4,
"name": "modbus189",
"attribute": 3,
"address": "1!400189"
},
{
"type": 4,
"name": "modbus190",
"attribute": 3,
"address": "1!400190"
},
{
"type": 4,
"name": "modbus191",
"attribute": 3,
"address": "1!400191"
},
{
"type": 4,
"name": "modbus192",
"attribute": 3,
"address": "1!400192"
},
{
"type": 4,
"name": "modbus193",
"attribute": 3,
"address": "1!400193"
},
{
"type": 4,
"name": "modbus194",
"attribute": 3,
"address": "1!400194"
},
{
"type": 4,
"name": "modbus195",
"attribute": 3,
"address": "1!400195"
},
{
"type": 4,
"name": "modbus196",
"attribute": 3,
"address": "1!400196"
},
{
"type": 4,
"name": "modbus197",
"attribute": 3,
"address": "1!400197"
},
{
"type": 4,
"name": "modbus198",
"attribute": 3,
"address": "1!400198"
},
{
"type": 4,
"name": "modbus199",
"attribute": 3,
"address": "1!400199"
},
{
"type": 4,
"name": "modbus200",
"attribute": 3,
"address": "1!400200"
}
]
}
@@ -0,0 +1,7 @@
{
"params": {
"host":"127.0.0.1",
"port":60502,
"connection_mode":0
}
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0000",
"adapter_name": "modbus-tcp-0001"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0001",
"adapter_name": "modbus-tcp-0001"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0002",
"adapter_name": "modbus-tcp-0001"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0003",
"adapter_name": "modbus-tcp-0001"
}
@@ -0,0 +1,7 @@
{
"params": {
"host":"127.0.0.1",
"port":60502,
"connection_mode":0
}
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0000",
"adapter_name": "modbus-tcp-0002"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0001",
"adapter_name": "modbus-tcp-0002"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0002",
"adapter_name": "modbus-tcp-0002"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0003",
"adapter_name": "modbus-tcp-0002"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0004",
"adapter_name": "modbus-tcp-0002"
}
@@ -0,0 +1,7 @@
{
"params": {
"host":"127.0.0.1",
"port":60502,
"connection_mode":0
}
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0000",
"adapter_name": "modbus-tcp-0003"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0001",
"adapter_name": "modbus-tcp-0003"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0002",
"adapter_name": "modbus-tcp-0003"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0003",
"adapter_name": "modbus-tcp-0003"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0004",
"adapter_name": "modbus-tcp-0003"
}
@@ -0,0 +1,7 @@
{
"params": {
"host":"127.0.0.1",
"port":60502,
"connection_mode":0
}
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0000",
"adapter_name": "modbus-tcp-0004"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0001",
"adapter_name": "modbus-tcp-0004"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0002",
"adapter_name": "modbus-tcp-0004"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0003",
"adapter_name": "modbus-tcp-0004"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0004",
"adapter_name": "modbus-tcp-0004"
}
@@ -0,0 +1,7 @@
{
"params": {
"host":"127.0.0.1",
"port":60502,
"connection_mode":0
}
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0000",
"adapter_name": "modbus-tcp-0005"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0001",
"adapter_name": "modbus-tcp-0005"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0002",
"adapter_name": "modbus-tcp-0005"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0003",
"adapter_name": "modbus-tcp-0005"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0004",
"adapter_name": "modbus-tcp-0005"
}
@@ -0,0 +1,7 @@
{
"params": {
"host":"127.0.0.1",
"port":60502,
"connection_mode":0
}
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0000",
"adapter_name": "modbus-tcp-0006"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0001",
"adapter_name": "modbus-tcp-0006"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0002",
"adapter_name": "modbus-tcp-0006"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0003",
"adapter_name": "modbus-tcp-0006"
}
@@ -0,0 +1,5 @@
{
"read_interval": 1000,
"group_config_name": "group-0004",
"adapter_name": "modbus-tcp-0006"
}

Some files were not shown because too many files have changed in this diff Show More