Class Group

java.lang.Object
org.openscada.opc.lib.da.Group

public class Group extends Object
  • Method Details

    • setActive

      public void setActive(boolean state) throws org.jinterop.dcom.common.JIException
      Throws:
      org.jinterop.dcom.common.JIException
    • remove

      public void remove() throws org.jinterop.dcom.common.JIException
      remove the group from the server
      Throws:
      org.jinterop.dcom.common.JIException
    • isActive

      public boolean isActive() throws org.jinterop.dcom.common.JIException
      Throws:
      org.jinterop.dcom.common.JIException
    • getName

      public String getName() throws org.jinterop.dcom.common.JIException
      Get the group name from the server
      Returns:
      The group name fetched from the server
      Throws:
      org.jinterop.dcom.common.JIException
    • setName

      public void setName(String name) throws org.jinterop.dcom.common.JIException
      Change the group name
      Parameters:
      name - the new name of the group
      Throws:
      org.jinterop.dcom.common.JIException
    • addItem

      public Item addItem(String item) throws org.jinterop.dcom.common.JIException, AddFailedException
      Add a single item. Actually calls addItems(String[]) with only one paraemter
      Parameters:
      item - The item to add
      Returns:
      The added item
      Throws:
      org.jinterop.dcom.common.JIException - The add operation failed
      AddFailedException - The item was not added due to an error
    • validateItems

      public Map<String,Result<OPCITEMRESULT>> validateItems(String... items) throws org.jinterop.dcom.common.JIException
      Validate item ids and get additional information to them.
      According to the OPC specification you should first validate the items and the add them. The spec also says that when a server lets the item pass validation it must also let them pass the add operation.
      Parameters:
      items - The items to validate
      Returns:
      A result map of item id to result information (including error code).
      Throws:
      org.jinterop.dcom.common.JIException
    • addItems

      public Map<String,Item> addItems(String... items) throws org.jinterop.dcom.common.JIException, AddFailedException
      Add new items to the group
      Parameters:
      items - The items (by string id) to add
      Returns:
      A result map of id to item object
      Throws:
      org.jinterop.dcom.common.JIException - The add operation completely failed. No item was added.
      AddFailedException - If one or more item could not be added. Item without error where added.
    • getItemByOPCItemId

      protected Item getItemByOPCItemId(String opcItemId)
    • checkItems

      protected void checkItems(Item[] items)
    • setActive

      public void setActive(boolean state, Item... items) throws org.jinterop.dcom.common.JIException
      Throws:
      org.jinterop.dcom.common.JIException
    • getServerHandles

      protected Integer[] getServerHandles(Item[] items)
    • write

      public Map<Item,Integer> write(WriteRequest... requests) throws org.jinterop.dcom.common.JIException
      Throws:
      org.jinterop.dcom.common.JIException
    • read

      public Map<Item,ItemState> read(boolean device, Item... items) throws org.jinterop.dcom.common.JIException
      Throws:
      org.jinterop.dcom.common.JIException
    • getServer

      public Server getServer()
    • clear

      public void clear() throws org.jinterop.dcom.common.JIException
      Throws:
      org.jinterop.dcom.common.JIException
    • getAsyncIO20

      public OPCAsyncIO2 getAsyncIO20()
    • attach

      public EventHandler attach(IOPCDataCallback dataCallback) throws org.jinterop.dcom.common.JIException
      Throws:
      org.jinterop.dcom.common.JIException
    • findItemByClientHandle

      public Item findItemByClientHandle(int clientHandle)
    • getServerHandle

      public int getServerHandle()
    • removeItem

      public void removeItem(String opcItemId) throws IllegalArgumentException, UnknownHostException, org.jinterop.dcom.common.JIException
      Throws:
      IllegalArgumentException
      UnknownHostException
      org.jinterop.dcom.common.JIException