Skip to content
Version 6.1.0
Contact Us

BACnetStack_AddTrendLogMultipleObject

bool BACnetStack_AddTrendLogMultipleObject(
const uint32_t deviceInstance,
const uint32_t objectInstance,
const uint32_t maxBufferSize);

Adds a BACnet Trend Log Multiple Object.

The device must be added first before this function can be called. The Trend Log Multiple Object references multiple logged device/object/property entities and when enabled, will log the values of the property based on the logging type. The logging type for this trend log multiple object is set by calling one of the following functions after calling this function:

  • BACnetStack_SetTrendLogTypeToPolled, with objectType = trendLogMultiple
  • BACnetStack_SetTrendLogTypeToTriggered, with objectType = trendLogMultiple

Note: The Trend Log Multiple Object in the BACnet Spec does not support the COV logging type.

To add additional device/object/property entities to be logged call the following function after calling this function:

  • AddLoggedObjectToTrendLogMultiple

The Trend Log Multiple properties that are handled and stored by the CAS BACnet Stack are:

  • Enable, Stop_When_Full, Trigger, Logging_Type
  • Start_Time, Stop_Time, Log_Interval
  • Buffer_Size, Record_Count, Total_Record_Count
  • Log_DeviceObjectProperty (a BACnetARRAY; empty until BACnetStack_AddLoggedObjectToTrendLogMultiple() is called)
  • Log_Buffer, Object_Identifier, Object_Type, Status_Flags, Property_List These are answered from stack storage BEFORE any callback is consulted, so a registered Get callback CANNOT override them. Writes to the writable ones land in the same storage, not in a Set callback - and a WriteProperty to ANY Trend Log Multiple property Aborts unless BACnetStack_RegisterCallbackGetSystemTime() has been called. Log_Buffer is readable only with ReadRange; a ReadProperty of it returns Error(PROPERTY, READ_ACCESS_DENIED). There is no Client_COV_Increment: this object type does not support COV logging.

Callbacks are used to handle the remaining required properties. The following list contains those properties and the Callbacks that are used to get the required data:

--------------------------------------------------------------------------------
Property Datatype Callback
--------------------------------------------------------------------------------
ObjectName CharacterString CallbackGetPropertyCharacterString
CallbackSetPropertyCharacterString
(only if made writable)
EventState* Enumerated CallbackGetPropertyEnumerated
(*) Served by the stack's intrinsic alarm engine instead, if intrinsic reporting has been
enabled for this object. With neither an alarm engine nor a callback the stack
answers NORMAL.
--------------------------------------------------------------------------------

See also: BACnetStack_ObjectExists(), BACnetStack_RemoveObject()

BACnet reference: ANSI/ASHRAE 135-2024 clause 12.30 (Trend Log Multiple Object Type).

Parameter Direction Description
deviceInstance in The instance number of the device that owns this Trend Log Multiple Object.
objectInstance in The instance number of this Trend Log Multiple Object.
maxBufferSize in The maximum number of logged records held in memory, i.e. the object’s Buffer_Size property. The buffer is circular: once full, the oldest record is overwritten unless Stop_When_Full is set. Each record costs memory proportional to the logged datatype, so size this against the target’s RAM rather than picking a large round number. Must be at least 1.

True if successful, false if failed.

Topic: Objects and properties. Declared in CASBACnetStackDLL.h.