From b31cf8a8bd45d2a2e149caea317d5e3c39652ff5 Mon Sep 17 00:00:00 2001 From: Swilder-M Date: Mon, 2 Sep 2024 17:09:48 +0800 Subject: [PATCH] chore(ci): fix deploy ci for 2.3 Signed-off-by: Swilder-M --- .github/scripts/directory_check.py | 27 +++--- .github/scripts/remove_unused.py | 8 +- .github/workflows/check_markdown.yaml | 20 ++--- .github/workflows/deploy_docs.yaml | 87 +++++++++++-------- .github/workflows/markdown_config.json | 24 ++--- en_US/{README.md => index.md} | 6 +- en_US/project/compile.md | 6 +- en_US/quick-start/installation.md | 4 +- en_US/south-devices/ads/ads.md | 2 +- en_US/south-devices/bacnet-ip/bacnet-ip.md | 2 +- .../south-devices/dlt645-2007/dlt645-2007.md | 16 ++-- .../south-devices/ethernet-ip/ethernet-ip.md | 2 +- en_US/south-devices/file/file.md | 2 +- en_US/south-devices/iec-104/iec-104.md | 2 +- en_US/south-devices/knxnet-ip/knxnet-ip.md | 4 +- .../mitsubishi-1e/mitsubishi-1e.md | 2 +- .../mitsubishi-3e/mitsubishi-3e.md | 2 +- en_US/south-devices/modbus-rtu/modbus-rtu.md | 2 +- en_US/south-devices/modbus-tcp/modbus-tcp.md | 2 +- en_US/south-devices/nona11/nona11.md | 2 +- en_US/south-devices/omron-fins/omron-fins.md | 2 +- en_US/south-devices/opc-da/overview.md | 2 +- en_US/south-devices/opc-ua/assets/overview.md | 2 +- en_US/south-devices/opc-ua/assets/policy.md | 4 +- en_US/south-devices/opc-ua/overview.md | 2 +- en_US/south-devices/opc-ua/policy.md | 4 +- en_US/south-devices/siemens-s7/s7.md | 2 +- en_US/user-guide/data-statistics.md | 8 +- zh_CN/appendix/data-type.md | 2 +- zh_CN/{README.md => index.md} | 6 +- zh_CN/project/compile.md | 2 +- zh_CN/project/development.md | 8 +- zh_CN/quick-start/installation.md | 4 +- zh_CN/south-devices/ads/ads.md | 2 +- zh_CN/south-devices/bacnet-ip/bacnet-ip.md | 2 +- .../south-devices/dlt645-2007/dlt645-2007.md | 16 ++-- .../south-devices/ethernet-ip/ethernet-ip.md | 2 +- zh_CN/south-devices/file/file.md | 2 +- zh_CN/south-devices/iec-104/iec-104.md | 2 +- zh_CN/south-devices/knxnet-ip/knxnet-ip.md | 4 +- .../mitsubishi-1e/mitsubishi-1e.md | 2 +- .../mitsubishi-3e/mitsubishi-3e.md | 2 +- zh_CN/south-devices/modbus-rtu/modbus-rtu.md | 2 +- zh_CN/south-devices/modbus-tcp/modbus-tcp.md | 2 +- zh_CN/south-devices/nona11/nona11.md | 2 +- zh_CN/south-devices/omron-fins/omron-fins.md | 2 +- zh_CN/south-devices/opc-da/overview.md | 2 +- zh_CN/south-devices/opc-ua/assets/overview.md | 2 +- zh_CN/south-devices/opc-ua/assets/policy.md | 4 +- zh_CN/south-devices/opc-ua/overview.md | 2 +- zh_CN/south-devices/opc-ua/policy.md | 4 +- zh_CN/south-devices/siemens-s7/s7.md | 2 +- zh_CN/user-guide/data-statistics.md | 8 +- 53 files changed, 178 insertions(+), 158 deletions(-) rename en_US/{README.md => index.md} (98%) rename zh_CN/{README.md => index.md} (98%) diff --git a/.github/scripts/directory_check.py b/.github/scripts/directory_check.py index f259ab3b..d97f6df4 100644 --- a/.github/scripts/directory_check.py +++ b/.github/scripts/directory_check.py @@ -2,6 +2,7 @@ import sys import json import re +from urllib.parse import urlparse directory_file = sys.argv[1] docs_path = sys.argv[2] @@ -16,13 +17,21 @@ def check_md_content(md_file): success = False return - md_content = open(md_file, 'r').read() + md_content = re.sub(r'', '', open(md_file, 'r').read()) + + if 'ee' in directory_file: + md_content = re.sub(r'{% emqxce %}([\s\S]*?){% endemqxce %}', '', md_content) + else: + md_content = re.sub(r'{% emqxee %}([\s\S]*?){% endemqxee %}', '', md_content) + image_list = re.findall('(.*?)!\[(.*?)\]\((.*?)\)', md_content) url_list = re.findall('(.*?)\[(.*?)\]\((.*?)\)', md_content) for url in url_list: if url[0].endswith('!'): continue - if url[2].startswith(('http://', 'https://', '<', '#')): + if url[2].startswith(('http://', 'https://', '<', '#', 'mailto:', 'tel:')): + continue + if urlparse(url[2]).path.endswith('.html'): continue url_path = url[2].split('.md')[0] ref_md_path = os.path.join(f'{"/".join(md_file.split("/")[:-1])}/', f'{url_path}.md') @@ -51,20 +60,18 @@ def get_md_files(dir_config, path): for i in dir_config: md_name = i.get('path') md_children = i.get('children') - if md_name and md_children: - print(f'{i.get("title")} has path and children') - success = False - if md_children: - md_list += get_md_files(md_children, path) - else: + if md_name: if md_name.startswith(('http://', 'https://')): continue elif md_name == './': - md_list.append(f'{docs_path}/{path}/README.md') + md_list.append(f'{docs_path}/{path}/index.md') else: md_list.append(f'{docs_path}/{path}/{md_name}.md') + if md_children: + md_list += get_md_files(md_children, path) + return list(set(md_list)) @@ -85,8 +92,6 @@ def get_md_files(dir_config, path): for file in md_file_list: check_md_content(file) - else: - sys.exit(f'No {directory_file} file!') if not success: sys.exit('No pass!') diff --git a/.github/scripts/remove_unused.py b/.github/scripts/remove_unused.py index b06806f2..c6a7c11b 100644 --- a/.github/scripts/remove_unused.py +++ b/.github/scripts/remove_unused.py @@ -8,13 +8,13 @@ def get_markdown_file(dir_config, base_path): current_files = [] for row in dir_config: - if row.get('children'): - current_files += get_markdown_file(row['children'], base_path) - else: + if row.get('path'): current_files.append( - f'{base_path}/README.md' if row['path'] == './' + f'{base_path}/index.md' if row['path'] == './' else f'{base_path}/{row["path"]}.md' ) + if row.get('children'): + current_files += get_markdown_file(row['children'], base_path) return current_files diff --git a/.github/workflows/check_markdown.yaml b/.github/workflows/check_markdown.yaml index 3bc589f7..6f924866 100644 --- a/.github/workflows/check_markdown.yaml +++ b/.github/workflows/check_markdown.yaml @@ -1,25 +1,25 @@ -name: Check markdown +name: Check Docs on: [push, pull_request] jobs: - Markdown_Checker: + markdown_check: runs-on: ubuntu-latest steps: - - name: Check out code + - name: check out code uses: actions/checkout@main - - - name: Install markdownlint + + - name: install markdownlint run: sudo npm install -g markdownlint-cli - - name: Check markdown + - name: check markdown run: markdownlint -c .github/workflows/markdown_config.json ./ - Directory_Checker: + directory_check: runs-on: ubuntu-latest steps: - - name: Check out code + - name: check out code uses: actions/checkout@main - - - name: Check directory config + + - name: check directory config run: python3 .github/scripts/directory_check.py directory.json $(pwd) diff --git a/.github/workflows/deploy_docs.yaml b/.github/workflows/deploy_docs.yaml index ba0aef00..e787f381 100644 --- a/.github/workflows/deploy_docs.yaml +++ b/.github/workflows/deploy_docs.yaml @@ -1,7 +1,7 @@ name: Deploy Docs concurrency: - group: ${{ github.ref }} + group: ${{ github.ref_name }} cancel-in-progress: true on: @@ -17,28 +17,28 @@ jobs: if: github.repository_owner == 'emqx' steps: - name: clone docs - uses: actions/checkout@v2 + uses: actions/checkout@main with: fetch-depth: 0 path: docs-files - name: clone frontend - uses: actions/checkout@v2 + uses: actions/checkout@main with: - repository: 'emqx/emqx-io-docs-frontend' + repository: 'emqx/docs-emqx-com-frontend' + ref: next token: ${{ secrets.CI_GIT_TOKEN }} path: frontend - name: use node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: 14.15 + node-version-file: 'frontend/.nvmrc' - - name: use python - uses: actions/setup-python@v2 + - name: use pnpm + uses: pnpm/action-setup@v4 with: - python-version: '3.8' - architecture: 'x64' + version: 8 - name: set env run: | @@ -59,51 +59,66 @@ jobs: - name: move files run: | - rm frontend/docs/en/README.md || true - rm frontend/docs/zh/README.md || true + rm frontend/docs/en/index.md || true + rm frontend/docs/zh/index.md || true rm frontend/docs/*.md || true - rm frontend/README.md - mkdir -p frontend/docs/en/${VERSION}/ - mkdir -p frontend/docs/zh/${VERSION}/ - mkdir -p frontend/docs/.vuepress/public/api/ - cp -r docs-files/en_US/* frontend/docs/en/${VERSION}/ - cp -r docs-files/zh_CN/* frontend/docs/zh/${VERSION}/ - cp docs-files/directory.json frontend/docs/.vuepress/config/directory.json + rm frontend/index.md || true + mkdir -p frontend/docs/en/${DOCS_TYPE}/${VERSION}/ + mkdir -p frontend/docs/zh/${DOCS_TYPE}/${VERSION}/ + mkdir -p frontend/docs/public/api/ + cp -r docs-files/en_US/* frontend/docs/en/${DOCS_TYPE}/${VERSION}/ + cp -r docs-files/zh_CN/* frontend/docs/zh/${DOCS_TYPE}/${VERSION}/ + cp docs-files/directory.json frontend/docs/.vitepress/config/directory.json - name: generate version config run: | cd docs-files - python3 .github/scripts/generate_version.py $(git tag | egrep "v(.*)$" | xargs echo -n) > ../frontend/docs/.vuepress/public/api/${DOCS_TYPE}_versions.json - cat ../frontend/docs/.vuepress/public/api/${DOCS_TYPE}_versions.json + python3 .github/scripts/generate_version.py $(git tag | egrep "v(.*)$" | xargs echo -n) > ../frontend/docs/public/api/${DOCS_TYPE}_versions.json + cat ../frontend/docs/public/api/${DOCS_TYPE}_versions.json - name: build docs run: | cd frontend - yarn && yarn build + pnpm install + pnpm build - - name: upload dist + - name: set aws credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_DEFAULT_REGION }} + + - name: upload dist to s3 + run: | + aws s3 rm --recursive s3://docs-emqx-com/zh/${DOCS_TYPE}/${VERSION} || true + aws s3 rm --recursive s3://docs-emqx-com/en/${DOCS_TYPE}/${VERSION} || true + aws s3 cp --recursive frontend/docs/.vitepress/dist/ s3://docs-emqx-com/ + aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DOCS_CLOUDFRONT_ID }} --paths "/zh/${DOCS_TYPE}/${VERSION}/*" "/en/${DOCS_TYPE}/${VERSION}/*" "/api/${DOCS_TYPE}_versions.json" "/sitemap_${DOCS_TYPE}_${VERSION}.xml" + + - name: upload dist to cos run: | pip3 install coscmd - coscmd config -a ${{ secrets.TENCENT_COS_ID }} -s ${{ secrets.TENCENT_COS_KEY }} -b neugates-io-1302406139 -r ap-hongkong - coscmd delete -r -f docs/en/${VERSION} || true - coscmd delete -r -f docs/zh/${VERSION} || true - coscmd config -a ${{ secrets.TENCENT_COS_ID }} -s ${{ secrets.TENCENT_COS_KEY }} -b neugates-io-1302406139 -e cos.accelerate.myqcloud.com - cd frontend/docs/.vuepress/ - coscmd upload -r dist/ /docs/ - - - name: refresh cdn cache + coscmd config -a ${{ secrets.TENCENT_COS_ID }} -s ${{ secrets.TENCENT_COS_KEY }} -b docs-1302406139 -r ap-shanghai + coscmd delete -r -f en/${DOCS_TYPE}/${VERSION} || true + coscmd delete -r -f zh/${DOCS_TYPE}/${VERSION} || true + coscmd config -a ${{ secrets.TENCENT_COS_ID }} -s ${{ secrets.TENCENT_COS_KEY }} -b docs-1302406139 -e cos.accelerate.myqcloud.com + coscmd upload -r frontend/docs/.vitepress/dist/ / + + - name: flush cdn run: | pip3 install tccli tccli configure set secretId ${{ secrets.TENCENT_COS_ID }} tccli configure set secretKey ${{ secrets.TENCENT_COS_KEY }} - tccli configure set region ap-hongkong - tccli cdn PurgePathCache --Paths '["https://neugates.io/docs/", "https://neuron-docs.emqx.net"]' --FlushType delete + tccli configure set region ap-shanghai + tccli cdn PurgePathCache --cli-unfold-argument --Paths https://docs.emqx.com/zh/${DOCS_TYPE}/${VERSION}/ https://docs.emqx.com/en/${DOCS_TYPE}/${VERSION}/ --FlushType delete + tccli cdn PurgeUrlsCache --cli-unfold-argument --Urls https://docs.emqx.com/api/${DOCS_TYPE}_versions.json https://docs.emqx.com/sitemap_${DOCS_TYPE}_${VERSION}.xml - name: update search index - uses: Swilder-M/docsearch-scraper-simple@v4 + uses: Swilder-M/docsearch-scraper-simple@next env: - APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }} - API_KEY: ${{ secrets.ALGOLIA_API_KEY }} + APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID_NEXT }} + API_KEY: ${{ secrets.ALGOLIA_API_KEY_NEXT }} with: docs_type: ${{ env.DOCS_TYPE }} docs_version: ${{ env.VERSION }} diff --git a/.github/workflows/markdown_config.json b/.github/workflows/markdown_config.json index 4f0c5a1e..ed178d71 100644 --- a/.github/workflows/markdown_config.json +++ b/.github/workflows/markdown_config.json @@ -1,13 +1,13 @@ { - "default": false, - "MD001": true, - "MD003": {"style": "atx"}, - "MD011": true, - "MD018": true, - "MD019": true, - "MD023": true, - "MD025": {"level": 1, "front_matter_title": ""}, - "MD042": true, - "MD046": {"style": "fenced"}, - "MD048": {"style": "backtick"} - } \ No newline at end of file + "default": false, + "MD001": true, + "MD003": {"style": "atx"}, + "MD011": true, + "MD018": true, + "MD019": true, + "MD023": true, + "MD025": {"level": 1, "front_matter_title": ""}, + "MD042": true, + "MD046": {"style": "fenced"}, + "MD048": {"style": "backtick"} +} \ No newline at end of file diff --git a/en_US/README.md b/en_US/index.md similarity index 98% rename from en_US/README.md rename to en_US/index.md index a1c6f620..84d49eed 100644 --- a/en_US/README.md +++ b/en_US/index.md @@ -14,9 +14,9 @@ NeuronEX is a version of the Neuron integrated data stream processing engine eKu ### Diversified Connectivity -Neuron provides diversified driver protocol support for various industries, including building automation, CNC machines, Robotics, Electricity, various PLCs, and even intelligent sensors, such as Modbus, OPCUA, Ethernet/IP, IEC104, BACnet, Siemens, Mitsubishi, and more.
-Neuron supports applications that connect to various cloud or IIoT platforms, such as MQTT, WebSocket, SparkPlug B, and other custom applications.
-With MQTT, IIoT platforms, big data, and AI/ML analysis software can be better integrated into private clouds, EMQX Cloud, AWS, Google Cloud, Azure, or local servers.
+Neuron provides diversified driver protocol support for various industries, including building automation, CNC machines, Robotics, Electricity, various PLCs, and even intelligent sensors, such as Modbus, OPCUA, Ethernet/IP, IEC104, BACnet, Siemens, Mitsubishi, and more.
+Neuron supports applications that connect to various cloud or IIoT platforms, such as MQTT, WebSocket, SparkPlug B, and other custom applications.
+With MQTT, IIoT platforms, big data, and AI/ML analysis software can be better integrated into private clouds, EMQX Cloud, AWS, Google Cloud, Azure, or local servers.
Through SparkPlug B, unified data operations will be provided for industrial applications, eliminating the complexity of ERP, MES, SCADA, and historian accessing device data. ### Lightweight diff --git a/en_US/project/compile.md b/en_US/project/compile.md index 5b0dc50d..c7367a70 100644 --- a/en_US/project/compile.md +++ b/en_US/project/compile.md @@ -18,7 +18,7 @@ $ cmake .. && make :::tip There are three optional parameters in CMakeLists: * CMAKE_ BUILD_ Type "Debug", which compiles the debug version by default. -* DISABLE_WERROR, which treats all warnings as errors.
Usage example:```cmake -DISABLE_WERROR=1 ..``` +* DISABLE_WERROR, which treats all warnings as errors.
Usage example:```cmake -DISABLE_WERROR=1 ..``` * DISABLE_ ASAN, select whether to enable libasan memory detection. ::: @@ -40,7 +40,7 @@ $ ./ neuron 3. Combining libasan runtime memory analysis, most memory issues can be resolved. :::tip -Libasan refers to the Address Sanitizer (ASan) library, which is a memory error detection tool used to help detect memory errors during program execution, such as buffer overflows, using freed memory, and using uninitialized memory.
-ASan detects memory errors by injecting additional code while the program is running. It uses a red and black tree data structure to track the allocation of memory blocks, and uses shadow memory to detect read and write access to unallocated memory. When a memory error is detected, ASan prints relevant information, such as the location and type of the error.
+Libasan refers to the Address Sanitizer (ASan) library, which is a memory error detection tool used to help detect memory errors during program execution, such as buffer overflows, using freed memory, and using uninitialized memory.
+ASan detects memory errors by injecting additional code while the program is running. It uses a red and black tree data structure to track the allocation of memory blocks, and uses shadow memory to detect read and write access to unallocated memory. When a memory error is detected, ASan prints relevant information, such as the location and type of the error.
Libasan is a runtime library for ASan that can be used with compilers, such as Clang, GCC, and so on. It provides the necessary functions and data structures to detect and report memory errors during program execution. ::: \ No newline at end of file diff --git a/en_US/quick-start/installation.md b/en_US/quick-start/installation.md index db39189f..c4725549 100644 --- a/en_US/quick-start/installation.md +++ b/en_US/quick-start/installation.md @@ -21,8 +21,8 @@ Users can choose according to their own needs. | Linux distribution | Required packages | | ------------------------------------------------------------ | ------------------ | -| **Debian package system**
Ubuntu 20.04
Ubuntu 18.04
Ubuntu16.04
Debian 11
Debian 10
Debian 9
Debian 8 | deb | -| **Redhat package system**
CentOS Stream 9
CentOS Stream 8
CentOS 7 | rpm | +| **Debian package system**
Ubuntu 20.04
Ubuntu 18.04
Ubuntu16.04
Debian 11
Debian 10
Debian 9
Debian 8 | deb | +| **Redhat package system**
CentOS Stream 9
CentOS Stream 8
CentOS 7 | rpm | :::tip The rpm/deb package uses systemd to manage the neuron process and it is recommended that the rpm/deb package is used in preference. diff --git a/en_US/south-devices/ads/ads.md b/en_US/south-devices/ads/ads.md index 7c8150ed..b2807338 100644 --- a/en_US/south-devices/ads/ads.md +++ b/en_US/south-devices/ads/ads.md @@ -78,7 +78,7 @@ In the context of the ADS plugin, a tag address consists of two components, `INDEX_GROUP` and `INDEX_OFFSET`, which represents the index group and the index offset respectively. -> INDEX_GROUP,INDEX_OFFSET +> INDEX_GROUP,INDEX_OFFSET Both `INDEX_GROUP` and `INDEX_OFFSET` could be in decimal or hexadecimal format. diff --git a/en_US/south-devices/bacnet-ip/bacnet-ip.md b/en_US/south-devices/bacnet-ip/bacnet-ip.md index e319c4c2..41136302 100644 --- a/en_US/south-devices/bacnet-ip/bacnet-ip.md +++ b/en_US/south-devices/bacnet-ip/bacnet-ip.md @@ -16,7 +16,7 @@ ### Address Format -> AREA[ADDRESS] +> AREA[ADDRESS] | AREA | ADDRESS RANGE | ATTRIBUTE | DATA TYPE | REMARK | | ---- | ------------- | ---------- | ------------- | ------------------ | diff --git a/en_US/south-devices/dlt645-2007/dlt645-2007.md b/en_US/south-devices/dlt645-2007/dlt645-2007.md index 37130188..73ac329b 100644 --- a/en_US/south-devices/dlt645-2007/dlt645-2007.md +++ b/en_US/south-devices/dlt645-2007/dlt645-2007.md @@ -39,7 +39,7 @@ The dlt645 protocol supports serial and tcp connection. ### Address format -> mail_address#DI3-DI2-DI1-DI0 +> mail_address#DI3-DI2-DI1-DI0 * mail_address represents the mailing address of the meter. * DI3-DI2-DI1-DI0 represents the data identification, and all points only support read attributes, and expressed in hexadecimal. @@ -60,10 +60,10 @@ Please refer to the DL/T645-2007 industry standard data coding table for the spe | DI3 | DI2 | DI1 | DI0 | Description | Type of data | Decimal value | Example | | -------------- | ----------------- | ---------------- | --------------- | -------------------------------- | ------- | --------- | ------------------------------------------------------------ | -| 00 | 00 ~ 0A | 00 ~ 3F | 00 ~ 0C | DI3= 00, representing the electrical energy
DI0, representing the settlement date | UINT64 | 0.01 | 00-00-00-00 Representative (current) combined active total energy
00-00-00-01 Representative (last settlement date) combined active total energy | -| 00 | 80~86
15~1E
94~9A
29~32
A8~AE
3D~46
BC~C2 | 00 | 00 ~ 0C | DI3= 00, representing the electrical energy
DI0, representing the settlement date | UINT64 | 0.01 | 00-80-00-00 Representative (current) total associated power
00-80-00-01 Representative (last 1 settlement date) associated total power
00-15-00-01 Representative (last 1 settlement date) A-phase positive Active energy
00-15-00-01 represents (last 2 settlement days) A-phase forward active energy
00-29-00-02 represents (last 2 settlement days) B-phase forward active energy | -| 02 | 01 ~ 09 | 01 ~ 03 | 00 | DI3= 02, representing the variable | UINT16
UINT32 | 0.1
0.01
0.001
0.0001 | 02-01-01-00 Represents A-phase voltage
02-02-01-00 Represents A-phase current | -| 02 | 0A ~ 0B | 01 ~ 03 | 01 ~15 | DI2= 0A, representing the voltage harmonic content
DI2 = 0B, representing the current harmonic content
DI1, representing A, B, C phase
DI~0~, representing the th order of harmonic content | UINT16 | 0.01 | 02-0A-01-01 Represents the 1st harmonic content of A-phase voltage
02-0A-02-02 represents the 2nd harmonic content of B-phase voltage
02-0B-01-01 represents the 1st harmonic content of A-phase current
02-0B-02-02 represents the second harmonic content of phase B current | -| 02 | 80 | 00 | 01 ~ 0A | DI3= 02, representing the variable | UINT16 | 0.01 | 02-80-00-01 Represents zero line current
02-80-00-02 Represents grid frequency | -| 04 | 00 | 01 ~ 0E | 01 ~ 0C | DI3= 04, representing the parameter | UINT8
UINT16
UINT32
UINT64 | 0
0.1
0.001
0.0001 | 04-00-01-01 Represents date and time
04-00-01-03 represents maximum demand period
04-00-04-01 represents communication address
04-00-05-01 represents meter running status word 1 | -| 06 | 00 ~ 06 | 00 | 00 ~ 02 | DI3= 06, representing the load record | UINT8
UINT64 | 0 | 06-00-00-00 Represents the oldest recorded block
06-06-00-00 represents the earliest recorded block of class 6 loads | \ No newline at end of file +| 00 | 00 ~ 0A | 00 ~ 3F | 00 ~ 0C | DI3= 00, representing the electrical energy
DI0, representing the settlement date | UINT64 | 0.01 | 00-00-00-00 Representative (current) combined active total energy
00-00-00-01 Representative (last settlement date) combined active total energy | +| 00 | 80~86
15~1E
94~9A
29~32
A8~AE
3D~46
BC~C2 | 00 | 00 ~ 0C | DI3= 00, representing the electrical energy
DI0, representing the settlement date | UINT64 | 0.01 | 00-80-00-00 Representative (current) total associated power
00-80-00-01 Representative (last 1 settlement date) associated total power
00-15-00-01 Representative (last 1 settlement date) A-phase positive Active energy
00-15-00-01 represents (last 2 settlement days) A-phase forward active energy
00-29-00-02 represents (last 2 settlement days) B-phase forward active energy | +| 02 | 01 ~ 09 | 01 ~ 03 | 00 | DI3= 02, representing the variable | UINT16
UINT32 | 0.1
0.01
0.001
0.0001 | 02-01-01-00 Represents A-phase voltage
02-02-01-00 Represents A-phase current | +| 02 | 0A ~ 0B | 01 ~ 03 | 01 ~15 | DI2= 0A, representing the voltage harmonic content
DI2 = 0B, representing the current harmonic content
DI1, representing A, B, C phase
DI~0~, representing the th order of harmonic content | UINT16 | 0.01 | 02-0A-01-01 Represents the 1st harmonic content of A-phase voltage
02-0A-02-02 represents the 2nd harmonic content of B-phase voltage
02-0B-01-01 represents the 1st harmonic content of A-phase current
02-0B-02-02 represents the second harmonic content of phase B current | +| 02 | 80 | 00 | 01 ~ 0A | DI3= 02, representing the variable | UINT16 | 0.01 | 02-80-00-01 Represents zero line current
02-80-00-02 Represents grid frequency | +| 04 | 00 | 01 ~ 0E | 01 ~ 0C | DI3= 04, representing the parameter | UINT8
UINT16
UINT32
UINT64 | 0
0.1
0.001
0.0001 | 04-00-01-01 Represents date and time
04-00-01-03 represents maximum demand period
04-00-04-01 represents communication address
04-00-05-01 represents meter running status word 1 | +| 06 | 00 ~ 06 | 00 | 00 ~ 02 | DI3= 06, representing the load record | UINT8
UINT64 | 0 | 06-00-00-00 Represents the oldest recorded block
06-06-00-00 represents the earliest recorded block of class 6 loads | \ No newline at end of file diff --git a/en_US/south-devices/ethernet-ip/ethernet-ip.md b/en_US/south-devices/ethernet-ip/ethernet-ip.md index f71cd267..aa6b094d 100644 --- a/en_US/south-devices/ethernet-ip/ethernet-ip.md +++ b/en_US/south-devices/ethernet-ip/ethernet-ip.md @@ -29,4 +29,4 @@ ### Address Format -> TAG NAME +> TAG NAME diff --git a/en_US/south-devices/file/file.md b/en_US/south-devices/file/file.md index 95cf79c5..683c57a9 100644 --- a/en_US/south-devices/file/file.md +++ b/en_US/south-devices/file/file.md @@ -18,7 +18,7 @@ File plugin is used to read or write files. ### Address Format -> FILE PATH +> FILE PATH ### Address Example diff --git a/en_US/south-devices/iec-104/iec-104.md b/en_US/south-devices/iec-104/iec-104.md index f7aed4f6..0daa6641 100644 --- a/en_US/south-devices/iec-104/iec-104.md +++ b/en_US/south-devices/iec-104/iec-104.md @@ -28,7 +28,7 @@ Neuron supports the acquisition of remote signaling, remote measurement, and rem ## Address format -> IOA +> IOA | IEC 60870-5-104 TYPEID | NEURON TYPE | | ------------------------------- | ------------ | diff --git a/en_US/south-devices/knxnet-ip/knxnet-ip.md b/en_US/south-devices/knxnet-ip/knxnet-ip.md index 949ea99c..d4c81e08 100644 --- a/en_US/south-devices/knxnet-ip/knxnet-ip.md +++ b/en_US/south-devices/knxnet-ip/knxnet-ip.md @@ -29,7 +29,7 @@ we recommend that you install Neuron using binary packages. ### Address Format -* > GROUP_ADDRESS,INDIVIDUAL_ADDRESS +* > GROUP_ADDRESS,INDIVIDUAL_ADDRESS Represents a KNX individual address that is a member of the group address. When reading the KNX plugin sends a `GroupValueRead` tunnelling request using @@ -43,7 +43,7 @@ the specified group address. `0/0/1,1.1.1` represents a KNX individual address `1.1.1` that is a member of the group address `0/0/1`. -* > GROUP_ADDRESS,INDIVIDUAL_ADDRESS,BIT +* > GROUP_ADDRESS,INDIVIDUAL_ADDRESS,BIT Same as above, but for `uint8` values with fewer than 8 bits, such as KNX data point types `B2` and `B1U3`, etc. *BIT* represents the number of bits. diff --git a/en_US/south-devices/mitsubishi-1e/mitsubishi-1e.md b/en_US/south-devices/mitsubishi-1e/mitsubishi-1e.md index 96037586..0083d911 100644 --- a/en_US/south-devices/mitsubishi-1e/mitsubishi-1e.md +++ b/en_US/south-devices/mitsubishi-1e/mitsubishi-1e.md @@ -26,7 +26,7 @@ The a1e plug-in is used to access Mitsubishi's A series, FX3U, FX3G, iQ-F series ### Address Format -> AREA ADDRESS\[.BIT]\[.LEN\[H]\[L]] +> AREA ADDRESS\[.BIT]\[.LEN\[H]\[L]] #### AREA ADDRESS diff --git a/en_US/south-devices/mitsubishi-3e/mitsubishi-3e.md b/en_US/south-devices/mitsubishi-3e/mitsubishi-3e.md index 38652168..f3e6ed13 100644 --- a/en_US/south-devices/mitsubishi-3e/mitsubishi-3e.md +++ b/en_US/south-devices/mitsubishi-3e/mitsubishi-3e.md @@ -26,7 +26,7 @@ The qna3e plugin is used to access Mitsubishi's QnA compatible PLCs via Ethernet ### Address Format -> AREA ADDRESS\[.BIT]\[.LEN\[H]\[L]] +> AREA ADDRESS\[.BIT]\[.LEN\[H]\[L]] #### AREA ADDRESS diff --git a/en_US/south-devices/modbus-rtu/modbus-rtu.md b/en_US/south-devices/modbus-rtu/modbus-rtu.md index 2487d1e7..53460c87 100644 --- a/en_US/south-devices/modbus-rtu/modbus-rtu.md +++ b/en_US/south-devices/modbus-rtu/modbus-rtu.md @@ -35,7 +35,7 @@ The Modbus RTU protocol uses binary encoding and can transmit data over RS-232, ## Address format -> SLAVE!ADDRESS\[.BIT][#ENDIAN]\[.LEN\[H]\[L]\[D]\[E]] +> SLAVE!ADDRESS\[.BIT][#ENDIAN]\[.LEN\[H]\[L]\[D]\[E]] ### **SLAVE** diff --git a/en_US/south-devices/modbus-tcp/modbus-tcp.md b/en_US/south-devices/modbus-tcp/modbus-tcp.md index 57dab73b..406cddfa 100644 --- a/en_US/south-devices/modbus-tcp/modbus-tcp.md +++ b/en_US/south-devices/modbus-tcp/modbus-tcp.md @@ -38,7 +38,7 @@ In addition to supporting data acquisition and processing via TCP client mode, t ## Address format -> SLAVE!ADDRESS\[.BIT][#ENDIAN]\[.LEN\[H]\[L]\[D]\[E]] +> SLAVE!ADDRESS\[.BIT][#ENDIAN]\[.LEN\[H]\[L]\[D]\[E]] ### **SLAVE** diff --git a/en_US/south-devices/nona11/nona11.md b/en_US/south-devices/nona11/nona11.md index 33a4cd8d..12976f3a 100644 --- a/en_US/south-devices/nona11/nona11.md +++ b/en_US/south-devices/nona11/nona11.md @@ -26,7 +26,7 @@ The non a11 plugin is used for NON-A11 device. ### Address Format -> COMMAND ! OFFSET[.LEN] +> COMMAND ! OFFSET[.LEN] ### Address Examples diff --git a/en_US/south-devices/omron-fins/omron-fins.md b/en_US/south-devices/omron-fins/omron-fins.md index 1b51f016..f7671909 100644 --- a/en_US/south-devices/omron-fins/omron-fins.md +++ b/en_US/south-devices/omron-fins/omron-fins.md @@ -28,7 +28,7 @@ The fins plugin is used for Omron PLCs with network port, such as CP2E. ### Address Format -> AREA ADDRESS\[.BIT]\[.LEN\[H]\[L]] +> AREA ADDRESS\[.BIT]\[.LEN\[H]\[L]] #### AREA ADDRESS diff --git a/en_US/south-devices/opc-da/overview.md b/en_US/south-devices/opc-da/overview.md index 544f7eb3..d9641731 100644 --- a/en_US/south-devices/opc-da/overview.md +++ b/en_US/south-devices/opc-da/overview.md @@ -42,7 +42,7 @@ The NeuOPC component packages can be downloaded from the [Project page](https:// ## Address Format -> IX!NODEID +> IX!NODEID **IX** Namespace index, IX can only be 2 when accessing NeuOPC. diff --git a/en_US/south-devices/opc-ua/assets/overview.md b/en_US/south-devices/opc-ua/assets/overview.md index 7e535bf8..275d26f6 100644 --- a/en_US/south-devices/opc-ua/assets/overview.md +++ b/en_US/south-devices/opc-ua/assets/overview.md @@ -37,7 +37,7 @@ Neuron OPC UA 插件可作为客户端访问 KEPServerEX、Industrial Gateway OP ## 地址格式 -> NS!NODEID +> NS!NODEID **NS** 名字空间索引。 diff --git a/en_US/south-devices/opc-ua/assets/policy.md b/en_US/south-devices/opc-ua/assets/policy.md index 20c1051b..186d2813 100644 --- a/en_US/south-devices/opc-ua/assets/policy.md +++ b/en_US/south-devices/opc-ua/assets/policy.md @@ -46,9 +46,9 @@ OPC UA 可通过用户自签名证书登录到 OPC UA 服务器,Certificate 可以通过以下步骤和命令将 PEM 证书以及私钥转换为 DER 格式。 -1. 将包括`-----BEGIN CERTIFICATE-----`和`-----END CERTIFICATE-----`的所有内容保存为 1.crt;
+1. 将包括`-----BEGIN CERTIFICATE-----`和`-----END CERTIFICATE-----`的所有内容保存为 1.crt;
-2. 将包括`-----BEGIN PRIVATE KEY-----`和`-----END PRIVATE KEY-----`的所有内容保存为 1.key;
+2. 将包括`-----BEGIN PRIVATE KEY-----`和`-----END PRIVATE KEY-----`的所有内容保存为 1.key;
3. 执行如下命令: diff --git a/en_US/south-devices/opc-ua/overview.md b/en_US/south-devices/opc-ua/overview.md index decab247..501da6b0 100644 --- a/en_US/south-devices/opc-ua/overview.md +++ b/en_US/south-devices/opc-ua/overview.md @@ -32,7 +32,7 @@ The Neuron OPC UA plug-in can be used as a client to access KEPServerEX, Industr ## Address format -> NS!NODEID +> NS!NODEID **NS** Namespace index. diff --git a/en_US/south-devices/opc-ua/policy.md b/en_US/south-devices/opc-ua/policy.md index d24c7fea..85810adb 100644 --- a/en_US/south-devices/opc-ua/policy.md +++ b/en_US/south-devices/opc-ua/policy.md @@ -46,9 +46,9 @@ The certificate file can be imported into the target server in advance and set a You can use the following steps and commands to convert the PEM certificate and private key to DER format: -1. Save all contents including `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----` as 1.crt;
+1. Save all contents including `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----` as 1.crt;
-2. Save all contents including `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----` as 1.key;
+2. Save all contents including `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----` as 1.key;
3. Run the following command: diff --git a/en_US/south-devices/siemens-s7/s7.md b/en_US/south-devices/siemens-s7/s7.md index 1cb521e1..a25b24c8 100644 --- a/en_US/south-devices/siemens-s7/s7.md +++ b/en_US/south-devices/siemens-s7/s7.md @@ -33,7 +33,7 @@ When using the S7COMM plugin to access the S7 1200/1500 PLC, you need to use Si ### Address Format -> AREA ADDRESS\[.BIT][.LEN] +> AREA ADDRESS\[.BIT][.LEN] #### AREA ADDRESS diff --git a/en_US/user-guide/data-statistics.md b/en_US/user-guide/data-statistics.md index adba04d2..0906437a 100644 --- a/en_US/user-guide/data-statistics.md +++ b/en_US/user-guide/data-statistics.md @@ -24,8 +24,8 @@ The northbound application node already supports the statistics of some fields, | send_msgs_total | Total number of sent the messages | | send_msg_errors_total | Total number of failed messages sent | | recv_msgs_total | Total number of received the messages | -| link_state | link state of the node
DISCONNECTED = 0
CONNECTED = 1 | -| running_state | running state of the node
INIT = 1
READY = 2
RUNNING = 3
STOPPED = 4 | +| link_state | link state of the node
DISCONNECTED = 0
CONNECTED = 1 | +| running_state | running state of the node
INIT = 1
READY = 2
RUNNING = 3
STOPPED = 4 | ## Southboud node statistics @@ -43,5 +43,5 @@ The southbound node already supports the statistics of some fields, but there ar | group_tags_total | Total number of tags in the group | | group_last_send_msgs | Number of messages sent by calling group timer once | | group_last_timer_ms | The time when the group timer is called once, in milliseconds | -| link_state | link state of the node
DISCONNECTED = 0
CONNECTED = 1 | -| running_state | running state of the node
INIT = 1
READY = 2
RUNNING = 3
STOPPED = 4 | \ No newline at end of file +| link_state | link state of the node
DISCONNECTED = 0
CONNECTED = 1 | +| running_state | running state of the node
INIT = 1
READY = 2
RUNNING = 3
STOPPED = 4 | \ No newline at end of file diff --git a/zh_CN/appendix/data-type.md b/zh_CN/appendix/data-type.md index c9d403e2..5e7bfc43 100644 --- a/zh_CN/appendix/data-type.md +++ b/zh_CN/appendix/data-type.md @@ -7,7 +7,7 @@ * 输入输出:不同的数据类型需要不同的输入输出方式。例如,整数可以通过标准输入输出进行读写,正确的数据类型可以确保程序能够正确地读写数据。 * 代码逻辑:不同的数据类型对应不同的含义和用途,因此在编写代码时需要选择正确的数据类型来反映代码逻辑和意图。例如,布尔型变量通常用于控制流程和逻辑判断,而整数和浮点数通常用于数学计算。 -综上所述,正确选择和使用数据类型是编程中至关重要的一步,它直接关系到程序的正确性、性能和可维护性。
+综上所述,正确选择和使用数据类型是编程中至关重要的一步,它直接关系到程序的正确性、性能和可维护性。
下面是 neuron 的数据类型: |数据类型|数据范围|占用字节|数据示例| diff --git a/zh_CN/README.md b/zh_CN/index.md similarity index 98% rename from zh_CN/README.md rename to zh_CN/index.md index 3151695a..95dd5fe7 100644 --- a/zh_CN/README.md +++ b/zh_CN/index.md @@ -12,9 +12,9 @@ NeuronEX 是 Neuron 集成数据流处理引擎 eKuiper 的版本。在 NeuronEX ### 多样化连接 -Neuron 为包括楼宇自动化、CNC 机器、机器人、电力、各种 PLC 甚至智能传感器在内的各个行业提供多样的驱动协议支持,例如 Modbus、OPCUA、Ethernet/IP、IEC104、BACnet、Siemens、Mitsubishi 等。
-Neuron 支持连接各种云或者是 IIoT 平台的应用,例如 MQTT、WebSocket、SparkPlug B 和其他自定义的应用。
-通过 MQTT,可将 IIoT 平台、大数据和 AI/ML 分析软件更好地集成到私有云、EMQX Cloud、AWS、Google Cloud、Azure 或本地服务器中。
+Neuron 为包括楼宇自动化、CNC 机器、机器人、电力、各种 PLC 甚至智能传感器在内的各个行业提供多样的驱动协议支持,例如 Modbus、OPCUA、Ethernet/IP、IEC104、BACnet、Siemens、Mitsubishi 等。
+Neuron 支持连接各种云或者是 IIoT 平台的应用,例如 MQTT、WebSocket、SparkPlug B 和其他自定义的应用。
+通过 MQTT,可将 IIoT 平台、大数据和 AI/ML 分析软件更好地集成到私有云、EMQX Cloud、AWS、Google Cloud、Azure 或本地服务器中。
通过 SparkPlug B,将为工业应用提供统一的数据操作,消除 ERP、MES、SCADA 和 historian 访问设备数据的复杂性。 ### 轻量化 diff --git a/zh_CN/project/compile.md b/zh_CN/project/compile.md index 427baaf6..6faf8122 100644 --- a/zh_CN/project/compile.md +++ b/zh_CN/project/compile.md @@ -18,7 +18,7 @@ $ cmake .. && make :::tip CMakeLists 中有三个可选参数: * CMAKE_BUILD_TYPE "Debug",默认编译 debug 版本。 -* DISABLE_WERROR,将所有的警告当作错误进行处理。
使用示例:```cmake -DISABLE_WERROR=1 ..``` +* DISABLE_WERROR,将所有的警告当作错误进行处理。
使用示例:```cmake -DISABLE_WERROR=1 ..``` * DISABLE_ASAN,选择是否开启 libasan 内存检测。 ::: diff --git a/zh_CN/project/development.md b/zh_CN/project/development.md index 526d9055..ef946e55 100644 --- a/zh_CN/project/development.md +++ b/zh_CN/project/development.md @@ -35,13 +35,13 @@ $ python3 -m robot --maxerroelines=600 -P ft/ -d ft/reports ft * 一个 PR 只做一件事,如果有多个 bug 的修复,请对每一个 bug 提交一个 PR; * PR 流程如下: - * 先 Fork 本项目,创建自己的 github.com/your/neuron 仓库;
+ * 先 Fork 本项目,创建自己的 github.com/your/neuron 仓库;
* 克隆自己的 neuron 仓库到本地: ```bash $ git clone https://github.com/your/neuron.git ``` - * 例如基于 ```main``` 分支创建新的分支;
- * 在新创建的分支上作修改并提交修改;
+ * 例如基于 ```main``` 分支创建新的分支;
+ * 在新创建的分支上作修改并提交修改;
* 在推送修改完成的分支到自己的仓库前,先切换到 ```main``` 分支,运行如下指令拉取最新的远端代码: ```bash $ git pull https://github.com/emqx/neuron.git @@ -50,7 +50,7 @@ $ python3 -m robot --maxerroelines=600 -P ft/ -d ft/reports ft ```bash $ git rebase main ``` - 如遇到文件冲突,则需要解决冲突;
+ 如遇到文件冲突,则需要解决冲突;
* 上一步处理完毕后,就可以把自己创建的分支推送到自己的仓库: ```bash $ git push origin main diff --git a/zh_CN/quick-start/installation.md b/zh_CN/quick-start/installation.md index e249c9a9..1dc78c00 100644 --- a/zh_CN/quick-start/installation.md +++ b/zh_CN/quick-start/installation.md @@ -10,8 +10,8 @@ Neuron 分成两个安装包: | Linux 发行版 | 所需包 | | :----------------------------------------------------------------- | :--------- | -| **Debian package system**
Ubuntu 20.04
Ubuntu 18.04
Ubuntu 16.04
Debian 11
Debian 10
Debian 9
Debian 8 | deb | -| **Redhat package system**
CentOS Stream 9
CentOS Stream 8
CentOS 7 | rpm | +| **Debian package system**
Ubuntu 20.04
Ubuntu 18.04
Ubuntu 16.04
Debian 11
Debian 10
Debian 9
Debian 8 | deb | +| **Redhat package system**
CentOS Stream 9
CentOS Stream 8
CentOS 7 | rpm | :::tip rpm/deb package 中使用了 systemd 管理 neuron 进程,建议优先使用 rpm/deb package。 diff --git a/zh_CN/south-devices/ads/ads.md b/zh_CN/south-devices/ads/ads.md index 31e84388..f4d5e990 100644 --- a/zh_CN/south-devices/ads/ads.md +++ b/zh_CN/south-devices/ads/ads.md @@ -64,7 +64,7 @@ Index group 用于指定正在访问的数据的类别或类型,而 index offs 对 ADS 插件来说,一个点位地址由 INDEX_GROUP 和 INDEX_OFFSET 两个部分组成,分别表示 index group 和 index offset 。 -> INDEX_GROUP,INDEX_OFFSET +> INDEX_GROUP,INDEX_OFFSET `INDEX_GROUP` 和 `INDEX_OFFSET` 可以分别使用十进制或十六进制指定。 diff --git a/zh_CN/south-devices/bacnet-ip/bacnet-ip.md b/zh_CN/south-devices/bacnet-ip/bacnet-ip.md index b573a07a..d801c341 100644 --- a/zh_CN/south-devices/bacnet-ip/bacnet-ip.md +++ b/zh_CN/south-devices/bacnet-ip/bacnet-ip.md @@ -16,7 +16,7 @@ ### 地址格式 -> AREA ADDRESS +> AREA ADDRESS | 区域 | 地址范围 | 属性 | 数据类型 | 备注 | | ---- | ------------ | ------ | ------- | ----------- | diff --git a/zh_CN/south-devices/dlt645-2007/dlt645-2007.md b/zh_CN/south-devices/dlt645-2007/dlt645-2007.md index 74b7a0d5..62279834 100644 --- a/zh_CN/south-devices/dlt645-2007/dlt645-2007.md +++ b/zh_CN/south-devices/dlt645-2007/dlt645-2007.md @@ -39,7 +39,7 @@ dlt645 驱动支持串口和 TCP 连接。 ### 地址格式 -> mail_address#DI3-DI2-DI1-DI0 +> mail_address#DI3-DI2-DI1-DI0 * mail_address 代表电表的通信地址。 * DI3-DI2-DI1-DI0 代表的是数据标识,所有点位只支持读属性,且用十六进制表示。 @@ -60,10 +60,10 @@ dlt645 驱动支持串口和 TCP 连接。 | DI3 | DI2 | DI1 | DI0 | 说明 | 数据类型 | Decimal 值 | 举例 | | -------------- | ----------------- | ---------------- | --------------- | -------------------------------- | ------- | --------- | ------------------------------------------------------------ | -| 00 | 00 ~ 0A | 00 ~ 3F | 00 ~ 0C | DI3= 00,代表电能量
DI0,代表结算日 | UINT64 | 0.01 | 00-00-00-00 代表(当前)组合有功总电能
00-00-00-01 代表(上 1 结算日)组合有功总电能 | -| 00 | 80~86
15~1E
94~9A
29~32
A8~AE
3D~46
BC~C2 | 00 | 00 ~ 0C | DI3 = 00,代表电能量
DI0,代表结算日 | UINT64 | 0.01 | 00-80-00-00 代表(当前)关联总电能
00-80-00-01 代表(上 1 结算日)关联总电能
00-15-00-01 代表(上 1 结算日)A 相正向有功电能
00-15-00-01 代表(上 2 结算日)A 相正向有功电能
00-29-00-02 代表(上 2 结算日)B 相正向有功电能 | -| 02 | 01 ~ 09 | 01 ~ 03 | 00 | DI3= 02,代表变量 | UINT16
UINT32 | 0.1
0.01
0.001
0.0001 | 02-01-01-00 代表 A 相电压
02-02-01-00 代表 A 相电流| -| 02 | 0A ~ 0B | 01 ~ 03 | 01 ~15 | DI2= 0A,代表电压谐波含量
DI2 = 0B,代表电流谐波含量
DI1 ,代表A,B,C 相
DI~0~,代表第几次谐波含量 | UINT16 | 0.01 | 02-0A-01-01 代表 A 相电压 1 次谐波含量
02-0A-02-02 代表 B 相电压 2 次谐波含量
02-0B-01-01 代表 A 相电流 1 次谐波含量
02-0B-02-02 代表 B 相电流 2 次谐波含量 | -| 02 | 80 | 00 | 01 ~ 0A | DI3= 02,代表变量 | UINT16 | 0.01 | 02-80-00-01 代表零线电流
02-80-00-02 代表电网频率 | -| 04 | 00 | 01 ~ 0E | 01 ~ 0C | DI3= 04,代表参变量 | UINT8
UINT16
UINT32
UINT64 | 0
0.1
0.001
0.0001 | 04-00-01-01 代表日期及时间
04-00-01-03 代表最大需量周期
04-00-04-01 代表通信地址
04-00-05-01 代表电表运行状态字 1 | -| 06 | 00 ~ 06 | 00 | 00 ~ 02 | DI3= 06,代表负荷记录 | UINT8
UINT64 | 0 | 06-00-00-00 代表最早记录块
06-06-00-00 代表第 6 类负荷最早记录块 | \ No newline at end of file +| 00 | 00 ~ 0A | 00 ~ 3F | 00 ~ 0C | DI3= 00,代表电能量
DI0,代表结算日 | UINT64 | 0.01 | 00-00-00-00 代表(当前)组合有功总电能
00-00-00-01 代表(上 1 结算日)组合有功总电能 | +| 00 | 80~86
15~1E
94~9A
29~32
A8~AE
3D~46
BC~C2 | 00 | 00 ~ 0C | DI3 = 00,代表电能量
DI0,代表结算日 | UINT64 | 0.01 | 00-80-00-00 代表(当前)关联总电能
00-80-00-01 代表(上 1 结算日)关联总电能
00-15-00-01 代表(上 1 结算日)A 相正向有功电能
00-15-00-01 代表(上 2 结算日)A 相正向有功电能
00-29-00-02 代表(上 2 结算日)B 相正向有功电能 | +| 02 | 01 ~ 09 | 01 ~ 03 | 00 | DI3= 02,代表变量 | UINT16
UINT32 | 0.1
0.01
0.001
0.0001 | 02-01-01-00 代表 A 相电压
02-02-01-00 代表 A 相电流| +| 02 | 0A ~ 0B | 01 ~ 03 | 01 ~15 | DI2= 0A,代表电压谐波含量
DI2 = 0B,代表电流谐波含量
DI1 ,代表A,B,C 相
DI~0~,代表第几次谐波含量 | UINT16 | 0.01 | 02-0A-01-01 代表 A 相电压 1 次谐波含量
02-0A-02-02 代表 B 相电压 2 次谐波含量
02-0B-01-01 代表 A 相电流 1 次谐波含量
02-0B-02-02 代表 B 相电流 2 次谐波含量 | +| 02 | 80 | 00 | 01 ~ 0A | DI3= 02,代表变量 | UINT16 | 0.01 | 02-80-00-01 代表零线电流
02-80-00-02 代表电网频率 | +| 04 | 00 | 01 ~ 0E | 01 ~ 0C | DI3= 04,代表参变量 | UINT8
UINT16
UINT32
UINT64 | 0
0.1
0.001
0.0001 | 04-00-01-01 代表日期及时间
04-00-01-03 代表最大需量周期
04-00-04-01 代表通信地址
04-00-05-01 代表电表运行状态字 1 | +| 06 | 00 ~ 06 | 00 | 00 ~ 02 | DI3= 06,代表负荷记录 | UINT8
UINT64 | 0 | 06-00-00-00 代表最早记录块
06-06-00-00 代表第 6 类负荷最早记录块 | \ No newline at end of file diff --git a/zh_CN/south-devices/ethernet-ip/ethernet-ip.md b/zh_CN/south-devices/ethernet-ip/ethernet-ip.md index 9899a8c5..d1b1efd1 100644 --- a/zh_CN/south-devices/ethernet-ip/ethernet-ip.md +++ b/zh_CN/south-devices/ethernet-ip/ethernet-ip.md @@ -33,4 +33,4 @@ ## PLC 数据地址 -> TAG NAME +> TAG NAME diff --git a/zh_CN/south-devices/file/file.md b/zh_CN/south-devices/file/file.md index 59f382b9..1f1956c4 100644 --- a/zh_CN/south-devices/file/file.md +++ b/zh_CN/south-devices/file/file.md @@ -18,7 +18,7 @@ File 插件用于读写文件。 ### 地址格式 -> FILE PATH +> FILE PATH ### 地址示例 diff --git a/zh_CN/south-devices/iec-104/iec-104.md b/zh_CN/south-devices/iec-104/iec-104.md index 85de9f42..0e8961eb 100644 --- a/zh_CN/south-devices/iec-104/iec-104.md +++ b/zh_CN/south-devices/iec-104/iec-104.md @@ -28,7 +28,7 @@ Neuron 支持以总召唤以及设备主动上报数据的方式采集遥信、 ## 地址格式 -> IOA +> IOA ### IOA 在 IEC60870-5-104 协议中,IOA (Information Object Address) 指的是信息对象地址,是用于唯一标识一个数据对象的地址,用于指定一个信息对象(遥信、遥测、遥控等)的地址。 diff --git a/zh_CN/south-devices/knxnet-ip/knxnet-ip.md b/zh_CN/south-devices/knxnet-ip/knxnet-ip.md index 8234f292..4888deef 100644 --- a/zh_CN/south-devices/knxnet-ip/knxnet-ip.md +++ b/zh_CN/south-devices/knxnet-ip/knxnet-ip.md @@ -33,7 +33,7 @@ `0/0/1` 是一个 KNX 组地址,只在 Neuron 中写入,属于 `0/0/1` 组的 KNX 设备将对发送到 `0/0/1` 组的消息做出响应。 -* > GROUP_ADDRESS,INDIVIDUAL_ADDRESS +* > GROUP_ADDRESS,INDIVIDUAL_ADDRESS 表示一个KNX设备地址及其所属的组地址。进行读操作时,KNX插件发送`GroupValueRead` 隧道请求,在收到匹配设备地址的`GroupValueResp`报文时更新点位数据。 @@ -43,7 +43,7 @@ `0/0/1,1.1.1` 代表 KNX 组地址 `0/0/1`下的设备地址 `1.1.1`。 -* > GROUP_ADDRESS,INDIVIDUAL_ADDRESS,BIT +* > GROUP_ADDRESS,INDIVIDUAL_ADDRESS,BIT 与上相同,但为读取比特位数少于8的`uint8`类型数据时使用,如KNX data point类型`B2`和`B1U3`等。 其中*BIT*表示数据比特位数。 diff --git a/zh_CN/south-devices/mitsubishi-1e/mitsubishi-1e.md b/zh_CN/south-devices/mitsubishi-1e/mitsubishi-1e.md index 034fe393..70281e9b 100644 --- a/zh_CN/south-devices/mitsubishi-1e/mitsubishi-1e.md +++ b/zh_CN/south-devices/mitsubishi-1e/mitsubishi-1e.md @@ -24,7 +24,7 @@ a1e 插件用于通过以太网访问三菱的 A 系列、FX3U、FX3G、iQ-F 系 ### 地址格式 -> AREA ADDRESS\[.BIT]\[.LEN\[H]\[L]] +> AREA ADDRESS\[.BIT]\[.LEN\[H]\[L]] #### AREA ADDRESS diff --git a/zh_CN/south-devices/mitsubishi-3e/mitsubishi-3e.md b/zh_CN/south-devices/mitsubishi-3e/mitsubishi-3e.md index 6bec2dda..b572814d 100644 --- a/zh_CN/south-devices/mitsubishi-3e/mitsubishi-3e.md +++ b/zh_CN/south-devices/mitsubishi-3e/mitsubishi-3e.md @@ -26,7 +26,7 @@ qna3e 插件用于通过以太网访问三菱的QnA兼容PLC,包括Q系列(M ### 地址格式 -> AREA ADDRESS\[.BIT]\[.LEN\[H]\[L]] +> AREA ADDRESS\[.BIT]\[.LEN\[H]\[L]] #### AREA ADDRESS diff --git a/zh_CN/south-devices/modbus-rtu/modbus-rtu.md b/zh_CN/south-devices/modbus-rtu/modbus-rtu.md index b9a3df7c..3a80544f 100644 --- a/zh_CN/south-devices/modbus-rtu/modbus-rtu.md +++ b/zh_CN/south-devices/modbus-rtu/modbus-rtu.md @@ -36,7 +36,7 @@ Modbus RTU 协议采用二进制编码,可以在 RS-232、RS-485 或其他串 ## 地址格式 -> SLAVE!ADDRESS\[.BIT][#ENDIAN]\[.LEN\[H]\[L]\[D]\[E]] +> SLAVE!ADDRESS\[.BIT][#ENDIAN]\[.LEN\[H]\[L]\[D]\[E]] ### **SLAVE** diff --git a/zh_CN/south-devices/modbus-tcp/modbus-tcp.md b/zh_CN/south-devices/modbus-tcp/modbus-tcp.md index ec5605d6..f17b3833 100644 --- a/zh_CN/south-devices/modbus-tcp/modbus-tcp.md +++ b/zh_CN/south-devices/modbus-tcp/modbus-tcp.md @@ -37,7 +37,7 @@ Neuron 的 Modbus TCP 插件除了支持以 TCP 客户端的模式主动接入 ## 地址格式 -> SLAVE!ADDRESS\[.BIT][#ENDIAN]\[.LEN\[H]\[L]\[D]\[E]] +> SLAVE!ADDRESS\[.BIT][#ENDIAN]\[.LEN\[H]\[L]\[D]\[E]] ### **SLAVE** diff --git a/zh_CN/south-devices/nona11/nona11.md b/zh_CN/south-devices/nona11/nona11.md index 8a9a8de9..4aab958b 100644 --- a/zh_CN/south-devices/nona11/nona11.md +++ b/zh_CN/south-devices/nona11/nona11.md @@ -22,7 +22,7 @@ ### 地址格式 -> COMMAND ! OFFSET[.LEN] +> COMMAND ! OFFSET[.LEN] ### 地址示例 diff --git a/zh_CN/south-devices/omron-fins/omron-fins.md b/zh_CN/south-devices/omron-fins/omron-fins.md index 10933944..1a8e9d81 100644 --- a/zh_CN/south-devices/omron-fins/omron-fins.md +++ b/zh_CN/south-devices/omron-fins/omron-fins.md @@ -28,7 +28,7 @@ fins 插件用于带有网口的欧姆龙 PLC,如 CP2E。 ### 地址格式 -> AREA ADDRESS\[.BIT]\[.LEN\[H]\[L]] +> AREA ADDRESS\[.BIT]\[.LEN\[H]\[L]] #### AREA ADDRESS diff --git a/zh_CN/south-devices/opc-da/overview.md b/zh_CN/south-devices/opc-da/overview.md index 22480630..f54906b3 100644 --- a/zh_CN/south-devices/opc-da/overview.md +++ b/zh_CN/south-devices/opc-da/overview.md @@ -41,7 +41,7 @@ NeuOPC 的组件包可以前往 NeuOPC 的[项目页面](https://github.com/neug ## 地址格式 -> IX!NODEID +> IX!NODEID **IX** 名字空间索引,访问 NeuOPC 时,IX 只能为2。 diff --git a/zh_CN/south-devices/opc-ua/assets/overview.md b/zh_CN/south-devices/opc-ua/assets/overview.md index 7e535bf8..275d26f6 100644 --- a/zh_CN/south-devices/opc-ua/assets/overview.md +++ b/zh_CN/south-devices/opc-ua/assets/overview.md @@ -37,7 +37,7 @@ Neuron OPC UA 插件可作为客户端访问 KEPServerEX、Industrial Gateway OP ## 地址格式 -> NS!NODEID +> NS!NODEID **NS** 名字空间索引。 diff --git a/zh_CN/south-devices/opc-ua/assets/policy.md b/zh_CN/south-devices/opc-ua/assets/policy.md index 20c1051b..186d2813 100644 --- a/zh_CN/south-devices/opc-ua/assets/policy.md +++ b/zh_CN/south-devices/opc-ua/assets/policy.md @@ -46,9 +46,9 @@ OPC UA 可通过用户自签名证书登录到 OPC UA 服务器,Certificate 可以通过以下步骤和命令将 PEM 证书以及私钥转换为 DER 格式。 -1. 将包括`-----BEGIN CERTIFICATE-----`和`-----END CERTIFICATE-----`的所有内容保存为 1.crt;
+1. 将包括`-----BEGIN CERTIFICATE-----`和`-----END CERTIFICATE-----`的所有内容保存为 1.crt;
-2. 将包括`-----BEGIN PRIVATE KEY-----`和`-----END PRIVATE KEY-----`的所有内容保存为 1.key;
+2. 将包括`-----BEGIN PRIVATE KEY-----`和`-----END PRIVATE KEY-----`的所有内容保存为 1.key;
3. 执行如下命令: diff --git a/zh_CN/south-devices/opc-ua/overview.md b/zh_CN/south-devices/opc-ua/overview.md index 5f6a5768..ba3fdf98 100644 --- a/zh_CN/south-devices/opc-ua/overview.md +++ b/zh_CN/south-devices/opc-ua/overview.md @@ -31,7 +31,7 @@ Neuron OPC UA 插件可作为客户端访问 KEPServerEX、Industrial Gateway OP ## 地址格式 -> NS!NODEID +> NS!NODEID **NS** 名字空间索引。 diff --git a/zh_CN/south-devices/opc-ua/policy.md b/zh_CN/south-devices/opc-ua/policy.md index 20c1051b..186d2813 100644 --- a/zh_CN/south-devices/opc-ua/policy.md +++ b/zh_CN/south-devices/opc-ua/policy.md @@ -46,9 +46,9 @@ OPC UA 可通过用户自签名证书登录到 OPC UA 服务器,Certificate 可以通过以下步骤和命令将 PEM 证书以及私钥转换为 DER 格式。 -1. 将包括`-----BEGIN CERTIFICATE-----`和`-----END CERTIFICATE-----`的所有内容保存为 1.crt;
+1. 将包括`-----BEGIN CERTIFICATE-----`和`-----END CERTIFICATE-----`的所有内容保存为 1.crt;
-2. 将包括`-----BEGIN PRIVATE KEY-----`和`-----END PRIVATE KEY-----`的所有内容保存为 1.key;
+2. 将包括`-----BEGIN PRIVATE KEY-----`和`-----END PRIVATE KEY-----`的所有内容保存为 1.key;
3. 执行如下命令: diff --git a/zh_CN/south-devices/siemens-s7/s7.md b/zh_CN/south-devices/siemens-s7/s7.md index c307acc5..30d5a06c 100644 --- a/zh_CN/south-devices/siemens-s7/s7.md +++ b/zh_CN/south-devices/siemens-s7/s7.md @@ -35,7 +35,7 @@ s7comm 插件用于带有网络端口的西门子 PLC,如,s7-200/300/400/120 ### 地址格式 -> AREA ADDRESS\[.BIT][.LEN] +> AREA ADDRESS\[.BIT][.LEN] #### AREA ADDRESS diff --git a/zh_CN/user-guide/data-statistics.md b/zh_CN/user-guide/data-statistics.md index 8735cf90..07764063 100644 --- a/zh_CN/user-guide/data-statistics.md +++ b/zh_CN/user-guide/data-statistics.md @@ -24,8 +24,8 @@ Neuron 支持基于 Prometheus 的数据模型的南北向节点数据统计功 | send_msgs_total | 发送消息总条数 | | send_msg_errors_total | 消息发送失败的总条数 | | recv_msgs_total | 接收消息的总条数 | -| link_state | 节点连接状态
DISCONNECTED = 0
CONNECTED = 1 | -| running_state | 节点状态
INIT = 1
READY = 2
RUNNING = 3
STOPPED = 4 | +| link_state | 节点连接状态
DISCONNECTED = 0
CONNECTED = 1 | +| running_state | 节点状态
INIT = 1
READY = 2
RUNNING = 3
STOPPED = 4 | ## 南向节点统计 @@ -43,5 +43,5 @@ Neuron 支持基于 Prometheus 的数据模型的南北向节点数据统计功 | group_tags_total | 组的总点位数 | | group_last_send_msgs | 调用一次 group timer 发送的消息数 | | group_last_timer_ms | 调用一次 group timer 的时间,以毫秒为单位 | -| link_state | 节点连接状态
DISCONNECTED = 0
CONNECTED = 1 | -| running_state | 节点状态
INIT = 1
READY = 2
RUNNING = 3
STOPPED = 4 | +| link_state | 节点连接状态
DISCONNECTED = 0
CONNECTED = 1 | +| running_state | 节点状态
INIT = 1
READY = 2
RUNNING = 3
STOPPED = 4 |