本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
示例: HeartBeat 用于监控设备连接的设备 AWS IoT Events
该探测器模型是 AWS IoT Events 控制台提供的模板之一。为方便起见,它包含在此处。
心跳缺陷 (DHB) 示例说明了 AWS IoT Events 如何在医疗保健监测中使用。此示例说明如何创建检测器模型来分析心率数据、检测不规则模式并触发适当的响应。学习设置输入、定义阈值和配置潜在心脏问题警报,展示相关医疗保健应用 AWS IoT Events的多功能性。
{ "detectorModelDefinition": { "states": [ { "onInput": { "transitionEvents": [ { "eventName": "To_normal", "actions": [], "condition": "currentInput(\"AWS_IoTEvents_Blueprints_Heartbeat_Input\")", "nextState": "Normal" } ], "events": [] }, "stateName": "Offline", "onEnter": { "events": [ { "eventName": "Send_notification", "actions": [ { "sns": { "targetArn": "
sns-topic-arn
" } } ], "condition": "true" } ] }, "onExit": { "events": [] } }, { "onInput": { "transitionEvents": [ { "eventName": "Go_offline", "actions": [], "condition": "timeout(\"awake\")", "nextState": "Offline" } ], "events": [ { "eventName": "Reset_timer", "actions": [ { "resetTimer": { "timerName": "awake" } } ], "condition": "currentInput(\"AWS_IoTEvents_Blueprints_Heartbeat_Input\")" } ] }, "stateName": "Normal", "onEnter": { "events": [ { "eventName": "Create_timer", "actions": [ { "setTimer": { "seconds": 300, "timerName": "awake" } } ], "condition": "$input.AWS_IoTEvents_Blueprints_Heartbeat_Input.value > 0" } ] }, "onExit": { "events": [] } } ], "initialStateName": "Normal" } }