Class UaVariableNode

  • Direct Known Subclasses:
    BaseVariableNode

    public class UaVariableNode
    extends UaNode
    PLCcom sdk UaVariableNode Implementation for Opc Ua, with the UaVariableNode object you can read or write Attributes or values from cache or directly from connected ua server
    Author:
    Indi.An GmbH, www.indi-an.com, support@indi-an.com
    • Constructor Summary

      Constructors 
      Constructor Description
      UaVariableNode​(UaClient client, com.plccom.opc.ua.builtintypes.NodeId nodeId)
      Creates a new UaVariableNode for the given client and NodeId.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      UaVariableTypeNode browseVariableType()
      returns the VariableTypeNode object from node
      com.plccom.opc.ua.builtintypes.UnsignedByte getAccessLevel()
      Returns the attribute AccessLevel from cache or directly from connected ua server
      com.plccom.opc.ua.builtintypes.UnsignedInteger[] getArrayDimensions()
      Returns the attribute ArrayDimensions from cache or directly from connected ua server
      com.plccom.opc.ua.builtintypes.NodeId getDataType()
      Returns the attribute value from cache or directly from connected ua server
      Boolean getHistorizing()
      Returns the attribute Historizing from cache or directly from connected ua server
      Double getMinimumSamplingInterval()
      Returns the attribute MinimumSamplingInterval from cache or directly from connected ua server
      com.plccom.opc.ua.builtintypes.UnsignedByte getUserAccessLevel()
      Returns the attribute UserAccessLevel from cache or directly from connected ua server
      Object getValue()
      Returns the attribute value from cache or directly from connected ua server
      Integer getValueRank()
      Returns the attribute ValueRank from cache or directly from connected ua server
      com.plccom.opc.ua.builtintypes.DataValue readAccessLevel()
      Reads the complete datavalue of attribute AccessLevel this node from cache or directly from connected ua server
      com.plccom.opc.ua.builtintypes.DataValue readArrayDimensions()
      Reads the complete datavalue of attribute ArrayDimensions this node from cache or directly from connected ua server
      com.plccom.opc.ua.builtintypes.DataValue readDataType()
      Reads the complete datavalue of attribute DataType this node from cache or directly from connected ua server
      com.plccom.opc.ua.builtintypes.DataValue readHistorizing()
      Reads the complete datavalue of attribute Historizing this node from cache or directly from connected ua server
      com.plccom.opc.ua.builtintypes.DataValue readMinimumSamplingInterval()
      Reads the complete datavalue of attribute MinimumSamplingInterval this node from cache or directly from connected ua server
      com.plccom.opc.ua.builtintypes.DataValue readUserAccessLevel()
      Reads the complete datavalue of attribute UserAccessLevel this node from cache or directly from connected ua server
      com.plccom.opc.ua.builtintypes.DataValue readValue()
      Reads the complete datavalue of attribute Value this node from cache or directly from connected ua server
      com.plccom.opc.ua.builtintypes.DataValue readValueRank()
      Reads the complete datavalue of attribute ValueRank this node from cache or directly from connected ua server
      com.plccom.opc.ua.builtintypes.StatusCode setAccessLevel​(com.plccom.opc.ua.builtintypes.UnsignedByte accessLevel)
      Sets the attribute accessLevel of this node at connected ua server and refreshing the nodecache
      com.plccom.opc.ua.builtintypes.StatusCode setArrayDimensions​(com.plccom.opc.ua.builtintypes.UnsignedInteger[] arrayDimensions)
      Sets the attribute arrayDimensions of this node at connected ua server and refreshing the nodecache
      com.plccom.opc.ua.builtintypes.StatusCode setDataType​(com.plccom.opc.ua.builtintypes.NodeId dataType)
      Sets the attribute dataType of this node at connected ua server and refreshing the nodecache
      com.plccom.opc.ua.builtintypes.StatusCode setHistorizing​(boolean historizing)
      Sets the attribute historizing of this node at connected ua server and refreshing the nodecache
      com.plccom.opc.ua.builtintypes.StatusCode setMinimumSamplingInterval​(double minimumSamplingInterval)
      Sets the attribute minimumSamplingInterval of this node at connected ua server and refreshing the nodecache
      com.plccom.opc.ua.builtintypes.StatusCode setUserAccessLevel​(com.plccom.opc.ua.builtintypes.UnsignedByte userAccessLevel)
      Sets the attribute userAccessLevel of this node at connected ua server and refreshing the nodecache
      com.plccom.opc.ua.builtintypes.StatusCode setValue​(Object value)
      Sets the attribute value of this node at connected ua server and refreshing the nodecache
      com.plccom.opc.ua.builtintypes.StatusCode setValueRank​(int valueRank)
      Sets the attribute valueRank of this node at connected ua server and refreshing the nodecache
      com.plccom.opc.ua.builtintypes.StatusCode writeAccessLevel​(com.plccom.opc.ua.builtintypes.DataValue value)
      Writes the AccessLevel attribute
      com.plccom.opc.ua.builtintypes.StatusCode writeArrayDimensions​(com.plccom.opc.ua.builtintypes.DataValue value)
      Writes the ArrayDimensions attribute
      com.plccom.opc.ua.builtintypes.StatusCode writeDataType​(com.plccom.opc.ua.builtintypes.DataValue value)
      Writes the DataType attribute
      com.plccom.opc.ua.builtintypes.StatusCode writeHistorizing​(com.plccom.opc.ua.builtintypes.DataValue value)
      Writes the Historizing attribute
      com.plccom.opc.ua.builtintypes.StatusCode writeMinimumSamplingInterval​(com.plccom.opc.ua.builtintypes.DataValue value)
      Writes the MinimumSamplingInterval attribute
      com.plccom.opc.ua.builtintypes.StatusCode writeUserAccessLevel​(com.plccom.opc.ua.builtintypes.DataValue value)
      Writes the UserAccessLevel attribute
      com.plccom.opc.ua.builtintypes.StatusCode writeValue​(com.plccom.opc.ua.builtintypes.DataValue value)
      Writes the Value attribute
      com.plccom.opc.ua.builtintypes.StatusCode writeValueRank​(com.plccom.opc.ua.builtintypes.DataValue value)
      Writes the ValueRank attribute
    • Constructor Detail

      • UaVariableNode

        public UaVariableNode​(UaClient client,
                              com.plccom.opc.ua.builtintypes.NodeId nodeId)
        Creates a new UaVariableNode for the given client and NodeId.
        Parameters:
        client - the client instance
        nodeId - the NodeId of the variable node
    • Method Detail

      • getValue

        public Object getValue()
                        throws com.plccom.opc.ua.common.ServiceFaultException,
                               com.plccom.opc.ua.common.ServiceResultException
        Returns the attribute value from cache or directly from connected ua server
        Returns:
        the value attribute
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • getDataType

        public com.plccom.opc.ua.builtintypes.NodeId getDataType()
                                                          throws com.plccom.opc.ua.common.ServiceFaultException,
                                                                 com.plccom.opc.ua.common.ServiceResultException
        Returns the attribute value from cache or directly from connected ua server
        Returns:
        the value attribute
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • getValueRank

        public Integer getValueRank()
                             throws com.plccom.opc.ua.common.ServiceFaultException,
                                    com.plccom.opc.ua.common.ServiceResultException
        Returns the attribute ValueRank from cache or directly from connected ua server
        Returns:
        the ValueRank attribute
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • getArrayDimensions

        public com.plccom.opc.ua.builtintypes.UnsignedInteger[] getArrayDimensions()
                                                                            throws com.plccom.opc.ua.common.ServiceFaultException,
                                                                                   com.plccom.opc.ua.common.ServiceResultException
        Returns the attribute ArrayDimensions from cache or directly from connected ua server
        Returns:
        the ArrayDimensions attribute
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • getAccessLevel

        public com.plccom.opc.ua.builtintypes.UnsignedByte getAccessLevel()
                                                                   throws com.plccom.opc.ua.common.ServiceFaultException,
                                                                          com.plccom.opc.ua.common.ServiceResultException
        Returns the attribute AccessLevel from cache or directly from connected ua server
        Returns:
        the AccessLevel attribute
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • getUserAccessLevel

        public com.plccom.opc.ua.builtintypes.UnsignedByte getUserAccessLevel()
                                                                       throws com.plccom.opc.ua.common.ServiceFaultException,
                                                                              com.plccom.opc.ua.common.ServiceResultException
        Returns the attribute UserAccessLevel from cache or directly from connected ua server
        Returns:
        the UserAccessLevel attribute
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • getMinimumSamplingInterval

        public Double getMinimumSamplingInterval()
                                          throws com.plccom.opc.ua.common.ServiceFaultException,
                                                 com.plccom.opc.ua.common.ServiceResultException
        Returns the attribute MinimumSamplingInterval from cache or directly from connected ua server
        Returns:
        the MinimumSamplingInterval attribute
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • getHistorizing

        public Boolean getHistorizing()
                               throws com.plccom.opc.ua.common.ServiceFaultException,
                                      com.plccom.opc.ua.common.ServiceResultException
        Returns the attribute Historizing from cache or directly from connected ua server
        Returns:
        the Historizing attribute
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • setValue

        public com.plccom.opc.ua.builtintypes.StatusCode setValue​(Object value)
                                                           throws com.plccom.opc.ua.common.ServiceResultException
        Sets the attribute value of this node at connected ua server and refreshing the nodecache
        Parameters:
        value - the value attribute
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • setDataType

        public com.plccom.opc.ua.builtintypes.StatusCode setDataType​(com.plccom.opc.ua.builtintypes.NodeId dataType)
                                                              throws com.plccom.opc.ua.common.ServiceResultException
        Sets the attribute dataType of this node at connected ua server and refreshing the nodecache
        Parameters:
        dataType - the dataType attribute
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • setValueRank

        public com.plccom.opc.ua.builtintypes.StatusCode setValueRank​(int valueRank)
                                                               throws com.plccom.opc.ua.common.ServiceResultException
        Sets the attribute valueRank of this node at connected ua server and refreshing the nodecache
        Parameters:
        valueRank - the setValueRank attribute
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • setArrayDimensions

        public com.plccom.opc.ua.builtintypes.StatusCode setArrayDimensions​(com.plccom.opc.ua.builtintypes.UnsignedInteger[] arrayDimensions)
                                                                     throws com.plccom.opc.ua.common.ServiceResultException
        Sets the attribute arrayDimensions of this node at connected ua server and refreshing the nodecache
        Parameters:
        arrayDimensions - the arrayDimensions attribute
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • setAccessLevel

        public com.plccom.opc.ua.builtintypes.StatusCode setAccessLevel​(com.plccom.opc.ua.builtintypes.UnsignedByte accessLevel)
                                                                 throws com.plccom.opc.ua.common.ServiceResultException
        Sets the attribute accessLevel of this node at connected ua server and refreshing the nodecache
        Parameters:
        accessLevel - the accessLevel attribute
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • setUserAccessLevel

        public com.plccom.opc.ua.builtintypes.StatusCode setUserAccessLevel​(com.plccom.opc.ua.builtintypes.UnsignedByte userAccessLevel)
                                                                     throws com.plccom.opc.ua.common.ServiceResultException
        Sets the attribute userAccessLevel of this node at connected ua server and refreshing the nodecache
        Parameters:
        userAccessLevel - the userAccessLevel attribute
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • setMinimumSamplingInterval

        public com.plccom.opc.ua.builtintypes.StatusCode setMinimumSamplingInterval​(double minimumSamplingInterval)
                                                                             throws com.plccom.opc.ua.common.ServiceResultException
        Sets the attribute minimumSamplingInterval of this node at connected ua server and refreshing the nodecache
        Parameters:
        minimumSamplingInterval - the minimumSamplingInterval attribute
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • setHistorizing

        public com.plccom.opc.ua.builtintypes.StatusCode setHistorizing​(boolean historizing)
                                                                 throws com.plccom.opc.ua.common.ServiceResultException
        Sets the attribute historizing of this node at connected ua server and refreshing the nodecache
        Parameters:
        historizing - the historizing attribute
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • readValue

        public com.plccom.opc.ua.builtintypes.DataValue readValue()
                                                           throws com.plccom.opc.ua.common.ServiceFaultException,
                                                                  com.plccom.opc.ua.common.ServiceResultException
        Reads the complete datavalue of attribute Value this node from cache or directly from connected ua server
        Returns:
        a datavalue object with the attribute Value
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • readDataType

        public com.plccom.opc.ua.builtintypes.DataValue readDataType()
                                                              throws com.plccom.opc.ua.common.ServiceFaultException,
                                                                     com.plccom.opc.ua.common.ServiceResultException
        Reads the complete datavalue of attribute DataType this node from cache or directly from connected ua server
        Returns:
        a datavalue object with the attribute DataType
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • readValueRank

        public com.plccom.opc.ua.builtintypes.DataValue readValueRank()
                                                               throws com.plccom.opc.ua.common.ServiceFaultException,
                                                                      com.plccom.opc.ua.common.ServiceResultException
        Reads the complete datavalue of attribute ValueRank this node from cache or directly from connected ua server
        Returns:
        a datavalue object with the attribute ValueRank
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • readArrayDimensions

        public com.plccom.opc.ua.builtintypes.DataValue readArrayDimensions()
                                                                     throws com.plccom.opc.ua.common.ServiceFaultException,
                                                                            com.plccom.opc.ua.common.ServiceResultException
        Reads the complete datavalue of attribute ArrayDimensions this node from cache or directly from connected ua server
        Returns:
        a datavalue object with the attribute ArrayDimensions
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • readAccessLevel

        public com.plccom.opc.ua.builtintypes.DataValue readAccessLevel()
                                                                 throws com.plccom.opc.ua.common.ServiceFaultException,
                                                                        com.plccom.opc.ua.common.ServiceResultException
        Reads the complete datavalue of attribute AccessLevel this node from cache or directly from connected ua server
        Returns:
        a datavalue object with the attribute AccessLevel
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • readUserAccessLevel

        public com.plccom.opc.ua.builtintypes.DataValue readUserAccessLevel()
                                                                     throws com.plccom.opc.ua.common.ServiceFaultException,
                                                                            com.plccom.opc.ua.common.ServiceResultException
        Reads the complete datavalue of attribute UserAccessLevel this node from cache or directly from connected ua server
        Returns:
        a datavalue object with the attribute UserAccessLevel
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • readMinimumSamplingInterval

        public com.plccom.opc.ua.builtintypes.DataValue readMinimumSamplingInterval()
                                                                             throws com.plccom.opc.ua.common.ServiceFaultException,
                                                                                    com.plccom.opc.ua.common.ServiceResultException
        Reads the complete datavalue of attribute MinimumSamplingInterval this node from cache or directly from connected ua server
        Returns:
        a datavalue object with the attribute MinimumSamplingInterval
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • readHistorizing

        public com.plccom.opc.ua.builtintypes.DataValue readHistorizing()
                                                                 throws com.plccom.opc.ua.common.ServiceFaultException,
                                                                        com.plccom.opc.ua.common.ServiceResultException
        Reads the complete datavalue of attribute Historizing this node from cache or directly from connected ua server
        Returns:
        a datavalue object with the attribute Historizing
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • writeValue

        public com.plccom.opc.ua.builtintypes.StatusCode writeValue​(com.plccom.opc.ua.builtintypes.DataValue value)
                                                             throws com.plccom.opc.ua.common.ServiceResultException
        Writes the Value attribute
        Parameters:
        value - a datavalue object with informations to write
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • writeDataType

        public com.plccom.opc.ua.builtintypes.StatusCode writeDataType​(com.plccom.opc.ua.builtintypes.DataValue value)
                                                                throws com.plccom.opc.ua.common.ServiceResultException
        Writes the DataType attribute
        Parameters:
        value - a datavalue object with informations to write
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • writeValueRank

        public com.plccom.opc.ua.builtintypes.StatusCode writeValueRank​(com.plccom.opc.ua.builtintypes.DataValue value)
                                                                 throws com.plccom.opc.ua.common.ServiceResultException
        Writes the ValueRank attribute
        Parameters:
        value - a datavalue object with informations to write
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • writeArrayDimensions

        public com.plccom.opc.ua.builtintypes.StatusCode writeArrayDimensions​(com.plccom.opc.ua.builtintypes.DataValue value)
                                                                       throws com.plccom.opc.ua.common.ServiceResultException
        Writes the ArrayDimensions attribute
        Parameters:
        value - a datavalue object with informations to write
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • writeAccessLevel

        public com.plccom.opc.ua.builtintypes.StatusCode writeAccessLevel​(com.plccom.opc.ua.builtintypes.DataValue value)
                                                                   throws com.plccom.opc.ua.common.ServiceResultException
        Writes the AccessLevel attribute
        Parameters:
        value - a datavalue object with informations to write
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • writeUserAccessLevel

        public com.plccom.opc.ua.builtintypes.StatusCode writeUserAccessLevel​(com.plccom.opc.ua.builtintypes.DataValue value)
                                                                       throws com.plccom.opc.ua.common.ServiceResultException
        Writes the UserAccessLevel attribute
        Parameters:
        value - a datavalue object with informations to write
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • writeMinimumSamplingInterval

        public com.plccom.opc.ua.builtintypes.StatusCode writeMinimumSamplingInterval​(com.plccom.opc.ua.builtintypes.DataValue value)
                                                                               throws com.plccom.opc.ua.common.ServiceResultException
        Writes the MinimumSamplingInterval attribute
        Parameters:
        value - a datavalue object with informations to write
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • writeHistorizing

        public com.plccom.opc.ua.builtintypes.StatusCode writeHistorizing​(com.plccom.opc.ua.builtintypes.DataValue value)
                                                                   throws com.plccom.opc.ua.common.ServiceResultException
        Writes the Historizing attribute
        Parameters:
        value - a datavalue object with informations to write
        Returns:
        a StatusCode object with result of actual operation
        Throws:
        com.plccom.opc.ua.common.ServiceResultException - on communication error
      • browseVariableType

        public UaVariableTypeNode browseVariableType()
                                              throws com.plccom.opc.ua.common.ServiceFaultException,
                                                     com.plccom.opc.ua.common.ServiceResultException
        returns the VariableTypeNode object from node
        Returns:
        a UaVariableTypeNode object
        Throws:
        com.plccom.opc.ua.common.ServiceFaultException - on error while executing the operation
        com.plccom.opc.ua.common.ServiceResultException - on communication error