Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add onChangeThreshold in Device AutoEvent #4992

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions openapi/core-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ components:
onChange:
type: boolean
description: OnChange indicates whether the device service will generate an event only, if the reading value is different from the previous one. If true, only generate events when readings change
onChangeThreshold:
type: number
description: OnChangeThreshold indicates any changed value that exceeds the threshold shall be generated new event if `onChange` is true, this feature only applies to the numeric reading. Available value types are `Uint8`, `Uint16`, `Uint32`, `Uint64`, `Int8`, `Int16`, `Int32`, `Int64`, `Float32`, `Float64`. The default value is 0.
sourceName:
type: string
description: SourceName indicates the name of the resource or device command in the device profile which describes the event to generate
Expand Down Expand Up @@ -1315,6 +1318,7 @@ components:
autoEvents:
- interval: 300ms
onChange: true
onChangeThreshold: 0.01
sourceName: CurrentHumidity
protocols:
modbus-tcp:
Expand Down Expand Up @@ -1348,6 +1352,7 @@ components:
autoEvents:
- interval: "100ms"
onChange: true
onChangeThreshold: 0.01
sourceName: "CurrentHumidity"
- apiVersion: v3
device:
Expand Down
Loading