Index

Class OcaNumericObserverList

ClassID: 1.2.9

extends OcaAgent

Observer of a scalar numeric or boolean property ("target property") of a set of specified objects. This class is a subclass of OcaNumericObserver, and differs from that class only in that it observes a set of properties rather than a single property. Does not work for array, list, map, struct, or string properties. OcaNumericObserverList emits an Observation event under certain conditions. There are three kinds of conditions:
  1. Numeric comparison. A target property value meets a certain comparison condition. A selection of comparison operators is available. Such observations are called "asynchronous observations".
  2. Timer expiry. The value of the Period property, if nonzero, is a the time interval for the recurrent timed emission of Observation events. Such events ("periodic observations") are emitted regardless of the target property's value.
  3. Combination of (1) and (2). If a numeric comparison and a nonzero period are both specified, then the Observation event is emitted when the timer expires and the numeric comparison is true for at least one of the observed properties. Such observations are called "conditional-periodic observations".
This is a weakly typed class. Its threshold is specified as an OcaFloat64 number. Note that this coercion may result in rounding errors if the observed datatype is of type OcaUint64 or OcaUint64. An OcaNumericObserver instance and the property it observes are bound at the time the OcaNumericObserver instance is constructed. For static devices, construction will occur during manufacture, or possibly during a subsequent hardware configuration step. For reconfigurable devices, construction might be done by online controllers as part of device configuration sessions. This class is normally used for monitoring readings of sensor readings, but may be used equally well for watching workers' parameter settings.

Properties

static readonly OcaClassID ClassID = 1.2.9

Level: 1 Index: 1

Number that uniquely identifies the class. Note that this differs from the object number, which identifies the instantiated object. This property is an override of the OcaRoot property.

static readonly OcaClassVersionNumber ClassVersion = 2

Level: 1 Index: 2

Identifies the interface version of the class. Any change to the class definition leads to a higher class version. This property is an override of the OcaRoot property.

OcaObserverState State

Level: 3 Index: 1

State: triggered, not triggered

OcaList<OcaProperty> ObservedProperties

Level: 3 Index: 2

List of identifiers of the properties are being observed.

OcaFloat64 Threshold

Level: 3 Index: 3

Comparison value for raising the Triggered event.

OcaRelationalOperator Operator

Level: 3 Index: 4

Relational operator used when comparing the value of the observed property to the threshold value.

OcaBoolean TwoWay

Level: 3 Index: 5

True to emit a Triggered event upon crossing the threshold in either direction; false to emit only upon crossing in the primary direction (i.e. rising when Operator is set to GreaterThan or GreaterThanOrEqual; falling when Operator is set to LessThan or LessThanOrEqual; equality when Operator is set to Equality; inequality when Operator is set to Inequality).

OcaFloat64 Hysteresis

Level: 3 Index: 6

Hysteresis that is used when observing the property value. This indicates which amount must be added/subtracted from the Threshold value to raise or re-enable the Triggered event of this OcaObserver object. The rules for hysteresis handling depend upon the configured Operator and TwoWay properties. The Hysteresis property is ignored if the Operator property is 'Inequality'. If the State is Not Triggered it changes to Triggered if any of the ObservedProperties reaches the Threshold. If the State is Triggered it changes to Not Triggered only if all of the ObservedProperties no longer meet the ‘Threshold including Hysteresis’ .

OcaTimeInterval Period

Level: 3 Index: 7

Repetition period or zero. If nonzero, the observer will retrieve the value and emit

Properties inherited from OcaAgent

OcaString Label

OcaONo Owner

Properties inherited from OcaRoot

readonly OcaONo ObjectNumber

readonly OcaBoolean Lockable

readonly OcaString Role

Methods

OcaNumericObserverList::GetLastObservation ( ) → ( OcaList<OcaFloat64> Observation)

Level: 3 Index: 1

Gets the values of the observed property that were reported by the most recently emitted Observation event. If the numeric observer has never emitted an Observation event, returns a list of IEEE not-a-number values. The order of values in the returned list is determined by the order of values set by SetObservedProperties, and is the same as the order of values returned by the Observation event, and the same as the order of object identifications returned by GetObservedProperties. The return status indicates whether the value has been successfully returned.

