CVBpy 14.0
StringNode Class Reference

Represents an OPCUA variable node that contains a string value. More...

Inherits VariableNode.

Public Member Functions

None create (int namespace_index, str name, cvb.opcua.NodeID parent_node_id, str value)
 Creates an OPCUA string variable node. More...
 
None set_value (self, str value)
 Sets value of this node. More...
 
str value (self)
 Returns value of this node. More...
 
- Public Member Functions inherited from VariableNode
None deregister_callback (self, cvb.EventCookie event_cookie)
 Deregisters a callback. More...
 
cvb.EventCookie register_read_callback (self, Callable[[], None] callback)
 Registers a callback for the read operations on this node. More...
 
cvb.EventCookie register_write_callback (self, Callable[[], None] callback)
 Registers a callback for the write operations on this node. More...
 
- Public Member Functions inherited from BaseNode
List[cvb.opcua.NodeIDbrowse (self, cvb.opcua.BrowseFilter filter_options)
 Enumerates the child nodes present in the OPCUA server. More...
 
Union[int, float, str] get_attribute (self, int attribute_id)
 Gets specific information about this node. More...
 
cvb.opcua.NodeID node_id (self)
 Gets the OPCUA node ID of this node. More...
 
None set_attribute (self, int attribute_id, Union[int, float, str] value)
 Sets specific information about this node. More...
 

Additional Inherited Members

- Properties inherited from VariableNode
 datatype = property
 int: Gets the data type of this node (see cvb.opcua.DataType).
 
- Properties inherited from BaseNode
 access = property
 int: Gets access rights to this node (see cvb.opcua.Access).
 
 browse_name = property
 str: Gets the browse name of this node.
 
 connection_status = property
 int: Gets connection status of this node (see cvb.opcua.ConnectionStatus).
 
 description = property
 str: Gets description of this node.
 
 display_name = property
 str: Gets the human-readable name of this node.
 
 node_class = property
 int: Gets OPCUA node class of this node (see cvb.opcua.NodeClass).
 

Detailed Description

Represents an OPCUA variable node that contains a string value.

It provides an interface for storage and manipulation of strings.

Member Function Documentation

◆ create()

None create ( int  namespace_index,
str  name,
cvb.opcua.NodeID  parent_node_id,
str  value 
)

Creates an OPCUA string variable node.

You must add this node to a server before most operations are possible. The OPCUA BaseNode which is created by this method has the default type definition cvb.opcua.Namespace0NodeID.BASEVARIABLETYPE (see cvb.opcua.Namespace0NodeID). Further, the default reference type is cvb.opcua.ReferenceType.HasComponent (see cvb.opcua.ReferenceType). Callbacks can be registered once the node has been added with the cvb.opcua.Server.add_node method to the server with the cvb.opcua.VariableNode.register_write_callback method or the cvb.opcua.VariableNode.register_write_callback method.

Parameters

namespace_index : int Index of the name space where the OPCUA node should belong to.

name : str String literal for the non-localized, human-readable name of the node.

parent_node_id : cvb.opcua.NodeID OPCUA node ID of the parent node.

value : str Initial value of the node.

◆ set_value()

None set_value (   self,
str  value 
)

Sets value of this node.

Parameters

value : str New value.

◆ value()

str value (   self)

Returns value of this node.

Returns

str The value of this node.