Averaging
An Averaging object samples one property over a sliding time window and reports the minimum, maximum and average. It turns a noisy reading into a smoothed one without extra programming. It can sample a property on its own device or, optionally, one on another device.
Typical uses
Section titled “Typical uses”- A 15-minute average of electrical demand
- The peak temperature over the last hour
- A smoothed pressure reading for a control loop
- The lowest flow rate in the last shift
Key properties
Section titled “Key properties”| Property | What it holds |
|---|---|
| Object_Property_Reference | The property being sampled. It can be Boolean, integer, unsigned, enumerated or real. |
| Window_Interval | The length of the sliding window, in seconds. |
| Window_Samples | How many samples the window holds. A new sample is taken every interval divided by this count. |
| Minimum_Value | The smallest sample in the window. |
| Maximum_Value | The largest sample in the window. |
| Average_Value | The mean of the valid samples in the window. |
How it behaves
Section titled “How it behaves”The object is not commandable and the standard defines no event algorithm for it. Valid_Samples and Attempted_Samples show how full the window is and how many reads failed.
With the CAS BACnet Stack
Section titled “With the CAS BACnet Stack”Enable it with the STACK_OPTION_OBJECT_TYPE_AVERAGING build option and add each object with BACnetStack_AddObject. The stack serves the object identifier, type and property list; you provide the rest through your property callbacks.
Related object types
Section titled “Related object types”Analog Input, Analog Value, Trend Log
Properties
Section titled “Properties”The properties ASHRAE 135-2024 clause 12.5 defines for this object type.
How to read the table:
- Conformance is what the standard asks of every object of this type: R is required, W is required and writable by a client, O is optional. A digit after the letter marks a condition in the standard that decides when the property is present or writable, such as support for intrinsic reporting.
- Present by default: yes means the stack presents the property as soon as you add the object; no means it
is optional and you turn it on with
BACnetStack_SetPropertyEnabled. This is the stack’s starting setup, so it can differ from the conformance code. - Writable is whether a client can write the property by default. Change it with
BACnetStack_SetPropertyWritable. - not in profile means the stack does not offer this property for this object type.
- Value when your callback does not answer: “Held by the stack” means the stack stores and serves the value itself and does not ask your callbacks. Otherwise it is the value the stack answers when your callback declines or is not registered.
| Property | Datatype | Conformance | Present by default | Writable | Value when your callback does not answer |
|---|---|---|---|---|---|
| Object_Identifier | BACnetObjectIdentifier | R | yes | no | Held by the stack. |
| Object_Name | CharacterString | R | yes | no | "Object <type>,<instance>", such as "Object 0,1" for Analog Input 1. |
| Object_Type | BACnetObjectType | R | yes | no | Held by the stack. |
| Minimum_Value | Real | R | yes | no | 0.0 |
| Minimum_Value_Timestamp | BACnetDateTime | O | not in profile | not in profile | No default: the read fails. |
| Average_Value | Real | R | yes | no | 0.0 |
| Variance_Value | Real | O | no | no | 0.0 |
| Maximum_Value | Real | R | yes | no | 0.0 |
| Maximum_Value_Timestamp | BACnetDateTime | O | not in profile | not in profile | No default: the read fails. |
| Description | CharacterString | O | no | no | "" |
| Attempted_Samples | Unsigned | W1 | yes | yes | 0 |
| Valid_Samples | Unsigned | R | yes | no | 0 |
| Object_Property_Reference | BACnetDeviceObjectPropertyReference | R1 | yes | no | No default: the read fails. |
| Window_Interval | Unsigned | W1 | yes | yes | 0 |
| Window_Samples | Unsigned | W1 | yes | yes | 0 |
| Property_List | BACnetARRAY[N] of BACnetPropertyIdentifier | R | yes | no | Held by the stack. |
| Audit_Level | BACnetAuditLevel | O2 | not in profile | not in profile | No default: the read fails. |
| Auditable_Operations | BACnetAuditOperationFlags | O2 | not in profile | not in profile | No default: the read fails. |
| Tags | BACnetARRAY[N] of BACnetNameValue | O | no | no | No default: the read fails. |
| Profile_Location | CharacterString | O | no | no | "" |
| Profile_Name | CharacterString | O | no | no | "" |