交接文档
This commit is contained in:
parent
2c558f7c45
commit
da6041bdb4
13
.idea/.idea.dev-aid.dir/.idea/.gitignore
generated
vendored
Normal file
13
.idea/.idea.dev-aid.dir/.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/projectSettingsUpdater.xml
|
||||
/contentModel.xml
|
||||
/.idea.dev-aid.iml
|
||||
/modules.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
4
.idea/.idea.dev-aid.dir/.idea/encodings.xml
generated
Normal file
4
.idea/.idea.dev-aid.dir/.idea/encodings.xml
generated
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
8
.idea/.idea.dev-aid.dir/.idea/indexLayout.xml
generated
Normal file
8
.idea/.idea.dev-aid.dir/.idea/indexLayout.xml
generated
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
12
.idea/.idea.dev-aid.dir/.idea/vcs.xml
generated
Normal file
12
.idea/.idea.dev-aid.dir/.idea/vcs.xml
generated
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CommitMessageInspectionProfile">
|
||||
<profile version="1.0">
|
||||
<inspection_tool class="CommitFormat" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="CommitNamingConvention" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
BIN
pa-iot/交接文档/assets/clip_image001.png
Normal file
BIN
pa-iot/交接文档/assets/clip_image001.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
pa-iot/交接文档/assets/clip_image002.png
Normal file
BIN
pa-iot/交接文档/assets/clip_image002.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
BIN
pa-iot/交接文档/assets/image-20240724091848331.png
Normal file
BIN
pa-iot/交接文档/assets/image-20240724091848331.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
107
pa-iot/交接文档/交接文档.md
Normal file
107
pa-iot/交接文档/交接文档.md
Normal file
@ -0,0 +1,107 @@
|
||||
# 项目结构
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
从上到下依次为:
|
||||
|
||||
- Webapi项目
|
||||
|
||||
- 数据库项目
|
||||
|
||||
- 接收MQTT主题消息的项目
|
||||
- 处理定时任务的项目
|
||||
|
||||
- MQTT服务器项目
|
||||
|
||||
其在服务器对应的服务(从上到下且不包含PAIoT.DataPersistence):
|
||||
|
||||
- 华为云
|
||||
|
||||
- pa-iot
|
||||
|
||||
- datasync
|
||||
|
||||
- jobs
|
||||
|
||||
- mqtt
|
||||
|
||||
- 阿里云
|
||||
|
||||
- iot-api
|
||||
|
||||
- datasync2
|
||||
|
||||
- jobs
|
||||
|
||||
- mqttbroker
|
||||
|
||||
注:
|
||||
|
||||
- 需要注意的是datasync2服务位于另一台服务器。
|
||||
|
||||
- 除pa-iot对应的文件夹为api之外,其余服务所在的文件夹与其服务名相似(一致或包含其中的某个单词)。
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# 业务逻辑
|
||||
|
||||
- **PAIOT**
|
||||
|
||||
- **PAIOT.Jobs**
|
||||
|
||||
- **报警逻辑:**
|
||||
|
||||
- **实时数据报警:**
|
||||
- **针对设置实时数据报警设置的指标:**系统对接收到的每条数据进行越限判断,在规定的持续时间内,如异常数据和总数据之比超过所设定的报警比例,则进入等待报警状态。进入报警状态后,根据报警设置和勾选的报警人确定发送对象和发送方式。
|
||||
- 报警次数:默认报警次数为1,即在进入等待报警状态后的下一次判断中进入报警状态。如果报警次数大于1,每一次的报警时间间隔由间隔时间/报警次数得出。
|
||||
- 间隔时间在报警完成后开始累计,直至间隔时间结束,系统不会再对该以判断过报警的监测点进行判断。
|
||||
|
||||
- **网关状态报警:**
|
||||
|
||||
- **针对设置网关状态报警设置的指标:** 网关状态报警即在网关状态发生相应的变化时,发出对应的告警,其告警为立刻告警,收到对应的消息即刻告警,进入报警状态后,根据报警设置和勾选的报警人确定发送对象和发送方式。
|
||||
|
||||
- 网关状态发生相应变化详见网关状态逻辑,此处不再赘述。
|
||||
|
||||
- **网关IO报警:**
|
||||
- **针对设置网关IO报警设置的指标:**接收到相应的event主题后,发出对应的告警,其告警为立刻告警,收到对应的消息即刻告警,进入报警状态后,根据报警设置和勾选的报警人确定发送对象和发送方式。
|
||||
|
||||
- **网关状态逻辑:**
|
||||
|
||||
- **网关离线判断:**
|
||||
|
||||
- 三者条件满足任一进入下一个判断。
|
||||
|
||||
- 同时满足网关在线再进入下一个判断。
|
||||
|
||||

|
||||
|
||||
- 上述两个条件满足之后,进入处理
|
||||
- 状态置为0
|
||||
- 如果报警设置设置了网关离线则发送相应的消息
|
||||
- 网关掉电同上
|
||||
- 网关下的设备状态都置为0
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
注:
|
||||
|
||||
- 常规的增删改查可通过接口注释知晓其作用,故未在此展示。
|
||||
|
||||
- 大部分接口都涉及租户和平台的判断,上述业务逻辑讲解不再单独提及此逻辑。
|
||||
|
||||
- 报警和设备状态相关操作引起数据库数据变动, redis需要同时作出相应变化,和数据库保持一致,上述业务逻辑讲解不再单独提及此逻辑。
|
||||
|
||||
- 各MQTT主题作用详见文件(数据采集网关控制器-mqtt通讯规范),此处不再赘述。
|
||||
|
||||
- 网关状态逻辑详见(网关在线离线逻辑判断 1.1 2024-7-3_加水印.pdf)。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user