/// <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 qualityBits IsMachineQualityHealthy(string command) { qualityBits machineQuality = qualityBits.bad; try { ItemProperties[] item = null; //get value of command. item = opcServer.GetProperties(new string[1] { command }, true, new int[] { 3 }); Property property = item[0].Properties[0]; machineQuality = ((OPCDA.OPCQuality)property.Value).QualityField; } catch (Exception errMsg) { //rptEngine.Alarm_OPC_NotificatonMessage(command, "Quality is " + machineQuality.ToString() // + " Message = " + errMsg.Message); } return(machineQuality); }
/// <summary> /// Initializes the object with the specified quality. /// </summary> public Quality(qualityBits quality) { m_qualityBits = quality; m_limitBits = limitBits.none; m_vendorBits = 0; }
public TestTagInDevice(string itemID, object value, qualityBits InitialQuality, ItemAccessRights AccessRights, Type tagCanonicalType) : base(itemID, value, InitialQuality, AccessRights, tagCanonicalType) { }
// Token: 0x06000270 RID: 624 RVA: 0x00006E63 File Offset: 0x00005E63 public Quality(qualityBits quality) { this.m_qualityBits = quality; this.m_limitBits = limitBits.none; this.m_vendorBits = 0; }
public OPCQuality() { this.qualityFieldField = qualityBits.good; this.limitFieldField = limitBits.none; this.vendorFieldField = ((byte)(0)); }
/// <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); }
public Quality(short code) { this.m_qualityBits = ((qualityBits)code) & (qualityBits.goodLocalOverride | qualityBits.badWaitingForInitialData | qualityBits.badConfigurationError); this.m_limitBits = ((limitBits)code) & limitBits.constant; this.m_vendorBits = (byte)((code & -253) >> 8); }