UA Server SDK C++ Bundle
1.4.1.271
|
Helper class for loading UANodeSet XML files and managing the required NodeManagers. More...
#include <nodemanagernodesetxml.h>
Inherits UaBase::UaNodesetXmlParser, and UaServerApplicationModule.
Public Member Functions | |
UaNodeSetXmlParserUaNode (const UaString &sFilename, NodeManagerNodeSetXmlCreator *pNodeManagerXmlCreator, UaBase::BaseNodeFactory *pBaseNodeFactory, XmlUaNodeFactoryManager *pUaNodeFactory) | |
Constructs a parser for reading UANodeSet XML files. More... | |
virtual | ~UaNodeSetXmlParserUaNode () |
Calls the shutDown() method for each created NodeManger and deletes it. More... | |
virtual UaStatus | readXmlFile () |
Reads a NodeSet XML file that matches the schema http://opcfoundation.org/UA/2011/03/UANodeSet.xsd. More... | |
virtual UaStatus | startUp (ServerManager *pServerManager) |
Imports the specified XML file. More... | |
virtual UaStatus | shutDown () |
Shuts all created NodeManagers down. More... | |
Public Member Functions inherited from UaBase::UaNodesetXmlParser | |
UaNodesetXmlParser (UaXmlDocument *pXmlDoc) | |
Creates and initializes a UaNodesetXmlParser object. More... | |
virtual | ~UaNodesetXmlParser () |
Destroys the UaNodesetXmlParser object. More... | |
virtual UaString | readNamespaceUri () |
Returns the first NamespaceUri of the NamespaceUris node. More... | |
Protected Member Functions | |
virtual OpcUa_StatusCode | readUris () |
Reads the NamespaceUris. More... | |
Protected Member Functions inherited from UaBase::UaNodesetXmlParser | |
void | readAliases () |
Parses the Aliases node. More... | |
virtual UaStatus | parseVariable (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
Parses a node with the tagname "Variable" and adds the resulting UaBase::Variable* to rMapNodes. More... | |
virtual UaStatus | parseObject (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
Parses a node with the tagname "Object" and adds the resulting UaBase::Object* to rMapNodes. More... | |
virtual UaStatus | parseMethod (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
P arses a node with the tagname "Method" and adds the resulting UaBase::Method* to rMapNodes. More... | |
virtual UaStatus | parseDataType (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
Parses a node with the tagname "DataType" and adds the resulting UaBase::DataType* to rMapNodes. More... | |
virtual UaStatus | parseReferenceType (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
Parses a node with the tagname "ReferenceType" and adds the resulting UaBase::ReferenceType* to rMapNodes. More... | |
virtual UaStatus | parseObjectType (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
Parses a node with the tagname "ObjectType" and adds the resulting UaBase::ObjectType* to rMapNodes. More... | |
virtual UaStatus | parseVariableType (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
Parses a node with the tagname "VariableType" and adds the resulting UaBase::VariableType* to rMapNodes. More... | |
virtual UaStatus | parseView (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
Parses a node with the tagname "View" and adds the resulting UaBase::View* to rMapNodes. More... | |
virtual UaStatus | parseReferences (UaBase::BaseNode *pBaseNode) |
Parses a node with tagname "References". More... | |
virtual UaStatus | parseExtensions (UaBase::BaseNode *pBaseNode) |
Parses a node with tagname "Extensions". More... | |
UaNodeId | parseNodeId (const UaUniString &sNodeId) const |
Parses the sNodeId. More... | |
UaQualifiedName | parseQualifiedName (const UaUniString &sQualifiedName) const |
Parses the sQualifiedName. More... | |
UaLocalizedText | parseLocalizedText () const |
Current node is the node which contains the localized text. More... | |
void | parseBooleanAttribute (const char *szAttributeName, OpcUa_Boolean bDefaultValue, OpcUa_Boolean &rbValue) |
Looks for an attribute of the current node. More... | |
void | parseByteAttribute (const char *szAttributeName, OpcUa_Byte defaultValue, OpcUa_Byte &rbValue) |
Parses an attribute of the type OpcUa_Byte. More... | |
void | parseInt32Attribute (const char *szAttributeName, OpcUa_Int32 defaultValue, OpcUa_Int32 &rbValue) |
Parses an attribute of the type OpcUa_Int32. More... | |
void | parseNodeIdAttribute (const char *szAttributeName, const UaNodeId &defaultValue, UaNodeId &rbValue) |
Parses an attribute of the type UaNodeId. More... | |
void | parseDoubleAttribute (const char *szAttributeName, OpcUa_Double defaultValue, OpcUa_Double &rbValue) |
Parses an attribute of the type OpcUa_Double. More... | |
UaVariant | parseValue () |
Parses the Value of a Variable or a VariableType. More... | |
void | parseTypesValue (UaVariant &rValue) |
Parses a node with the tagname "Value". More... | |
OpcUa_Boolean | getBooleanValue () const |
Parses a Boolean value. More... | |
OpcUa_Byte | getByteValue () const |
Parses a value of DataType OpcUa_Byte. More... | |
UaByteString | getByteStringValue () const |
Parses a value of DataType UaByteString. More... | |
OpcUa_Double | getDoubleValue () const |
Parses a value of DataType OpcUa_Double. More... | |
UaExtensionObject | getExtensionObjectValue () |
Parses a value of DataType UaExtensionObject. More... | |
OpcUa_Float | getFloatValue () const |
Parses a value of DataType OpcUa_Float. More... | |
UaGuid | getGuidValue () const |
Parses a value of DataType UaGuid. More... | |
OpcUa_Int16 | getInt16Value () const |
Parses a value of DataType OpcUa_Int16. More... | |
OpcUa_Int32 | getInt32Value () const |
Parses a value of DataType OpcUa_Int32. More... | |
OpcUa_Int64 | getInt64Value () const |
Parses a value of DataType OpcUa_Int64. More... | |
UaLocalizedText | getLocalizedTextValue () const |
Parses a value of DataType UaLocalizedText. More... | |
UaNodeId | getNodeIdValue () const |
Parses a value of DataType UaNodeId. More... | |
UaQualifiedName | getQualifiedNameValue () const |
Parses a value of DataType UaQualifiedName. More... | |
UaString | getStringValue () const |
Parses a value of DataType UaString. More... | |
OpcUa_SByte | getSByteValue () const |
Parses a value of DataType OpcUa_SByte. More... | |
OpcUa_UInt16 | getUInt16Value () const |
Parses a value of DataType OpcUa_UInt16. More... | |
OpcUa_UInt32 | getUInt32Value () const |
Parses a value of DataType OpcUa_UInt32. More... | |
OpcUa_UInt64 | getUInt64Value () const |
Parses a value of DataType OpcUa_UInt64. More... | |
void | getBoolArray (UaBooleanArray &ret) |
Parses a value of DataType UaBoolArray. More... | |
void | getByteArray (UaByteArray &ret) |
Parses a value of DataType UaByteArray. More... | |
void | getByteStringArray (UaByteStringArray &ret) |
Parses a value of DataType UaByteStringArray. More... | |
void | getDoubleArray (UaDoubleArray &ret) |
Parses a value of DataType UaDoubleArray. More... | |
void | getFloatArray (UaFloatArray &ret) |
Parses a value of DataType UaFloatArray. More... | |
void | getGuidArray (UaGuidArray &ret) |
Parses a value of DataType UaGuidArray. More... | |
void | getInt16Array (UaInt16Array &ret) |
Parses a value of DataType UaInt16Array. More... | |
void | getInt32Array (UaInt32Array &ret) |
Parses a value of DataType UaInt32Array. More... | |
void | getInt64Array (UaInt64Array &ret) |
Parses a value of DataType UaInt64Array. More... | |
void | getLocalizedTextArray (UaLocalizedTextArray &ret) |
Parses a value of DataType UaLocalizedTextArray. More... | |
void | getNodeIdArray (UaNodeIdArray &ret) |
Parses a value of DataType UaNodeIdArray. More... | |
void | getQualifiedNameArray (UaQualifiedNameArray &ret) |
Parses a value of DataType UaQualifiedNameArray. More... | |
void | getStringArray (UaStringArray &ret) |
Parses a value of DataType UaStringArray. More... | |
void | getSByteArray (UaSByteArray &ret) |
Parses a value of DataType UaSByteArray. More... | |
void | getUInt16Array (UaUInt16Array &ret) |
Parses a value of DataType UaUInt16Array. More... | |
void | getUInt32Array (UaUInt32Array &ret) |
Parses a value of DataType UaUInt32Array. More... | |
void | getUInt64Array (UaUInt64Array &ret) |
Parses a value of DataType UaUInt64Array. More... | |
void | getExtensionObjectArray (UaExtensionObjectArray &ret) |
Parses a value of DataType UaExtensionObjectArray. More... | |
UaArgument | getArgumentValue () |
Parses a value of DataType UaArgument. More... | |
UaEnumValueType | getEnumValueTypeValue () |
Parses a value of DataType UaEnumValueType. More... | |
UaEUInformation | getEUInformationValue () |
Parses a value of DataType UaEUInformation. More... | |
UaRange | getRangeValue () |
Parses a value of DataType UaRange. More... | |
void | parseNode (UaNodeId &rNodeId, UaQualifiedName &rBrowseName, UaLocalizedText &rDisplayName, UaLocalizedText &rDescription, OpcUa_UInt32 &riWriteMask, OpcUa_UInt32 &riUserWriteMask) |
Parses the standard attributes for each NodeClass. More... | |
void | parseReference (const UaXmlElementListIterator &it, UaNodeId &rReferenceTypeId, bool &rbIsForward, UaNodeId &rTargetNodeId) |
Parses a reference of a node. More... | |
void | parseExtension (UaString &rsName, UaByteString &rbsValue) |
Parses a Extension for a node. More... | |
bool | getReferenceTarget (const UaNodeId &referenceType, bool bIsForward, UaNodeId &targetId) |
Tries to find a reference with the specified referenceType. More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from UaBase::UaNodesetXmlParser | |
static bool | contains (const std::list< UaNodeId > &lstNodeIds, const UaNodeId &nodeId) |
Checks if nodeId is in lstNodeIds. More... | |
Helper class for loading UANodeSet XML files and managing the required NodeManagers.
The parser can read UANodeSet XML files that match the schema http://opcfoundation.org/UA/2011/03/UANodeSet.xsd.
This class implements the UaServerApplicationModule interface which allows to plug in the parsing and NodeManager startup into the normal startup process handled by the UaServerApplication class and the OpcServer class derived from it.
UaNodeSetXmlParserUaNode::UaNodeSetXmlParserUaNode | ( | const UaString & | sFilename, |
NodeManagerNodeSetXmlCreator * | pNodeManagerXmlCreator, | ||
UaBase::BaseNodeFactory * | pBaseNodeFactory, | ||
XmlUaNodeFactoryManager * | pUaNodeFactory | ||
) |
Constructs a parser for reading UANodeSet XML files.
The parser stores the nodes and references in an internal format based on UaBase::BaseNode and derived classes, uses them to create UaNodes and adds them to the NodeManagers.
sFilename | The filename of the UANodeSet XML file to import. |
pNodeManagerXmlCreator | The factory to create the NodeManagers for the new NamespaceUris declared in the XML document. If NULL, a standard creator is used. |
pUaNodeFactory | The XmlUaNodeFactoryManager to create UaNodes to be added to the NodeManager. You can add your own factories of the type XmlUaNodeFactoryNamespace to this manager to instantiate your own UaNode implementation classes. If NULL, a standard factory is used. |
pBaseNodeFactory | The factory to create the UaBase::BaseNode in the internal format. You can use a subtype of UaBase::BaseNodeFactory to implement your own logic of creating UserData from the XML Extensions. If NULL, a standard factory is used. |
|
virtual |
Calls the shutDown() method for each created NodeManger and deletes it.
|
protectedvirtual |
Reads the NamespaceUris.
Creates NodeManagers for each unknown NamespaceUri using the NodeManagerNodeSetXmlCreator.
Reimplemented from UaBase::UaNodesetXmlParser.
|
virtual |
Reads a NodeSet XML file that matches the schema http://opcfoundation.org/UA/2011/03/UANodeSet.xsd.
For each NamespaceUri that is declared in sFile but is not known by the Server, a new NodeManager is created. The parser stores the nodes and references in an internal format and uses them to create instances of the Type classes.
|
virtual |
Shuts all created NodeManagers down.
Implements UaServerApplicationModule.
|
virtual |