OcaNumericObserverList::GetState ( ) → ( OcaObserverState state)

Level: 3 Index: 2

Gets the observer's state. The return value indicates whether the state was successfully retrieved.

OcaNumericObserverList::GetObservedProperties ( ) → ( OcaList<OcaProperty> property)

Level: 3 Index: 3

Gets the identifications of the properties that the observer observes. The order of property identifications in the returned list is determined by the order of property identifications set by SetObservedProperties, and is the same as the order of values returned by GetLastObservation and the Observation event. The return value indicates whether the identifications were successfully retrieved.

OcaNumericObserverList::SetObservedProperties ( OcaList<OcaProperty> property )

Level: 3 Index: 4

Sets the identifications of the properties that the observer observes. The order of property identifications supplied determines the order of property identifications returned by GetObservedProperties and the order of values returned by GetLastObservation and the Observation event. The return value indicates whether the identifications were successfully set.

OcaNumericObserverList::GetThreshold ( ) → ( OcaFloat64 Threshold)

Level: 3 Index: 5

Gets the value of the Threshold property. The return value indicates whether the threshold value was successfully retrieved.

OcaNumericObserverList::SetThreshold ( OcaFloat64 Threshold )

Level: 3 Index: 6

Sets the value of the Threshold property. The return value indicates whether the threshold value was successfully set.

OcaNumericObserverList::GetOperator ( ) → ( OcaRelationalOperator operator)

Level: 3 Index: 7

Gets the value of the Operator property. The return value indicates whether the property was successfully retrieved.

OcaNumericObserverList::SetOperator ( OcaRelationalOperator operator )

Level: 3 Index: 8

Sets the value of the Operator property. The return value indicates whether the operator was successfully set.

OcaNumericObserverList::GetTwoWay ( ) → ( OcaBoolean twoWay)

Level: 3 Index: 9

Gets the value of the TwoWay property. The return value indicates whether the property was successfully retrieved.

OcaNumericObserverList::SetTwoWay ( OcaBoolean twoWay )

Level: 3 Index: 10

Sets the value of the TwoWay property. The return value indicates whether the property was successfully set.

OcaNumericObserverList::GetHysteresis ( ) → ( OcaFloat64 hysteresis)

Level: 3 Index: 11

Gets the value of the Hysteresis property. The return value indicates whether the property was successfully retrieved.

OcaNumericObserverList::SetHysteresis ( OcaFloat64 hysteresis )

Level: 3 Index: 12

Sets the value of the Hysteresis property. The return value indicates whether the property was successfully set.

OcaNumericObserverList::GetPeriod ( ) → ( OcaTimeInterval period)

Level: 3 Index: 13

Gets the value of the Period property. The return value indicates whether the property was successfully retrieved.

OcaNumericObserverList::SetPeriod ( OcaTimeInterval period )

Level: 3 Index: 14

Sets the value of the Period property. The return value indicates whether the property was successfully set.

Methods inherited from OcaAgent

OcaAgent::GetLabel ( ) → ( OcaString Label)

OcaAgent::SetLabel ( OcaString Label )

OcaAgent::GetOwner ( ) → ( OcaONo owner)

OcaAgent::GetPath ( ) → ( OcaNamePath NamePath, OcaONoPath ONoPath)

Methods inherited from OcaRoot

OcaRoot::GetClassIdentification ( ) → ( OcaClassIdentification ClassIdentification)

OcaRoot::GetLockable ( ) → ( OcaBoolean lockable)

OcaRoot::LockTotal ( )

OcaRoot::Unlock ( )

OcaRoot::GetRole ( ) → ( OcaString Role)

OcaRoot::LockReadonly ( )

Events

Event Observation

Event emitted to signal an asynchronous, periodic, or conditional-periodic observation. This event returns the complete list of values being observed, regardless of which one(s) may have triggered it in the first place. The order of values in the returned list is determined by the order of values set by SetObservedProperties, and is the same as the order of values returned by GetLastObservation, and the same as the order of object identifications returned by GetObservedProperties.