mirror of
https://github.com/emqx/neuron.git
synced 2026-10-29 23:19:18 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca95e1c7d6 | ||
|
|
742e41dd9a | ||
|
|
db7a59f5d7 | ||
|
|
75a8cb23f6 | ||
|
|
97cc025cbc | ||
|
|
4766081eb7 | ||
|
|
d057c63c35 | ||
|
|
8523df1a5a | ||
|
|
37f85d49c6 | ||
|
|
74bda5b0ba | ||
|
|
1835fb7951 | ||
|
|
0192b1504f | ||
|
|
d405368c33 | ||
|
|
9bc9312af8 | ||
|
|
ce0800a7d0 | ||
|
|
97e69e23c0 | ||
|
|
9996d02beb | ||
|
|
8c78faafe8 | ||
|
|
6ece977535 | ||
|
|
f73280dd04 | ||
|
|
63854443be | ||
|
|
e1a751614f | ||
|
|
175f23ad21 | ||
|
|
f27b7b9da6 | ||
|
|
9f4b04a021 | ||
|
|
5fb50e1d84 | ||
|
|
37fa663f7c | ||
|
|
2693e59508 | ||
|
|
fa219c1850 | ||
|
|
35f2a1e28b | ||
|
|
b7bafef1e0 | ||
|
|
717cfcb756 | ||
|
|
1ed77c631a | ||
|
|
041b7423c8 | ||
|
|
53089af902 | ||
|
|
ce747b57d4 | ||
|
|
e6674f1eef | ||
|
|
a352e75863 | ||
|
|
d16051a3c7 | ||
|
|
78cd5f5105 | ||
|
|
b87da6154c | ||
|
|
e8dffb1ee2 | ||
|
|
812cc72a6c | ||
|
|
e201ba6a3e | ||
|
|
507842b8a2 | ||
|
|
3fc48541c7 | ||
|
|
834ab49ebf | ||
|
|
2470e915fb | ||
|
|
219db4f571 | ||
|
|
2163a6aabe | ||
|
|
48b2e29434 | ||
|
|
93c2c09049 | ||
|
|
d2701f1772 | ||
|
|
4e44ff19e4 | ||
|
|
68bd9245b8 | ||
|
|
bf3276a857 | ||
|
|
b8b4dc55fd | ||
|
|
65a5c9e0c5 | ||
|
|
d165a0caf1 | ||
|
|
d251eb9409 | ||
|
|
428f65a53e | ||
|
|
e68d469e3d | ||
|
|
f2026ac304 | ||
|
|
e427211c63 | ||
|
|
09adbcdd4d | ||
|
|
bb77c59e2b | ||
|
|
71885810ca | ||
|
|
911d7d7f8c | ||
|
|
9c5c41b264 | ||
|
|
636cb69c65 | ||
|
|
bd75e295ba | ||
|
|
1860519927 | ||
|
|
c817c0d4f4 | ||
|
|
e7b960e71b | ||
|
|
71e820674f | ||
|
|
57dc135db7 | ||
|
|
5993b6e28c | ||
|
|
076f63e87b | ||
|
|
4d22cb60b4 | ||
|
|
5801cf213f | ||
|
|
b9cac5b4a7 | ||
|
|
69eaca2046 | ||
|
|
f1cf74ffe3 | ||
|
|
d5cf105c2e | ||
|
|
0b922f98c5 | ||
|
|
bb4ce7ba0c | ||
|
|
11fadeee4d | ||
|
|
52b74ee3a2 | ||
|
|
d1401c88d1 | ||
|
|
1ed6dbba14 | ||
|
|
98ac2456e3 | ||
|
|
e4f30a5cb2 | ||
|
|
c6be6f8018 | ||
|
|
7c1680f285 | ||
|
|
ab4bc4cdc4 | ||
|
|
6fb94430b2 | ||
|
|
bce294d7f1 | ||
|
|
2205e60dc2 | ||
|
|
e7beacb632 |
@@ -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
|
||||
+92
-76
@@ -9,43 +9,42 @@ on:
|
||||
|
||||
jobs:
|
||||
clang_format_check:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
# checkout
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Run clang-format style check for C/C++ programs.
|
||||
uses: DoozyX/clang-format-lint-action@v0.18
|
||||
uses: DoozyX/clang-format-lint-action@v0.12
|
||||
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 src/otel/trace.pb-c.h src/otel/trace.pb-c.c src/otel/resource.pb-c.h src/otel/resource.pb-c.c src/otel/common.pb-c.c src/otel/common.pb-c.h'
|
||||
style: file
|
||||
exclude: 'include/neuron/utils/uthash.h include/neuron/utils/utarray.h include/neuron/utils/utlist.h include/neuron/utils/zlog.h'
|
||||
clangFormatVersion: 10
|
||||
style: file
|
||||
|
||||
cppcheck:
|
||||
runs-on: ubuntu-24.04
|
||||
container: ghcr.io/neugates/build:x86_64-main
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: cppcheck
|
||||
run: |
|
||||
sudo apt install -y cppcheck
|
||||
cppcheck --enable=all --error-exitcode=2 --inline-suppr --suppress=missingInclude --suppress=unusedFunction --suppress=*:src/otel/trace.pb-c.c --suppress=*:src/otel/common.pb-c.c --suppress=*:src/otel/resource.pb-c.c ./plugins ./src
|
||||
cppcheck --enable=all --error-exitcode=2 --inline-suppr --suppress=missingInclude --suppress=variableScope ./simulator
|
||||
sudo apt install cppcheck
|
||||
cppcheck --enable=all --error-exitcode=2 --inline-suppr --suppress=missingInclude --suppress=unusedFunction ./plugins ./simulator ./src
|
||||
|
||||
ut:
|
||||
runs-on: ubuntu-24.04
|
||||
container: ghcr.io/neugates/build:x86_64-v2.11
|
||||
runs-on: ubuntu-20.04
|
||||
container: ghcr.io/neugates/build:x86_64-v2.6
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
@@ -59,82 +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
|
||||
|
||||
- name: create cov report
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install lcov
|
||||
mkdir -p cov_report
|
||||
./create_cov_report.sh ut
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
verbose: true
|
||||
fail_ci_if_error: true
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
directory: ./cov_report/
|
||||
files: ./cov_report/cov-ut.info
|
||||
name: ut_result
|
||||
path: |
|
||||
build/tests/reports/ut.log
|
||||
build/tests/reports/output.xml
|
||||
build/result/index.html
|
||||
build/neuron.log
|
||||
|
||||
pft:
|
||||
runs-on: ubuntu-24.04
|
||||
container: ghcr.io/neugates/build:x86_64-v2.11
|
||||
strategy:
|
||||
matrix:
|
||||
plugin: [core, ekuiper, modbus, mqtt, azure, metrics]
|
||||
ft:
|
||||
runs-on: ubuntu-20.04
|
||||
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: |
|
||||
sudo apt-get install -y mosquitto
|
||||
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
|
||||
|
||||
- name: create cov report
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install lcov
|
||||
mkdir -p cov_report
|
||||
./create_cov_report.sh ${{ matrix.plugin }}
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
verbose: true
|
||||
fail_ci_if_error: true
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
directory: ./cov_report/
|
||||
files: ./cov_report/cov-${{ matrix.plugin }}.info
|
||||
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
|
||||
|
||||
+13
-23
@@ -8,20 +8,20 @@ on:
|
||||
- published
|
||||
|
||||
env:
|
||||
VERSION: 2.11.5
|
||||
VERSION: 2.6.1
|
||||
UI_VERSION: 2.6.1
|
||||
BRANCH: v2.11
|
||||
BRANCH: v2.6
|
||||
|
||||
jobs:
|
||||
cross-build:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.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.11
|
||||
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@v4
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: neuron-sdk-${{ matrix.arch[2] }}
|
||||
name: neuron-sdk
|
||||
path: |
|
||||
neuron-sdk-*.tar.gz
|
||||
|
||||
build-debug-sdk:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
arch:
|
||||
- [x86_64-linux-gnu, x86_64, amd64]
|
||||
container: ghcr.io/neugates/build:${{ matrix.arch[1] }}-v2.11
|
||||
container: ghcr.io/neugates/build:${{ matrix.arch[1] }}-v2.6
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -83,9 +83,9 @@ jobs:
|
||||
run: |
|
||||
./package-sdk.sh -p ${{ matrix.arch[2] }} -n neuron-sdk-debug-$VERSION
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: neuron-sdk-debug
|
||||
name: neuron-sdk
|
||||
path: |
|
||||
neuron-sdk-debug-*.tar.gz
|
||||
|
||||
@@ -102,19 +102,9 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: neuron-sdk-debug
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: neuron-sdk-arm64
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: neuron-sdk-armhf
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: neuron-sdk-amd64
|
||||
name: neuron-sdk
|
||||
|
||||
- uses: softprops/action-gh-release@v1
|
||||
env:
|
||||
@@ -125,4 +115,4 @@ jobs:
|
||||
draft: false
|
||||
prerelease: true
|
||||
files: |
|
||||
neuron-sdk-*
|
||||
neuron-sdk-*
|
||||
|
||||
@@ -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"
|
||||
+16
-41
@@ -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}")
|
||||
@@ -41,7 +41,7 @@ if(USE_GCOV)
|
||||
endif(USE_GCOV)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -g")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O0")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O1")
|
||||
|
||||
if(NOT DISABLE_ASAN)
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -fsanitize=address")
|
||||
@@ -54,32 +54,27 @@ add_custom_target(neuron-version
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/neuron-version.cmake)
|
||||
|
||||
find_package(nng CONFIG REQUIRED)
|
||||
find_package(LibXml2 REQUIRED)
|
||||
find_package(Threads)
|
||||
|
||||
if (CMAKE_STAGING_PREFIX)
|
||||
include_directories(${CMAKE_STAGING_PREFIX}/include)
|
||||
link_directories(${CMAKE_STAGING_PREFIX}/lib)
|
||||
include_directories(${CMAKE_STAGING_PREFIX}/include/libxml2)
|
||||
else()
|
||||
include_directories(/usr/local/include)
|
||||
link_directories(/usr/local/lib)
|
||||
include_directories(/usr/local/include/libxml2)
|
||||
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)
|
||||
aux_source_directory(src/otel NEURON_SRC_OTEL)
|
||||
set(NEURON_BASE_SOURCES
|
||||
src/base/tag.c
|
||||
src/base/neu_plugin_common.c
|
||||
src/base/tag_sort.c
|
||||
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
|
||||
@@ -89,11 +84,12 @@ 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
|
||||
src/utils/cid.c
|
||||
${PERSIST_SOURCES})
|
||||
|
||||
if (SMART_LINK)
|
||||
@@ -102,30 +98,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 (USE_MQTT_SM)
|
||||
message(STATUS "use mqtt sm")
|
||||
add_definitions(-DNEU_USE_MQTT_SM)
|
||||
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} ${NEURON_SRC_OTEL})
|
||||
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 xml2
|
||||
${CMAKE_THREAD_LIBS_INIT} -lm protobuf-c)
|
||||
target_link_libraries(neuron-base nng libzlog.so jansson jwt
|
||||
${CMAKE_THREAD_LIBS_INIT})
|
||||
add_dependencies(neuron-base neuron-version)
|
||||
|
||||
# dependency imposed by nng
|
||||
@@ -141,27 +120,26 @@ 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
|
||||
src/adapter/adapter.c
|
||||
src/adapter/driver/cache.c
|
||||
src/adapter/driver/driver.c
|
||||
plugins/restful/handle.c
|
||||
plugins/restful/log_handle.c
|
||||
plugins/restful/file_handle.c
|
||||
plugins/restful/metric_handle.c
|
||||
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/otel_handle.c
|
||||
plugins/restful/cid_handle.c
|
||||
plugins/restful/system_handle.c
|
||||
plugins/restful/rest.c
|
||||
plugins/restful/user.c)
|
||||
|
||||
@@ -169,7 +147,7 @@ set(CMAKE_BUILD_RPATH ./)
|
||||
add_executable(neuron)
|
||||
target_sources(neuron PRIVATE ${NEURON_SOURCES})
|
||||
target_include_directories(neuron PRIVATE include/neuron src plugins)
|
||||
target_link_libraries(neuron dl neuron-base sqlite3 -lm xml2)
|
||||
target_link_libraries(neuron dl neuron-base sqlite3 -lm)
|
||||
target_link_options(neuron PRIVATE "LINKER:--dynamic-list-data")
|
||||
|
||||
#copy file for run
|
||||
@@ -178,6 +156,8 @@ file(COPY ${CMAKE_SOURCE_DIR}/dev.conf DESTINATION ${CMAKE_BINARY_DIR}/config)
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/neuron.json DESTINATION ${CMAKE_BINARY_DIR}/config)
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/.gitkeep DESTINATION ${CMAKE_BINARY_DIR}/logs)
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/.gitkeep DESTINATION ${CMAKE_BINARY_DIR}/persistence)
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/neuron.key DESTINATION ${CMAKE_BINARY_DIR}/config)
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/neuron.pem DESTINATION ${CMAKE_BINARY_DIR}/config)
|
||||
file(GLOB SQL_SCHEMAS ${CMAKE_SOURCE_DIR}/persistence/*.sql)
|
||||
file(COPY ${SQL_SCHEMAS} DESTINATION ${CMAKE_BINARY_DIR}/config)
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/default_plugins.json DESTINATION ${CMAKE_BINARY_DIR}/config)
|
||||
@@ -185,19 +165,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/file)
|
||||
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)
|
||||
|
||||
@@ -55,30 +55,3 @@ $ tar xzf sqlite3.tar.gz --strip-components=1 -C sqlite3
|
||||
$ cd sqlite3
|
||||
$ ./configure CFLAGS=-fPIC && make && sudo make install
|
||||
```
|
||||
|
||||
[protobuf](https://github.com/protocolbuffers/protobuf)
|
||||
```shell
|
||||
$ wget --no-check-certificate --content-disposition https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protobuf-cpp-3.20.1.tar.gz
|
||||
$ tar -xzvf protobuf-cpp-3.20.1.tar.gz
|
||||
$ cd protobuf-3.20.1
|
||||
$ ./configure --enable-shared=no CFLAGS=-fPIC CXXFLAGS=-fPIC
|
||||
$ make && sudo make install
|
||||
```
|
||||
|
||||
[protobuf-c](https://github.com/protobuf-c/protobuf-c.git)
|
||||
```shell
|
||||
$ git clone -b v1.4.0 https://github.com/protobuf-c/protobuf-c.git
|
||||
$ cd protobuf-c
|
||||
$ ./autogen.sh
|
||||
$ ./configure --disable-protoc --enable-shared=no CFLAGS=-fPIC CXXFLAGS=-fPIC
|
||||
$ make && sudo make install
|
||||
```
|
||||
|
||||
[libxml2](https://github.com/GNOME/libxml2.git)
|
||||
```shell
|
||||
$ git clone -b v2.9.14 https://github.com/GNOME/libxml2.git
|
||||
$ cd libxml2
|
||||
$ ./autogen.sh
|
||||
$ ./configure --enable-shared=no CFLAGS=-fPIC CXXFLAGS=-fPIC
|
||||
$ make && sudo make install
|
||||
```
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
[](https://github.com/emqx/neuron/releases)
|
||||
[](https://hub.docker.com/r/emqx/neuron)
|
||||
[](https://codecov.io/gh/emqx/neuron)
|
||||
[](https://slack-invite.emqx.io/)
|
||||
[](https://discord.gg/xYGf3fQnES)
|
||||
[](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.
|
||||
|
||||
@@ -43,8 +42,7 @@ Next, please follow the [getting started guide](https://neugates.io/docs/en/late
|
||||
>
|
||||
> Neuron open source edition only includes Modbus and MQTT drivers.
|
||||
>
|
||||
> If you need more driver protocol support and edge computing services, you can choose Neuron's commercial version [NeuronEX](https://www.emqx.com/en/products/neuronex).
|
||||
> NeuronEX comes with a built-in license for 30 data tags that can be applied to all southbound drivers. And NeuronEX also supports edge intelligent analysis of industrial data to enable you to quickly gain business insights. To download NeuronEX, please click [here](https://www.emqx.com/en/downloads-and-install/neuronex).
|
||||
> [Apply for a 15-day trial license](https://www.emqx.com/en/apply-licenses/neuron) to load all drivers.
|
||||
|
||||
#### More installation options
|
||||
|
||||
|
||||
@@ -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.11/libs)
|
||||
set(LIBRARY_DIR /home/neuron/v2.6/libs)
|
||||
|
||||
set(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
|
||||
|
||||
@@ -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.11/libs)
|
||||
set(LIBRARY_DIR /home/neuron/v2.6/libs)
|
||||
|
||||
set(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
|
||||
|
||||
@@ -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.11/libs)
|
||||
set(LIBRARY_DIR /home/neuron/v2.6/libs)
|
||||
|
||||
set(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
|
||||
|
||||
@@ -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,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.11/libs)
|
||||
set(LIBRARY_DIR /home/neuron/v2.6/libs)
|
||||
|
||||
set(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
ignore:
|
||||
- "src/otel/*.pb-c.c"
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
target: auto # the required coverage value
|
||||
threshold: 0.1% # the leniency in hitting the target
|
||||
@@ -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
|
||||
@@ -1,9 +1,8 @@
|
||||
{
|
||||
"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"
|
||||
]
|
||||
|
||||
@@ -6,10 +6,10 @@ 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 = "%d:%ms %H neuron[%p]: [%V] [%c] %f:%L %m%n"
|
||||
|
||||
[rules]
|
||||
|
||||
*.* "./logs/%c.log", 25MB * 1 ~ "./logs/%c.#2r.log"; file_format
|
||||
*.* "./logs/%c.log", 50MB * 1 ~ "./logs/%c.#2s.log"; file_format
|
||||
*.* >stdout; stdout_format
|
||||
*.* $remote_syslog,"%V"; syslog
|
||||
*.* $remote_syslog; syslog
|
||||
|
||||
@@ -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, MQTTv50
|
||||
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
|
||||
@@ -79,24 +97,28 @@ class Client:
|
||||
)
|
||||
self._client = client
|
||||
|
||||
self._run(self._client.connect(host, port, version=MQTTv50))
|
||||
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,10 +173,14 @@ class Client:
|
||||
|
||||
`retain` retained flag
|
||||
|
||||
"""
|
||||
self._client.publish(topic, payload, qos=qos,
|
||||
retain=retain, user_property=[('traceparent', '00-8fb7651916cd43dd8448eb211c80319c-0000000000000000-01'), ('tracestate', 'service.name=ex,a=b,c=d,e=f,g=h')])
|
||||
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.
|
||||
@@ -172,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()
|
||||
@@ -181,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
|
||||
|
||||
@@ -190,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()
|
||||
@@ -222,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()
|
||||
@@ -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
|
||||
@@ -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"
|
||||
}
|
||||
+60004
File diff suppressed because it is too large
Load Diff
@@ -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"
|
||||
}
|
||||
+6004
File diff suppressed because it is too large
Load Diff
@@ -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,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"
|
||||
}
|
||||
+604
@@ -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"
|
||||
}
|
||||
+604
@@ -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"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0001",
|
||||
"adapter_name": "modbus-tcp-0001"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0002",
|
||||
"adapter_name": "modbus-tcp-0001"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0003",
|
||||
"adapter_name": "modbus-tcp-0001"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -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"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0001",
|
||||
"adapter_name": "modbus-tcp-0002"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0002",
|
||||
"adapter_name": "modbus-tcp-0002"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0003",
|
||||
"adapter_name": "modbus-tcp-0002"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0004",
|
||||
"adapter_name": "modbus-tcp-0002"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -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"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0001",
|
||||
"adapter_name": "modbus-tcp-0003"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0002",
|
||||
"adapter_name": "modbus-tcp-0003"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0003",
|
||||
"adapter_name": "modbus-tcp-0003"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0004",
|
||||
"adapter_name": "modbus-tcp-0003"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -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"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0001",
|
||||
"adapter_name": "modbus-tcp-0004"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0002",
|
||||
"adapter_name": "modbus-tcp-0004"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0003",
|
||||
"adapter_name": "modbus-tcp-0004"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0004",
|
||||
"adapter_name": "modbus-tcp-0004"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -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"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0001",
|
||||
"adapter_name": "modbus-tcp-0005"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0002",
|
||||
"adapter_name": "modbus-tcp-0005"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0003",
|
||||
"adapter_name": "modbus-tcp-0005"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0004",
|
||||
"adapter_name": "modbus-tcp-0005"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -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"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0001",
|
||||
"adapter_name": "modbus-tcp-0006"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0002",
|
||||
"adapter_name": "modbus-tcp-0006"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"read_interval": 1000,
|
||||
"group_config_name": "group-0003",
|
||||
"adapter_name": "modbus-tcp-0006"
|
||||
}
|
||||
+1204
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user