javafish.clients.opc.component
Class OpcItem

java.lang.Object
  extended by javafish.clients.opc.component.OpcItem
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class OpcItem
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

OPC Item class

See Also:
Serialized Form

Constructor Summary
OpcItem(java.lang.String itemName, boolean active, java.lang.String accessPath)
          Create new instance of OPCItem
 
Method Summary
 java.lang.Object clone()
          Return clone of opc-item
 void generateClientHandleByOwner(OpcGroup group)
          Generate clientHandle by its owner.
 java.lang.String getAccessPath()
          Get access path of item
 int getClientHandle()
          Get client handle of item (unique key)
 int getDataType()
          Get item type
 java.lang.String getItemName()
          Get item name
 java.util.GregorianCalendar getTimeStamp()
          Get time stamp of downloaded item
 Variant getValue()
          Get value (Variant)
 boolean isActive()
          Get activity of OpcItem
 boolean isQuality()
          Get quality of downloaded item.
 void setActive(boolean active)
          Set activity of group
 void setQuality(boolean itemQuality)
          Set quality of downloaded item
 void setTimeStamp(java.util.GregorianCalendar timeStamp)
          Set time stamp of downloaded item
 void setValue(Variant itemValue)
          Set value (Variant)
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OpcItem

public OpcItem(java.lang.String itemName,
               boolean active,
               java.lang.String accessPath)
Create new instance of OPCItem

Parameters:
itemName - String - specific Tag name of item
active - boolean - begin activity of item
accessPath - String - accessPath is the "how" for the server to get the data specified by the itemName (ItemID, the what). The client uses this function to identify the possible access paths for the specified ItemID (similary with namespaces). Not all Opc Serves support these access paths.
Method Detail

generateClientHandleByOwner

public void generateClientHandleByOwner(OpcGroup group)
Generate clientHandle by its owner.

It is internal method for generation of unique item ID.

Parameters:
group - OpcGroup

setActive

public void setActive(boolean active)
Set activity of group

Parameters:
active - boolean

isActive

public boolean isActive()
Get activity of OpcItem

Returns:
is active, boolean

isQuality

public boolean isQuality()
Get quality of downloaded item.

The quality is very important flag. This flag has to be checked, because you have to handle only correct values. The item can have some values, but the quality has to be true.

Returns:
quality is OK, boolean

setQuality

public void setQuality(boolean itemQuality)
Set quality of downloaded item

Parameters:
itemQuality - boolean

getValue

public Variant getValue()
Get value (Variant)

Returns:
value Variant

setValue

public void setValue(Variant itemValue)
Set value (Variant)

Parameters:
itemValue - Variant

getTimeStamp

public java.util.GregorianCalendar getTimeStamp()
Get time stamp of downloaded item

Returns:
timeStamp GregorianCalendar

setTimeStamp

public void setTimeStamp(java.util.GregorianCalendar timeStamp)
Set time stamp of downloaded item

Parameters:
timeStamp - GregorianCalendar

getAccessPath

public java.lang.String getAccessPath()
Get access path of item

Returns:
accessPath String

getClientHandle

public int getClientHandle()
Get client handle of item (unique key)

Returns:
key int

getDataType

public int getDataType()
Get item type

Returns:
type int

getItemName

public java.lang.String getItemName()
Get item name

Returns:
String

clone

public java.lang.Object clone()
Return clone of opc-item

Overrides:
clone in class java.lang.Object
Returns:
item Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object