範例: HeartBeat 使用 監控裝置連線的裝置 AWS IoT Events - AWS IoT Events

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

範例: HeartBeat 使用 監控裝置連線的裝置 AWS IoT Events

此偵測器模型是主控台提供的其中一個範本 AWS IoT Events 。為了您的方便,此處包含此項目。

缺陷性 Heart Beat (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" } }