public BacnetLogRecord(BacnetTrendLogValueType type, object value, DateTime stamp, uint status) { this.type = type; timestamp = stamp; statusFlags = BacnetBitString.ConvertFromInt(status); any_value = null; Value = value; }
private void AddToList(int sequence_no, DateTime dt, BacnetTrendLogValueType type, object value, uint status) { ListViewItem itm = new ListViewItem(); itm.Text = sequence_no.ToString(); itm.SubItems.Add(dt.ToString()); itm.SubItems.Add(System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(type.ToString().ToLower().Substring(8))); itm.SubItems.Add(value != null ? value.ToString() : "NULL"); itm.SubItems.Add(status.ToString()); this.Invoke((MethodInvoker) delegate { m_list.Items.Add(itm); }); }
public TrendLog(int ObjId, string ObjName, string Description, uint Logsize, BacnetTrendLogValueType DefaultValueType) : base(new BacnetObjectId(BacnetObjectTypes.OBJECT_TRENDLOG, (uint)ObjId), ObjName, Description) { m_PROP_STATUS_FLAGS = m_PROP_STATUS_FLAGS.SetBit((byte)0, false); m_PROP_STATUS_FLAGS = m_PROP_STATUS_FLAGS.SetBit((byte)1, false); m_PROP_STATUS_FLAGS = m_PROP_STATUS_FLAGS.SetBit((byte)2, false); m_PROP_STATUS_FLAGS = m_PROP_STATUS_FLAGS.SetBit((byte)3, false); this.DefaultValueType = DefaultValueType; m_PROP_BUFFER_SIZE = Logsize; }
// first a constructor calling the parent constructor public TrendLogCustom(int ObjId, string ObjName, string Description, uint Logsize, BacnetTrendLogValueType DefaultValueType) : base(ObjId, ObjName, Description, Logsize, DefaultValueType) { }