Skip to content

Commit

Permalink
docs: Add onChangeThreshold in Device AutoEvent
Browse files Browse the repository at this point in the history
The onChange flag in Device AutoEvent can prevent any non changed values sent out. The onChangeThreshold could provide the advanced feature, and the default value is 0, any changed value that exceeds (>) bounds shall be published.

Signed-off-by: bruce <[email protected]>
  • Loading branch information
weichou1229 committed Nov 4, 2024
1 parent 89254c1 commit 941e1e5
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit 941e1e5

Please sign in to comment.