dk.opi.io.opc.opcclient
Class OpcQuality

java.lang.Object
  extended bydk.opi.io.opc.opcclient.OpcQuality
All Implemented Interfaces:
IOQuality

public class OpcQuality
extends Object
implements IOQuality

This class implements functinality related to items. An items represents the input/output points read/written to/from the devices monitored by the OPC server.

This class has no public constructor - use the OpcGroup.addItem() method to create instances of this class.

See Also:
OpcGroup.addItem(java.lang.String, java.lang.String, boolean, int, java.lang.String)

Field Summary
 
Fields inherited from interface dk.opi.io.IOQuality
BAD_COMM_FAILURE, BAD_CONFIGURATION_ERROR, BAD_DEVICE_FAILURE, BAD_LAST_KNOWN_VALUE, BAD_NON_SPECIFIC, BAD_NOT_CONNECTED, BAD_OUT_OF_SERVICE, BAD_SENSOR_FAILURE, GOOD_LOCAL_OVERRIDE, GOOD_NON_SPECIFIC, LIMIT_CONSTANT, LIMIT_HIGHLIMITED, LIMIT_LOWLIMITED, LIMIT_NOT_LIMITED, QUALITY_BAD, QUALITY_GOOD, QUALITY_UNCERTAIN, UNCERTAIN_ENGINEERING_UNITS_EXCEEDED, UNCERTAIN_LAST_USABLE_VALUE, UNCERTAIN_NON_SPECIFIC, UNCERTAIN_SENSOR_NOT_ACCURATE, UNCERTAIN_SUB_NORMAL
 
Method Summary
 int getLimitField()
          The Limit Field is valid regardless of the Quality and Substatus.
 int getQuality()
          Returns the quality of the item in question
 int getSubStatus()
          Returns the sub status for the item in question
 boolean isQualityGood()
          Convinience method.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

isQualityGood

public boolean isQualityGood()
Convinience method. Returns the result of the comparison getQuality() == QUALITY_GOOD

Specified by:
isQualityGood in interface IOQuality

getQuality

public int getQuality()
Returns the quality of the item in question

Specified by:
getQuality in interface IOQuality
Returns:
any of the values IOQuality.QUALITY_BAD, IOQuality.QUALITY_UNCERTAIN or IOQuality.QUALITY_GOOD

getSubStatus

public int getSubStatus()
Returns the sub status for the item in question

Specified by:
getSubStatus in interface IOQuality
Returns:
the return value depends on the current status as returned by getQuality(). For BAD values any of the values IOQuality.BAD_NON_SPECIFIC, etc. are returned. for UNCERTAIN values any of the values IOQuality.UNCERTAIN_NON_SPECIFIC, etc. are returned. For GOOD values any of the values IOQuality.GOOD_NON_SPECIFIC, etc. are returned.

getLimitField

public int getLimitField()
The Limit Field is valid regardless of the Quality and Substatus. In some cases such as Sensor Failure it can provide useful diagnostic information.

Specified by:
getLimitField in interface IOQuality
Returns:
any of the values IOQuality.LIMIT_NOT_LIMITED, IOQuality.LIMIT_LOWLIMITED, IOQuality.LIMIT_HIGHLIMITED or IOQuality.LIMIT_CONSTANT

toString

public String toString()