Skip to content
Version 6.1.0
Contact Us

BACnetStack_SetTrendLogTypeToPolled

bool BACnetStack_SetTrendLogTypeToPolled(
const uint32_t deviceInstance,
const uint16_t objectType,
const uint32_t objectInstance,
const bool enable,
const bool stopWhenFull,
const uint32_t logInterval);

Sets property values of an existing Trend Log or Trend Log Multiple object.

This function should only be called after the AddTrendLogObject or AddTrendLogMultipleObject functions.

This function sets the log object to used the polled type of logging and users can specify some parameters like if it should be enabled, if logging should stop when full, and the log interval.

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

Parameter Direction Description
deviceInstance in The instance of the device that contains the Trend Log object.
objectType in The type of trend log object. Must be either BACnetObjectType::trendLog or BACnetObjectType::trendLogMultiple. With objectInstance, this is one BACnet Object Identifier carried as two parameters (see the API conventions).
objectInstance in The instance of the Trend Log object to update.
enable in Whether to enable logging on the Trend Log object (true) or not (false).
stopWhenFull in Whether to stop logging when the log buffer is full (true) or not (false).
logInterval in The periodic interval in hundredths of seconds of when to log values. RESOLUTION IS ONE SECOND despite the units: the value is integer-divided by 100 before use, so a sub-second remainder is discarded (150 behaves as 1.00 s, not 1.50 s). A value below 100 - including 0 - gives an effective interval of 0 and logs on EVERY BACnetStack_Tick(). The value is stored and reported over the wire unchanged, so Log_Interval reads back what you passed even when the behaviour is rounded down. Not validated.

True if successful, otherwise false.

Topic: Schedules, calendars, trend logs and other object configuration. Declared in CASBACnetStackDLL.h.