/// <summary> /// Initializes the object from a data value. /// </summary> /// <param name="itemID">Item identifier</param> /// <param name="value">Current value</param> /// <param name="InitialQuality">Initial quality</param> /// <param name="AccessRights">Initial access rights</param> /// <param name="tagCanonicalType">Tag CAnonical Type</param> /// <param name="UTCTime">if set to <c>true</c> the time-stamp is expressed as the Coordinated Universal Time (UTC).</param> public DeviceItem(string itemID, object value, qualityBits InitialQuality, ItemAccessRights AccessRights, System.Type tagCanonicalType, bool UTCTime = true) : this(itemID, value, UTCTime) { if (value != null) { m_quality = new Quality(InitialQuality); } else { m_quality = new Quality(qualityBits.badWaitingForInitialData); m_datatype = tagCanonicalType; } switch (AccessRights) { case ItemAccessRights.ReadOnly: m_accessRights = accessRights.readable; break; case ItemAccessRights.ReadWrite: m_accessRights = accessRights.readWritable; break; case ItemAccessRights.WriteOnly: m_accessRights = accessRights.writable; break; } }
public TestTagInDevice(string itemID, object value, qualityBits InitialQuality, ItemAccessRights AccessRights, Type tagCanonicalType) : base(itemID, value, InitialQuality, AccessRights, tagCanonicalType) { }
/// <summary> /// Initializes the object from a data value. It creates new TAG in the device address space. /// </summary> /// <param name="itemID">Item identifier</param> /// <param name="value">Current value</param> /// <param name="InitialQuality">Initial quality</param> /// <param name="AccessRights">Initial access rights</param> /// <param name="tagCanonicalType">Canonical Type for the tag</param> public TagInDevice(string itemID, object value, qualityBits InitialQuality, ItemAccessRights AccessRights, System.Type tagCanonicalType) : base(itemID, value, InitialQuality, AccessRights, tagCanonicalType) { Add(itemID, this); }