As you have already learned, the properties of ACComponent classes are the IACPropertyBase implementations. IACPropertyBase has the property PropertyLogListInfo LiveLog. PropertyLogListInfo, in turn, is a property that can store a series of property values.
The first time you access LiveLog, a property logging mechanism is automatically activated. Every time the property value changes, the new value is written to a ring buffer. You access the values of this ring buffer using the LiveLogList property. The standard capacity of the ring buffer is 500 values. However, you can change this value in the iPlus development environment in the "Log buffer size" field:
The values saved in the ring buffer is of type PropertyLogItem.
public class PropertyLogItem
{
public DateTime Time { get; set; }
public object Value { get; set; }
}
The LiveLogList property is of type PropertyLogRing:
public class PropertyLogRing : PropertyLogRing<PropertyLogItem>
{
public PropertyLogRing() : this(500) { }
}
The ring buffer implements the INotifyCollectionChanged interface so that value changes can be transferred to other classes via event:
public class PropertyLogRing<T> : INotifyCollectionChanged, IList<T>
{
}
The control element VBChartControl , for example, is such a class that reacts to value changes and displays the logged values on the GUI as a line chart.
Here again the class PropertyLogListInfo:
public class PropertyLogListInfo : INotifyPropertyChanged
{
public PropertyLogRing LiveLogList {get;}
public IList<PropertyLogItem> PropertyLogList {get;}
}
PropertyLogListInfo can not only save live values, but also provide archived values from a long-term archive. Use the PropertyLogList property to read the property values because PropertyLogListInfo makes either live values or archived values accessible via it.