UA Server SDK C++ Bundle
1.4.0.258
|
Helper class for loading UANodesSt 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. | |
virtual UaStatus | readXmlFile () |
Reads a NodeSet XML file that match the schema http://opcfoundation.org/UA/2011/03/UANodeSet.xsd. More... | |
virtual UaStatus | startUp (ServerManager *pServerManager) |
virtual UaStatus | shutDown () |
Public Member Functions inherited from UaBase::UaNodesetXmlParser | |
UaNodesetXmlParser (UaXmlDocument *pXmlDoc) | |
Creates and initializes a UaNodesetXmlParser object. | |
virtual | ~UaNodesetXmlParser () |
Destroys the UaNodesetXmlParser object. | |
virtual UaString | readNamespaceUri () |
Protected Member Functions | |
virtual OpcUa_StatusCode | readUris () |
Protected Member Functions inherited from UaBase::UaNodesetXmlParser | |
virtual OpcUa_StatusCode | readUris () |
void | readAliases () |
virtual UaStatus | parseVariable (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
virtual UaStatus | parseObject (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
virtual UaStatus | parseMethod (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
virtual UaStatus | parseDataType (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
virtual UaStatus | parseReferenceType (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
virtual UaStatus | parseObjectType (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
virtual UaStatus | parseVariableType (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
virtual UaStatus | parseView (std::map< UaNodeId, UaBase::BaseNode * > &rMapNodes) |
virtual UaStatus | parseReferences (UaBase::BaseNode *pBaseNode) |
virtual UaStatus | parseExtensions (UaBase::BaseNode *pBaseNode) |
UaNodeId | parseNodeId (const UaUniString &sNodeId) const |
UaQualifiedName | parseQualifiedName (const UaUniString &sQualifiedName) const |
Parses the sQualifiedName, the current node has no effect. | |
UaLocalizedText | parseLocalizedText () const |
Current node is the node which contains the localized text. | |
void | parseBooleanAttribute (const char *szAttributeName, OpcUa_Boolean bDefaultValue, OpcUa_Boolean &rbValue) |
looks for an attribute of the current node. | |
void | parseByteAttribute (const char *szAttributeName, OpcUa_Byte defaultValue, OpcUa_Byte &rbValue) |
void | parseInt32Attribute (const char *szAttributeName, OpcUa_Int32 defaultValue, OpcUa_Int32 &rbValue) |
void | parseNodeIdAttribute (const char *szAttributeName, const UaNodeId &defaultValue, UaNodeId &rbValue) |
void | parseDoubleAttribute (const char *szAttributeName, OpcUa_Double defaultValue, OpcUa_Double &rbValue) |
UaVariant | parseValue () |
void | parseTypesValue (UaVariant &rValue) |
OpcUa_Boolean | getBooleanValue () const |
OpcUa_Byte | getByteValue () const |
UaByteString | getByteStringValue () const |
OpcUa_Double | getDoubleValue () const |
UaExtensionObject | getExtensionObjectValue () |
OpcUa_Float | getFloatValue () const |
UaGuid | getGuidValue () const |
OpcUa_Int16 | getInt16Value () const |
OpcUa_Int32 | getInt32Value () const |
OpcUa_Int64 | getInt64Value () const |
UaLocalizedText | getLocalizedTextValue () const |
UaNodeId | getNodeIdValue () const |
UaQualifiedName | getQualifiedNameValue () const |
UaString | getStringValue () const |
OpcUa_SByte | getSByteValue () const |
OpcUa_UInt16 | getUInt16Value () const |
OpcUa_UInt32 | getUInt32Value () const |
OpcUa_UInt64 | getUInt64Value () const |
void | getBoolArray (UaBooleanArray &ret) |
void | getByteArray (UaByteArray &ret) |
void | getByteStringArray (UaByteStringArray &ret) |
void | getDoubleArray (UaDoubleArray &ret) |
void | getFloatArray (UaFloatArray &ret) |
void | getGuidArray (UaGuidArray &ret) |
void | getInt16Array (UaInt16Array &ret) |
void | getInt32Array (UaInt32Array &ret) |
void | getInt64Array (UaInt64Array &ret) |
void | getLocalizedTextArray (UaLocalizedTextArray &ret) |
void | getNodeIdArray (UaNodeIdArray &ret) |
void | getQualifiedNameArray (UaQualifiedNameArray &ret) |
void | getStringArray (UaStringArray &ret) |
void | getSByteArray (UaSByteArray &ret) |
void | getUInt16Array (UaUInt16Array &ret) |
void | getUInt32Array (UaUInt32Array &ret) |
void | getUInt64Array (UaUInt64Array &ret) |
void | getExtensionObjectArray (UaExtensionObjectArray &ret) |
UaArgument | getArgumentValue () |
UaEnumValueType | getEnumValueTypeValue () |
UaEUInformation | getEUInformationValue () |
UaRange | getRangeValue () |
void | parseNode (UaNodeId &rNodeId, UaQualifiedName &rBrowseName, UaLocalizedText &rDisplayName, UaLocalizedText &rDescription, OpcUa_UInt32 &riWriteMask, OpcUa_UInt32 &riUserWriteMask) |
void | parseReference (const UaXmlElementListIterator &it, UaNodeId &rReferenceTypeId, bool &rbIsForward, UaNodeId &rTargetNodeId) |
void | parseExtension (UaString &rsName, UaByteString &rbsValue) |
UaNodeId | getReferenceType () |
bool | getReferenceTarget (const UaNodeId &referenceType, bool bIsForward, UaNodeId &targetId) |
Additional Inherited Members | |
Static Protected Member Functions inherited from UaBase::UaNodesetXmlParser | |
static bool | contains (const std::list< UaNodeId > &lstNodeIds, const UaNodeId &nodeId) |
Protected Attributes inherited from UaBase::UaNodesetXmlParser | |
UaXmlDocument * | m_pXmlDocument |
std::map< OpcUa_UInt16, OpcUa_UInt16 > | m_mapNs |
std::map< UaUniString, UaNodeId > | m_mapAliases |
UaBase::BaseNodeFactory | m_standardFactory |
UaBase::BaseNodeFactory * | m_pBaseNodeFactory |
Static Protected Attributes inherited from UaBase::UaNodesetXmlParser | |
static OpcUa_Boolean | s_bDefaultIsAbstract = OpcUa_False |
static OpcUa_Boolean | s_bDefaultHistorizing = OpcUa_False |
static OpcUa_Boolean | s_bDefaultSymmetric = OpcUa_False |
static OpcUa_Boolean | s_bDefaultExecutable = OpcUa_True |
static OpcUa_Boolean | s_bDefaultUserExecutable = OpcUa_True |
static OpcUa_Boolean | s_bDefaultContainsNoLoops = OpcUa_False |
static OpcUa_Byte | s_byDefaultEventNotifier = 0 |
static UaNodeId | s_idDefaultDataType = OpcUaId_BaseDataType |
static OpcUa_Int32 | s_iDefaultValueRank = -1 |
static OpcUa_Byte | s_byDefaultAccessLevel = OpcUa_AccessLevels_CurrentRead |
static OpcUa_Byte | s_byDefaultUserAccessLevel = OpcUa_AccessLevels_CurrentRead |
static OpcUa_Double | s_dDefaultMinimumSamplingInterval = 0.0 |
Helper class for loading UANodesSt 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 start up 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 and 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 |
Reads a NodeSet XML file that match 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.