|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavafish.clients.opc.JCustomOpc
javafish.clients.opc.JOpc
public class JOpc
Java OPC class
implements OPCDA standard (2.0, 3.0)
OPC is open connectivity in industrial automation and the enterprise systems that support the industry. Interoperability is assured through the creation and maintenance of non-proprietary open standards specifications.
The first OPC standard specification resulted from the collaboration of a number of leading worldwide automation suppliers working in cooperation with Microsoft. Originally based on Microsoft's OLE COM and DCOM technologies, the specification defined a standard set of objects, interfaces and methods for use in process control and manufacturing automation applications to facilitate interoperability.
The COM/DCOM technologies provided the framework for software products to be developed. There are now hundreds of OPC Data Access servers and clients.
| Constructor Summary | |
|---|---|
JOpc(java.lang.String host,
java.lang.String serverProgID,
java.lang.String serverClientHandle)
Create new instance of OPC Client. |
|
| Method Summary | |
|---|---|
void |
addGroup(OpcGroup group)
Add opc group to the client. |
void |
asynch10Read(OpcGroup group)
Asynchronous 1.0 reading (AdviseSink) - start |
void |
asynch10Unadvise(OpcGroup group)
Asynchronous 1.0 unadvise reading (AdviseSink) - terminate |
void |
asynch20Read(OpcGroup group)
Asynchronous 2.0 reading (Callback) - start |
void |
asynch20Unadvise(OpcGroup group)
Asynchronous 2.0 unadvise reading (Callback) - terminate |
OpcGroup |
getDownloadGroup()
Get downloaded group (clone) from opc-server NOTE: Asynchronous mode, OPC-Queue of downloaded groups, OPCGroup can be NULL. |
OpcGroup |
getGroupByClientHandle(int clientHandle)
Get group by its clientHandle identification. |
OpcGroup[] |
getGroupsAsArray()
Get opc-groups as array. |
int |
getNewGroupClientHandle()
Generate new clientHandle for group (Generation of unique group ID) |
void |
registerGroup(OpcGroup group)
Register group to opc-server. |
void |
registerGroups()
Register all groups (with items) to opc-server. |
void |
registerItem(OpcGroup group,
OpcItem item)
Register item (in group) to opc-server. |
void |
removeGroup(OpcGroup group)
Remove opc group from the client. |
void |
run()
|
void |
setGroupActivity(OpcGroup group,
boolean active)
Set new activity of group (change active state) |
void |
setGroupUpdateTime(OpcGroup group,
int updateTime)
Set new updateTime of group (refresh rate) |
void |
setItemActivity(OpcGroup group,
OpcItem item,
boolean active)
Set new activity of item (change active state) |
void |
start()
Run OPC-Client thread |
OpcGroup |
synchReadGroup(OpcGroup group)
Synchronous reading of group |
OpcItem |
synchReadItem(OpcGroup group,
OpcItem item)
Synchronous reading of one item in specific group. |
void |
synchWriteItem(OpcGroup group,
OpcItem item)
Synchronous writing of one item in specific group. |
void |
unregisterGroup(OpcGroup group)
Unregister group from opc-server. |
void |
unregisterGroups()
Unregister all groups from opc-server (with items). |
void |
unregisterItem(OpcGroup group,
OpcItem item)
Unregister item (in group) from opc-server. |
void |
updateGroups()
Update native groups representation. |
| Methods inherited from class javafish.clients.opc.JCustomOpc |
|---|
coInitialize, connect, coUninitialize, getFullOpcServerName, getHost, getServerClientHandle, getServerProgID, ping |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JOpc(java.lang.String host,
java.lang.String serverProgID,
java.lang.String serverClientHandle)
host - - host computerserverProgID - - OPC Server nameserverClientHandle - - user name for OPC Client| Method Detail |
|---|
public int getNewGroupClientHandle()
(Generation of unique group ID)
public void addGroup(OpcGroup group)
NOTE: GroupExistsException - runtime exception
group - OpcGrouppublic void removeGroup(OpcGroup group)
NOTE: GroupExistsException - runtime exception
group - OpcGrouppublic OpcGroup getGroupByClientHandle(int clientHandle)
clientHandle - int
public OpcGroup[] getGroupsAsArray()
public void updateGroups()
public void registerGroup(OpcGroup group)
throws ComponentNotFoundException,
UnableAddGroupException
group - OpcGroup
ComponentNotFoundException
UnableAddGroupException
public void registerItem(OpcGroup group,
OpcItem item)
throws ComponentNotFoundException,
UnableAddItemException
group - OpcGroupitem - OpcItem
ComponentNotFoundException
UnableAddItemException
public void registerGroups()
throws UnableAddGroupException,
UnableAddItemException
NOTE: It's faster than separate methods registerGroup and registerItem, but you don't know, which item or group causes the registration exception.
UnableAddGroupException
UnableAddItemException
public void unregisterGroup(OpcGroup group)
throws ComponentNotFoundException,
UnableRemoveGroupException
group - OpcGroup
ComponentNotFoundException
UnableRemoveGroupException
public void unregisterItem(OpcGroup group,
OpcItem item)
throws ComponentNotFoundException,
UnableRemoveItemException
group - OpcGroupitem - OpcItem
ComponentNotFoundException
UnableRemoveItemException
public void unregisterGroups()
throws UnableRemoveGroupException
NOTE: It's faster than separate methods unregisterGroup and unregisterItem, but you don't know, which group causes the unregistration exception.
UnableRemoveGroupException
public OpcItem synchReadItem(OpcGroup group,
OpcItem item)
throws ComponentNotFoundException,
SynchReadException
group - OpcGroupitem - OpcItem
ComponentNotFoundException
SynchReadException
public void synchWriteItem(OpcGroup group,
OpcItem item)
throws ComponentNotFoundException,
SynchWriteException
group - OpcGroupitem - OpcItem
ComponentNotFoundException
SynchWriteException
public OpcGroup synchReadGroup(OpcGroup group)
throws ComponentNotFoundException,
SynchReadException
group - OpcGroup
ComponentNotFoundException
SynchReadException
public void asynch10Read(OpcGroup group)
throws ComponentNotFoundException,
Asynch10ReadException
group - OpcGroup
ComponentNotFoundException
Asynch10ReadException
public void asynch20Read(OpcGroup group)
throws ComponentNotFoundException,
Asynch20ReadException
group - OpcGroup
ComponentNotFoundException
Asynch20ReadException
public void asynch10Unadvise(OpcGroup group)
throws ComponentNotFoundException,
Asynch10UnadviseException
group - OpcGroup
ComponentNotFoundException
Asynch10UnadviseException
public void asynch20Unadvise(OpcGroup group)
throws ComponentNotFoundException,
Asynch20UnadviseException
group - OpcGroup
ComponentNotFoundException
Asynch20UnadviseExceptionpublic OpcGroup getDownloadGroup()
NOTE: Asynchronous mode, OPC-Queue of downloaded groups, OPCGroup can be NULL.
public void setGroupUpdateTime(OpcGroup group,
int updateTime)
throws ComponentNotFoundException,
GroupUpdateTimeException
group - OpcGroupupdateTime - int
ComponentNotFoundException
GroupUpdateTimeException
public void setGroupActivity(OpcGroup group,
boolean active)
throws ComponentNotFoundException,
GroupActivityException
group - OpcGroupactive - boolean
ComponentNotFoundException
GroupActivityException
public void setItemActivity(OpcGroup group,
OpcItem item,
boolean active)
throws ComponentNotFoundException,
ItemActivityException
group - OpcGroupitem - OpcItemactive - boolean
ComponentNotFoundException
ItemActivityExceptionpublic void start()
public void run()
run in interface java.lang.Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||