TriggerCondition

Created on June 21, 2022

TriggerCondition for Telemetry 2 Report Profiles

The TriggerCondition property is an array of objects that define the condition(s) under which the T2 report should be generated.  Similar to Parameters, each object specifies the type of data for the condition.

Each object defines a condition upon which the report should be generated. If any one condition evaluates to TRUE, the report is generated immediately.  This behaves like all conditions are OR’d. The first evaluation to TRUE will cause further evaluations to cease, and the report will be generated.

TriggerCondition is OR’d with ReportingInterval, such that report generation occurs when the reporting interval is reached OR when a condition evaluates to TRUE. If TriggerCondition is present, ReportingInterval is optional.  If GenerateNow is used, TriggerCondition may not be present.

The Telemetry 2 component uses rbus to subscribe for changes and conditions to the dataModel property specified in each TriggerCondition object.

NOTE: Only “dataModel” data is supported for TriggerCondition objects in the RDK releases.

Example

{
    "type": "dataModel",
    "reference":"Device.WiFi.Radio.1.Stats.X_COMCAST-COM_NoiseFloor", 
"operator":"gt","threshold":"-65", "minThresholdDuration":120 }

Available Properties

PropertyTypeRequired
typestringRequired
operatorstringRequired
thresholdintegerOptional
minThresholdDurationintegerOptional
referencestringRequired (for type=”dataModel”)
eventNamestringRequired (for type=”event”)
componentstringRequired (for type=”event”)


type

Defines the type of data to be used for the condition.


type

  • is required
  • Type: string

type Constraints

ValueDescription
dataModelData that comes from the data model, e.g., TR-181 data.
event

Data that comes from a component event

NOTE: Event conditions are not yet supported in RDK builds.


operator

Indicates the filter type used in conjunction with a trigger condition. If the data type of the dataModel parameter is string or date/time, then only the “any” filter type applies.

name

  • is required
  • Type: string

operator Constraints

enum: the value of this property must be equal to one of the following values:

ValueExplanation
"any"This condition is TRUE when any change to the indicated parameter occurs.
“lt”This condition is TRUE when the value of the parameter is less than the threshold value.
“gt”This condition is TRUE when the value of the parameter is greater than the threshold value.
“eq”This condition is TRUE when the value of the parameter is equal to the threshold value.


threshold

The operand value to use during evaluation of the condition if the operator is not “any”.  If operator is “any”, then threshold is ignored.  For boolean data types, TRUE and FALSE are represented by “1” and “0”, respectively.

threshold

  • is optional
  • Type: integer


minThresholdDuration


Minimum time, in seconds, between report generation if condition reoccurs or persists. This will help prevent device from bogging down generating the same report over and over. If not specified, a new report will be generated every time this Trigger Condition is satisfied.


threshold


  • is optional
  • Type: integer


reference

When type=”dataModel”, reference indicates the data model object or property name whose value is to be in the generated report, e.g., “Device.DeviceInfo.HardwareVersion”

reference

  • is required for type=”dataModel”
  • Type: string


eventName

When type=”event”, eventName indicates the event name by which the component will report this data to Telemetry 2.

reference

  • is required for type=”eventName”
  • Type: string


component

When type=”event”, component indicates the component name from which this data should be expected. 

reference

  • is required for type=”eventName”
  • Type: string

Go To Top