TrendLog (FB)

FUNCTION_BLOCK TrendLog EXTENDS LogObjectsBase IMPLEMENTS BACnet.IBACnetEventConsumer

Default implementation to handle Trend_Log-object data storage in the file system.

Assumptions and requirements see LogObjectsBase.

TrendLog provide the feature to monitor BACnet properties, but doesnt allow to monitor other entities than BACnet properties. See ANSI/ASHRAE Standard 135-2012 Table 12-29. Properties of the Trend Log Object Type footnote [8]. Monitoring other entities (than BACnet properties) is definded in the ANSI/ASHRAE Standard 135-2012 for historic reasons and not recommended anyway. Use a BinaryInput, BinaryValue, AnalogInput or AnalogValue to represent the other entity and monitor it’s Present_Value.

TrendLog is limited to monitor properties of selected value types (BOOLEAN, UNSIGNED, SIGNED, REAL, ENUMERATED, BIT_STRING) only. To ensure the Log_DeviceObjectProperty property can not be set to other properties use the BACnet-Server-plugin LimitDeviceObjectPropertyReferencesToCertainTypes. Also TrendLog data files needs to be consistent with object persistence. Most obvious Total_Record_Count needs to be consistent with last records sequence number. So in case you delete object persistence files created by ObjectPersistence you need to delete TrendLog data files as well.

This BACnet-Server-plugin needs to be registered prior to BACnetServer.StartBACnetStack() to capture log records created during StartBACnetStack(), so you can’t use it with BACnet-Server AutoStart (at application init).

Properties:

Name

NumCallbacks

NumHooks

HardShutdown, inherited from LogObjectsBase

MaxDataSize, inherited from LogObjectsBase

ObjectType, inherited from LogObjectsBase

PersistentPath, inherited from LogObjectsBase

ServerDeviceId, inherited from LogObjectsBase

TempPath, inherited from LogObjectsBase

Methods:

BACnetEventCallback

GetCallback

GetHook

Init

PostStartBACnetStack

PreRegister

ComputeRecordSize, inherited from LogObjectsBase

CreateDataFiles, inherited from LogObjectsBase

DataFileName, inherited from LogObjectsBase

FreeReadRangeResult, inherited from LogObjectsBase

GetBufferSize

GetLogDeviceObjectProperty

GetRecordsByPosition, inherited from LogObjectsBase

GetRecordsBySequence, inherited from LogObjectsBase

GetRecordsByTime, inherited from LogObjectsBase

GetStopWhenFull

ListDataFiles, inherited from LogObjectsBase

LogDataFile, inherited from LogObjectsBase

LogFilePos, inherited from LogObjectsBase

LogFileSize, inherited from LogObjectsBase

LogFileSizeAndPos, inherited from LogObjectsBase

LogObjectAddrString, inherited from LogObjectsBase

LogObjectPropertyAddrString, inherited from LogObjectsBase

LogReadRangeResult, inherited from LogObjectsBase

LogRecord, inherited from LogObjectsBase

LogRecordContentInfo, inherited from LogObjectsBase

ObjectId, inherited from LogObjectsBase

PostStopBACnetStack, inherited from LogObjectsBase

PurgeDataFile, inherited from LogObjectsBase

ReadNumberOfRecordsAndLastSequenceFromDataFile, inherited from LogObjectsBase

ReadNumberOfRecordsFromDataFile, inherited from LogObjectsBase

ReadRangeErrorCompletion, inherited from LogObjectsBase

ReadRangeInfoToString, inherited from LogObjectsBase

ReadRangeResultSetInfo, inherited from LogObjectsBase

RemoveDataFiles, inherited from LogObjectsBase

RemoveUnusedDataFiles, inherited from LogObjectsBase

ResetDataFile, inherited from LogObjectsBase

ScanObjectsAndSetCallbackAttachments, inherited from LogObjectsBase

SetCallbackAttachments

SetReadCallbackAttachment, inherited from LogObjectsBase

SetWriteCallbackAttachment, inherited from LogObjectsBase

UpdateObjectPropertiesFromDataFile

WriteRecordContentToDataFile, inherited from LogObjectsBase

Structure: