C++ Based OPC UA Client/Server SDK  1.5.5.355
UaObjectServer Class Reference

Management class for the Server object node and its children. More...

#include <uaobjectsserver.h>

Inherits UaObjectBase.

Public Member Functions

 UaObjectServer (const UaString &name, const UaNodeId &nodeId, const UaString &defaultLocaleId)
 construction
 
UaStatus startUp (ServerConfig *pServerConfig, NodeManagerConfig *pNodeManagerConfig)
 Start up the Server object node with its child nodes. More...
 
UaStatus shutDown ()
 Shut down UaObjectServer. More...
 
UaNodeId typeDefinitionId () const
 Get the object type NodeId for the server object. More...
 
OpcUa_Byte eventNotifier () const
 Provides the information if the object can be used to subscribe for events. More...
 
void setEventNotifier (OpcUa_Byte eventNotifier)
 Sets the information if the object can be used to subscribe for events. More...
 
UaNodegetUaNode () const
 Get the UaNode. More...
 
UaStatus setNamespaces (UaStringArray &sNamespaces)
 Set the list of name spaces in the server object. More...
 
UaStatus getNamespaces (UaStringArray &sNamespaces)
 Get list of name spaces. More...
 
void startServerShutDown (OpcUa_Int32 secondsTillShutdown, const UaLocalizedText &shutdownReason)
 Inform the server object about the shutdown of the server. More...
 
void startServerShutDown (OpcUa_Int32 secondsTillShutdown, const UaLocalizedTextArray &shutdownReason)
 Inform the server object about the shutdown of the server. More...
 
void changeServerState (OpcUa_ServerState newState)
 Update the server manager about the change of the server state. More...
 
void changeServiceLevel (OpcUa_Byte serviceLevel, OpcUa_Byte changeMask)
 Update the ServiceLevel property of the Server object. More...
 
OpcUa_Byte serviceLevel () const
 Get the current ServiceLevel value. More...
 
void setEstimatedReturnTime (const UaDateTime &time)
 Set the EstimatedReturnTime property of the Server object. More...
 
OpcUa::HistoryServerCapabilitiesTypegetHistoryServerCapabilities ()
 Get the HistoryServerCapability object to update the capabilities. More...
 
void createServerConfiguration (ServerConfig *pServerConfig)
 Get the ServerConfiguration object. More...
 
- Public Member Functions inherited from UaObjectBase
 UaObjectBase (const UaString &name, const UaNodeId &newNodeId, const UaString &defaultLocaleId)
 construction
 
UaReferenceListsgetUaReferenceLists () const
 Get a ReferenceList where all the Nodes are in. More...
 
virtual UaStatus browse (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References)
 Discover the references of a specified node of a view. More...
 
UaNodeId nodeId () const
 Get the NodeId of the current Node. More...
 
virtual UaQualifiedName browseName () const
 Get the browseName of the current Node. More...
 
virtual UaLocalizedText displayName (Session *pSession) const
 Get the displayName as LocalizedText of the current Node. More...
 
virtual OpcUa_Boolean isDescriptionSupported () const
 Check if Node is DescriptionSupported. More...
 
virtual UaLocalizedText description (Session *pSession) const
 Get the description as LocalizedText of the current Node. More...
 
virtual OpcUa_Boolean isWriteMaskSupported () const
 Check if Node is WriteMaskSupported. More...
 
virtual OpcUa_UInt32 writeMask () const
 Get the writeMask of the current Node. More...
 
virtual OpcUa_Boolean isUserWriteMaskSupported () const
 Check if Node is UserWriteMaskSupported. More...
 
virtual OpcUa_UInt32 userWriteMask (Session *pSession) const
 Check if Node has a userWriteMask. More...
 
UaNodegetUaNode () const
 Get the UaNode interface pointer of this node. More...
 
- Public Member Functions inherited from UaObject
 UaObject ()
 Construction of the UaObject. More...
 
virtual MethodManagergetMethodManager (UaMethod *pMethod) const
 Get the MethodManager interface for a method of this object. More...
 
OpcUa_NodeClass nodeClass () const
 Get the node class of the Node. More...
 
virtual void getAttributeValue (Session *pSession, OpcUa_Int32 attributeId, UaDataValue &uaDataValue)
 Gets the value of an attribute of the Node. More...
 
- Public Member Functions inherited from UaNode
 UaNode ()
 Construction of the UaNode. More...
 
virtual UaNodeId getKey () const
 Get the key of the node used for the hash table. More...
 
virtual UaNodeId modellingRuleId () const
 Get NodeId of the modeling rule for this node. More...
 
virtual UaStatus setAttributeValue (Session *pSession, OpcUa_Int32 attributeId, const UaDataValue &dataValue, OpcUa_Boolean checkWriteMask)
 Sets the value of an attribute of the Node. More...
 
virtual void setUserData (UserDataBase *pUserData)
 Defines the method to set user data handled by a derived class. More...
 
virtual UserDataBasegetUserData () const
 Returns user data provided by a derived class. More...
 
const NodeAccessInfogetAccessInfo () const
 Returns the access info for this node. More...
 
void useAccessInfoFrom (const UaNode *pOther)
 Set the NodeAccessInfo from another node to this node. More...
 
void setAccessInfo (NodeAccessInfo *pAccessInfo)
 Set the NodeAccessInfo for this node. More...
 
void attachAccessInfo (NodeAccessInfo *pAccessInfo)
 Set the NodeAccessInfo for this node. More...
 
- Public Member Functions inherited from ChainEntry
 ChainEntry ()
 construction
 
ChainEntryfind (const UaNodeId &key, ChainEntry **ppPrevious)
 finds the right entry in the chain. More...
 
void add (ChainEntry *pNewEntry)
 adds a new entry to the list. More...
 
void prepend (ChainEntry *pNewEntry)
 prepends a new entry to the list. More...
 
ChainEntryremove (const UaNodeId &key, ChainEntry **ppNext)
 removes an entry from the list. More...
 
ChainEntrygetNext () const
 Check if there is a chain. More...
 
virtual void setInvalid ()
 Set the entry to invalid. More...
 
void clearChain ()
 Clear the chain when the hashtable is cleared.
 
- Public Member Functions inherited from ReferenceCounter
 ReferenceCounter ()
 construction
 
virtual ~ReferenceCounter ()
 destruction
 
- Public Member Functions inherited from UaReferenceLists
 UaReferenceLists ()
 Constructs the reference lists object.
 
virtual ~UaReferenceLists ()
 Destroys the reference lists object.
 
virtual UaStatus browseReferences (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References)
 Discover the references of a specified node of a view. More...
 
virtual UaStatus translateBrowsePathToNodeId (const ServiceContext &serviceContext, const UaNodeId &startingNode, UaRelativePath &relativePath, UaBrowsePathTargets &browsePathTargets)
 Find a node based on an element of an relative path. More...
 
virtual const UaReferencepTargetNodes () const
 Returns the list of references to target nodes. More...
 
virtual const UaReferencepSourceNodes () const
 Returns the list of references to source nodes. More...
 
virtual UaNodegetTargetNodeByBrowseName (const UaQualifiedName &browseName) const
 Searches a target node with the passed browse name and returns the UaNode interface if found. More...
 
virtual void addTargetNode (UaReference *pReference)
 Add a reference to a target node where this node is the source node. More...
 
virtual void addSourceNode (UaReference *pReference)
 Adds a reference to a source node where this node is the target node. More...
 
virtual UaStatus removeSourceNode (UaReference *pReferenceToRemove)
 Remove a reference to a source node where this node is the target node. More...
 
virtual bool removeSourceReference (UaReference *pReferenceToRemove)
 Remove the passed reference to a source node. More...
 
virtual UaStatus removeTargetNode (UaNode *pTargetNode, const UaNodeId &referenceTypeId, OpcUa_Boolean deleteBidirectional)
 Remove a reference to a target node where this node is the source node. More...
 
virtual UaStatus removeTargetNode (const UaNodeId &targetNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean deleteBidirectional)
 Remove a reference to a target node where this node is the source node. More...
 
virtual bool removeTargetReference (UaReference *pReferenceToRemove)
 Remove the passed reference to a target node. More...
 
virtual UaStatus removeCrossNodeManagerRef (NodeManager *pNodeManager)
 Remove references to another NodeManager. More...
 
virtual UaStatus invalidateSourceReferences (OpcUa_Boolean deleteSourceReferences)
 Set all references from SourceNodes to this Node invalid. More...
 
virtual UaStatus invalidateTargetReferences (OpcUa_Boolean deleteTargetReferences)
 Set all references to TargetNode of this node invalid. More...
 
virtual UaStatus deleteAllChildren (NodeManagerConfig *pNodeManagerConfig)
 Deletes all child nodes. More...
 

Static Public Member Functions

static void createTypes ()
 Create the related type nodes.
 
static void clearStaticMembers ()
 Clear the static members of the class.
 

Protected Member Functions

virtual ~UaObjectServer ()
 destruction
 
- Protected Member Functions inherited from UaObjectBase
virtual ~UaObjectBase ()
 destruction
 
- Protected Member Functions inherited from UaObject
virtual ~UaObject ()
 Destruction of the UaObject. More...
 
- Protected Member Functions inherited from UaNode
virtual ~UaNode ()
 Destruction of the UaNode. More...
 
- Protected Member Functions inherited from ChainEntry
virtual ~ChainEntry ()
 destruction
 

Additional Inherited Members

- Protected Attributes inherited from UaObjectBase
UaString m_defaultLocaleId
 Default localeId for the object. More...
 
- Protected Attributes inherited from UaReferenceLists
UaReferencem_pTargetNodes
 List of references to target nodes where this node is the source node. More...
 
UaReferencem_pLastTargetNode
 Last references in the list of references to the target nodes. More...
 
UaReferencem_pSourceNodes
 List of references to source nodes where this node is the target node. More...
 

Detailed Description

Management class for the Server object node and its children.

This class represents the Server object with the children for namespace array, server status server diagnostics and server capability nodes.

Member Function Documentation

void UaObjectServer::changeServerState ( OpcUa_ServerState  newState)

Update the server manager about the change of the server state.

Parameters
newStateNew server status.
void UaObjectServer::changeServiceLevel ( OpcUa_Byte  serviceLevel,
OpcUa_Byte  changeMask 
)

Update the ServiceLevel property of the Server object.

Parameters
serviceLevelThe new service level to set.
changeMaskA mask indicating which bits of the service level should be set. If a bit is set to 1, the according bit of serviceLevel is set in the server's serviceLevel. If a bit is set to 0, the according bit in the server's serviceLevel will remain untouched.
void UaObjectServer::createServerConfiguration ( ServerConfig pServerConfig)

Get the ServerConfiguration object.

Returns
Returns the ServerConfiguration object or NULL in the case of an error
OpcUa_Byte UaObjectServer::eventNotifier ( ) const
virtual

Provides the information if the object can be used to subscribe for events.

Returns
the EventNotifier attribute value for the UaObjectServer.

Implements UaObject.

OpcUa::HistoryServerCapabilitiesType * UaObjectServer::getHistoryServerCapabilities ( )

Get the HistoryServerCapability object to update the capabilities.

Returns
Returns the HistoryServerCapabilityObject or NULL in the case of an error
UaStatus UaObjectServer::getNamespaces ( UaStringArray sNamespaces)

Get list of name spaces.

Parameters
sNamespacesthe namespace table from the server object.
Returns
Error code
UaNode* UaObjectServer::getUaNode ( ) const
inlinevirtual

Get the UaNode.

Returns
the node owning the reference list.

Implements UaReferenceLists.

OpcUa_Byte UaObjectServer::serviceLevel ( ) const

Get the current ServiceLevel value.

Returns
The current ServiceLevel of the server.
void UaObjectServer::setEstimatedReturnTime ( const UaDateTime time)

Set the EstimatedReturnTime property of the Server object.

Creates the optional property if it does not exist

Parameters
timeThe expected return time of the server after a shut down.
void UaObjectServer::setEventNotifier ( OpcUa_Byte  eventNotifier)

Sets the information if the object can be used to subscribe for events.

Parameters
eventNotifierthe new event notifier attribute value
UaStatus UaObjectServer::setNamespaces ( UaStringArray sNamespaces)

Set the list of name spaces in the server object.

Parameters
sNamespacesthe namespace table from the server object.
Returns
Error code
UaStatus UaObjectServer::shutDown ( )

Shut down UaObjectServer.

Returns
Error code
void UaObjectServer::startServerShutDown ( OpcUa_Int32  secondsTillShutdown,
const UaLocalizedText shutdownReason 
)

Inform the server object about the shutdown of the server.

Parameters
[in]secondsTillShutdownSeconds till shutdown of the server
[in]shutdownReasonReason for the shutdown
void UaObjectServer::startServerShutDown ( OpcUa_Int32  secondsTillShutdown,
const UaLocalizedTextArray shutdownReason 
)

Inform the server object about the shutdown of the server.

This is an overload to provide the shutdown reason as a list of localized text in different languages

Parameters
[in]secondsTillShutdownSeconds till shutdown of the server
[in]shutdownReasonReason for the shutdown in different languages
UaStatus UaObjectServer::startUp ( ServerConfig pServerConfig,
NodeManagerConfig pNodeManagerConfig 
)

Start up the Server object node with its child nodes.

Parameters
pServerConfigServer configuration object.
pNodeManagerConfigNodeManager configuration object.
Returns
Error code
UaNodeId UaObjectServer::typeDefinitionId ( ) const
virtual

Get the object type NodeId for the server object.

Returns
the object type NodeId for the server object.

Reimplemented from UaNode.


The documentation for this class was generated from the following files: