diff --git a/README.md b/README.md index 7dcc76ea..8a866ce9 100644 --- a/README.md +++ b/README.md @@ -121,8 +121,9 @@ docker build . C++ style * 2 spaces not tab * CamelCase -* local variables start with small letter -* gobal/member variables starts with capital letters. +* Local variables start with small letter +* Global/member variables starts with capital letters +* Use provided automatic formatter ([Artistic Style](http://astyle.sourceforge.net)) by invoking ``./restyle`` python code and API should follows PEP8 (many places should be fixed) diff --git a/astylerc b/astylerc new file mode 100644 index 00000000..805e62c1 --- /dev/null +++ b/astylerc @@ -0,0 +1,13 @@ +--break-blocks +--break-blocks=all +--add-brackets +--add-one-line-brackets +--suffix=none +--indent=spaces=2 +--convert-tabs +-A7 +--align-pointer=middle +--align-reference=middle +--pad-header +--pad-oper +--unpad-paren diff --git a/include/opc/common/addons_core/addon.h b/include/opc/common/addons_core/addon.h index 672c9056..48f64e71 100644 --- a/include/opc/common/addons_core/addon.h +++ b/include/opc/common/addons_core/addon.h @@ -19,32 +19,32 @@ namespace Common { - class Addon : private Common::Interface - { - public: - DEFINE_CLASS_POINTERS(Addon) - - public: - /// @brief initialize addon. - /// @note Calls when all addons dependencies resolved. - /// suppose that addon fully ready for work. - virtual void Initialize(AddonsManager& manager, const AddonParameters& parameters) = 0; - - /// @brief Stopping addon work. - /// After calling this method addon should throw exception on any calls. - virtual void Stop() = 0; - }; - - // @brief factory of addon. - class AddonFactory : private Common::Interface - { - public: - DEFINE_CLASS_POINTERS(AddonFactory) - - public: - /// @brief Create instance of addon. - virtual Addon::UniquePtr CreateAddon() = 0; - }; +class Addon : private Common::Interface +{ +public: + DEFINE_CLASS_POINTERS(Addon) + +public: + /// @brief initialize addon. + /// @note Calls when all addons dependencies resolved. + /// suppose that addon fully ready for work. + virtual void Initialize(AddonsManager & manager, const AddonParameters & parameters) = 0; + + /// @brief Stopping addon work. + /// After calling this method addon should throw exception on any calls. + virtual void Stop() = 0; +}; + +// @brief factory of addon. +class AddonFactory : private Common::Interface +{ +public: + DEFINE_CLASS_POINTERS(AddonFactory) + +public: + /// @brief Create instance of addon. + virtual Addon::UniquePtr CreateAddon() = 0; +}; } // namespace Common diff --git a/include/opc/common/addons_core/addon_manager.h b/include/opc/common/addons_core/addon_manager.h index 9b3a2ac2..5dd76ef0 100644 --- a/include/opc/common/addons_core/addon_manager.h +++ b/include/opc/common/addons_core/addon_manager.h @@ -20,89 +20,89 @@ namespace Common { - typedef std::string AddonId; +typedef std::string AddonId; - class Addon; - class AddonFactory; +class Addon; +class AddonFactory; - struct AddonInformation - { - AddonId Id; - std::shared_ptr Factory; - std::vector Dependencies; - AddonParameters Parameters; - }; +struct AddonInformation +{ + AddonId Id; + std::shared_ptr Factory; + std::vector Dependencies; + AddonParameters Parameters; +}; - class AddonsManager : private Interface +class AddonsManager : private Interface +{ +public: + DEFINE_CLASS_POINTERS(AddonsManager) + +public: + /// @brief register new addon. + /// @param addonConfiguration configuration of new addon. + /// @throws if addon already redistered. If manager started thows if not all dependencies resolved. + /// If manager already started addon will be immediately created and initialized. + virtual void Register(const AddonInformation & caddonConfiguration) = 0; + + /// @brief unregister addon + /// @param id id of unregistering addon + /// @throws if addon not found + /// For unregistering addon will be called method Addon::Stop() and addon data will be removed. + virtual void Unregister(const AddonId & id) = 0; + + /// @brief getting addon by id + /// @param id id of the required addon + /// @return addon instance + /// @throws if addon is not registered or not initialized yet. + + virtual std::shared_ptr GetAddon(const AddonId & id) const = 0; + + virtual std::shared_ptr GetAddon(const char id[]) const { - public: - DEFINE_CLASS_POINTERS(AddonsManager) - - public: - /// @brief register new addon. - /// @param addonConfiguration configuration of new addon. - /// @throws if addon already redistered. If manager started thows if not all dependencies resolved. - /// If manager already started addon will be immediately created and initialized. - virtual void Register(const AddonInformation& caddonConfiguration) = 0; - - /// @brief unregister addon - /// @param id id of unregistering addon - /// @throws if addon not found - /// For unregistering addon will be called method Addon::Stop() and addon data will be removed. - virtual void Unregister(const AddonId& id) = 0; - - /// @brief getting addon by id - /// @param id id of the required addon - /// @return addon instance - /// @throws if addon is not registered or not initialized yet. - - virtual std::shared_ptr GetAddon(const AddonId& id) const = 0; - - virtual std::shared_ptr GetAddon(const char id[]) const - { - return GetAddon(AddonId(id)); - } - - /// @brief Get instance of addon - /// @return instance of addon casted to specified type - /// @throws if unable to cast addon, unable to find addon, or in casr of error - template - typename std::shared_ptr GetAddon(const AddonId& id) const; + return GetAddon(AddonId(id)); + } + + /// @brief Get instance of addon + /// @return instance of addon casted to specified type + /// @throws if unable to cast addon, unable to find addon, or in casr of error + template + typename std::shared_ptr GetAddon(const AddonId & id) const; // template // typename std::shared_ptr GetAddon(const char* id) const; - template - typename std::shared_ptr GetAddon(const char id[]) const; + template + typename std::shared_ptr GetAddon(const char id[]) const; - /// @brief starting work. - /// creates all addons and initializes them. - /// @throws if not all addons dependencies can be resolved. - virtual void Start(/*const AddonsConfiguration& config*/) = 0; + /// @brief starting work. + /// creates all addons and initializes them. + /// @throws if not all addons dependencies can be resolved. + virtual void Start(/*const AddonsConfiguration& config*/) = 0; - // @brief Stopping all addons; - virtual void Stop() = 0; - }; + // @brief Stopping all addons; + virtual void Stop() = 0; +}; - /// @brief Get instance of addons core - /// @throws in case of error - /// @note Only one instance of addons manager can be at one time. - /// When all smart pointers are gone addons manager deletes. - AddonsManager::UniquePtr CreateAddonsManager(); +/// @brief Get instance of addons core +/// @throws in case of error +/// @note Only one instance of addons manager can be at one time. +/// When all smart pointers are gone addons manager deletes. +AddonsManager::UniquePtr CreateAddonsManager(); - template - typename std::shared_ptr AddonsManager::GetAddon(const AddonId& id) const - { - return std::dynamic_pointer_cast(GetAddon(id)); - } +template +typename std::shared_ptr AddonsManager::GetAddon(const AddonId & id) const +{ + return std::dynamic_pointer_cast(GetAddon(id)); +} - template - typename std::shared_ptr AddonsManager::GetAddon(const char id[]) const - { - return std::dynamic_pointer_cast(GetAddon(AddonId(id))); - } +template +typename std::shared_ptr AddonsManager::GetAddon(const char id[]) const +{ + return std::dynamic_pointer_cast(GetAddon(AddonId(id))); +} } // namespace Common diff --git a/include/opc/common/addons_core/addon_parameters.h b/include/opc/common/addons_core/addon_parameters.h index d08393c4..49155310 100644 --- a/include/opc/common/addons_core/addon_parameters.h +++ b/include/opc/common/addons_core/addon_parameters.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -18,44 +18,44 @@ namespace Common { - struct Parameter +struct Parameter +{ + std::string Name; + std::string Value; + + Parameter() { - std::string Name; - std::string Value; + } - Parameter() - { - } + Parameter(const std::string & name, const std::string & value) + : Name(name) + , Value(value) + { + } +}; - Parameter(const std::string& name, const std::string& value) - : Name(name) - , Value(value) - { - } - }; +struct ParametersGroup +{ + std::string Name; + std::vector Parameters; + std::vector Groups; - struct ParametersGroup + ParametersGroup() { - std::string Name; - std::vector Parameters; - std::vector Groups; + } - ParametersGroup() - { - } - - ParametersGroup(const std::string& name) - : Name(name) - { - } - }; + ParametersGroup(const std::string & name) + : Name(name) + { + } +}; - struct AddonParameters - { - std::vector Groups; - std::vector Parameters; - }; +struct AddonParameters +{ + std::vector Groups; + std::vector Parameters; +}; } diff --git a/include/opc/common/addons_core/config_file.h b/include/opc/common/addons_core/config_file.h index 55b450cd..2725089d 100644 --- a/include/opc/common/addons_core/config_file.h +++ b/include/opc/common/addons_core/config_file.h @@ -16,28 +16,28 @@ namespace Common { - struct ModuleConfiguration - { - AddonId Id; - std::vector Dependencies; - std::string Path; - AddonParameters Parameters; - }; +struct ModuleConfiguration +{ + AddonId Id; + std::vector Dependencies; + std::string Path; + AddonParameters Parameters; +}; - typedef std::vector ModulesConfiguration; +typedef std::vector ModulesConfiguration; - struct Configuration - { - Common::AddonParameters Parameters; - std::vector Modules; - }; +struct Configuration +{ + Common::AddonParameters Parameters; + std::vector Modules; +}; - Common::AddonInformation GetAddonInfomation(const ModuleConfiguration& config); +Common::AddonInformation GetAddonInfomation(const ModuleConfiguration & config); - Configuration ParseConfiguration(const std::string& configPath); - void SaveConfiguration(const ModulesConfiguration& configuration, const std::string& configPath); +Configuration ParseConfiguration(const std::string & configPath); +void SaveConfiguration(const ModulesConfiguration & configuration, const std::string & configPath); - Configuration ParseConfigurationFiles(const std::string& directory); +Configuration ParseConfigurationFiles(const std::string & directory); } diff --git a/include/opc/common/addons_core/dynamic_addon.h b/include/opc/common/addons_core/dynamic_addon.h index 6719d846..2b5c868f 100644 --- a/include/opc/common/addons_core/dynamic_addon.h +++ b/include/opc/common/addons_core/dynamic_addon.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -13,9 +13,9 @@ #include -extern "C" Common::Addon* CreateAddon(); +extern "C" Common::Addon * CreateAddon(); -typedef Common::Addon* (*CreateAddonFunc)(); +typedef Common::Addon * (*CreateAddonFunc)(); #endif // OPC_CORE_DYNAMIC_ADDON_H diff --git a/include/opc/common/addons_core/dynamic_addon_factory.h b/include/opc/common/addons_core/dynamic_addon_factory.h index e1552029..5f2794a4 100644 --- a/include/opc/common/addons_core/dynamic_addon_factory.h +++ b/include/opc/common/addons_core/dynamic_addon_factory.h @@ -17,12 +17,12 @@ namespace Common { - AddonFactory::UniquePtr CreateDynamicAddonFactory(const char* modulePath); +AddonFactory::UniquePtr CreateDynamicAddonFactory(const char * modulePath); - inline AddonFactory::UniquePtr CreateDynamicAddonFactory(const std::string& modulePath) - { - return ::Common::CreateDynamicAddonFactory(modulePath.c_str()); - } +inline AddonFactory::UniquePtr CreateDynamicAddonFactory(const std::string & modulePath) +{ + return ::Common::CreateDynamicAddonFactory(modulePath.c_str()); +} } diff --git a/include/opc/common/addons_core/errors.h b/include/opc/common/addons_core/errors.h index e9530f6b..c6098111 100644 --- a/include/opc/common/addons_core/errors.h +++ b/include/opc/common/addons_core/errors.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// diff --git a/include/opc/common/errors.h b/include/opc/common/errors.h index 6b5ecb8f..1b89eb4b 100644 --- a/include/opc/common/errors.h +++ b/include/opc/common/errors.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// diff --git a/include/opc/common/exception.h b/include/opc/common/exception.h index 33550be3..2c5db253 100644 --- a/include/opc/common/exception.h +++ b/include/opc/common/exception.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -21,181 +21,181 @@ namespace Common { - struct ErrorData - { - unsigned ErrorCode; - const char* ErrorMessage; - - ErrorData() - : ErrorCode(0) - , ErrorMessage(NULL) - { - } - - ErrorData(unsigned code, const char* msg) - : ErrorCode(code) - , ErrorMessage(msg) - { - } - }; - - class Error : public std::exception - { - public: - Error(); - explicit Error(unsigned lineNum, const char* fileName, unsigned errorCode, const char* msg); - virtual ~Error() throw(); - - unsigned GetLineNum() const; - std::string GetFileName() const; - unsigned GetCode() const; - std::string GetMessage() const; - std::string GetFullMessage() const; - - Error& AddError(const Error& subError); - - public: // std::exception - virtual const char* what() const throw(); - - private: - unsigned LineNum; - std::string FileName; - unsigned Code; - std::string Message; - mutable std::string FullMessage; - std::vector SubErrors; - }; - - - inline Error CreateError( - unsigned lineNum, - const char* filename, - unsigned errorCode, - const char* msg) - { - return Common::Error(lineNum, filename, errorCode, msg); - } +struct ErrorData +{ + unsigned ErrorCode; + const char * ErrorMessage; - template - inline Error CreateError( - unsigned lineNum, - const char* fileName, - unsigned errorCode, - const char* msg, - const T1& param1) + ErrorData() + : ErrorCode(0) + , ErrorMessage(NULL) { - const std::string& resultMessage = str(boost::format(msg) % param1); - return Error(lineNum, fileName, errorCode, resultMessage.c_str()); } - template - inline Error CreateError( - unsigned lineNum, - const char* fileName, - unsigned errorCode, - const char* msg, - const T1& param1, - const Common::Error& subError) + ErrorData(unsigned code, const char * msg) + : ErrorCode(code) + , ErrorMessage(msg) { - const std::string& resultMessage = str(boost::format(msg) % param1); - Error resultError(lineNum, fileName, errorCode, resultMessage.c_str()); - resultError.AddError(subError); - return resultError; } +}; - template - inline Error CreateError( - unsigned lineNum, - const char* fileName, - unsigned errorCode, - const char* msg, - const T1& param1, - const T2& param2) - { - const std::string& resultMessage = str(boost::format(msg) % param1 % param2); - return Error(lineNum, fileName, errorCode, resultMessage.c_str()); - } +class Error : public std::exception +{ +public: + Error(); + explicit Error(unsigned lineNum, const char * fileName, unsigned errorCode, const char * msg); + virtual ~Error() throw(); + + unsigned GetLineNum() const; + std::string GetFileName() const; + unsigned GetCode() const; + std::string GetMessage() const; + std::string GetFullMessage() const; + + Error & AddError(const Error & subError); + +public: // std::exception + virtual const char * what() const throw(); + +private: + unsigned LineNum; + std::string FileName; + unsigned Code; + std::string Message; + mutable std::string FullMessage; + std::vector SubErrors; +}; + + +inline Error CreateError( + unsigned lineNum, + const char * filename, + unsigned errorCode, + const char * msg) +{ + return Common::Error(lineNum, filename, errorCode, msg); +} +template +inline Error CreateError( + unsigned lineNum, + const char * fileName, + unsigned errorCode, + const char * msg, + const T1 & param1) +{ + const std::string & resultMessage = str(boost::format(msg) % param1); + return Error(lineNum, fileName, errorCode, resultMessage.c_str()); +} - template - inline Error CreateError( - unsigned lineNum, - const char* fileName, - unsigned errorCode, - const char* msg, - const T1& param1, - const T2& param2, - const Common::Error& subError) - { - const std::string& resultMessage = str(boost::format(msg) % param1 % param2); - Error resultError(lineNum, fileName, errorCode, resultMessage.c_str()); - resultError.AddError(subError); - return resultError; - } +template +inline Error CreateError( + unsigned lineNum, + const char * fileName, + unsigned errorCode, + const char * msg, + const T1 & param1, + const Common::Error & subError) +{ + const std::string & resultMessage = str(boost::format(msg) % param1); + Error resultError(lineNum, fileName, errorCode, resultMessage.c_str()); + resultError.AddError(subError); + return resultError; +} - template - inline Error CreateError( - unsigned lineNum, - const char* fileName, - unsigned errorCode, - const char* msg, - const T1& param1, - const T2& param2, - const T3& param3) - { - const std::string& resultMessage = str(boost::format(msg) % param1 % param2 % param3); - return Error(lineNum, fileName, errorCode, resultMessage.c_str()); - } +template +inline Error CreateError( + unsigned lineNum, + const char * fileName, + unsigned errorCode, + const char * msg, + const T1 & param1, + const T2 & param2) +{ + const std::string & resultMessage = str(boost::format(msg) % param1 % param2); + return Error(lineNum, fileName, errorCode, resultMessage.c_str()); +} - template - inline Error CreateError( - unsigned lineNum, - const char* fileName, - unsigned errorCode, - const char* msg, - const T1& param1, - const T2& param2, - const T3& param3, - const Common::Error& subError) - { - const std::string& resultMessage = str(boost::format(msg) % param1 % param2 % param3); - Error resultError(lineNum, fileName, errorCode, resultMessage.c_str()); - resultError.AddError(subError); - return resultError; - } - template - inline Error CreateError( - unsigned lineNum, - const char* fileName, - unsigned errorCode, - const char* msg, - const T1& param1, - const T2& param2, - const T3& param3, - const T4& param4) - { - const std::string& resultMessage = str(boost::format(msg) % param1 % param2 % param3 % param4); - return Error(lineNum, fileName, errorCode, resultMessage.c_str()); - } +template +inline Error CreateError( + unsigned lineNum, + const char * fileName, + unsigned errorCode, + const char * msg, + const T1 & param1, + const T2 & param2, + const Common::Error & subError) +{ + const std::string & resultMessage = str(boost::format(msg) % param1 % param2); + Error resultError(lineNum, fileName, errorCode, resultMessage.c_str()); + resultError.AddError(subError); + return resultError; +} - template - inline Error CreateError( - unsigned lineNum, - const char* fileName, - unsigned errorCode, - const char* msg, - const T1& param1, - const T2& param2, - const T3& param3, - const T4& param4, - const Common::Error& subError) - { - const std::string& resultMessage = str(boost::format(msg) % param1 % param2 % param3 % param4); - Error resultError(lineNum, fileName, errorCode, resultMessage.c_str()); - resultError.AddError(subError); - return resultError; - } +template +inline Error CreateError( + unsigned lineNum, + const char * fileName, + unsigned errorCode, + const char * msg, + const T1 & param1, + const T2 & param2, + const T3 & param3) +{ + const std::string & resultMessage = str(boost::format(msg) % param1 % param2 % param3); + return Error(lineNum, fileName, errorCode, resultMessage.c_str()); +} + +template +inline Error CreateError( + unsigned lineNum, + const char * fileName, + unsigned errorCode, + const char * msg, + const T1 & param1, + const T2 & param2, + const T3 & param3, + const Common::Error & subError) +{ + const std::string & resultMessage = str(boost::format(msg) % param1 % param2 % param3); + Error resultError(lineNum, fileName, errorCode, resultMessage.c_str()); + resultError.AddError(subError); + return resultError; +} + +template +inline Error CreateError( + unsigned lineNum, + const char * fileName, + unsigned errorCode, + const char * msg, + const T1 & param1, + const T2 & param2, + const T3 & param3, + const T4 & param4) +{ + const std::string & resultMessage = str(boost::format(msg) % param1 % param2 % param3 % param4); + return Error(lineNum, fileName, errorCode, resultMessage.c_str()); +} + +template +inline Error CreateError( + unsigned lineNum, + const char * fileName, + unsigned errorCode, + const char * msg, + const T1 & param1, + const T2 & param2, + const T3 & param3, + const T4 & param4, + const Common::Error & subError) +{ + const std::string & resultMessage = str(boost::format(msg) % param1 % param2 % param3 % param4); + Error resultError(lineNum, fileName, errorCode, resultMessage.c_str()); + resultError.AddError(subError); + return resultError; +} } diff --git a/include/opc/common/interface.h b/include/opc/common/interface.h index f8b2ec98..79bc573f 100644 --- a/include/opc/common/interface.h +++ b/include/opc/common/interface.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -14,16 +14,16 @@ namespace Common { - class Interface - { - protected: - Interface(){} +class Interface +{ +protected: + Interface() {} - virtual ~Interface() {} + virtual ~Interface() {} - Interface(const Interface&) = delete; - const Interface& operator=(const Interface&) = delete; - }; + Interface(const Interface &) = delete; + const Interface & operator=(const Interface &) = delete; +}; } diff --git a/include/opc/common/modules.h b/include/opc/common/modules.h index 02175898..7be6d574 100644 --- a/include/opc/common/modules.h +++ b/include/opc/common/modules.h @@ -5,7 +5,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -14,14 +14,14 @@ namespace Common { - enum Modules - { - MODULE_OS = 0, - MODULE_COMMON, - MODULE_ADDONS_MANAGER, - MODULE_OPCUA_CORE, - MODULE_OPCUA_Client, - }; +enum Modules +{ + MODULE_OS = 0, + MODULE_COMMON, + MODULE_ADDONS_MANAGER, + MODULE_OPCUA_CORE, + MODULE_OPCUA_Client, +}; } #endif // __modules_h__f01eb2ae_a824_4dc3_a0f2_bf586d241024 diff --git a/include/opc/common/thread.h b/include/opc/common/thread.h index 3bbe0710..c32e1f93 100644 --- a/include/opc/common/thread.h +++ b/include/opc/common/thread.h @@ -19,52 +19,52 @@ namespace Common { - class ThreadObserver : private Common::Interface - { - public: - /// @brief thread exited with Success. - virtual void OnSuccess() = 0; - /// @brief Thread exited with error. - virtual void OnError(const std::exception& exc) = 0; - }; +class ThreadObserver : private Common::Interface +{ +public: + /// @brief thread exited with Success. + virtual void OnSuccess() = 0; + /// @brief Thread exited with error. + virtual void OnError(const std::exception & exc) = 0; +}; - typedef std::function ThreadProc; +typedef std::function ThreadProc; - class Thread - { - public: - DEFINE_CLASS_POINTERS(Thread) +class Thread +{ +public: + DEFINE_CLASS_POINTERS(Thread) - public: - /// @brief Starts f in a separate thread. - Thread(std::function f, ThreadObserver* observer = 0); +public: + /// @brief Starts f in a separate thread. + Thread(std::function f, ThreadObserver * observer = 0); - static Thread::UniquePtr Create(ThreadProc f, ThreadObserver* observer = 0) - { - return Thread::UniquePtr(new Thread(f, observer)); - } + static Thread::UniquePtr Create(ThreadProc f, ThreadObserver * observer = 0) + { + return Thread::UniquePtr(new Thread(f, observer)); + } - static Thread::UniquePtr Create(void (*f)(), ThreadObserver* observer = 0) - { - Common::ThreadProc proc(f); - return Thread::UniquePtr(new Common::Thread(proc, observer)); - } + static Thread::UniquePtr Create(void (*f)(), ThreadObserver * observer = 0) + { + Common::ThreadProc proc(f); + return Thread::UniquePtr(new Common::Thread(proc, observer)); + } - ~Thread(); - /// @brief Wait until started thread stop. - void Join(); + ~Thread(); + /// @brief Wait until started thread stop. + void Join(); - public: - /// @brief Calls in the separate thread from ThreadProc. - void Run(); - /// @brief static member required for std::thread - static void ThreadProc(Thread* thread); +public: + /// @brief Calls in the separate thread from ThreadProc. + void Run(); + /// @brief static member required for std::thread + static void ThreadProc(Thread * thread); - private: - ThreadObserver* Observer; - Common::ThreadProc Func; - std::thread Impl; - }; +private: + ThreadObserver * Observer; + Common::ThreadProc Func; + std::thread Impl; +}; } // namespace Common diff --git a/include/opc/common/uri_facade.h b/include/opc/common/uri_facade.h index 6d8be7a5..61b98a2a 100644 --- a/include/opc/common/uri_facade.h +++ b/include/opc/common/uri_facade.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -15,54 +15,54 @@ namespace Common { - class Uri +class Uri +{ +public: + explicit Uri(const std::string & uriString) { - public: - explicit Uri(const std::string& uriString) - { - Initialize(uriString.c_str(), uriString.size()); - } + Initialize(uriString.c_str(), uriString.size()); + } - explicit Uri(const char* uriString) - { - Initialize(uriString, 0); - } + explicit Uri(const char * uriString) + { + Initialize(uriString, 0); + } - std::string Scheme() const - { - return SchemeStr; - } + std::string Scheme() const + { + return SchemeStr; + } - std::string User() const - { - return UserStr; - } + std::string User() const + { + return UserStr; + } - std::string Password() const - { - return PasswordStr; - } + std::string Password() const + { + return PasswordStr; + } - std::string Host() const - { - return HostStr; - } + std::string Host() const + { + return HostStr; + } - unsigned Port() const - { - return PortNum; - } + unsigned Port() const + { + return PortNum; + } - private: - void Initialize(const char* uriString, std::size_t len); +private: + void Initialize(const char * uriString, std::size_t len); - private: - std::string SchemeStr; - std::string UserStr; - std::string PasswordStr; - std::string HostStr; - unsigned PortNum; - }; +private: + std::string SchemeStr; + std::string UserStr; + std::string PasswordStr; + std::string HostStr; + unsigned PortNum; +}; } // namespace Common diff --git a/include/opc/ua/client/addon.h b/include/opc/ua/client/addon.h index 50ca129b..05a3fe6e 100644 --- a/include/opc/ua/client/addon.h +++ b/include/opc/ua/client/addon.h @@ -17,16 +17,16 @@ namespace OpcUa { - namespace Client - { - class Addon : public Common::Addon - { - public: - DEFINE_CLASS_POINTERS(Addon) +namespace Client +{ +class Addon : public Common::Addon +{ +public: + DEFINE_CLASS_POINTERS(Addon) - public: - virtual std::string GetProtocol() const = 0; - virtual OpcUa::Services::SharedPtr Connect(const std::string& url) = 0; - }; - } +public: + virtual std::string GetProtocol() const = 0; + virtual OpcUa::Services::SharedPtr Connect(const std::string & url) = 0; +}; +} } diff --git a/include/opc/ua/client/binary_client.h b/include/opc/ua/client/binary_client.h index 0fd1677d..4bf1ac7a 100644 --- a/include/opc/ua/client/binary_client.h +++ b/include/opc/ua/client/binary_client.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -19,23 +19,23 @@ namespace OpcUa { - struct SecureConnectionParams - { - std::string EndpointUrl; - std::string SecurePolicy; - std::vector SenderCertificate; - std::vector ReceiverCertificateThumbPrint; - uint32_t SecureChannelId; - - SecureConnectionParams() - : SecureChannelId(0) - { - } - }; - - /// @brief Create server based on opc ua binary protocol. - /// @param channel channel wich will be used for sending requests data. - Services::SharedPtr CreateBinaryClient(IOChannel::SharedPtr channel, const SecureConnectionParams& params, bool debug = false); - Services::SharedPtr CreateBinaryClient(const std::string& endpointUrl, bool debug = false); +struct SecureConnectionParams +{ + std::string EndpointUrl; + std::string SecurePolicy; + std::vector SenderCertificate; + std::vector ReceiverCertificateThumbPrint; + uint32_t SecureChannelId; + + SecureConnectionParams() + : SecureChannelId(0) + { + } +}; + +/// @brief Create server based on opc ua binary protocol. +/// @param channel channel wich will be used for sending requests data. +Services::SharedPtr CreateBinaryClient(IOChannel::SharedPtr channel, const SecureConnectionParams & params, bool debug = false); +Services::SharedPtr CreateBinaryClient(const std::string & endpointUrl, bool debug = false); } // namespace OpcUa diff --git a/include/opc/ua/client/client.h b/include/opc/ua/client/client.h index 3d001a37..99d5ff14 100644 --- a/include/opc/ua/client/client.h +++ b/include/opc/ua/client/client.h @@ -35,141 +35,141 @@ namespace OpcUa { - class KeepAliveThread - { - public: - /// @brief Internal - // Send keepalive request to server so it does not disconnect us - KeepAliveThread(bool debug=false) : StopRequest(false), Running(false), Debug(debug) {} - void Start( Services::SharedPtr server, Node node, Duration period); - void Stop(); - - private: - void Run(); - mutable std::thread Thread; - Node NodeToRead; - Services::SharedPtr Server; - Duration Period = 1200000; - std::atomic StopRequest; - std::atomic Running; - std::condition_variable Condition; - std::mutex Mutex; - bool Debug = false; - }; - - - class UaClient - { - public: - /// @brief create high level client - /// this class is meant to be used to quickly/easily connect to an OPCUA server - /// it may not offer absolutely all features available in protocol - /// you may want to look at code and implement your own client if you need - /// debug argument will make freeopcua write A LOT to stdout - /// set endpoint uri on wich server will listen. - /// opc.tcp://localhost:4841/opcua/server - /// opc.tcp://192.168.1.1:4840/opcua/server - /// opc.tcp://server.freeopca.org:4841/opcua/server - UaClient(bool debug=false) : KeepAlive(debug), Debug(debug) {} - ~UaClient(); - - UaClient(const UaClient&&) = delete; - UaClient(const UaClient&) = delete; - UaClient& operator=(const UaClient&) = delete; - - /// @brief set session name - void SetSessionName(const std::string& str) { SessionName = str; } - std::string GetSessionName() const { return SessionName; } - - /// @brief connect to a server, specify endpoint as string - // a connection will be made to server to get endpoint description - // an endpoint description will be selected and then a connection will attempted - void Connect(const std::string& endpoint); - - /// @brief connect to a server, specify endpoint as EndpointDesciption - // EndpointDescription can be defined by hand or gotten through - // a call to GetServerEndpoints() - void Connect(const EndpointDescription&); - - /// @brief Disconnect from server - // close communication with OPC-UA server, close all threads and subscriptions - void Disconnect(); - - /// @brief Abort server connection - // abort communication with OPC-UA server, close all threads and subcsriptions - // Like Disconnect() but without CloseSession() call, which is not possible on faulty connection anyway - void Abort(); - - /// @brief Connect to server and get endpoints - std::vector GetServerEndpoints(const std::string& endpoint); - - /// @brief Connect to server and select one endpoint - EndpointDescription SelectEndpoint(const std::string&); - - /// @brief get endpoints from server, assume we are already connected - std::vector GetServerEndpoints(); - std::string GetEndpoint() const { return Endpoint.EndpointUrl; } - - /// @brief set application description - std::string GetApplicationURI() const { return ApplicationUri; } - void SetApplicationURI(std::string uri) { ApplicationUri = uri; } - std::string GetProductURI() const { return ProductUri; } - void SetProductURI(std::string uri) { ProductUri = uri; } - - /// @brief set security policy - // anyway freeopcua currently only support MessageSecurityMode::None - void SetSecurityPolicy(std::string sec) {SecurityPolicy = sec;} - std::string GetSecurityPolicy() const { return SecurityPolicy; } - - /// @brief Get namespaces used by server. - // Deduce index from order or call GetNamespaceIndex(uri) - std::vector GetServerNamespaces(); - uint32_t GetNamespaceIndex(std::string uri); - - /// @brief Get a specific node by nodeid - // you can also access a standard node from addressspace using - // ObjectId, for example: - // Node mynode = GetNode(ObjectId::Server); - // using a string is also possible: - // Node mynode = GetNode("ns=3;i=55"); - Node GetNode(const NodeId& nodeid) const; - Node GetNode(const std::string& nodeid) const; - - /// @brief helper methods for node you will probably want to access - Node GetRootNode() const; - Node GetObjectsNode() const; - Node GetServerNode() const; - - void DeleteNodes(std::vector& nodes, bool recursive=false); - - /// @brief Create a subscription objects - // returned object can then be used to subscribe - // to datachange or custom events from server - std::unique_ptr CreateSubscription(unsigned int period, SubscriptionHandler& client); - - /// @brief Create a server operations object - ServerOperations CreateServerOperations(); - - private: - void OpenSecureChannel(); - void CloseSecureChannel(); - - std::vector AddChilds(std::vector nodes); - - EndpointDescription Endpoint; - // defined some sensible defaults that should let us connect to most servers - std::string SessionName = "Open source OPC-UA Client Session"; - std::string ApplicationUri = "urn:freeopcua:client"; - std::string ProductUri = "urn:freeopcua.github.no:client"; - std::string SecurityPolicy = "none"; - KeepAliveThread KeepAlive; - uint32_t SecureChannelId; - bool Debug = false; - uint32_t DefaultTimeout = 3600000; - - protected: - Services::SharedPtr Server; - - }; +class KeepAliveThread +{ +public: + /// @brief Internal + // Send keepalive request to server so it does not disconnect us + KeepAliveThread(bool debug = false) : StopRequest(false), Running(false), Debug(debug) {} + void Start(Services::SharedPtr server, Node node, Duration period); + void Stop(); + +private: + void Run(); + mutable std::thread Thread; + Node NodeToRead; + Services::SharedPtr Server; + Duration Period = 1200000; + std::atomic StopRequest; + std::atomic Running; + std::condition_variable Condition; + std::mutex Mutex; + bool Debug = false; +}; + + +class UaClient +{ +public: + /// @brief create high level client + /// this class is meant to be used to quickly/easily connect to an OPCUA server + /// it may not offer absolutely all features available in protocol + /// you may want to look at code and implement your own client if you need + /// debug argument will make freeopcua write A LOT to stdout + /// set endpoint uri on wich server will listen. + /// opc.tcp://localhost:4841/opcua/server + /// opc.tcp://192.168.1.1:4840/opcua/server + /// opc.tcp://server.freeopca.org:4841/opcua/server + UaClient(bool debug = false) : KeepAlive(debug), Debug(debug) {} + ~UaClient(); + + UaClient(const UaClient &&) = delete; + UaClient(const UaClient &) = delete; + UaClient & operator=(const UaClient &) = delete; + + /// @brief set session name + void SetSessionName(const std::string & str) { SessionName = str; } + std::string GetSessionName() const { return SessionName; } + + /// @brief connect to a server, specify endpoint as string + // a connection will be made to server to get endpoint description + // an endpoint description will be selected and then a connection will attempted + void Connect(const std::string & endpoint); + + /// @brief connect to a server, specify endpoint as EndpointDesciption + // EndpointDescription can be defined by hand or gotten through + // a call to GetServerEndpoints() + void Connect(const EndpointDescription &); + + /// @brief Disconnect from server + // close communication with OPC-UA server, close all threads and subscriptions + void Disconnect(); + + /// @brief Abort server connection + // abort communication with OPC-UA server, close all threads and subcsriptions + // Like Disconnect() but without CloseSession() call, which is not possible on faulty connection anyway + void Abort(); + + /// @brief Connect to server and get endpoints + std::vector GetServerEndpoints(const std::string & endpoint); + + /// @brief Connect to server and select one endpoint + EndpointDescription SelectEndpoint(const std::string &); + + /// @brief get endpoints from server, assume we are already connected + std::vector GetServerEndpoints(); + std::string GetEndpoint() const { return Endpoint.EndpointUrl; } + + /// @brief set application description + std::string GetApplicationURI() const { return ApplicationUri; } + void SetApplicationURI(std::string uri) { ApplicationUri = uri; } + std::string GetProductURI() const { return ProductUri; } + void SetProductURI(std::string uri) { ProductUri = uri; } + + /// @brief set security policy + // anyway freeopcua currently only support MessageSecurityMode::None + void SetSecurityPolicy(std::string sec) {SecurityPolicy = sec;} + std::string GetSecurityPolicy() const { return SecurityPolicy; } + + /// @brief Get namespaces used by server. + // Deduce index from order or call GetNamespaceIndex(uri) + std::vector GetServerNamespaces(); + uint32_t GetNamespaceIndex(std::string uri); + + /// @brief Get a specific node by nodeid + // you can also access a standard node from addressspace using + // ObjectId, for example: + // Node mynode = GetNode(ObjectId::Server); + // using a string is also possible: + // Node mynode = GetNode("ns=3;i=55"); + Node GetNode(const NodeId & nodeid) const; + Node GetNode(const std::string & nodeid) const; + + /// @brief helper methods for node you will probably want to access + Node GetRootNode() const; + Node GetObjectsNode() const; + Node GetServerNode() const; + + void DeleteNodes(std::vector & nodes, bool recursive = false); + + /// @brief Create a subscription objects + // returned object can then be used to subscribe + // to datachange or custom events from server + std::unique_ptr CreateSubscription(unsigned int period, SubscriptionHandler & client); + + /// @brief Create a server operations object + ServerOperations CreateServerOperations(); + +private: + void OpenSecureChannel(); + void CloseSecureChannel(); + + std::vector AddChilds(std::vector nodes); + + EndpointDescription Endpoint; + // defined some sensible defaults that should let us connect to most servers + std::string SessionName = "Open source OPC-UA Client Session"; + std::string ApplicationUri = "urn:freeopcua:client"; + std::string ProductUri = "urn:freeopcua.github.no:client"; + std::string SecurityPolicy = "none"; + KeepAliveThread KeepAlive; + uint32_t SecureChannelId; + bool Debug = false; + uint32_t DefaultTimeout = 3600000; + +protected: + Services::SharedPtr Server; + +}; } // namespace OpcUa diff --git a/include/opc/ua/client/remote_connection.h b/include/opc/ua/client/remote_connection.h index ddf4bfa8..2aa6ea80 100644 --- a/include/opc/ua/client/remote_connection.h +++ b/include/opc/ua/client/remote_connection.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -18,19 +18,19 @@ namespace OpcUa { - - class RemoteConnection : public IOChannel - { - public: - virtual std::size_t Receive(char* data, std::size_t size) = 0; - virtual void Send(const char* message, std::size_t size) = 0; - virtual std::string GetHost() const = 0; - virtual unsigned GetPort() const = 0; - }; +class RemoteConnection : public IOChannel +{ +public: + virtual std::size_t Receive(char * data, std::size_t size) = 0; + virtual void Send(const char * message, std::size_t size) = 0; + + virtual std::string GetHost() const = 0; + virtual unsigned GetPort() const = 0; +}; - std::unique_ptr Connect(const std::string& host, unsigned port); +std::unique_ptr Connect(const std::string & host, unsigned port); } // namespace OpcUa diff --git a/include/opc/ua/connection_listener.h b/include/opc/ua/connection_listener.h index a605d9c0..d237daaf 100644 --- a/include/opc/ua/connection_listener.h +++ b/include/opc/ua/connection_listener.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -17,22 +17,22 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - class IncomingConnectionProcessor : private Common::Interface - { - public: - virtual void Process(IOChannel::SharedPtr clientChannel) = 0; - virtual void StopProcessing(IOChannel::SharedPtr clientChannel) = 0; - }; +class IncomingConnectionProcessor : private Common::Interface +{ +public: + virtual void Process(IOChannel::SharedPtr clientChannel) = 0; + virtual void StopProcessing(IOChannel::SharedPtr clientChannel) = 0; +}; - class ConnectionListener : private Common::Interface - { - public: - virtual void Start(std::shared_ptr connectionProcssor) = 0; - virtual void Stop() = 0; - }; +class ConnectionListener : private Common::Interface +{ +public: + virtual void Start(std::shared_ptr connectionProcssor) = 0; + virtual void Stop() = 0; +}; - } // namespace UaServer +} // namespace UaServer } // namespace OpcUA diff --git a/include/opc/ua/errors.h b/include/opc/ua/errors.h index c10a4e2d..fab76189 100644 --- a/include/opc/ua/errors.h +++ b/include/opc/ua/errors.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// diff --git a/include/opc/ua/event.h b/include/opc/ua/event.h index c15c8360..954eb77e 100644 --- a/include/opc/ua/event.h +++ b/include/opc/ua/event.h @@ -13,66 +13,66 @@ namespace OpcUa { - typedef std::map, Variant> PathMap; - typedef std::map AttributeMap; - - class Event - { - - public: - //Instanciate a new event object - //The optional argument is the type of the event - //If not set BaseEventType is used - //If you want to send custom data, you need custom event type on server - //The attributes of BaseEventType are accesible as class member, - //Other attributes must be set using SetValue and accessed using GetValue - // This API is a draft, it WILL change - Event(const Node& type); - Event(const NodeId& type); - Event(); - - //Attributes of an BaseEventType - ByteString EventId; //unique id - NodeId EventType; //The type of event, defines attribues, connections, ... - DateTime LocalTime; //Time zone information - DateTime ReceiveTime; //Time at which the server received the event - DateTime Time; //Time at which the event occured, should come from underlying system - LocalizedText Message; //human readable event description - uint16_t Severity = 1; //Priority, from 1 to 1000. 1 is lowest priority - NodeId SourceNode; //The node that has generated the event - std::string SourceName; //Description of the source - - - //Set value of a variable(or object) - //This value will be used when the event is fired - //You can set arbitrary data, but clients will not be able to discover them thus subscribe to them - void SetValue(const std::vector& path, Variant value); - void SetValue(AttributeId attribute, Variant value); - void SetValue(const QualifiedName& path, Variant value); - void SetValue(const std::string& qualifiedname, Variant value); //helper method for the most common case - - //Return value og variable identified by its relative path - //or value of attribute identified by its Id - //returns null variant if no match - Variant GetValue(const std::vector& path) const; - Variant GetValue(AttributeId attribute) const; - Variant GetValue(const QualifiedName& path) const; - Variant GetValue(const std::string& qualifiedname) const; //helper method for the most common case - - //Get the list of available values in this event - std::vector> GetValueKeys(); - - protected: - PathMap PathValues; - AttributeMap AttributeValues; - }; - - std::string ToString(const Event& event); - - inline std::ostream& operator<<(std::ostream& os, const Event& event) - { - os << "{" << ToString(event) << "}"; - return os; - } +typedef std::map, Variant> PathMap; +typedef std::map AttributeMap; + +class Event +{ + +public: + //Instanciate a new event object + //The optional argument is the type of the event + //If not set BaseEventType is used + //If you want to send custom data, you need custom event type on server + //The attributes of BaseEventType are accesible as class member, + //Other attributes must be set using SetValue and accessed using GetValue + // This API is a draft, it WILL change + Event(const Node & type); + Event(const NodeId & type); + Event(); + + //Attributes of an BaseEventType + ByteString EventId; //unique id + NodeId EventType; //The type of event, defines attribues, connections, ... + DateTime LocalTime; //Time zone information + DateTime ReceiveTime; //Time at which the server received the event + DateTime Time; //Time at which the event occured, should come from underlying system + LocalizedText Message; //human readable event description + uint16_t Severity = 1; //Priority, from 1 to 1000. 1 is lowest priority + NodeId SourceNode; //The node that has generated the event + std::string SourceName; //Description of the source + + + //Set value of a variable(or object) + //This value will be used when the event is fired + //You can set arbitrary data, but clients will not be able to discover them thus subscribe to them + void SetValue(const std::vector & path, Variant value); + void SetValue(AttributeId attribute, Variant value); + void SetValue(const QualifiedName & path, Variant value); + void SetValue(const std::string & qualifiedname, Variant value); //helper method for the most common case + + //Return value og variable identified by its relative path + //or value of attribute identified by its Id + //returns null variant if no match + Variant GetValue(const std::vector & path) const; + Variant GetValue(AttributeId attribute) const; + Variant GetValue(const QualifiedName & path) const; + Variant GetValue(const std::string & qualifiedname) const; //helper method for the most common case + + //Get the list of available values in this event + std::vector> GetValueKeys(); + +protected: + PathMap PathValues; + AttributeMap AttributeValues; +}; + +std::string ToString(const Event & event); + +inline std::ostream & operator<<(std::ostream & os, const Event & event) +{ + os << "{" << ToString(event) << "}"; + return os; +} } diff --git a/include/opc/ua/model.h b/include/opc/ua/model.h index 381aac35..d954f68e 100644 --- a/include/opc/ua/model.h +++ b/include/opc/ua/model.h @@ -24,227 +24,227 @@ namespace OpcUa { - namespace Model - { - - class Reference; - class Variable; - - class Node - { - public: - Node(NodeId id, Services::SharedPtr services); - - NodeId GetId() const; - - - QualifiedName GetBrowseName() const; - LocalizedText GetDisplayName() const; - - std::vector GetReferencies() const; - - public: - Services::SharedPtr GetServices() const - { - return OpcUaServices; - } - - protected: - Node(Services::SharedPtr services); - - protected: - NodeId Id; - QualifiedName BrowseName; - LocalizedText DisplayName; - Services::SharedPtr OpcUaServices; - }; - +namespace Model +{ - class ReferenceType : public Node - { - public: - ReferenceType(NodeId typeId, Services::SharedPtr services); +class Reference; +class Variable; - ReferenceType Parent() const; +class Node +{ +public: + Node(NodeId id, Services::SharedPtr services); - QualifiedName Name() const; - QualifiedName InverseName() const; - }; + NodeId GetId() const; - class Reference - { - public: - ReferenceType Type(); - Node Source() const; - Node Target() const; - }; + QualifiedName GetBrowseName() const; + LocalizedText GetDisplayName() const; - class DataType : public Node - { - public: - DataType(NodeId typeId, Services::SharedPtr services); + std::vector GetReferencies() const; - bool IsAbstrasct() const; - DataType Parent() const; +public: + Services::SharedPtr GetServices() const + { + return OpcUaServices; + } - std::vector SubTypes() const; +protected: + Node(Services::SharedPtr services); - private: - bool IsAbstract = false; - NodeId ParentTypeId; - }; +protected: + NodeId Id; + QualifiedName BrowseName; + LocalizedText DisplayName; + Services::SharedPtr OpcUaServices; +}; - class VariableType : public Node - { - public: - VariableType(NodeId typeId, Services::SharedPtr services); - // Existing variable type. - VariableType(Services::SharedPtr services, const NodeId& typeId); +class ReferenceType : public Node +{ +public: + ReferenceType(NodeId typeId, Services::SharedPtr services); - bool IsBase() const; - bool IsAbstract() const; - VariableType Parent() const; - std::vector SubTypes() const; + ReferenceType Parent() const; - DataType ValueType() const; + QualifiedName Name() const; + QualifiedName InverseName() const; +}; - DataValue GetDefaultValue() const; - void SetDefaultValue(const DataValue& value); +class Reference +{ +public: + ReferenceType Type(); - std::vector GetVariables() const; - Variable GetVariable(const QualifiedName& name) const; - Variable GetVariable(const RelativePath& path) const; + Node Source() const; + Node Target() const; +}; - private: - bool Abstract = false; - DataValue DefaultValue; - NodeId ValueTypeId; - NodeId ParentTypeId; - }; +class DataType : public Node +{ +public: + DataType(NodeId typeId, Services::SharedPtr services); + bool IsAbstrasct() const; + DataType Parent() const; - class Variable : public Node - { - public: - Variable(NodeId variableId, Services::SharedPtr services); + std::vector SubTypes() const; - VariableType GetType() const; +private: + bool IsAbstract = false; + NodeId ParentTypeId; +}; - DataValue GetValue() const; - void SetValue(const Variant& value); - void SetValue(const DataValue& value); - VariantType GetDataType() const; +class VariableType : public Node +{ +public: + VariableType(NodeId typeId, Services::SharedPtr services); - std::vector Variables() const; - Variable GetVariable(const QualifiedName& name) const; - Variable GetVariable(const std::vector& path) const; + // Existing variable type. + VariableType(Services::SharedPtr services, const NodeId & typeId); - private: - friend class Object; + bool IsBase() const; + bool IsAbstract() const; + VariableType Parent() const; + std::vector SubTypes() const; - Variable(Services::SharedPtr services) - : Node(services) - { - } + DataType ValueType() const; - private: - NodeId TypeId; - VariantType DataType = VariantType::NUL; - }; + DataValue GetDefaultValue() const; + void SetDefaultValue(const DataValue & value); + std::vector GetVariables() const; + Variable GetVariable(const QualifiedName & name) const; + Variable GetVariable(const RelativePath & path) const; - class Object; +private: + bool Abstract = false; + DataValue DefaultValue; + NodeId ValueTypeId; + NodeId ParentTypeId; +}; - class ObjectType : public Node - { - public: - ObjectType(NodeId objectId, Services::SharedPtr services); - bool IsBase() const; - bool IsAbstract() const; +class Variable : public Node +{ +public: + Variable(NodeId variableId, Services::SharedPtr services); - std::vector Variables() const; - std::vector Objects() const; + VariableType GetType() const; - std::vector SubTypes() const; + DataValue GetValue() const; + void SetValue(const Variant & value); + void SetValue(const DataValue & value); + VariantType GetDataType() const; - ObjectType Parent() const; + std::vector Variables() const; + Variable GetVariable(const QualifiedName & name) const; + Variable GetVariable(const std::vector & path) const; - private: - bool Abstract = false; - NodeId ParentTypeId; - }; +private: + friend class Object; + Variable(Services::SharedPtr services) + : Node(services) + { + } - class Object : public Node - { - public: - Object(NodeId objectId, Services::SharedPtr services); - Object(Object&& object); - Object(const Object& object); +private: + NodeId TypeId; + VariantType DataType = VariantType::NUL; +}; - ObjectType GetType() const; - /// @brief Get variables of the object. - std::vector GetVariables() const; - /// @brief Get variable of the object by it name. - Variable GetVariable(const QualifiedName& name) const; - /// @brief Get variable by browse path. - Variable GetVariable(const RelativePath& path) const; +class Object; - /// @brief Create a new variable. - /// @param browseName name of new variable. - /// @param dataType type of the value of new variable. - /// @param type Variable type from which will be taken data type and structure. - /// @description Will be create new node under current object. - /// @note If id of the new variable is not specified then it will be generated. - /// @return new variable. - Variable CreateVariable(const QualifiedName& browseName, const Variant& value); - Variable CreateVariable(const NodeId& newVariableId, const QualifiedName& browseName, const Variant& value); - Variable CreateVariable(const QualifiedName& browseName, const VariableType& type); - Variable CreateVariable(const NodeId& newVariableId, const QualifiedName& browseName, const VariableType& type); +class ObjectType : public Node +{ +public: + ObjectType(NodeId objectId, Services::SharedPtr services); - std::vector GetObjects() const; - Object GetObject(const QualifiedName& name) const; - Object GetObject(const RelativePath& name) const; + bool IsBase() const; + bool IsAbstract() const; - Object CreateObject(const ObjectType& type, const QualifiedName& browseName); - Object CreateObject(const NodeId& newNodeId, const ObjectType& nodeType, const QualifiedName& browseName); - Object CreateObject(const ObjectType& type, const QualifiedName& browseName, const std::string& displayName); - Object CreateObject(const NodeId& newNodeId, const ObjectType& type, const QualifiedName& browseName, const std::string& displayName); + std::vector Variables() const; + std::vector Objects() const; - private: - Object CreateObject(const NodeId& newNodeId, const NodeId& parentNode, const NodeId& typeId, const QualifiedName& browseName, const std::string& displayName); - Variable CreateVariable(const NodeId& newNodeId, const NodeId& parentNode, const NodeId& typeId, const QualifiedName& browseName, const std::string& displayName); + std::vector SubTypes() const; - NodeId InstantiateType(const NodeId& newNodeId, const NodeId& parentNode, const NodeId& typeId, NodeClass nodeClass, const QualifiedName& browseName, const std::string& displayName); - std::vector BrowseObjectsAndVariables(const NodeId& id); + ObjectType Parent() const; - std::map> CopyObjectsAndVariables(const NodeId& targetNode, const std::vector& refs); - AddNodesItem CreateVariableCopy(const NodeId& parentId, const ReferenceDescription& ref); - AddNodesItem CreateObjectCopy(const NodeId& parentId, const ReferenceDescription& ref); +private: + bool Abstract = false; + NodeId ParentTypeId; +}; - private: - explicit Object(Services::SharedPtr services); - }; - class Server - { - public: - Server(Services::SharedPtr services); +class Object : public Node +{ +public: + Object(NodeId objectId, Services::SharedPtr services); + Object(Object && object); + Object(const Object & object); + + ObjectType GetType() const; + + /// @brief Get variables of the object. + std::vector GetVariables() const; + /// @brief Get variable of the object by it name. + Variable GetVariable(const QualifiedName & name) const; + /// @brief Get variable by browse path. + Variable GetVariable(const RelativePath & path) const; + + /// @brief Create a new variable. + /// @param browseName name of new variable. + /// @param dataType type of the value of new variable. + /// @param type Variable type from which will be taken data type and structure. + /// @description Will be create new node under current object. + /// @note If id of the new variable is not specified then it will be generated. + /// @return new variable. + Variable CreateVariable(const QualifiedName & browseName, const Variant & value); + Variable CreateVariable(const NodeId & newVariableId, const QualifiedName & browseName, const Variant & value); + Variable CreateVariable(const QualifiedName & browseName, const VariableType & type); + Variable CreateVariable(const NodeId & newVariableId, const QualifiedName & browseName, const VariableType & type); + + std::vector GetObjects() const; + Object GetObject(const QualifiedName & name) const; + Object GetObject(const RelativePath & name) const; + + Object CreateObject(const ObjectType & type, const QualifiedName & browseName); + Object CreateObject(const NodeId & newNodeId, const ObjectType & nodeType, const QualifiedName & browseName); + Object CreateObject(const ObjectType & type, const QualifiedName & browseName, const std::string & displayName); + Object CreateObject(const NodeId & newNodeId, const ObjectType & type, const QualifiedName & browseName, const std::string & displayName); + +private: + Object CreateObject(const NodeId & newNodeId, const NodeId & parentNode, const NodeId & typeId, const QualifiedName & browseName, const std::string & displayName); + Variable CreateVariable(const NodeId & newNodeId, const NodeId & parentNode, const NodeId & typeId, const QualifiedName & browseName, const std::string & displayName); + + NodeId InstantiateType(const NodeId & newNodeId, const NodeId & parentNode, const NodeId & typeId, NodeClass nodeClass, const QualifiedName & browseName, const std::string & displayName); + std::vector BrowseObjectsAndVariables(const NodeId & id); + + std::map> CopyObjectsAndVariables(const NodeId & targetNode, const std::vector & refs); + AddNodesItem CreateVariableCopy(const NodeId & parentId, const ReferenceDescription & ref); + AddNodesItem CreateObjectCopy(const NodeId & parentId, const ReferenceDescription & ref); + +private: + explicit Object(Services::SharedPtr services); +}; + +class Server +{ +public: + Server(Services::SharedPtr services); - Object RootObject() const; - Object GetObject(const NodeId& id) const; - ObjectType GetObjectType(const NodeId& typeId) const; + Object RootObject() const; + Object GetObject(const NodeId & id) const; + ObjectType GetObjectType(const NodeId & typeId) const; - public: - Services::SharedPtr GetServices() const; +public: + Services::SharedPtr GetServices() const; - private: - Services::SharedPtr Connection; - }; +private: + Services::SharedPtr Connection; +}; - } // namespace Model +} // namespace Model } // namespace OpcUa diff --git a/include/opc/ua/node.h b/include/opc/ua/node.h index 4bc72b81..50094443 100644 --- a/include/opc/ua/node.h +++ b/include/opc/ua/node.h @@ -27,118 +27,118 @@ namespace OpcUa { - class NodeNotFoundException : public std::runtime_error - { - public: - NodeNotFoundException() : std::runtime_error("NodeNotFoundException") { } - }; - - /// @brief A Node object represent an OPC-UA node. - /// It is high level object intended for developper who want to expose - /// data through OPC-UA or read data from an OPCUA server. - /// Node are usually not create directly but obtained through call - /// to GetRootNode of GetObjectsNode on server or client side +class NodeNotFoundException : public std::runtime_error +{ +public: + NodeNotFoundException() : std::runtime_error("NodeNotFoundException") { } +}; + +/// @brief A Node object represent an OPC-UA node. +/// It is high level object intended for developper who want to expose +/// data through OPC-UA or read data from an OPCUA server. +/// Node are usually not create directly but obtained through call +/// to GetRootNode of GetObjectsNode on server or client side + +class Node +{ +public: + // Creating Root Node. + explicit Node(Services::SharedPtr srv); + Node(Services::SharedPtr srv, const NodeId & id); + Node(const Node & other); + Node() {} + + NodeId GetId() const; - class Node - { - public: - // Creating Root Node. - explicit Node(Services::SharedPtr srv); - Node(Services::SharedPtr srv, const NodeId& id); - Node(const Node& other); - Node(){} + QualifiedName GetBrowseName() const; + //void SetBrowseName(const QualifiedName& name) const; - NodeId GetId() const; + /// @brief List childrenn nodes by specified reference + /// @return One or zero chilren nodes. + std::vector GetChildren(const OpcUa::ReferenceId & refid) const; - QualifiedName GetBrowseName() const; - //void SetBrowseName(const QualifiedName& name) const; + /// @brief Get ghildren by hierarchal referencies. + /// @return One or zero chilren nodes. + std::vector GetChildren() const; - /// @brief List childrenn nodes by specified reference - /// @return One or zero chilren nodes. - std::vector GetChildren(const OpcUa::ReferenceId& refid) const; + //The GetChildNode methods return a node defined by its path from the node. A path is defined by + // a sequence of browse name(QualifiedName). A browse name is either defined through a qualifiedname object + // or a string of format namespace:browsename. If a namespace is not specified it is assumed to be + //the same as the parent + Node GetChild(const std::vector & path) const; + Node GetChild(const std::vector & path) const; + Node GetChild(const std::string & browsename) const ; - /// @brief Get ghildren by hierarchal referencies. - /// @return One or zero chilren nodes. - std::vector GetChildren() const; + std::vector GetProperties() const {return GetChildren(OpcUa::ReferenceId::HasProperty);} + std::vector GetVariables() const {return GetChildren(OpcUa::ReferenceId::HasComponent);} //Not correct should filter by variable type - //The GetChildNode methods return a node defined by its path from the node. A path is defined by - // a sequence of browse name(QualifiedName). A browse name is either defined through a qualifiedname object - // or a string of format namespace:browsename. If a namespace is not specified it is assumed to be - //the same as the parent - Node GetChild(const std::vector& path) const; - Node GetChild(const std::vector& path) const; - Node GetChild(const std::string& browsename) const ; - std::vector GetProperties() const {return GetChildren(OpcUa::ReferenceId::HasProperty);} - std::vector GetVariables() const {return GetChildren(OpcUa::ReferenceId::HasComponent);} //Not correct should filter by variable type - + //TODO: How to get References? - //TODO: How to get References? + //The Read and Write methods read or write attributes of the node + //FIXME: add possibility to read and write several nodes at once + DataValue GetAttribute(const AttributeId attr) const; + void SetAttribute(AttributeId attr, const DataValue & dval) const; + //std::vector WriteAttrs(OpcUa::AttributeId attr, const Variant &val); - //The Read and Write methods read or write attributes of the node - //FIXME: add possibility to read and write several nodes at once - DataValue GetAttribute(const AttributeId attr) const; - void SetAttribute(AttributeId attr, const DataValue &dval) const; - //std::vector WriteAttrs(OpcUa::AttributeId attr, const Variant &val); - - //Helper method to get/set VALUE attribute of a node (Not all nodes support VALUE attribute) - Variant GetValue() const; - DataValue GetDataValue() const; - void SetValue(const Variant& val) const; - void SetValue(const DataValue& dval) const; + //Helper method to get/set VALUE attribute of a node (Not all nodes support VALUE attribute) + Variant GetValue() const; + DataValue GetDataValue() const; + void SetValue(const Variant & val) const; + void SetValue(const DataValue & dval) const; - Variant GetDataType() const; + Variant GetDataType() const; - // CallMethod - std::vector CallMethod(NodeId methodId, std::vector inputArguments) const; - std::vector> CallMethods(std::vector methodIds, std::vector> inputArguments) const; + // CallMethod + std::vector CallMethod(NodeId methodId, std::vector inputArguments) const; + std::vector> CallMethods(std::vector methodIds, std::vector> inputArguments) const; - //OpcUa low level methods to to modify address space model - std::vector AddNodes(std::vector items) const; - std::vector AddReferences(std::vector items) const; + //OpcUa low level methods to to modify address space model + std::vector AddNodes(std::vector items) const; + std::vector AddReferences(std::vector items) const; - //Helper classes to modify address space model - Node AddFolder(const NodeId& folderId, const QualifiedName& browseName) const; - Node AddFolder(const std::string& nodeid, const std::string& browseName) const; - Node AddFolder(uint32_t namespaceidx, const std::string& browseName) const; + //Helper classes to modify address space model + Node AddFolder(const NodeId & folderId, const QualifiedName & browseName) const; + Node AddFolder(const std::string & nodeid, const std::string & browseName) const; + Node AddFolder(uint32_t namespaceidx, const std::string & browseName) const; - Node AddObject(const NodeId& folderId, const QualifiedName& browseName) const; - Node AddObject(const std::string& nodeid, const std::string& browseName) const; - Node AddObject(uint32_t namespaceidx, const std::string& browseName) const; + Node AddObject(const NodeId & folderId, const QualifiedName & browseName) const; + Node AddObject(const std::string & nodeid, const std::string & browseName) const; + Node AddObject(uint32_t namespaceidx, const std::string & browseName) const; - Node AddVariable(const NodeId& variableId, const QualifiedName& browsename, const Variant& val) const; - Node AddVariable(uint32_t namespaceidx, const std::string& BrowseName, const Variant& val) const; - Node AddVariable(const std::string& nodeId, const std::string& browseName, const Variant& val) const; + Node AddVariable(const NodeId & variableId, const QualifiedName & browsename, const Variant & val) const; + Node AddVariable(uint32_t namespaceidx, const std::string & BrowseName, const Variant & val) const; + Node AddVariable(const std::string & nodeId, const std::string & browseName, const Variant & val) const; - Node AddProperty(const NodeId& propertyId, const QualifiedName& browsename, const Variant& val) const; - Node AddProperty(const std::string& nodeid, const std::string& browseName, const Variant& val) const; - Node AddProperty(uint32_t namespaceidx, const std::string& browseName, const Variant& val) const; + Node AddProperty(const NodeId & propertyId, const QualifiedName & browsename, const Variant & val) const; + Node AddProperty(const std::string & nodeid, const std::string & browseName, const Variant & val) const; + Node AddProperty(uint32_t namespaceidx, const std::string & browseName, const Variant & val) const; - Node AddMethod(const NodeId& variableId, const QualifiedName& browsename, std::function (NodeId context, std::vector arguments)> method) const; - Node AddMethod(uint32_t namespaceidx, const std::string& BrowseName, std::function (NodeId context, std::vector arguments)> method) const; - Node AddMethod(const std::string& nodeId, const std::string& browseName, std::function (NodeId context, std::vector arguments)> method) const; + Node AddMethod(const NodeId & variableId, const QualifiedName & browsename, std::function (NodeId context, std::vector arguments)> method) const; + Node AddMethod(uint32_t namespaceidx, const std::string & BrowseName, std::function (NodeId context, std::vector arguments)> method) const; + Node AddMethod(const std::string & nodeId, const std::string & browseName, std::function (NodeId context, std::vector arguments)> method) const; - std::string ToString() const; + std::string ToString() const; - bool operator==(Node const& x) const { return Id == x.Id; } - bool operator!=(Node const& x) const { return Id != x.Id; } + bool operator==(Node const & x) const { return Id == x.Id; } + bool operator!=(Node const & x) const { return Id != x.Id; } - //FIXME: I need this to create a copy for python binding, another way? - OpcUa::Services::SharedPtr GetServices() const {return Server;} + //FIXME: I need this to create a copy for python binding, another way? + OpcUa::Services::SharedPtr GetServices() const {return Server;} - protected: - OpcUa::Services::SharedPtr Server; - NodeId Id; - }; +protected: + OpcUa::Services::SharedPtr Server; + NodeId Id; +}; - std::ostream& operator<<(std::ostream& os, const Node& node); +std::ostream & operator<<(std::ostream & os, const Node & node); - //FIXME: The following methods should be moved somewhere else!!! +//FIXME: The following methods should be moved somewhere else!!! - ObjectId VariantTypeToDataType(VariantType vt); +ObjectId VariantTypeToDataType(VariantType vt); } // namespace OpcUa diff --git a/include/opc/ua/protocol/attribute_ids.h b/include/opc/ua/protocol/attribute_ids.h index 0dd581e1..7c336291 100644 --- a/include/opc/ua/protocol/attribute_ids.h +++ b/include/opc/ua/protocol/attribute_ids.h @@ -9,31 +9,31 @@ namespace OpcUa { - enum class AttributeId : uint32_t - { - NodeId = 1, - NodeClass = 2, - BrowseName = 3, - DisplayName = 4, - Description = 5, - WriteMask = 6, - UserWriteMask = 7, - IsAbstract = 8, - Symmetric = 9, - InverseName = 10, - ContainsNoLoops = 11, - EventNotifier = 12, - Value = 13, - DataType = 14, - ValueRank = 15, - ArrayDimensions = 16, - AccessLevel = 17, - UserAccessLevel = 18, - MinimumSamplingInterval = 19, - Historizing = 20, - Executable = 21, - UserExecutable = 22, - Unknown = ~uint32_t(), - }; +enum class AttributeId : uint32_t +{ + NodeId = 1, + NodeClass = 2, + BrowseName = 3, + DisplayName = 4, + Description = 5, + WriteMask = 6, + UserWriteMask = 7, + IsAbstract = 8, + Symmetric = 9, + InverseName = 10, + ContainsNoLoops = 11, + EventNotifier = 12, + Value = 13, + DataType = 14, + ValueRank = 15, + ArrayDimensions = 16, + AccessLevel = 17, + UserAccessLevel = 18, + MinimumSamplingInterval = 19, + Historizing = 20, + Executable = 21, + UserExecutable = 22, + Unknown = ~uint32_t(), +}; } // namespace OpcUa diff --git a/include/opc/ua/protocol/binary/common.h b/include/opc/ua/protocol/binary/common.h index 6340cdbb..c2ba512b 100644 --- a/include/opc/ua/protocol/binary/common.h +++ b/include/opc/ua/protocol/binary/common.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -22,127 +22,127 @@ namespace OpcUa { - namespace Binary - { - template - std::size_t RawSize(const T& obj); - - template - std::size_t RawSizeContainer(const T& container) - { - const std::size_t headerSize = 4; - std::size_t totalSize = headerSize; - std::for_each(container.begin(), container.end(), [&] (const typename T::value_type& val) {totalSize += RawSize(val);}); - return totalSize; - } - - - enum MessageType - { - MT_INVALID = 0, - MT_HELLO = 1, - MT_ACKNOWLEDGE, - MT_ERROR, - MT_SECURE_OPEN, - MT_SECURE_CLOSE, - MT_SECURE_MESSAGE, - }; - - enum ChunkType - { - CHT_INVALID = 0, - CHT_SINGLE = 1, - CHT_INTERMEDIATE, - CHT_FINAL, - }; - - struct Header - { - MessageType Type; - ChunkType Chunk; - uint32_t Size; - - Header(); - explicit Header(MessageType type, ChunkType chunk); - std::size_t AddSize(std::size_t size); - std::size_t MessageSize() const; - void ResetSize(); - }; - - - // Hello - // os << Header << Hello << flush - // is >> Header >> Acknowledge; - - struct Hello - { - uint32_t ProtocolVersion; - uint32_t ReceiveBufferSize; - uint32_t SendBufferSize; - uint32_t MaxMessageSize; - uint32_t MaxChunkCount; - std::string EndpointUrl; - - Hello(); - }; - - struct Acknowledge - { - uint32_t ProtocolVersion; - uint32_t ReceiveBufferSize; - uint32_t SendBufferSize; - uint32_t MaxMessageSize; - uint32_t MaxChunkCount; - - Acknowledge(); - }; - - struct Error - { - uint32_t Code; - std::string Reason; - - Error(); - }; - - struct SecureHeader - { - MessageType Type; - ChunkType Chunk; - uint32_t Size; - uint32_t ChannelId; - - SecureHeader(); - explicit SecureHeader(MessageType type, ChunkType chunk, uint32_t channelId); - - std::size_t AddSize(std::size_t size); - std::size_t MessageSize() const; - void ResetSize(); - }; - - struct AsymmetricAlgorithmHeader - { - std::string SecurityPolicyUri; - std::vector SenderCertificate; - std::vector ReceiverCertificateThumbPrint; - }; - - struct SymmetricAlgorithmHeader - { - uint32_t TokenId; - - SymmetricAlgorithmHeader(); - }; - - struct SequenceHeader - { - uint32_t SequenceNumber; - uint32_t RequestId; - - SequenceHeader(); - }; - - } // namespace Binary +namespace Binary +{ +template +std::size_t RawSize(const T & obj); + +template +std::size_t RawSizeContainer(const T & container) +{ + const std::size_t headerSize = 4; + std::size_t totalSize = headerSize; + std::for_each(container.begin(), container.end(), [&](const typename T::value_type & val) {totalSize += RawSize(val);}); + return totalSize; +} + + +enum MessageType +{ + MT_INVALID = 0, + MT_HELLO = 1, + MT_ACKNOWLEDGE, + MT_ERROR, + MT_SECURE_OPEN, + MT_SECURE_CLOSE, + MT_SECURE_MESSAGE, +}; + +enum ChunkType +{ + CHT_INVALID = 0, + CHT_SINGLE = 1, + CHT_INTERMEDIATE, + CHT_FINAL, +}; + +struct Header +{ + MessageType Type; + ChunkType Chunk; + uint32_t Size; + + Header(); + explicit Header(MessageType type, ChunkType chunk); + std::size_t AddSize(std::size_t size); + std::size_t MessageSize() const; + void ResetSize(); +}; + + +// Hello +// os << Header << Hello << flush +// is >> Header >> Acknowledge; + +struct Hello +{ + uint32_t ProtocolVersion; + uint32_t ReceiveBufferSize; + uint32_t SendBufferSize; + uint32_t MaxMessageSize; + uint32_t MaxChunkCount; + std::string EndpointUrl; + + Hello(); +}; + +struct Acknowledge +{ + uint32_t ProtocolVersion; + uint32_t ReceiveBufferSize; + uint32_t SendBufferSize; + uint32_t MaxMessageSize; + uint32_t MaxChunkCount; + + Acknowledge(); +}; + +struct Error +{ + uint32_t Code; + std::string Reason; + + Error(); +}; + +struct SecureHeader +{ + MessageType Type; + ChunkType Chunk; + uint32_t Size; + uint32_t ChannelId; + + SecureHeader(); + explicit SecureHeader(MessageType type, ChunkType chunk, uint32_t channelId); + + std::size_t AddSize(std::size_t size); + std::size_t MessageSize() const; + void ResetSize(); +}; + +struct AsymmetricAlgorithmHeader +{ + std::string SecurityPolicyUri; + std::vector SenderCertificate; + std::vector ReceiverCertificateThumbPrint; +}; + +struct SymmetricAlgorithmHeader +{ + uint32_t TokenId; + + SymmetricAlgorithmHeader(); +}; + +struct SequenceHeader +{ + uint32_t SequenceNumber; + uint32_t RequestId; + + SequenceHeader(); +}; + +} // namespace Binary } // namespace OpcUa diff --git a/include/opc/ua/protocol/binary/stream.h b/include/opc/ua/protocol/binary/stream.h index 4b4d5845..2fb66fd0 100644 --- a/include/opc/ua/protocol/binary/stream.h +++ b/include/opc/ua/protocol/binary/stream.h @@ -1,11 +1,11 @@ /// @author Alexander Rykovanov 2012 /// @email rykovanov.as@gmail.com -/// @brief Opc binary stream. +/// @brief Opc binary stream. /// Stream classes perform Serialization/Deserialization of opc ua structures. /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -23,214 +23,214 @@ namespace OpcUa { - namespace Binary - { - - class DataSerializer - { - public: - explicit DataSerializer(std::size_t defBufferSize = OPCUA_DEFAULT_BUFFER_SIZE) - { - Buffer.reserve(defBufferSize); - } - - template - DataSerializer& operator<<(const T& value) - { - Serialize(value); - return *this; - } - - template - void Flush(Acceptor& aceptor) - { - aceptor.Send(&Buffer[0], Buffer.size()); - Buffer.clear(); - } - - template - void Serialize(const T& value); - - private: - std::vector Buffer; - }; - - class DataSupplier - { - public: - virtual size_t Read(char* buffer, size_t size) = 0; - }; - - class DataDeserializer - { - public: - DataDeserializer(DataSupplier& supplier) - : In(supplier) - { - } - - virtual ~DataDeserializer() - { - } - - template - DataDeserializer& operator>>(T& value) - { - Deserialize(value); - return *this; - } - - template - void Deserialize(T&); - - private: - DataSupplier& In; - }; - - - struct RawMessage - { - const char* Data; - std::size_t Size; - - RawMessage(const char* data, std::size_t size) - : Data(data) - , Size(size) - { - } - }; - - - template - class OStream - { - public: - explicit OStream(std::shared_ptr channel) - : Out(*channel) - , Holder(channel) - { - } - - explicit OStream(OutputChannelType& channel) - : Out(channel) - { - } - - virtual ~OStream() - { - } - - template - OStream& operator<<(const T& value) - { - Serializer << value; - return *this; - } - - OStream& operator<< (OStream& (*pf)(OStream& out)) - { - return pf(*this); - } - - void Flush() - { - Serializer.Flush(Out); - } - - private: - OutputChannelType& Out; - std::shared_ptr Holder; - DataSerializer Serializer; - }; - - template - inline OStream& flush(OStream& os) - { - os.Flush(); - return os; - } - - struct RawBuffer - { - char* Data; - std::size_t Size; - - RawBuffer(char* data, std::size_t size) - : Data(data) - , Size(size) - { - } - }; - - - template - class IStream : private DataSupplier - { - public: - explicit IStream(std::shared_ptr channel) - : In(*channel) - , Holder(channel) - , Deserializer(*this) - { - } - - explicit IStream(InputChannelType& channel) - : In(channel) - , Deserializer(*this) - { - } - - virtual ~IStream() - { - } - - template - IStream& operator>>(T& value) - { - Deserializer >> value; - return *this; - } - - private: - virtual size_t Read(char* buffer, size_t size) - { - return In.Receive(buffer, size); - } - - private: - InputChannelType& In; - std::shared_ptr Holder; - DataDeserializer Deserializer; - }; - - - template - class IOStream : public IStream, public OStream - { - public: - IOStream(std::shared_ptr channel) - : IStream(channel) - , OStream(channel) - { - } - }; - - template - class InputOutputStream : public IStream, public OStream - { - public: - InputOutputStream(std::shared_ptr input, std::shared_ptr output) - : IStream(input) - , OStream(output) - { - } - }; - - typedef OpcUa::Binary::IOStream IOStreamBinary; - typedef OpcUa::Binary::IStream IStreamBinary; - typedef OpcUa::Binary::OStream OStreamBinary; - - } // namespace Binary +namespace Binary +{ + +class DataSerializer +{ +public: + explicit DataSerializer(std::size_t defBufferSize = OPCUA_DEFAULT_BUFFER_SIZE) + { + Buffer.reserve(defBufferSize); + } + + template + DataSerializer & operator<<(const T & value) + { + Serialize(value); + return *this; + } + + template + void Flush(Acceptor & aceptor) + { + aceptor.Send(&Buffer[0], Buffer.size()); + Buffer.clear(); + } + + template + void Serialize(const T & value); + +private: + std::vector Buffer; +}; + +class DataSupplier +{ +public: + virtual size_t Read(char * buffer, size_t size) = 0; +}; + +class DataDeserializer +{ +public: + DataDeserializer(DataSupplier & supplier) + : In(supplier) + { + } + + virtual ~DataDeserializer() + { + } + + template + DataDeserializer & operator>>(T & value) + { + Deserialize(value); + return *this; + } + + template + void Deserialize(T &); + +private: + DataSupplier & In; +}; + + +struct RawMessage +{ + const char * Data; + std::size_t Size; + + RawMessage(const char * data, std::size_t size) + : Data(data) + , Size(size) + { + } +}; + + +template +class OStream +{ +public: + explicit OStream(std::shared_ptr channel) + : Out(*channel) + , Holder(channel) + { + } + + explicit OStream(OutputChannelType & channel) + : Out(channel) + { + } + + virtual ~OStream() + { + } + + template + OStream & operator<<(const T & value) + { + Serializer << value; + return *this; + } + + OStream & operator<< (OStream & (*pf)(OStream & out)) + { + return pf(*this); + } + + void Flush() + { + Serializer.Flush(Out); + } + +private: + OutputChannelType & Out; + std::shared_ptr Holder; + DataSerializer Serializer; +}; + +template +inline OStream & flush(OStream & os) +{ + os.Flush(); + return os; +} + +struct RawBuffer +{ + char * Data; + std::size_t Size; + + RawBuffer(char * data, std::size_t size) + : Data(data) + , Size(size) + { + } +}; + + +template +class IStream : private DataSupplier +{ +public: + explicit IStream(std::shared_ptr channel) + : In(*channel) + , Holder(channel) + , Deserializer(*this) + { + } + + explicit IStream(InputChannelType & channel) + : In(channel) + , Deserializer(*this) + { + } + + virtual ~IStream() + { + } + + template + IStream & operator>>(T & value) + { + Deserializer >> value; + return *this; + } + +private: + virtual size_t Read(char * buffer, size_t size) + { + return In.Receive(buffer, size); + } + +private: + InputChannelType & In; + std::shared_ptr Holder; + DataDeserializer Deserializer; +}; + + +template +class IOStream : public IStream, public OStream +{ +public: + IOStream(std::shared_ptr channel) + : IStream(channel) + , OStream(channel) + { + } +}; + +template +class InputOutputStream : public IStream, public OStream +{ +public: + InputOutputStream(std::shared_ptr input, std::shared_ptr output) + : IStream(input) + , OStream(output) + { + } +}; + +typedef OpcUa::Binary::IOStream IOStreamBinary; +typedef OpcUa::Binary::IStream IStreamBinary; +typedef OpcUa::Binary::OStream OStreamBinary; + +} // namespace Binary } // namespace OpcUa #endif // __OPC_UA_MAPPING_SERIALIZE_H__ diff --git a/include/opc/ua/protocol/channel.h b/include/opc/ua/protocol/channel.h index 79cdede8..691992d7 100644 --- a/include/opc/ua/protocol/channel.h +++ b/include/opc/ua/protocol/channel.h @@ -18,69 +18,69 @@ namespace OpcUa { - class BreakableChannel - { - public: - virtual ~BreakableChannel(){} - BreakableChannel(){} - BreakableChannel(const BreakableChannel&) = delete; - BreakableChannel(BreakableChannel&&) = delete; - BreakableChannel& operator=(const BreakableChannel&) = delete; - - public: - virtual void Stop() = 0; - }; - - - class InputChannel : public virtual BreakableChannel - { - public: - typedef std::shared_ptr SharedPtr; - typedef std::unique_ptr UniquePtr; - - public: - virtual ~InputChannel(){} - InputChannel(){} - InputChannel(const InputChannel&) = delete; - InputChannel(InputChannel&&) = delete; - InputChannel& operator=(const InputChannel&) = delete; - - public: - /// @brief Receive data - /// @param data data for send - /// @param size size of data - /// @return size of received data - virtual std::size_t Receive(char* data, std::size_t size) = 0; - }; - - - class OutputChannel : public virtual BreakableChannel - { - public: - typedef std::shared_ptr SharedPtr; - typedef std::unique_ptr UniquePtr; - - public: - virtual ~OutputChannel(){} - - OutputChannel(){} - OutputChannel(const OutputChannel&) = delete; - OutputChannel(OutputChannel&&) = delete; - OutputChannel& operator=(const OutputChannel&) = delete; - - public: - virtual void Send(const char* message, std::size_t size) = 0; - }; - - - class IOChannel : - public InputChannel, - public OutputChannel - { - public: - typedef std::shared_ptr SharedPtr; - typedef std::unique_ptr UniquePtr; - }; +class BreakableChannel +{ +public: + virtual ~BreakableChannel() {} + BreakableChannel() {} + BreakableChannel(const BreakableChannel &) = delete; + BreakableChannel(BreakableChannel &&) = delete; + BreakableChannel & operator=(const BreakableChannel &) = delete; + +public: + virtual void Stop() = 0; +}; + + +class InputChannel : public virtual BreakableChannel +{ +public: + typedef std::shared_ptr SharedPtr; + typedef std::unique_ptr UniquePtr; + +public: + virtual ~InputChannel() {} + InputChannel() {} + InputChannel(const InputChannel &) = delete; + InputChannel(InputChannel &&) = delete; + InputChannel & operator=(const InputChannel &) = delete; + +public: + /// @brief Receive data + /// @param data data for send + /// @param size size of data + /// @return size of received data + virtual std::size_t Receive(char * data, std::size_t size) = 0; +}; + + +class OutputChannel : public virtual BreakableChannel +{ +public: + typedef std::shared_ptr SharedPtr; + typedef std::unique_ptr UniquePtr; + +public: + virtual ~OutputChannel() {} + + OutputChannel() {} + OutputChannel(const OutputChannel &) = delete; + OutputChannel(OutputChannel &&) = delete; + OutputChannel & operator=(const OutputChannel &) = delete; + +public: + virtual void Send(const char * message, std::size_t size) = 0; +}; + + +class IOChannel : + public InputChannel, + public OutputChannel +{ +public: + typedef std::shared_ptr SharedPtr; + typedef std::unique_ptr UniquePtr; +}; } diff --git a/include/opc/ua/protocol/data_value.h b/include/opc/ua/protocol/data_value.h index f54b2260..665e5848 100644 --- a/include/opc/ua/protocol/data_value.h +++ b/include/opc/ua/protocol/data_value.h @@ -15,104 +15,110 @@ namespace OpcUa { - const uint8_t DATA_VALUE = 1; - const uint8_t DATA_VALUE_STATUS_CODE = 2; - const uint8_t DATA_VALUE_SOURCE_TIMESTAMP = 4; - const uint8_t DATA_VALUE_Server_TIMESTAMP = 8; - const uint8_t DATA_VALUE_SOURCE_PICOSECONDS = 16; - const uint8_t DATA_VALUE_Server_PICOSECONDS = 32; - const uint8_t DATA_VALUE_ALL = ~uint8_t(); - - struct DataValue +const uint8_t DATA_VALUE = 1; +const uint8_t DATA_VALUE_STATUS_CODE = 2; +const uint8_t DATA_VALUE_SOURCE_TIMESTAMP = 4; +const uint8_t DATA_VALUE_Server_TIMESTAMP = 8; +const uint8_t DATA_VALUE_SOURCE_PICOSECONDS = 16; +const uint8_t DATA_VALUE_Server_PICOSECONDS = 32; +const uint8_t DATA_VALUE_ALL = ~uint8_t(); + +struct DataValue +{ + uint8_t Encoding; + Variant Value; + StatusCode Status; + DateTime SourceTimestamp; + uint16_t SourcePicoseconds; + DateTime ServerTimestamp; + uint16_t ServerPicoseconds; + + DataValue() + : Encoding(0) + , Status(StatusCode::Good) + , SourceTimestamp(0) + , SourcePicoseconds(0) + , ServerTimestamp(0) + , ServerPicoseconds(0) + { + } + + DataValue(const DataValue & data) = default; + + explicit DataValue(const Variant & value) + : DataValue() + { + Value = value; + Encoding |= DATA_VALUE; + } + + template + explicit DataValue(const T val) + : DataValue() + { + Value = Variant(val); + Encoding |= DATA_VALUE; + } + + DataValue & operator= (const Variant & value) + { + Value = value; + Encoding |= DATA_VALUE; + return *this; + } + + template + DataValue & operator= (const T & value) + { + Value = Variant(value); + Encoding |= DATA_VALUE; + return *this; + } + + template + bool operator== (const T & t) const + { + return (Encoding & DATA_VALUE) && Value == t; + } + + bool operator== (const DataValue & data) const + { + if (Encoding != data.Encoding) + { return false; } + + if ((Encoding & DATA_VALUE) && Value != data.Value) + { return false; } + + if ((Encoding & DATA_VALUE_STATUS_CODE) && Status != data.Status) + { return false; } + + if ((Encoding & DATA_VALUE_SOURCE_TIMESTAMP) && SourceTimestamp != data.SourceTimestamp) + { return false; } + + if ((Encoding & DATA_VALUE_SOURCE_PICOSECONDS) && SourcePicoseconds != data.SourcePicoseconds) + { return false; } + + if ((Encoding & DATA_VALUE_Server_TIMESTAMP) && ServerTimestamp != data.ServerTimestamp) + { return false; } + + if ((Encoding & DATA_VALUE_Server_PICOSECONDS) && ServerPicoseconds != data.ServerPicoseconds) + { return false; } + + return true; + } + + void SetSourceTimestamp(const DateTime & t) + { + SourceTimestamp = t; + Encoding |= DATA_VALUE_SOURCE_TIMESTAMP; + } + + void SetServerTimestamp(const DateTime & t) { - uint8_t Encoding; - Variant Value; - StatusCode Status; - DateTime SourceTimestamp; - uint16_t SourcePicoseconds; - DateTime ServerTimestamp; - uint16_t ServerPicoseconds; - - DataValue() - : Encoding(0) - , Status(StatusCode::Good) - , SourceTimestamp(0) - , SourcePicoseconds(0) - , ServerTimestamp(0) - , ServerPicoseconds(0) - { - } - - DataValue(const DataValue& data) = default; - - explicit DataValue(const Variant& value) - : DataValue() - { - Value = value; - Encoding |= DATA_VALUE; - } - - template - explicit DataValue(const T val) - : DataValue() - { - Value = Variant(val); - Encoding |= DATA_VALUE; - } - - DataValue& operator= (const Variant& value) - { - Value = value; - Encoding |= DATA_VALUE; - return *this; - } - - template - DataValue& operator= (const T& value) - { - Value = Variant(value); - Encoding |= DATA_VALUE; - return *this; - } - - template - bool operator== (const T& t) const - { - return (Encoding & DATA_VALUE) && Value == t; - } - - bool operator== (const DataValue& data) const - { - if (Encoding != data.Encoding) - return false; - if ((Encoding & DATA_VALUE) && Value != data.Value) - return false; - if ((Encoding & DATA_VALUE_STATUS_CODE) && Status != data.Status) - return false; - if ((Encoding & DATA_VALUE_SOURCE_TIMESTAMP) && SourceTimestamp != data.SourceTimestamp) - return false; - if ((Encoding & DATA_VALUE_SOURCE_PICOSECONDS) && SourcePicoseconds != data.SourcePicoseconds) - return false; - if ((Encoding & DATA_VALUE_Server_TIMESTAMP) && ServerTimestamp != data.ServerTimestamp) - return false; - if ((Encoding & DATA_VALUE_Server_PICOSECONDS) && ServerPicoseconds != data.ServerPicoseconds) - return false; - - return true; - } - - void SetSourceTimestamp(const DateTime& t) - { - SourceTimestamp = t; - Encoding |= DATA_VALUE_SOURCE_TIMESTAMP; - } - - void SetServerTimestamp(const DateTime& t) - { - ServerTimestamp = t; - Encoding |= DATA_VALUE_Server_TIMESTAMP; - } - }; + ServerTimestamp = t; + Encoding |= DATA_VALUE_Server_TIMESTAMP; + } +}; } // namespace OpcUa diff --git a/include/opc/ua/protocol/datetime.h b/include/opc/ua/protocol/datetime.h index 82923b65..34b5f1bb 100644 --- a/include/opc/ua/protocol/datetime.h +++ b/include/opc/ua/protocol/datetime.h @@ -17,40 +17,40 @@ namespace OpcUa { - struct DateTime +struct DateTime +{ + DateTime() + : Value(0) + { + } + + explicit DateTime(int64_t value) + : Value(value) + { + } + + static DateTime Current(); + static DateTime FromTimeT(time_t t, unsigned usec = 0); + static time_t ToTimeT(DateTime dateTime); + + DateTime(const DateTime &) = default; + DateTime & operator=(const DateTime &) = default; + DateTime & operator+=(const DateTime & val) { - DateTime() - : Value(0) - { - } - - explicit DateTime(int64_t value) - : Value(value) - { - } - - static DateTime Current(); - static DateTime FromTimeT(time_t t, unsigned usec = 0); - static time_t ToTimeT(DateTime dateTime); - - DateTime(const DateTime&) = default; - DateTime& operator=(const DateTime&) = default; - DateTime& operator+=(const DateTime& val) - { - Value += val.Value; - return *this; - } - - operator int64_t() const - { - return Value; - } - - int64_t Value; - }; - - - typedef double Duration; // Time duration in miliseconds. + Value += val.Value; + return *this; + } + + operator int64_t() const + { + return Value; + } + + int64_t Value; +}; + + +typedef double Duration; // Time duration in miliseconds. } // OpcUa diff --git a/include/opc/ua/protocol/describe.h b/include/opc/ua/protocol/describe.h index 4aa16449..ba1a9825 100644 --- a/include/opc/ua/protocol/describe.h +++ b/include/opc/ua/protocol/describe.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -17,27 +17,28 @@ namespace OpcUa { - struct Tabs +struct Tabs +{ + explicit Tabs(unsigned num = 0) + : Num(num) { - explicit Tabs(unsigned num = 0) - : Num(num) - { - } + } - unsigned Num; - }; + unsigned Num; +}; - std::ostream& operator <<(std::ostream& os, const Tabs& tabs) - { - for (unsigned i = 0; i < tabs.Num; ++i) +std::ostream & operator <<(std::ostream & os, const Tabs & tabs) +{ + for (unsigned i = 0; i < tabs.Num; ++i) { os << " "; } - return os; - } - template - std::string Describe(const T& object, const Tabs& tabs); + return os; +} + +template +std::string Describe(const T & object, const Tabs & tabs); } diff --git a/include/opc/ua/protocol/endpoints.h b/include/opc/ua/protocol/endpoints.h index d6527814..36c80b83 100644 --- a/include/opc/ua/protocol/endpoints.h +++ b/include/opc/ua/protocol/endpoints.h @@ -17,38 +17,38 @@ namespace OpcUa { - //////////////////////////////////////////////////////// - // FindServersRequest - //////////////////////////////////////////////////////// - struct FindServersParameters - { - std::string EndpointUrl; - std::vector Locales; - std::vector ServersToReturn; - }; - - struct FindServersRequest - { - NodeId TypeId; - RequestHeader Header; - FindServersParameters Parameters; - - FindServersRequest(); - }; - - struct FindServersData - { - std::vector Descriptions; - }; - - struct FindServersResponse - { - NodeId TypeId; - ResponseHeader Header; - FindServersData Data; - - FindServersResponse(); - }; +//////////////////////////////////////////////////////// +// FindServersRequest +//////////////////////////////////////////////////////// +struct FindServersParameters +{ + std::string EndpointUrl; + std::vector Locales; + std::vector ServersToReturn; +}; + +struct FindServersRequest +{ + NodeId TypeId; + RequestHeader Header; + FindServersParameters Parameters; + + FindServersRequest(); +}; + +struct FindServersData +{ + std::vector Descriptions; +}; + +struct FindServersResponse +{ + NodeId TypeId; + ResponseHeader Header; + FindServersData Data; + + FindServersResponse(); +}; } // namespace OpcUa diff --git a/include/opc/ua/protocol/enums.h b/include/opc/ua/protocol/enums.h index be5c244e..93ac5e9b 100644 --- a/include/opc/ua/protocol/enums.h +++ b/include/opc/ua/protocol/enums.h @@ -20,354 +20,354 @@ namespace OpcUa { - struct DiagnosticInfo; - - - - enum class OpenFileMode : uint32_t - { - Read = 1, - Write = 2, - EraseExisiting = 4, - Append = 8, - }; - inline OpenFileMode operator|(OpenFileMode a, OpenFileMode b) { return static_cast(static_cast(a) | static_cast(b)); } - inline OpenFileMode operator&(OpenFileMode a, OpenFileMode b) { return static_cast(static_cast(a) & static_cast(b)); } - - - // A mask specifying the class of the node. - enum class NodeClass : uint32_t - { - Unspecified = 0, - Object = 1, - Variable = 2, - Method = 4, - ObjectType = 8, - VariableType = 16, - ReferenceType = 32, - DataType = 64, - View = 128, - }; - inline NodeClass operator|(NodeClass a, NodeClass b) { return static_cast(static_cast(a) | static_cast(b)); } - inline NodeClass operator&(NodeClass a, NodeClass b) { return static_cast(static_cast(a) & static_cast(b)); } - - - // The types of applications. - enum class ApplicationType : uint32_t - { - Server = 0, - Client = 1, - ClientAndServer = 2, - DiscoveryServer = 3, - }; - inline ApplicationType operator|(ApplicationType a, ApplicationType b) { return static_cast(static_cast(a) | static_cast(b)); } - inline ApplicationType operator&(ApplicationType a, ApplicationType b) { return static_cast(static_cast(a) & static_cast(b)); } - - - // The type of security to use on a message. - enum class MessageSecurityMode : uint32_t - { - Invalid = 0, - None = 1, - Sign = 2, - SignAndEncrypt = 3, - }; - inline MessageSecurityMode operator|(MessageSecurityMode a, MessageSecurityMode b) { return static_cast(static_cast(a) | static_cast(b)); } - inline MessageSecurityMode operator&(MessageSecurityMode a, MessageSecurityMode b) { return static_cast(static_cast(a) & static_cast(b)); } - - - // The possible user token types. - enum class UserTokenType : uint32_t - { - Anonymous = 0, - UserName = 1, - Certificate = 2, - IssuedToken = 3, - }; - inline UserTokenType operator|(UserTokenType a, UserTokenType b) { return static_cast(static_cast(a) | static_cast(b)); } - inline UserTokenType operator&(UserTokenType a, UserTokenType b) { return static_cast(static_cast(a) & static_cast(b)); } - - - // Indicates whether a token if being created or renewed. - enum class SecurityTokenRequestType : uint32_t - { - Issue = 0, - Renew = 1, - }; - inline SecurityTokenRequestType operator|(SecurityTokenRequestType a, SecurityTokenRequestType b) { return static_cast(static_cast(a) | static_cast(b)); } - inline SecurityTokenRequestType operator&(SecurityTokenRequestType a, SecurityTokenRequestType b) { return static_cast(static_cast(a) & static_cast(b)); } - - - // The bits used to specify default attributes for a new node. - enum class NodeAttributesMask : uint32_t - { - None = 0, - AccessLevel = 1, - ArrayDimensions = 2, - BrowseName = 4, - ContainsNoLoops = 8, - DataType = 16, - Description = 32, - DisplayName = 64, - EventNotifier = 128, - Executable = 256, - Historizing = 512, - InverseName = 1024, - IsAbstract = 2048, - MinimumSamplingInterval = 4096, - NodeClass = 8192, - NodeId = 16384, - Symmetric = 32768, - UserAccessLevel = 65536, - UserExecutable = 131072, - UserWriteMask = 262144, - ValueRank = 524288, - WriteMask = 1048576, - Value = 2097152, - All = 4194303, - BaseNode = 1335396, - Object = 1335524, - ObjectTypeOrDataType = 1337444, - Variable = 4026999, - VariableType = 3958902, - Method = 1466724, - ReferenceType = 1371236, - View = 1335532, - }; - inline NodeAttributesMask operator|(NodeAttributesMask a, NodeAttributesMask b) { return static_cast(static_cast(a) | static_cast(b)); } - inline NodeAttributesMask operator&(NodeAttributesMask a, NodeAttributesMask b) { return static_cast(static_cast(a) & static_cast(b)); } - - - // Define bits used to indicate which attributes are writeable. - enum class AttributeWriteMask : uint32_t - { - None = 0, - AccessLevel = 1, - ArrayDimensions = 2, - BrowseName = 4, - ContainsNoLoops = 8, - DataType = 16, - Description = 32, - DisplayName = 64, - EventNotifier = 128, - Executable = 256, - Historizing = 512, - InverseName = 1024, - IsAbstract = 2048, - MinimumSamplingInterval = 4096, - NodeClass = 8192, - NodeId = 16384, - Symmetric = 32768, - UserAccessLevel = 65536, - UserExecutable = 131072, - UserWriteMask = 262144, - ValueRank = 524288, - WriteMask = 1048576, - ValueForVariableType = 2097152, - }; - inline AttributeWriteMask operator|(AttributeWriteMask a, AttributeWriteMask b) { return static_cast(static_cast(a) | static_cast(b)); } - inline AttributeWriteMask operator&(AttributeWriteMask a, AttributeWriteMask b) { return static_cast(static_cast(a) & static_cast(b)); } - - - // The directions of the references to return. - enum class BrowseDirection : uint32_t - { - Forward = 0, - Inverse = 1, - Both = 2, - }; - inline BrowseDirection operator|(BrowseDirection a, BrowseDirection b) { return static_cast(static_cast(a) | static_cast(b)); } - inline BrowseDirection operator&(BrowseDirection a, BrowseDirection b) { return static_cast(static_cast(a) & static_cast(b)); } - - - // A bit mask which specifies what should be returned in a browse response. - enum class BrowseResultMask : uint32_t - { - None = 0, - ReferenceTypeId = 1, - IsForward = 2, - NodeClass = 4, - BrowseName = 8, - DisplayName = 16, - TypeDefinition = 32, - All = 63, - ReferenceTypeInfo = 3, - TargetInfo = 60, - }; - inline BrowseResultMask operator|(BrowseResultMask a, BrowseResultMask b) { return static_cast(static_cast(a) | static_cast(b)); } - inline BrowseResultMask operator&(BrowseResultMask a, BrowseResultMask b) { return static_cast(static_cast(a) & static_cast(b)); } - - - enum class ComplianceLevel : uint32_t - { - Untested = 0, - Partial = 1, - SelfTested = 2, - Certified = 3, - }; - inline ComplianceLevel operator|(ComplianceLevel a, ComplianceLevel b) { return static_cast(static_cast(a) | static_cast(b)); } - inline ComplianceLevel operator&(ComplianceLevel a, ComplianceLevel b) { return static_cast(static_cast(a) & static_cast(b)); } - - - enum class FilterOperator : uint32_t - { - Equals = 0, - IsNull = 1, - GreaterThan = 2, - LessThan = 3, - GreaterThanOrEqual = 4, - LessThanOrEqual = 5, - Like = 6, - Not = 7, - Between = 8, - InList = 9, - And = 10, - Or = 11, - Cast = 12, - InView = 13, - OfType = 14, - RelatedTo = 15, - BitwiseAnd = 16, - BitwiseOr = 17, - }; - inline FilterOperator operator|(FilterOperator a, FilterOperator b) { return static_cast(static_cast(a) | static_cast(b)); } - inline FilterOperator operator&(FilterOperator a, FilterOperator b) { return static_cast(static_cast(a) & static_cast(b)); } - - - enum class TimestampsToReturn : uint32_t - { - Source = 0, - Server = 1, - Both = 2, - Neither = 3, - }; - inline TimestampsToReturn operator|(TimestampsToReturn a, TimestampsToReturn b) { return static_cast(static_cast(a) | static_cast(b)); } - inline TimestampsToReturn operator&(TimestampsToReturn a, TimestampsToReturn b) { return static_cast(static_cast(a) & static_cast(b)); } - - - enum class HistoryUpdateType : uint32_t - { - Insert = 1, - Replace = 2, - Update = 3, - Delete = 4, - }; - inline HistoryUpdateType operator|(HistoryUpdateType a, HistoryUpdateType b) { return static_cast(static_cast(a) | static_cast(b)); } - inline HistoryUpdateType operator&(HistoryUpdateType a, HistoryUpdateType b) { return static_cast(static_cast(a) & static_cast(b)); } - - - enum class PerformUpdateType : uint32_t - { - Insert = 1, - Replace = 2, - Update = 3, - Remove = 4, - }; - inline PerformUpdateType operator|(PerformUpdateType a, PerformUpdateType b) { return static_cast(static_cast(a) | static_cast(b)); } - inline PerformUpdateType operator&(PerformUpdateType a, PerformUpdateType b) { return static_cast(static_cast(a) & static_cast(b)); } - - - enum class MonitoringMode : uint32_t - { - Disabled = 0, - Sampling = 1, - Reporting = 2, - }; - inline MonitoringMode operator|(MonitoringMode a, MonitoringMode b) { return static_cast(static_cast(a) | static_cast(b)); } - inline MonitoringMode operator&(MonitoringMode a, MonitoringMode b) { return static_cast(static_cast(a) & static_cast(b)); } - - - enum class DataChangeTrigger : uint32_t - { - Status = 0, - StatusValue = 1, - StatusValueTimestamp = 2, - }; - inline DataChangeTrigger operator|(DataChangeTrigger a, DataChangeTrigger b) { return static_cast(static_cast(a) | static_cast(b)); } - inline DataChangeTrigger operator&(DataChangeTrigger a, DataChangeTrigger b) { return static_cast(static_cast(a) & static_cast(b)); } - - - enum class DeadbandType : uint32_t - { - None = 0, - Absolute = 1, - Percent = 2, - }; - inline DeadbandType operator|(DeadbandType a, DeadbandType b) { return static_cast(static_cast(a) | static_cast(b)); } - inline DeadbandType operator&(DeadbandType a, DeadbandType b) { return static_cast(static_cast(a) & static_cast(b)); } - - - // A simple enumerated type used for testing. - enum class EnumeratedTestType : uint32_t - { - Red = 1, - Yellow = 4, - Green = 5, - }; - inline EnumeratedTestType operator|(EnumeratedTestType a, EnumeratedTestType b) { return static_cast(static_cast(a) | static_cast(b)); } - inline EnumeratedTestType operator&(EnumeratedTestType a, EnumeratedTestType b) { return static_cast(static_cast(a) & static_cast(b)); } - - - enum class RedundancySupport : uint32_t - { - None = 0, - Cold = 1, - Warm = 2, - Hot = 3, - Transparent = 4, - HotAndMirrored = 5, - }; - inline RedundancySupport operator|(RedundancySupport a, RedundancySupport b) { return static_cast(static_cast(a) | static_cast(b)); } - inline RedundancySupport operator&(RedundancySupport a, RedundancySupport b) { return static_cast(static_cast(a) & static_cast(b)); } - - - enum class ServerState : uint32_t - { - Running = 0, - Failed = 1, - NoConfiguration = 2, - Suspended = 3, - Shutdown = 4, - Test = 5, - CommunicationFault = 6, - Unknown = 7, - }; - inline ServerState operator|(ServerState a, ServerState b) { return static_cast(static_cast(a) | static_cast(b)); } - inline ServerState operator&(ServerState a, ServerState b) { return static_cast(static_cast(a) & static_cast(b)); } - - - enum class ModelChangeStructureVerbMask : uint32_t - { - NodeAdded = 1, - NodeDeleted = 2, - ReferenceAdded = 4, - ReferenceDeleted = 8, - DataTypeChanged = 16, - }; - inline ModelChangeStructureVerbMask operator|(ModelChangeStructureVerbMask a, ModelChangeStructureVerbMask b) { return static_cast(static_cast(a) | static_cast(b)); } - inline ModelChangeStructureVerbMask operator&(ModelChangeStructureVerbMask a, ModelChangeStructureVerbMask b) { return static_cast(static_cast(a) & static_cast(b)); } - - - enum class AxisScaleEnumeration : uint32_t - { - Linear = 0, - Log = 1, - Ln = 2, - }; - inline AxisScaleEnumeration operator|(AxisScaleEnumeration a, AxisScaleEnumeration b) { return static_cast(static_cast(a) | static_cast(b)); } - inline AxisScaleEnumeration operator&(AxisScaleEnumeration a, AxisScaleEnumeration b) { return static_cast(static_cast(a) & static_cast(b)); } - - - enum class ExceptionDeviationFormat : uint32_t - { - AbsoluteValue = 0, - PercentOfRange = 1, - PercentOfValue = 2, - PercentOfEURange = 3, - Unknown = 4, - }; - inline ExceptionDeviationFormat operator|(ExceptionDeviationFormat a, ExceptionDeviationFormat b) { return static_cast(static_cast(a) | static_cast(b)); } - inline ExceptionDeviationFormat operator&(ExceptionDeviationFormat a, ExceptionDeviationFormat b) { return static_cast(static_cast(a) & static_cast(b)); } +struct DiagnosticInfo; + + + +enum class OpenFileMode : uint32_t +{ + Read = 1, + Write = 2, + EraseExisiting = 4, + Append = 8, +}; +inline OpenFileMode operator|(OpenFileMode a, OpenFileMode b) { return static_cast(static_cast(a) | static_cast(b)); } +inline OpenFileMode operator&(OpenFileMode a, OpenFileMode b) { return static_cast(static_cast(a) & static_cast(b)); } + + +// A mask specifying the class of the node. +enum class NodeClass : uint32_t +{ + Unspecified = 0, + Object = 1, + Variable = 2, + Method = 4, + ObjectType = 8, + VariableType = 16, + ReferenceType = 32, + DataType = 64, + View = 128, +}; +inline NodeClass operator|(NodeClass a, NodeClass b) { return static_cast(static_cast(a) | static_cast(b)); } +inline NodeClass operator&(NodeClass a, NodeClass b) { return static_cast(static_cast(a) & static_cast(b)); } + + +// The types of applications. +enum class ApplicationType : uint32_t +{ + Server = 0, + Client = 1, + ClientAndServer = 2, + DiscoveryServer = 3, +}; +inline ApplicationType operator|(ApplicationType a, ApplicationType b) { return static_cast(static_cast(a) | static_cast(b)); } +inline ApplicationType operator&(ApplicationType a, ApplicationType b) { return static_cast(static_cast(a) & static_cast(b)); } + + +// The type of security to use on a message. +enum class MessageSecurityMode : uint32_t +{ + Invalid = 0, + None = 1, + Sign = 2, + SignAndEncrypt = 3, +}; +inline MessageSecurityMode operator|(MessageSecurityMode a, MessageSecurityMode b) { return static_cast(static_cast(a) | static_cast(b)); } +inline MessageSecurityMode operator&(MessageSecurityMode a, MessageSecurityMode b) { return static_cast(static_cast(a) & static_cast(b)); } + + +// The possible user token types. +enum class UserTokenType : uint32_t +{ + Anonymous = 0, + UserName = 1, + Certificate = 2, + IssuedToken = 3, +}; +inline UserTokenType operator|(UserTokenType a, UserTokenType b) { return static_cast(static_cast(a) | static_cast(b)); } +inline UserTokenType operator&(UserTokenType a, UserTokenType b) { return static_cast(static_cast(a) & static_cast(b)); } + + +// Indicates whether a token if being created or renewed. +enum class SecurityTokenRequestType : uint32_t +{ + Issue = 0, + Renew = 1, +}; +inline SecurityTokenRequestType operator|(SecurityTokenRequestType a, SecurityTokenRequestType b) { return static_cast(static_cast(a) | static_cast(b)); } +inline SecurityTokenRequestType operator&(SecurityTokenRequestType a, SecurityTokenRequestType b) { return static_cast(static_cast(a) & static_cast(b)); } + + +// The bits used to specify default attributes for a new node. +enum class NodeAttributesMask : uint32_t +{ + None = 0, + AccessLevel = 1, + ArrayDimensions = 2, + BrowseName = 4, + ContainsNoLoops = 8, + DataType = 16, + Description = 32, + DisplayName = 64, + EventNotifier = 128, + Executable = 256, + Historizing = 512, + InverseName = 1024, + IsAbstract = 2048, + MinimumSamplingInterval = 4096, + NodeClass = 8192, + NodeId = 16384, + Symmetric = 32768, + UserAccessLevel = 65536, + UserExecutable = 131072, + UserWriteMask = 262144, + ValueRank = 524288, + WriteMask = 1048576, + Value = 2097152, + All = 4194303, + BaseNode = 1335396, + Object = 1335524, + ObjectTypeOrDataType = 1337444, + Variable = 4026999, + VariableType = 3958902, + Method = 1466724, + ReferenceType = 1371236, + View = 1335532, +}; +inline NodeAttributesMask operator|(NodeAttributesMask a, NodeAttributesMask b) { return static_cast(static_cast(a) | static_cast(b)); } +inline NodeAttributesMask operator&(NodeAttributesMask a, NodeAttributesMask b) { return static_cast(static_cast(a) & static_cast(b)); } + + +// Define bits used to indicate which attributes are writeable. +enum class AttributeWriteMask : uint32_t +{ + None = 0, + AccessLevel = 1, + ArrayDimensions = 2, + BrowseName = 4, + ContainsNoLoops = 8, + DataType = 16, + Description = 32, + DisplayName = 64, + EventNotifier = 128, + Executable = 256, + Historizing = 512, + InverseName = 1024, + IsAbstract = 2048, + MinimumSamplingInterval = 4096, + NodeClass = 8192, + NodeId = 16384, + Symmetric = 32768, + UserAccessLevel = 65536, + UserExecutable = 131072, + UserWriteMask = 262144, + ValueRank = 524288, + WriteMask = 1048576, + ValueForVariableType = 2097152, +}; +inline AttributeWriteMask operator|(AttributeWriteMask a, AttributeWriteMask b) { return static_cast(static_cast(a) | static_cast(b)); } +inline AttributeWriteMask operator&(AttributeWriteMask a, AttributeWriteMask b) { return static_cast(static_cast(a) & static_cast(b)); } + + +// The directions of the references to return. +enum class BrowseDirection : uint32_t +{ + Forward = 0, + Inverse = 1, + Both = 2, +}; +inline BrowseDirection operator|(BrowseDirection a, BrowseDirection b) { return static_cast(static_cast(a) | static_cast(b)); } +inline BrowseDirection operator&(BrowseDirection a, BrowseDirection b) { return static_cast(static_cast(a) & static_cast(b)); } + + +// A bit mask which specifies what should be returned in a browse response. +enum class BrowseResultMask : uint32_t +{ + None = 0, + ReferenceTypeId = 1, + IsForward = 2, + NodeClass = 4, + BrowseName = 8, + DisplayName = 16, + TypeDefinition = 32, + All = 63, + ReferenceTypeInfo = 3, + TargetInfo = 60, +}; +inline BrowseResultMask operator|(BrowseResultMask a, BrowseResultMask b) { return static_cast(static_cast(a) | static_cast(b)); } +inline BrowseResultMask operator&(BrowseResultMask a, BrowseResultMask b) { return static_cast(static_cast(a) & static_cast(b)); } + + +enum class ComplianceLevel : uint32_t +{ + Untested = 0, + Partial = 1, + SelfTested = 2, + Certified = 3, +}; +inline ComplianceLevel operator|(ComplianceLevel a, ComplianceLevel b) { return static_cast(static_cast(a) | static_cast(b)); } +inline ComplianceLevel operator&(ComplianceLevel a, ComplianceLevel b) { return static_cast(static_cast(a) & static_cast(b)); } + + +enum class FilterOperator : uint32_t +{ + Equals = 0, + IsNull = 1, + GreaterThan = 2, + LessThan = 3, + GreaterThanOrEqual = 4, + LessThanOrEqual = 5, + Like = 6, + Not = 7, + Between = 8, + InList = 9, + And = 10, + Or = 11, + Cast = 12, + InView = 13, + OfType = 14, + RelatedTo = 15, + BitwiseAnd = 16, + BitwiseOr = 17, +}; +inline FilterOperator operator|(FilterOperator a, FilterOperator b) { return static_cast(static_cast(a) | static_cast(b)); } +inline FilterOperator operator&(FilterOperator a, FilterOperator b) { return static_cast(static_cast(a) & static_cast(b)); } + + +enum class TimestampsToReturn : uint32_t +{ + Source = 0, + Server = 1, + Both = 2, + Neither = 3, +}; +inline TimestampsToReturn operator|(TimestampsToReturn a, TimestampsToReturn b) { return static_cast(static_cast(a) | static_cast(b)); } +inline TimestampsToReturn operator&(TimestampsToReturn a, TimestampsToReturn b) { return static_cast(static_cast(a) & static_cast(b)); } + + +enum class HistoryUpdateType : uint32_t +{ + Insert = 1, + Replace = 2, + Update = 3, + Delete = 4, +}; +inline HistoryUpdateType operator|(HistoryUpdateType a, HistoryUpdateType b) { return static_cast(static_cast(a) | static_cast(b)); } +inline HistoryUpdateType operator&(HistoryUpdateType a, HistoryUpdateType b) { return static_cast(static_cast(a) & static_cast(b)); } + + +enum class PerformUpdateType : uint32_t +{ + Insert = 1, + Replace = 2, + Update = 3, + Remove = 4, +}; +inline PerformUpdateType operator|(PerformUpdateType a, PerformUpdateType b) { return static_cast(static_cast(a) | static_cast(b)); } +inline PerformUpdateType operator&(PerformUpdateType a, PerformUpdateType b) { return static_cast(static_cast(a) & static_cast(b)); } + + +enum class MonitoringMode : uint32_t +{ + Disabled = 0, + Sampling = 1, + Reporting = 2, +}; +inline MonitoringMode operator|(MonitoringMode a, MonitoringMode b) { return static_cast(static_cast(a) | static_cast(b)); } +inline MonitoringMode operator&(MonitoringMode a, MonitoringMode b) { return static_cast(static_cast(a) & static_cast(b)); } + + +enum class DataChangeTrigger : uint32_t +{ + Status = 0, + StatusValue = 1, + StatusValueTimestamp = 2, +}; +inline DataChangeTrigger operator|(DataChangeTrigger a, DataChangeTrigger b) { return static_cast(static_cast(a) | static_cast(b)); } +inline DataChangeTrigger operator&(DataChangeTrigger a, DataChangeTrigger b) { return static_cast(static_cast(a) & static_cast(b)); } + + +enum class DeadbandType : uint32_t +{ + None = 0, + Absolute = 1, + Percent = 2, +}; +inline DeadbandType operator|(DeadbandType a, DeadbandType b) { return static_cast(static_cast(a) | static_cast(b)); } +inline DeadbandType operator&(DeadbandType a, DeadbandType b) { return static_cast(static_cast(a) & static_cast(b)); } + + +// A simple enumerated type used for testing. +enum class EnumeratedTestType : uint32_t +{ + Red = 1, + Yellow = 4, + Green = 5, +}; +inline EnumeratedTestType operator|(EnumeratedTestType a, EnumeratedTestType b) { return static_cast(static_cast(a) | static_cast(b)); } +inline EnumeratedTestType operator&(EnumeratedTestType a, EnumeratedTestType b) { return static_cast(static_cast(a) & static_cast(b)); } + + +enum class RedundancySupport : uint32_t +{ + None = 0, + Cold = 1, + Warm = 2, + Hot = 3, + Transparent = 4, + HotAndMirrored = 5, +}; +inline RedundancySupport operator|(RedundancySupport a, RedundancySupport b) { return static_cast(static_cast(a) | static_cast(b)); } +inline RedundancySupport operator&(RedundancySupport a, RedundancySupport b) { return static_cast(static_cast(a) & static_cast(b)); } + + +enum class ServerState : uint32_t +{ + Running = 0, + Failed = 1, + NoConfiguration = 2, + Suspended = 3, + Shutdown = 4, + Test = 5, + CommunicationFault = 6, + Unknown = 7, +}; +inline ServerState operator|(ServerState a, ServerState b) { return static_cast(static_cast(a) | static_cast(b)); } +inline ServerState operator&(ServerState a, ServerState b) { return static_cast(static_cast(a) & static_cast(b)); } + + +enum class ModelChangeStructureVerbMask : uint32_t +{ + NodeAdded = 1, + NodeDeleted = 2, + ReferenceAdded = 4, + ReferenceDeleted = 8, + DataTypeChanged = 16, +}; +inline ModelChangeStructureVerbMask operator|(ModelChangeStructureVerbMask a, ModelChangeStructureVerbMask b) { return static_cast(static_cast(a) | static_cast(b)); } +inline ModelChangeStructureVerbMask operator&(ModelChangeStructureVerbMask a, ModelChangeStructureVerbMask b) { return static_cast(static_cast(a) & static_cast(b)); } + + +enum class AxisScaleEnumeration : uint32_t +{ + Linear = 0, + Log = 1, + Ln = 2, +}; +inline AxisScaleEnumeration operator|(AxisScaleEnumeration a, AxisScaleEnumeration b) { return static_cast(static_cast(a) | static_cast(b)); } +inline AxisScaleEnumeration operator&(AxisScaleEnumeration a, AxisScaleEnumeration b) { return static_cast(static_cast(a) & static_cast(b)); } + + +enum class ExceptionDeviationFormat : uint32_t +{ + AbsoluteValue = 0, + PercentOfRange = 1, + PercentOfValue = 2, + PercentOfEURange = 3, + Unknown = 4, +}; +inline ExceptionDeviationFormat operator|(ExceptionDeviationFormat a, ExceptionDeviationFormat b) { return static_cast(static_cast(a) | static_cast(b)); } +inline ExceptionDeviationFormat operator&(ExceptionDeviationFormat a, ExceptionDeviationFormat b) { return static_cast(static_cast(a) & static_cast(b)); } } // namespace - + diff --git a/include/opc/ua/protocol/expanded_object_ids.h b/include/opc/ua/protocol/expanded_object_ids.h index 9335d71d..4cf29ad4 100644 --- a/include/opc/ua/protocol/expanded_object_ids.h +++ b/include/opc/ua/protocol/expanded_object_ids.h @@ -14,33 +14,33 @@ namespace OpcUa { - enum class ExpandedObjectId : uint32_t - { - Null = 0, - ObjectAttribute = 354, - VariableAttribute = 357, - MethodAttribute = 360, - ObjectTypeAttribute = 363, - VariableTypeAttribute = 366 , - ReferenceTypeAttribute = 369, - DataTypeAttribute = 372, - ViewAttribute = 375, - - DataChangeNotification = 811, - EventNotificationList = 916, //812, - StatusChangeNotification = 820, - - DataChangeFilter = 724, - EventFilter = 727, - AggregateFilter = 730, - - ElementOperand = 594, - LiteralOperand = 597, - AttributeOperand = 600, - SimpleAttributeOperand = 603 - - - }; +enum class ExpandedObjectId : uint32_t +{ + Null = 0, + ObjectAttribute = 354, + VariableAttribute = 357, + MethodAttribute = 360, + ObjectTypeAttribute = 363, + VariableTypeAttribute = 366 , + ReferenceTypeAttribute = 369, + DataTypeAttribute = 372, + ViewAttribute = 375, + + DataChangeNotification = 811, + EventNotificationList = 916, //812, + StatusChangeNotification = 820, + + DataChangeFilter = 724, + EventFilter = 727, + AggregateFilter = 730, + + ElementOperand = 594, + LiteralOperand = 597, + AttributeOperand = 600, + SimpleAttributeOperand = 603 + + +}; } #endif // __OPC_UA_BINARY_IdENTIFIERS diff --git a/include/opc/ua/protocol/extension_identifiers.h b/include/opc/ua/protocol/extension_identifiers.h index a36ba10f..2572b3ae 100644 --- a/include/opc/ua/protocol/extension_identifiers.h +++ b/include/opc/ua/protocol/extension_identifiers.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -15,11 +15,11 @@ namespace OpcUa { - enum ExtensionObjectId : uint16_t - { - USER_IdENTIFY_TOKEN_ANONYMOUS = 0x141, // 321 - USER_IdENTIFY_TOKEN_USERNAME = 0x144, // 324 - }; +enum ExtensionObjectId : uint16_t +{ + USER_IdENTIFY_TOKEN_ANONYMOUS = 0x141, // 321 + USER_IdENTIFY_TOKEN_USERNAME = 0x144, // 324 +}; } #endif // __OPC_UA_BINARY_EXTENSION_IdENTIFIERS diff --git a/include/opc/ua/protocol/guid.h b/include/opc/ua/protocol/guid.h index cfc44a1f..c2d27bb2 100644 --- a/include/opc/ua/protocol/guid.h +++ b/include/opc/ua/protocol/guid.h @@ -16,86 +16,86 @@ namespace OpcUa { - struct Guid +struct Guid +{ + uint32_t Data1; + uint16_t Data2; + uint16_t Data3; + uint8_t Data4[8]; + + Guid() + : Data1(0) + , Data2(0) + , Data3(0) { - uint32_t Data1; - uint16_t Data2; - uint16_t Data3; - uint8_t Data4[8]; - - Guid() - : Data1(0) - , Data2(0) - , Data3(0) - { - for (unsigned i = 0; i < 8; ++i) + for (unsigned i = 0; i < 8; ++i) { Data4[i] = 0; } - } + } - inline bool operator== (const Guid& r) const - { - for (unsigned i = 0; i < 8; ++i) + inline bool operator== (const Guid & r) const + { + for (unsigned i = 0; i < 8; ++i) { if (Data4[i] != r.Data4[i]) - { - return false; - } + { + return false; + } } - return Data1 == r.Data1 && Data2 == r.Data2 && Data3 == r.Data3; - } + return Data1 == r.Data1 && Data2 == r.Data2 && Data3 == r.Data3; + } - inline bool operator< (const Guid& r) const - { - if (Data1 > r.Data1) + inline bool operator< (const Guid & r) const + { + if (Data1 > r.Data1) { return false; } - if (Data1 < r.Data1) + if (Data1 < r.Data1) { return true; } - if (Data2 > r.Data2) + if (Data2 > r.Data2) { return false; } - if (Data2 < r.Data2) + if (Data2 < r.Data2) { return true; } - if (Data3 > r.Data3) + if (Data3 > r.Data3) { return false; } - if (Data3 < r.Data3) + if (Data3 < r.Data3) { return true; } - for (unsigned i = 0; i < 8; ++i) + for (unsigned i = 0; i < 8; ++i) { if (Data4[i] > r.Data4[i]) - { - return false; - } + { + return false; + } if (Data4[i] < r.Data4[i]) - { - return true; - } + { + return true; + } } - return false; - } + return false; + } - }; +}; } // namespace OpcUa diff --git a/include/opc/ua/protocol/input_from_buffer.h b/include/opc/ua/protocol/input_from_buffer.h index daeb1e59..d5d22a9e 100644 --- a/include/opc/ua/protocol/input_from_buffer.h +++ b/include/opc/ua/protocol/input_from_buffer.h @@ -24,20 +24,20 @@ namespace OpcUa { - class InputFromBuffer : public OpcUa::InputChannel - { - public: - InputFromBuffer(const char* buf, std::size_t bufSize); +class InputFromBuffer : public OpcUa::InputChannel +{ +public: + InputFromBuffer(const char * buf, std::size_t bufSize); - virtual std::size_t Receive(char* data, std::size_t size) override; + virtual std::size_t Receive(char * data, std::size_t size) override; - size_t GetRemainSize() const; + size_t GetRemainSize() const; - virtual void Stop() override {} + virtual void Stop() override {} - private: - const char* Buffer; - std::size_t Size; - }; +private: + const char * Buffer; + std::size_t Size; +}; } diff --git a/include/opc/ua/protocol/message_identifiers.h b/include/opc/ua/protocol/message_identifiers.h index b9df95c2..5e3ab2e4 100644 --- a/include/opc/ua/protocol/message_identifiers.h +++ b/include/opc/ua/protocol/message_identifiers.h @@ -13,100 +13,100 @@ namespace OpcUa { - enum MessageId - { - INVALID = 0, +enum MessageId +{ + INVALID = 0, - ACTIVATE_SESSION_REQUEST = 0x1d3, //467; - ACTIVATE_SESSION_RESPONSE = 0x1d6, //470; + ACTIVATE_SESSION_REQUEST = 0x1d3, //467; + ACTIVATE_SESSION_RESPONSE = 0x1d6, //470; - BROWSE_REQUEST = 0x20f, // 527; - BROWSE_RESPONSE = 0x212, //530; + BROWSE_REQUEST = 0x20f, // 527; + BROWSE_RESPONSE = 0x212, //530; - BROWSE_NEXT_REQUEST = 0x215, // 533 - BROWSE_NEXT_RESPONSE = 0x218, // 536 + BROWSE_NEXT_REQUEST = 0x215, // 533 + BROWSE_NEXT_RESPONSE = 0x218, // 536 - CLOSE_SECURE_CHANNEL_REQUEST = 0x1c4, // 452 + CLOSE_SECURE_CHANNEL_REQUEST = 0x1c4, // 452 - CLOSE_SESSION_REQUEST = 0x1d9, // 473; - CLOSE_SESSION_RESPONSE = 0x1dc, // 476; + CLOSE_SESSION_REQUEST = 0x1d9, // 473; + CLOSE_SESSION_RESPONSE = 0x1dc, // 476; - // Session services - CREATE_SESSION_REQUEST = 0x1cd, // 461; - CREATE_SESSION_RESPONSE = 0x1d0, // 464; + // Session services + CREATE_SESSION_REQUEST = 0x1cd, // 461; + CREATE_SESSION_RESPONSE = 0x1d0, // 464; - // Endpoints services - FIND_ServerS_REQUEST = 0x1A6, // 422 - FIND_ServerS_RESPONSE = 0x1A9, // 425 + // Endpoints services + FIND_ServerS_REQUEST = 0x1A6, // 422 + FIND_ServerS_RESPONSE = 0x1A9, // 425 - GET_ENDPOINTS_REQUEST = 0x1ac, // 428 - GET_ENDPOINTS_RESPONSE = 0x1af, // 431 + GET_ENDPOINTS_REQUEST = 0x1ac, // 428 + GET_ENDPOINTS_RESPONSE = 0x1af, // 431 - // Secure channel services - OPEN_SECURE_CHANNEL_REQUEST = 0x1be, // 446 - OPEN_SECURE_CHANNEL_RESPONSE = 0x1c1, // 449 + // Secure channel services + OPEN_SECURE_CHANNEL_REQUEST = 0x1be, // 446 + OPEN_SECURE_CHANNEL_RESPONSE = 0x1c1, // 449 - TRANSLATE_BROWSE_PATHS_TO_NODE_IdS_REQUEST = 0x22A, // 554 - TRANSLATE_BROWSE_PATHS_TO_NODE_IdS_RESPONSE = 0x22D, // 557 + TRANSLATE_BROWSE_PATHS_TO_NODE_IdS_REQUEST = 0x22A, // 554 + TRANSLATE_BROWSE_PATHS_TO_NODE_IdS_RESPONSE = 0x22D, // 557 - REGISTER_NODES_REQUEST = 0x230, // 560 - REGISTER_NODES_RESPONSE = 0x233, // 563 + REGISTER_NODES_REQUEST = 0x230, // 560 + REGISTER_NODES_RESPONSE = 0x233, // 563 - UNREGISTER_NODES_REQUEST = 0x234, // 564 - UNREGISTER_NODES_RESPONSE = 0x237, // 567 + UNREGISTER_NODES_REQUEST = 0x234, // 564 + UNREGISTER_NODES_RESPONSE = 0x237, // 567 - READ_REQUEST = 0x277, // 631 - READ_RESPONSE = 0x27A, // 634 + READ_REQUEST = 0x277, // 631 + READ_RESPONSE = 0x27A, // 634 - WRITE_REQUEST = 0x2A1, //673 - WRITE_RESPONSE = 0x2A4, // 676 + WRITE_REQUEST = 0x2A1, //673 + WRITE_RESPONSE = 0x2A4, // 676 - CALL_REQUEST = 712, - CALL_RESPONSE = 715, // 754 + CALL_REQUEST = 712, + CALL_RESPONSE = 715, // 754 - CREATE_MONITORED_ITEMS_REQUEST = 0x2EF, // 751 - CREATE_MONITORED_ITEMS_RESPONSE = 0x2F2, // 754 + CREATE_MONITORED_ITEMS_REQUEST = 0x2EF, // 751 + CREATE_MONITORED_ITEMS_RESPONSE = 0x2F2, // 754 - DELETE_MONITORED_ITEMS_REQUEST = 0x30d, // 781 - DELETE_MONITORED_ITEMS_RESPONSE = 0x310, // 784 + DELETE_MONITORED_ITEMS_REQUEST = 0x30d, // 781 + DELETE_MONITORED_ITEMS_RESPONSE = 0x310, // 784 - CREATE_SUBSCRIPTION_REQUEST = 0x313, //787 - CREATE_SUBSCRIPTION_RESPONSE = 0x316, //790 + CREATE_SUBSCRIPTION_REQUEST = 0x313, //787 + CREATE_SUBSCRIPTION_RESPONSE = 0x316, //790 - DELETE_SUBSCRIPTION_REQUEST = 0x34f, //847 - DELETE_SUBSCRIPTION_RESPONSE = 0x352, //850 + DELETE_SUBSCRIPTION_REQUEST = 0x34f, //847 + DELETE_SUBSCRIPTION_RESPONSE = 0x352, //850 - MODIFY_SUBSCRIPTION_REQUEST = 0x319, //793 - MODIFY_SUBSCRIPTION_RESPONSE = 0x31c, //796 + MODIFY_SUBSCRIPTION_REQUEST = 0x319, //793 + MODIFY_SUBSCRIPTION_RESPONSE = 0x31c, //796 - PUBLISH_REQUEST = 0x33A, // 826 - PUBLISH_RESPONSE = 0x33D, // 829 + PUBLISH_REQUEST = 0x33A, // 826 + PUBLISH_RESPONSE = 0x33D, // 829 - REPUBLISH_REQUEST = 832, - REPUBLISH_RESPONSE = 835, + REPUBLISH_REQUEST = 832, + REPUBLISH_RESPONSE = 835, - SET_PUBLISHING_MODE_REQUEST = 0x31F, // 799 - SET_PUBLISHING_MODE_RESPONSE = 0x322, // 802 + SET_PUBLISHING_MODE_REQUEST = 0x31F, // 799 + SET_PUBLISHING_MODE_RESPONSE = 0x322, // 802 - ADD_NODES_REQUEST = 0x1e8, //488; - ADD_NODES_RESPONSE = 0x1eb, //491; + ADD_NODES_REQUEST = 0x1e8, //488; + ADD_NODES_RESPONSE = 0x1eb, //491; - DELETE_NODES_REQUEST = 0x1f4, //500; - DELETE_NODES_RESPONSE = 0x1f7, //503; + DELETE_NODES_REQUEST = 0x1f4, //500; + DELETE_NODES_RESPONSE = 0x1f7, //503; - ADD_REFERENCES_REQUEST = 0x1ee, //494; - ADD_REFERENCES_RESPONSE = 0x1f1, //497; + ADD_REFERENCES_REQUEST = 0x1ee, //494; + ADD_REFERENCES_RESPONSE = 0x1f1, //497; - DELETE_REFERENCES_REQUEST = 0x1fa, //506; - DELETE_REFERENCES_RESPONSE = 0x1fd, //509; + DELETE_REFERENCES_REQUEST = 0x1fa, //506; + DELETE_REFERENCES_RESPONSE = 0x1fd, //509; - SERVICE_FAULT = 0x18d, //397; - }; + SERVICE_FAULT = 0x18d, //397; +}; - struct NodeId; +struct NodeId; - MessageId GetMessageId(const NodeId& id); +MessageId GetMessageId(const NodeId & id); } diff --git a/include/opc/ua/protocol/node_management.h b/include/opc/ua/protocol/node_management.h index aa5008f5..75a16698 100644 --- a/include/opc/ua/protocol/node_management.h +++ b/include/opc/ua/protocol/node_management.h @@ -1,4 +1,4 @@ -/// @author Olivier Roulet-Dubonnet 2014 +/// @author Olivier Roulet-Dubonnet 2014 /// @email olivier.roulet@gmail.com /// @brief Opc Ua Binary. Attributes service. /// @license GNU LGPL @@ -23,239 +23,239 @@ namespace OpcUa { - // - // AddNode Message definition - // - - enum SpecifiedAttributesEncoding : uint32_t - { - AccessLevel = 0, - ArrayDimensions = 1, - ContainsNoLoops = 3, - DataType = 4, - Description = 5, - DisplayName = 6, - EventNotifier = 7, - Executable = 8, - Historizing = 9, - InverseName = 10, - IsAbstract = 11, - MinimumSamplingInterval = 12, - Symmetric = 15, - UserAccessLevel = 16, - UserExecutable = 17, - UserWriteMask = 18, - ValueRank = 19, - WriteMask = 20, - Value = 21, - }; - - struct EventNotifier - { - static const uint8_t SubscribeToEvents = 1 << 0; - static const uint8_t Reserved = 1 << 1; - static const uint8_t HistoryRead = 1 << 2; - static const uint8_t HistoryWrite = 1 << 3; - //all other bytes are reserved - }; - - typedef std::bitset IntBits; - - struct ObjectAttributes - { - uint32_t SpecifiedAttributes; - LocalizedText DisplayName; - LocalizedText Description; - uint8_t EventNotifier = 0; - uint32_t WriteMask = 0; - uint32_t UserWriteMask = 0; - }; - - struct VariableAttributes - { - uint32_t SpecifiedAttributes; - LocalizedText DisplayName; - LocalizedText Description; - Variant Value; - NodeId Type; - int32_t Rank = 0; - std::vector Dimensions; - VariableAccessLevel AccessLevel = VariableAccessLevel::CurrentRead; - VariableAccessLevel UserAccessLevel = VariableAccessLevel::CurrentRead; - Duration MinimumSamplingInterval = 0; - bool Historizing = false; - uint32_t WriteMask = 0; - uint32_t UserWriteMask = 0; - }; - - struct MethodAttributes - { - uint32_t SpecifiedAttributes; - LocalizedText DisplayName; - LocalizedText Description; - bool Executable = false; - bool UserExecutable = false; - uint32_t WriteMask = 0; - uint32_t UserWriteMask = 0; - }; - - struct ObjectTypeAttributes - { - uint32_t SpecifiedAttributes; - LocalizedText DisplayName; - LocalizedText Description; - bool IsAbstract = false; - uint32_t WriteMask = 0; - uint32_t UserWriteMask = 0; - }; - - struct VariableTypeAttributes - { - uint32_t SpecifiedAttributes; - LocalizedText DisplayName; - LocalizedText Description; - Variant Value; - NodeId Type; - int32_t Rank = 0; - std::vector Dimensions; - bool IsAbstract = false; - uint32_t WriteMask = 0; - uint32_t UserWriteMask = 0; - }; - - struct ReferenceTypeAttributes - { - uint32_t SpecifiedAttributes; - LocalizedText DisplayName; - LocalizedText Description; - bool IsAbstract = false; - bool Symmetric = false; - LocalizedText InverseName; - uint32_t WriteMask = 0; - uint32_t UserWriteMask = 0; - }; - - struct DataTypeAttributes - { - uint32_t SpecifiedAttributes; - LocalizedText DisplayName; - LocalizedText Description; - bool IsAbstract = false; - uint32_t WriteMask = 0; - uint32_t UserWriteMask = 0; - }; - - struct ViewAttributes - { - uint32_t SpecifiedAttributes; - LocalizedText DisplayName; - LocalizedText Description; - bool ContainsNoLoops = true; - uint32_t WriteMask = 0; - uint32_t UserWriteMask = 0; - }; - - struct NodeAttributes - { - ExtensionObjectHeader Header; - uint32_t SpecifiedAttributes; - std::map Attributes; - - NodeAttributes(){} - NodeAttributes(const ObjectAttributes&); - NodeAttributes(const VariableAttributes&); - NodeAttributes(const MethodAttributes&); - NodeAttributes(const ObjectTypeAttributes&); - NodeAttributes(const VariableTypeAttributes&); - NodeAttributes(const ReferenceTypeAttributes&); - NodeAttributes(const DataTypeAttributes&); - NodeAttributes(const ViewAttributes&); - }; - - // TODO Rename to NodeParameters - struct AddNodesItem - { - NodeId ParentNodeId; - NodeId ReferenceTypeId; - NodeId RequestedNewNodeId; - QualifiedName BrowseName; - NodeClass Class; - NodeAttributes Attributes; - NodeId TypeDefinition; - }; - - - struct AddNodesParameters - { - std::vector NodesToAdd; - }; - - struct AddNodesRequest - { - NodeId TypeId; - RequestHeader Header; - AddNodesParameters Parameters; - AddNodesRequest(); - }; - - struct AddNodesResult - { - StatusCode Status; - NodeId AddedNodeId; - }; - - struct AddNodesResponse - { - NodeId TypeId; - ResponseHeader Header; - std::vector results; - DiagnosticInfoList Diagnostics; - AddNodesResponse(); - }; - - - // - // AddReference - // - - struct AddReferencesItem - { - NodeId SourceNodeId; - NodeId ReferenceTypeId; - bool IsForward; - std::string TargetServerUri; - NodeId TargetNodeId; - NodeClass TargetNodeClass; - }; - - struct AddReferencesParameters - { - std::vector ReferencesToAdd; - }; - - struct AddReferencesRequest - { - NodeId TypeId; - RequestHeader Header; - AddReferencesParameters Parameters; - - AddReferencesRequest(); - }; - - struct AddReferencesResponse - { - NodeId TypeId; - ResponseHeader Header; - std::vector Results; - DiagnosticInfoList Diagnostics; - - AddReferencesResponse(); - }; - - //FIXME: move somewhere else!! - const char* GetObjectIdName(const NodeId& id) ; +// +// AddNode Message definition +// + +enum SpecifiedAttributesEncoding : uint32_t +{ + AccessLevel = 0, + ArrayDimensions = 1, + ContainsNoLoops = 3, + DataType = 4, + Description = 5, + DisplayName = 6, + EventNotifier = 7, + Executable = 8, + Historizing = 9, + InverseName = 10, + IsAbstract = 11, + MinimumSamplingInterval = 12, + Symmetric = 15, + UserAccessLevel = 16, + UserExecutable = 17, + UserWriteMask = 18, + ValueRank = 19, + WriteMask = 20, + Value = 21, +}; + +struct EventNotifier +{ + static const uint8_t SubscribeToEvents = 1 << 0; + static const uint8_t Reserved = 1 << 1; + static const uint8_t HistoryRead = 1 << 2; + static const uint8_t HistoryWrite = 1 << 3; + //all other bytes are reserved +}; + +typedef std::bitset IntBits; + +struct ObjectAttributes +{ + uint32_t SpecifiedAttributes; + LocalizedText DisplayName; + LocalizedText Description; + uint8_t EventNotifier = 0; + uint32_t WriteMask = 0; + uint32_t UserWriteMask = 0; +}; + +struct VariableAttributes +{ + uint32_t SpecifiedAttributes; + LocalizedText DisplayName; + LocalizedText Description; + Variant Value; + NodeId Type; + int32_t Rank = 0; + std::vector Dimensions; + VariableAccessLevel AccessLevel = VariableAccessLevel::CurrentRead; + VariableAccessLevel UserAccessLevel = VariableAccessLevel::CurrentRead; + Duration MinimumSamplingInterval = 0; + bool Historizing = false; + uint32_t WriteMask = 0; + uint32_t UserWriteMask = 0; +}; + +struct MethodAttributes +{ + uint32_t SpecifiedAttributes; + LocalizedText DisplayName; + LocalizedText Description; + bool Executable = false; + bool UserExecutable = false; + uint32_t WriteMask = 0; + uint32_t UserWriteMask = 0; +}; + +struct ObjectTypeAttributes +{ + uint32_t SpecifiedAttributes; + LocalizedText DisplayName; + LocalizedText Description; + bool IsAbstract = false; + uint32_t WriteMask = 0; + uint32_t UserWriteMask = 0; +}; + +struct VariableTypeAttributes +{ + uint32_t SpecifiedAttributes; + LocalizedText DisplayName; + LocalizedText Description; + Variant Value; + NodeId Type; + int32_t Rank = 0; + std::vector Dimensions; + bool IsAbstract = false; + uint32_t WriteMask = 0; + uint32_t UserWriteMask = 0; +}; + +struct ReferenceTypeAttributes +{ + uint32_t SpecifiedAttributes; + LocalizedText DisplayName; + LocalizedText Description; + bool IsAbstract = false; + bool Symmetric = false; + LocalizedText InverseName; + uint32_t WriteMask = 0; + uint32_t UserWriteMask = 0; +}; + +struct DataTypeAttributes +{ + uint32_t SpecifiedAttributes; + LocalizedText DisplayName; + LocalizedText Description; + bool IsAbstract = false; + uint32_t WriteMask = 0; + uint32_t UserWriteMask = 0; +}; + +struct ViewAttributes +{ + uint32_t SpecifiedAttributes; + LocalizedText DisplayName; + LocalizedText Description; + bool ContainsNoLoops = true; + uint32_t WriteMask = 0; + uint32_t UserWriteMask = 0; +}; + +struct NodeAttributes +{ + ExtensionObjectHeader Header; + uint32_t SpecifiedAttributes; + std::map Attributes; + + NodeAttributes() {} + NodeAttributes(const ObjectAttributes &); + NodeAttributes(const VariableAttributes &); + NodeAttributes(const MethodAttributes &); + NodeAttributes(const ObjectTypeAttributes &); + NodeAttributes(const VariableTypeAttributes &); + NodeAttributes(const ReferenceTypeAttributes &); + NodeAttributes(const DataTypeAttributes &); + NodeAttributes(const ViewAttributes &); +}; + +// TODO Rename to NodeParameters +struct AddNodesItem +{ + NodeId ParentNodeId; + NodeId ReferenceTypeId; + NodeId RequestedNewNodeId; + QualifiedName BrowseName; + NodeClass Class; + NodeAttributes Attributes; + NodeId TypeDefinition; +}; + + +struct AddNodesParameters +{ + std::vector NodesToAdd; +}; + +struct AddNodesRequest +{ + NodeId TypeId; + RequestHeader Header; + AddNodesParameters Parameters; + AddNodesRequest(); +}; + +struct AddNodesResult +{ + StatusCode Status; + NodeId AddedNodeId; +}; + +struct AddNodesResponse +{ + NodeId TypeId; + ResponseHeader Header; + std::vector results; + DiagnosticInfoList Diagnostics; + AddNodesResponse(); +}; + + +// +// AddReference +// + +struct AddReferencesItem +{ + NodeId SourceNodeId; + NodeId ReferenceTypeId; + bool IsForward; + std::string TargetServerUri; + NodeId TargetNodeId; + NodeClass TargetNodeClass; +}; + +struct AddReferencesParameters +{ + std::vector ReferencesToAdd; +}; + +struct AddReferencesRequest +{ + NodeId TypeId; + RequestHeader Header; + AddReferencesParameters Parameters; + + AddReferencesRequest(); +}; + +struct AddReferencesResponse +{ + NodeId TypeId; + ResponseHeader Header; + std::vector Results; + DiagnosticInfoList Diagnostics; + + AddReferencesResponse(); +}; + +//FIXME: move somewhere else!! +const char * GetObjectIdName(const NodeId & id) ; } -#endif +#endif diff --git a/include/opc/ua/protocol/nodeid.h b/include/opc/ua/protocol/nodeid.h index 24eaa686..6c1aa158 100644 --- a/include/opc/ua/protocol/nodeid.h +++ b/include/opc/ua/protocol/nodeid.h @@ -24,248 +24,248 @@ namespace OpcUa { - enum NodeIdEncoding : uint8_t - { - EV_TWO_BYTE = 0, - EV_FOUR_BYTE = 1, - EV_NUMERIC = 2, - EV_STRING = 3, - EV_GUId = 4, - EV_BYTE_STRING = 5, - - EV_Server_INDEX_FLAG = 0x40, - EV_NAMESPACE_URI_FLAG = 0x80, - - EV_VALUE_MASK = 0x3f, - }; - - struct ExpandedNodeId; - - struct NodeId - { - NodeIdEncoding Encoding; - std::string NamespaceURI; - uint32_t ServerIndex; +enum NodeIdEncoding : uint8_t +{ + EV_TWO_BYTE = 0, + EV_FOUR_BYTE = 1, + EV_NUMERIC = 2, + EV_STRING = 3, + EV_GUId = 4, + EV_BYTE_STRING = 5, - struct TwoByteDataType - { - uint8_t Identifier; + EV_Server_INDEX_FLAG = 0x40, + EV_NAMESPACE_URI_FLAG = 0x80, - TwoByteDataType() - : Identifier(0) - { - } + EV_VALUE_MASK = 0x3f, +}; - } TwoByteData; +struct ExpandedNodeId; - struct FourByteDataType - { - uint8_t NamespaceIndex; - uint16_t Identifier; +struct NodeId +{ + NodeIdEncoding Encoding; + std::string NamespaceURI; + uint32_t ServerIndex; - FourByteDataType() - : NamespaceIndex(0) - , Identifier(0) - { - } - }FourByteData; + struct TwoByteDataType + { + uint8_t Identifier; - struct NumericDataType + TwoByteDataType() + : Identifier(0) { - uint16_t NamespaceIndex; - uint32_t Identifier; + } - NumericDataType() - : NamespaceIndex(0) - , Identifier(0) - { - } - }NumericData; + } TwoByteData; + struct FourByteDataType + { + uint8_t NamespaceIndex; + uint16_t Identifier; - struct StringDataType + FourByteDataType() + : NamespaceIndex(0) + , Identifier(0) { - uint16_t NamespaceIndex; - std::string Identifier; - - StringDataType() - : NamespaceIndex(0) - { - } + } + } FourByteData; - }StringData; + struct NumericDataType + { + uint16_t NamespaceIndex; + uint32_t Identifier; - struct BinaryDataType + NumericDataType() + : NamespaceIndex(0) + , Identifier(0) { - uint16_t NamespaceIndex; - std::vector Identifier; + } + } NumericData; - BinaryDataType() - : NamespaceIndex(0) - { - } - }BinaryData; + struct StringDataType + { + uint16_t NamespaceIndex; + std::string Identifier; - struct GuidDataType + StringDataType() + : NamespaceIndex(0) { - uint16_t NamespaceIndex; - Guid Identifier; - - GuidDataType() - : NamespaceIndex(0) - { - } - - }GuidData; - - NodeId(); - NodeId(const NodeId& node); - NodeId(const ExpandedNodeId& node); - NodeId(MessageId messageId); - NodeId(ReferenceId referenceId); - NodeId(ObjectId objectId); - NodeId(ExpandedObjectId objectId); - NodeId(uint32_t integerId, uint16_t index); - NodeId(std::string stringId, uint16_t index); + } - NodeId& operator= (const NodeId& node); - NodeId& operator= (const ExpandedNodeId& node); + } StringData; - explicit operator ExpandedNodeId(); + struct BinaryDataType + { + uint16_t NamespaceIndex; + std::vector Identifier; - NodeId& operator= (MessageId messageId) + BinaryDataType() + : NamespaceIndex(0) { - *this = NodeId(messageId); - return *this; } - NodeId& operator= (ReferenceId referenceId) - { - *this = NodeId(referenceId); - return *this; - } + } BinaryData; - NodeId& operator= (ObjectId objectId) - { - *this = NodeId(objectId); - return *this; - } + struct GuidDataType + { + uint16_t NamespaceIndex; + Guid Identifier; - NodeId& operator= (ExpandedObjectId objectId) + GuidDataType() + : NamespaceIndex(0) { - *this = NodeId(objectId); - return *this; } - bool operator== (const NodeId& node) const; - bool operator== (MessageId messageId) const; - bool operator== (ReferenceId referenceId) const; - bool operator== (ObjectId objectId) const; - bool operator== (ExpandedObjectId objectId) const; - - bool operator!= (const NodeId& node) const; - bool operator!= (MessageId messageId) const; - bool operator!= (ReferenceId referenceId) const; - bool operator!= (ObjectId objectId) const; - bool operator!= (ExpandedObjectId objectId) const; - - bool operator< (const NodeId& node) const; - - NodeIdEncoding GetEncodingValue() const; - bool IsNull() const; - bool HasNullIdentifier() const; - bool HasNamespaceURI() const; - bool HasServerIndex() const; + } GuidData; - void SetNamespaceURI(const std::string& uri); - void SetServerIndex(uint32_t index); - void SetNamespaceIndex(uint32_t ns); + NodeId(); + NodeId(const NodeId & node); + NodeId(const ExpandedNodeId & node); + NodeId(MessageId messageId); + NodeId(ReferenceId referenceId); + NodeId(ObjectId objectId); + NodeId(ExpandedObjectId objectId); + NodeId(uint32_t integerId, uint16_t index); + NodeId(std::string stringId, uint16_t index); - bool IsInteger() const; - bool IsString() const; - bool IsBinary() const; - bool IsGuid() const; + NodeId & operator= (const NodeId & node); + NodeId & operator= (const ExpandedNodeId & node); - uint32_t GetNamespaceIndex() const; + explicit operator ExpandedNodeId(); - uint32_t GetIntegerIdentifier() const; - std::string GetStringIdentifier() const; - std::vector GetBinaryIdentifier() const; - Guid GetGuidIdentifier() const; - - protected: - void CopyNodeId(const NodeId& node); - }; - - inline NodeId TwoByteNodeId(uint8_t value) + NodeId & operator= (MessageId messageId) { - NodeId id; - id.Encoding = EV_TWO_BYTE; - id.TwoByteData.Identifier = value; - return id; + *this = NodeId(messageId); + return *this; } - inline NodeId FourByteNodeId(uint16_t value, uint8_t namespaceIndex = 0) + NodeId & operator= (ReferenceId referenceId) { - NodeId id; - id.Encoding = EV_FOUR_BYTE; - id.FourByteData.Identifier = value; - id.FourByteData.NamespaceIndex = namespaceIndex; - return id; + *this = NodeId(referenceId); + return *this; } - inline NodeId NumericNodeId(uint32_t value, uint16_t namespaceIndex = 0) + NodeId & operator= (ObjectId objectId) { - NodeId id; - id.Encoding = EV_NUMERIC; - id.NumericData.Identifier = value; - id.NumericData.NamespaceIndex = namespaceIndex; - return id; + *this = NodeId(objectId); + return *this; } - inline NodeId StringNodeId(std::string value, uint16_t namespaceIndex = 0) + NodeId & operator= (ExpandedObjectId objectId) { - NodeId id; - id.Encoding = EV_STRING; - id.StringData.Identifier = value; - id.StringData.NamespaceIndex = namespaceIndex; - return id; + *this = NodeId(objectId); + return *this; } - inline NodeId BinaryNodeId(std::vector value, uint16_t namespaceIndex = 0) - { - NodeId id; - id.Encoding = EV_BYTE_STRING; - id.BinaryData.Identifier = value; - id.BinaryData.NamespaceIndex = namespaceIndex; - return id; - } + bool operator== (const NodeId & node) const; + bool operator== (MessageId messageId) const; + bool operator== (ReferenceId referenceId) const; + bool operator== (ObjectId objectId) const; + bool operator== (ExpandedObjectId objectId) const; - inline NodeId GuidNodeId(Guid value, uint16_t namespaceIndex = 0) - { - NodeId id; - id.Encoding = EV_GUId; - id.GuidData.Identifier = value; - id.GuidData.NamespaceIndex = namespaceIndex; - return id; - } + bool operator!= (const NodeId & node) const; + bool operator!= (MessageId messageId) const; + bool operator!= (ReferenceId referenceId) const; + bool operator!= (ObjectId objectId) const; + bool operator!= (ExpandedObjectId objectId) const; - struct ExpandedNodeId : public NodeId - { - ExpandedNodeId(); - ExpandedNodeId(const NodeId& node); - ExpandedNodeId(const ExpandedNodeId& node); - ExpandedNodeId(MessageId messageId); - ExpandedNodeId(ReferenceId referenceId); - ExpandedNodeId(ObjectId objectId); - ExpandedNodeId(ExpandedObjectId objectId); - ExpandedNodeId(uint32_t integerId, uint16_t index); - ExpandedNodeId(std::string stringId, uint16_t index); - - //using NodeId::NodeId; - //using base::base; - }; + bool operator< (const NodeId & node) const; + + NodeIdEncoding GetEncodingValue() const; + bool IsNull() const; + bool HasNullIdentifier() const; + bool HasNamespaceURI() const; + bool HasServerIndex() const; + + void SetNamespaceURI(const std::string & uri); + void SetServerIndex(uint32_t index); + void SetNamespaceIndex(uint32_t ns); + + bool IsInteger() const; + bool IsString() const; + bool IsBinary() const; + bool IsGuid() const; + + uint32_t GetNamespaceIndex() const; + + uint32_t GetIntegerIdentifier() const; + std::string GetStringIdentifier() const; + std::vector GetBinaryIdentifier() const; + Guid GetGuidIdentifier() const; + +protected: + void CopyNodeId(const NodeId & node); +}; + +inline NodeId TwoByteNodeId(uint8_t value) +{ + NodeId id; + id.Encoding = EV_TWO_BYTE; + id.TwoByteData.Identifier = value; + return id; +} + +inline NodeId FourByteNodeId(uint16_t value, uint8_t namespaceIndex = 0) +{ + NodeId id; + id.Encoding = EV_FOUR_BYTE; + id.FourByteData.Identifier = value; + id.FourByteData.NamespaceIndex = namespaceIndex; + return id; +} + +inline NodeId NumericNodeId(uint32_t value, uint16_t namespaceIndex = 0) +{ + NodeId id; + id.Encoding = EV_NUMERIC; + id.NumericData.Identifier = value; + id.NumericData.NamespaceIndex = namespaceIndex; + return id; +} + +inline NodeId StringNodeId(std::string value, uint16_t namespaceIndex = 0) +{ + NodeId id; + id.Encoding = EV_STRING; + id.StringData.Identifier = value; + id.StringData.NamespaceIndex = namespaceIndex; + return id; +} + +inline NodeId BinaryNodeId(std::vector value, uint16_t namespaceIndex = 0) +{ + NodeId id; + id.Encoding = EV_BYTE_STRING; + id.BinaryData.Identifier = value; + id.BinaryData.NamespaceIndex = namespaceIndex; + return id; +} + +inline NodeId GuidNodeId(Guid value, uint16_t namespaceIndex = 0) +{ + NodeId id; + id.Encoding = EV_GUId; + id.GuidData.Identifier = value; + id.GuidData.NamespaceIndex = namespaceIndex; + return id; +} + +struct ExpandedNodeId : public NodeId +{ + ExpandedNodeId(); + ExpandedNodeId(const NodeId & node); + ExpandedNodeId(const ExpandedNodeId & node); + ExpandedNodeId(MessageId messageId); + ExpandedNodeId(ReferenceId referenceId); + ExpandedNodeId(ObjectId objectId); + ExpandedNodeId(ExpandedObjectId objectId); + ExpandedNodeId(uint32_t integerId, uint16_t index); + ExpandedNodeId(std::string stringId, uint16_t index); + + //using NodeId::NodeId; + //using base::base; +}; } // namespace OpcUa diff --git a/include/opc/ua/protocol/object_ids.h b/include/opc/ua/protocol/object_ids.h index 819f06d4..9efd21dc 100644 --- a/include/opc/ua/protocol/object_ids.h +++ b/include/opc/ua/protocol/object_ids.h @@ -9,4888 +9,4888 @@ namespace OpcUa { - enum class ObjectId : uint32_t - { - Null = 0, - Boolean = 1, - SByte = 2, - Byte = 3, - Int16 = 4, - UInt16 = 5, - Int32 = 6, - UInt32 = 7, - Int64 = 8, - UInt64 = 9, - Float = 10, - Double = 11, - String = 12, - DateTime = 13, - Guid = 14, - ByteString = 15, - XmlElement = 16, - NodeId = 17, - ExpandedNodeId = 18, - StatusCode = 19, - QualifiedName = 20, - LocalizedText = 21, - Structure = 22, - DataValue = 23, - BaseDataType = 24, - DiagnosticInfo = 25, - Number = 26, - Integer = 27, - UInteger = 28, - Enumeration = 29, - Image = 30, - References = 31, - NonHierarchicalReferences = 32, - HierarchicalReferences = 33, - HasChild = 34, - Organizes = 35, - HasEventSource = 36, - HasModellingRule = 37, - HasEncoding = 38, - HasDescription = 39, - HasTypeDefinition = 40, - GeneratesEvent = 41, - Aggregates = 44, - HasSubtype = 45, - HasProperty = 46, - HasComponent = 47, - HasNotifier = 48, - HasOrderedComponent = 49, - FromState = 51, - ToState = 52, - HasCause = 53, - HasEffect = 54, - HasHistoricalConfiguration = 56, - BaseObjectType = 58, - FolderType = 61, - BaseVariableType = 62, - BaseDataVariableType = 63, - PropertyType = 68, - DataTypeDescriptionType = 69, - DataTypeDictionaryType = 72, - DataTypeSystemType = 75, - DataTypeEncodingType = 76, - ModellingRuleType = 77, - ModellingRule_Mandatory = 78, - ModellingRule_MandatoryShared = 79, - ModellingRule_Optional = 80, - ModellingRule_ExposesItsArray = 83, - RootFolder = 84, - ObjectsFolder = 85, - TypesFolder = 86, - ViewsFolder = 87, - ObjectTypesFolder = 88, - VariableTypesFolder = 89, - DataTypesFolder = 90, - ReferenceTypesFolder = 91, - XmlSchema_TypeSystem = 92, - OPCBinarySchema_TypeSystem = 93, - DataTypeDescriptionType_DataTypeVersion = 104, - DataTypeDescriptionType_DictionaryFragment = 105, - DataTypeDictionaryType_DataTypeVersion = 106, - DataTypeDictionaryType_NamespaceUri = 107, - ModellingRuleType_NamingRule = 111, - ModellingRule_Mandatory_NamingRule = 112, - ModellingRule_Optional_NamingRule = 113, - ModellingRule_ExposesItsArray_NamingRule = 114, - ModellingRule_MandatoryShared_NamingRule = 116, - HasSubStateMachine = 117, - NamingRuleType = 120, - IdType = 256, - NodeClass = 257, - Node = 258, - Node_Encoding_DefaultXml = 259, - Node_Encoding_DefaultBinary = 260, - ObjectNode = 261, - ObjectNode_Encoding_DefaultXml = 262, - ObjectNode_Encoding_DefaultBinary = 263, - ObjectTypeNode = 264, - ObjectTypeNode_Encoding_DefaultXml = 265, - ObjectTypeNode_Encoding_DefaultBinary = 266, - VariableNode = 267, - VariableNode_Encoding_DefaultXml = 268, - VariableNode_Encoding_DefaultBinary = 269, - VariableTypeNode = 270, - VariableTypeNode_Encoding_DefaultXml = 271, - VariableTypeNode_Encoding_DefaultBinary = 272, - ReferenceTypeNode = 273, - ReferenceTypeNode_Encoding_DefaultXml = 274, - ReferenceTypeNode_Encoding_DefaultBinary = 275, - MethodNode = 276, - MethodNode_Encoding_DefaultXml = 277, - MethodNode_Encoding_DefaultBinary = 278, - ViewNode = 279, - ViewNode_Encoding_DefaultXml = 280, - ViewNode_Encoding_DefaultBinary = 281, - DataTypeNode = 282, - DataTypeNode_Encoding_DefaultXml = 283, - DataTypeNode_Encoding_DefaultBinary = 284, - ReferenceNode = 285, - ReferenceNode_Encoding_DefaultXml = 286, - ReferenceNode_Encoding_DefaultBinary = 287, - IntegerId = 288, - Counter = 289, - Duration = 290, - NumericRange = 291, - Time = 292, - Date = 293, - UtcTime = 294, - LocaleId = 295, - Argument = 296, - Argument_Encoding_DefaultXml = 297, - Argument_Encoding_DefaultBinary = 298, - StatusResult = 299, - StatusResult_Encoding_DefaultXml = 300, - StatusResult_Encoding_DefaultBinary = 301, - MessageSecurityMode = 302, - UserTokenType = 303, - UserTokenPolicy = 304, - UserTokenPolicy_Encoding_DefaultXml = 305, - UserTokenPolicy_Encoding_DefaultBinary = 306, - ApplicationType = 307, - ApplicationDescription = 308, - ApplicationDescription_Encoding_DefaultXml = 309, - ApplicationDescription_Encoding_DefaultBinary = 310, - ApplicationInstanceCertificate = 311, - EndpointDescription = 312, - EndpointDescription_Encoding_DefaultXml = 313, - EndpointDescription_Encoding_DefaultBinary = 314, - SecurityTokenRequestType = 315, - UserIdentityToken = 316, - UserIdentityToken_Encoding_DefaultXml = 317, - UserIdentityToken_Encoding_DefaultBinary = 318, - AnonymousIdentityToken = 319, - AnonymousIdentityToken_Encoding_DefaultXml = 320, - AnonymousIdentityToken_Encoding_DefaultBinary = 321, - UserNameIdentityToken = 322, - UserNameIdentityToken_Encoding_DefaultXml = 323, - UserNameIdentityToken_Encoding_DefaultBinary = 324, - X509IdentityToken = 325, - X509IdentityToken_Encoding_DefaultXml = 326, - X509IdentityToken_Encoding_DefaultBinary = 327, - EndpointConfiguration = 331, - EndpointConfiguration_Encoding_DefaultXml = 332, - EndpointConfiguration_Encoding_DefaultBinary = 333, - ComplianceLevel = 334, - SupportedProfile = 335, - SupportedProfile_Encoding_DefaultXml = 336, - SupportedProfile_Encoding_DefaultBinary = 337, - BuildInfo = 338, - BuildInfo_Encoding_DefaultXml = 339, - BuildInfo_Encoding_DefaultBinary = 340, - SoftwareCertificate = 341, - SoftwareCertificate_Encoding_DefaultXml = 342, - SoftwareCertificate_Encoding_DefaultBinary = 343, - SignedSoftwareCertificate = 344, - SignedSoftwareCertificate_Encoding_DefaultXml = 345, - SignedSoftwareCertificate_Encoding_DefaultBinary = 346, - AttributeWriteMask = 347, - NodeAttributesMask = 348, - NodeAttributes = 349, - NodeAttributes_Encoding_DefaultXml = 350, - NodeAttributes_Encoding_DefaultBinary = 351, - ObjectAttributes = 352, - ObjectAttributes_Encoding_DefaultXml = 353, - ObjectAttributes_Encoding_DefaultBinary = 354, - VariableAttributes = 355, - VariableAttributes_Encoding_DefaultXml = 356, - VariableAttributes_Encoding_DefaultBinary = 357, - MethodAttributes = 358, - MethodAttributes_Encoding_DefaultXml = 359, - MethodAttributes_Encoding_DefaultBinary = 360, - ObjectTypeAttributes = 361, - ObjectTypeAttributes_Encoding_DefaultXml = 362, - ObjectTypeAttributes_Encoding_DefaultBinary = 363, - VariableTypeAttributes = 364, - VariableTypeAttributes_Encoding_DefaultXml = 365, - VariableTypeAttributes_Encoding_DefaultBinary = 366, - ReferenceTypeAttributes = 367, - ReferenceTypeAttributes_Encoding_DefaultXml = 368, - ReferenceTypeAttributes_Encoding_DefaultBinary = 369, - DataTypeAttributes = 370, - DataTypeAttributes_Encoding_DefaultXml = 371, - DataTypeAttributes_Encoding_DefaultBinary = 372, - ViewAttributes = 373, - ViewAttributes_Encoding_DefaultXml = 374, - ViewAttributes_Encoding_DefaultBinary = 375, - AddNodesItem = 376, - AddNodesItem_Encoding_DefaultXml = 377, - AddNodesItem_Encoding_DefaultBinary = 378, - AddReferencesItem = 379, - AddReferencesItem_Encoding_DefaultXml = 380, - AddReferencesItem_Encoding_DefaultBinary = 381, - DeleteNodesItem = 382, - DeleteNodesItem_Encoding_DefaultXml = 383, - DeleteNodesItem_Encoding_DefaultBinary = 384, - DeleteReferencesItem = 385, - DeleteReferencesItem_Encoding_DefaultXml = 386, - DeleteReferencesItem_Encoding_DefaultBinary = 387, - SessionAuthenticationToken = 388, - RequestHeader = 389, - RequestHeader_Encoding_DefaultXml = 390, - RequestHeader_Encoding_DefaultBinary = 391, - ResponseHeader = 392, - ResponseHeader_Encoding_DefaultXml = 393, - ResponseHeader_Encoding_DefaultBinary = 394, - ServiceFault = 395, - ServiceFault_Encoding_DefaultXml = 396, - ServiceFault_Encoding_DefaultBinary = 397, - EnumeratedTestType = 398, - ScalarTestType = 399, - ScalarTestType_Encoding_DefaultXml = 400, - ScalarTestType_Encoding_DefaultBinary = 401, - ArrayTestType = 402, - ArrayTestType_Encoding_DefaultXml = 403, - ArrayTestType_Encoding_DefaultBinary = 404, - CompositeTestType = 405, - CompositeTestType_Encoding_DefaultXml = 406, - CompositeTestType_Encoding_DefaultBinary = 407, - TestStackRequest = 408, - TestStackRequest_Encoding_DefaultXml = 409, - TestStackRequest_Encoding_DefaultBinary = 410, - TestStackResponse = 411, - TestStackResponse_Encoding_DefaultXml = 412, - TestStackResponse_Encoding_DefaultBinary = 413, - TestStackExRequest = 414, - TestStackExRequest_Encoding_DefaultXml = 415, - TestStackExRequest_Encoding_DefaultBinary = 416, - TestStackExResponse = 417, - TestStackExResponse_Encoding_DefaultXml = 418, - TestStackExResponse_Encoding_DefaultBinary = 419, - FindServersRequest = 420, - FindServersRequest_Encoding_DefaultXml = 421, - FindServersRequest_Encoding_DefaultBinary = 422, - FindServersResponse = 423, - FindServersResponse_Encoding_DefaultXml = 424, - FindServersResponse_Encoding_DefaultBinary = 425, - GetEndpointsRequest = 426, - GetEndpointsRequest_Encoding_DefaultXml = 427, - GetEndpointsRequest_Encoding_DefaultBinary = 428, - GetEndpointsResponse = 429, - GetEndpointsResponse_Encoding_DefaultXml = 430, - GetEndpointsResponse_Encoding_DefaultBinary = 431, - RegisteredServer = 432, - RegisteredServer_Encoding_DefaultXml = 433, - RegisteredServer_Encoding_DefaultBinary = 434, - RegisterServerRequest = 435, - RegisterServerRequest_Encoding_DefaultXml = 436, - RegisterServerRequest_Encoding_DefaultBinary = 437, - RegisterServerResponse = 438, - RegisterServerResponse_Encoding_DefaultXml = 439, - RegisterServerResponse_Encoding_DefaultBinary = 440, - ChannelSecurityToken = 441, - ChannelSecurityToken_Encoding_DefaultXml = 442, - ChannelSecurityToken_Encoding_DefaultBinary = 443, - OpenSecureChannelRequest = 444, - OpenSecureChannelRequest_Encoding_DefaultXml = 445, - OpenSecureChannelRequest_Encoding_DefaultBinary = 446, - OpenSecureChannelResponse = 447, - OpenSecureChannelResponse_Encoding_DefaultXml = 448, - OpenSecureChannelResponse_Encoding_DefaultBinary = 449, - CloseSecureChannelRequest = 450, - CloseSecureChannelRequest_Encoding_DefaultXml = 451, - CloseSecureChannelRequest_Encoding_DefaultBinary = 452, - CloseSecureChannelResponse = 453, - CloseSecureChannelResponse_Encoding_DefaultXml = 454, - CloseSecureChannelResponse_Encoding_DefaultBinary = 455, - SignatureData = 456, - SignatureData_Encoding_DefaultXml = 457, - SignatureData_Encoding_DefaultBinary = 458, - CreateSessionRequest = 459, - CreateSessionRequest_Encoding_DefaultXml = 460, - CreateSessionRequest_Encoding_DefaultBinary = 461, - CreateSessionResponse = 462, - CreateSessionResponse_Encoding_DefaultXml = 463, - CreateSessionResponse_Encoding_DefaultBinary = 464, - ActivateSessionRequest = 465, - ActivateSessionRequest_Encoding_DefaultXml = 466, - ActivateSessionRequest_Encoding_DefaultBinary = 467, - ActivateSessionResponse = 468, - ActivateSessionResponse_Encoding_DefaultXml = 469, - ActivateSessionResponse_Encoding_DefaultBinary = 470, - CloseSessionRequest = 471, - CloseSessionRequest_Encoding_DefaultXml = 472, - CloseSessionRequest_Encoding_DefaultBinary = 473, - CloseSessionResponse = 474, - CloseSessionResponse_Encoding_DefaultXml = 475, - CloseSessionResponse_Encoding_DefaultBinary = 476, - CancelRequest = 477, - CancelRequest_Encoding_DefaultXml = 478, - CancelRequest_Encoding_DefaultBinary = 479, - CancelResponse = 480, - CancelResponse_Encoding_DefaultXml = 481, - CancelResponse_Encoding_DefaultBinary = 482, - AddNodesResult = 483, - AddNodesResult_Encoding_DefaultXml = 484, - AddNodesResult_Encoding_DefaultBinary = 485, - AddNodesRequest = 486, - AddNodesRequest_Encoding_DefaultXml = 487, - AddNodesRequest_Encoding_DefaultBinary = 488, - AddNodesResponse = 489, - AddNodesResponse_Encoding_DefaultXml = 490, - AddNodesResponse_Encoding_DefaultBinary = 491, - AddReferencesRequest = 492, - AddReferencesRequest_Encoding_DefaultXml = 493, - AddReferencesRequest_Encoding_DefaultBinary = 494, - AddReferencesResponse = 495, - AddReferencesResponse_Encoding_DefaultXml = 496, - AddReferencesResponse_Encoding_DefaultBinary = 497, - DeleteNodesRequest = 498, - DeleteNodesRequest_Encoding_DefaultXml = 499, - DeleteNodesRequest_Encoding_DefaultBinary = 500, - DeleteNodesResponse = 501, - DeleteNodesResponse_Encoding_DefaultXml = 502, - DeleteNodesResponse_Encoding_DefaultBinary = 503, - DeleteReferencesRequest = 504, - DeleteReferencesRequest_Encoding_DefaultXml = 505, - DeleteReferencesRequest_Encoding_DefaultBinary = 506, - DeleteReferencesResponse = 507, - DeleteReferencesResponse_Encoding_DefaultXml = 508, - DeleteReferencesResponse_Encoding_DefaultBinary = 509, - BrowseDirection = 510, - ViewDescription = 511, - ViewDescription_Encoding_DefaultXml = 512, - ViewDescription_Encoding_DefaultBinary = 513, - BrowseDescription = 514, - BrowseDescription_Encoding_DefaultXml = 515, - BrowseDescription_Encoding_DefaultBinary = 516, - BrowseResultMask = 517, - ReferenceDescription = 518, - ReferenceDescription_Encoding_DefaultXml = 519, - ReferenceDescription_Encoding_DefaultBinary = 520, - ContinuationPoint = 521, - BrowseResult = 522, - BrowseResult_Encoding_DefaultXml = 523, - BrowseResult_Encoding_DefaultBinary = 524, - BrowseRequest = 525, - BrowseRequest_Encoding_DefaultXml = 526, - BrowseRequest_Encoding_DefaultBinary = 527, - BrowseResponse = 528, - BrowseResponse_Encoding_DefaultXml = 529, - BrowseResponse_Encoding_DefaultBinary = 530, - BrowseNextRequest = 531, - BrowseNextRequest_Encoding_DefaultXml = 532, - BrowseNextRequest_Encoding_DefaultBinary = 533, - BrowseNextResponse = 534, - BrowseNextResponse_Encoding_DefaultXml = 535, - BrowseNextResponse_Encoding_DefaultBinary = 536, - RelativePathElement = 537, - RelativePathElement_Encoding_DefaultXml = 538, - RelativePathElement_Encoding_DefaultBinary = 539, - RelativePath = 540, - RelativePath_Encoding_DefaultXml = 541, - RelativePath_Encoding_DefaultBinary = 542, - BrowsePath = 543, - BrowsePath_Encoding_DefaultXml = 544, - BrowsePath_Encoding_DefaultBinary = 545, - BrowsePathTarget = 546, - BrowsePathTarget_Encoding_DefaultXml = 547, - BrowsePathTarget_Encoding_DefaultBinary = 548, - BrowsePathResult = 549, - BrowsePathResult_Encoding_DefaultXml = 550, - BrowsePathResult_Encoding_DefaultBinary = 551, - TranslateBrowsePathsToNodeIdsRequest = 552, - TranslateBrowsePathsToNodeIdsRequest_Encoding_DefaultXml = 553, - TranslateBrowsePathsToNodeIdsRequest_Encoding_DefaultBinary = 554, - TranslateBrowsePathsToNodeIdsResponse = 555, - TranslateBrowsePathsToNodeIdsResponse_Encoding_DefaultXml = 556, - TranslateBrowsePathsToNodeIdsResponse_Encoding_DefaultBinary = 557, - RegisterNodesRequest = 558, - RegisterNodesRequest_Encoding_DefaultXml = 559, - RegisterNodesRequest_Encoding_DefaultBinary = 560, - RegisterNodesResponse = 561, - RegisterNodesResponse_Encoding_DefaultXml = 562, - RegisterNodesResponse_Encoding_DefaultBinary = 563, - UnregisterNodesRequest = 564, - UnregisterNodesRequest_Encoding_DefaultXml = 565, - UnregisterNodesRequest_Encoding_DefaultBinary = 566, - UnregisterNodesResponse = 567, - UnregisterNodesResponse_Encoding_DefaultXml = 568, - UnregisterNodesResponse_Encoding_DefaultBinary = 569, - QueryDataDescription = 570, - QueryDataDescription_Encoding_DefaultXml = 571, - QueryDataDescription_Encoding_DefaultBinary = 572, - NodeTypeDescription = 573, - NodeTypeDescription_Encoding_DefaultXml = 574, - NodeTypeDescription_Encoding_DefaultBinary = 575, - FilterOperator = 576, - QueryDataSet = 577, - QueryDataSet_Encoding_DefaultXml = 578, - QueryDataSet_Encoding_DefaultBinary = 579, - NodeReference = 580, - NodeReference_Encoding_DefaultXml = 581, - NodeReference_Encoding_DefaultBinary = 582, - ContentFilterElement = 583, - ContentFilterElement_Encoding_DefaultXml = 584, - ContentFilterElement_Encoding_DefaultBinary = 585, - ContentFilter = 586, - ContentFilter_Encoding_DefaultXml = 587, - ContentFilter_Encoding_DefaultBinary = 588, - FilterOperand = 589, - FilterOperand_Encoding_DefaultXml = 590, - FilterOperand_Encoding_DefaultBinary = 591, - ElementOperand = 592, - ElementOperand_Encoding_DefaultXml = 593, - ElementOperand_Encoding_DefaultBinary = 594, - LiteralOperand = 595, - LiteralOperand_Encoding_DefaultXml = 596, - LiteralOperand_Encoding_DefaultBinary = 597, - AttributeOperand = 598, - AttributeOperand_Encoding_DefaultXml = 599, - AttributeOperand_Encoding_DefaultBinary = 600, - SimpleAttributeOperand = 601, - SimpleAttributeOperand_Encoding_DefaultXml = 602, - SimpleAttributeOperand_Encoding_DefaultBinary = 603, - ContentFilterElementResult = 604, - ContentFilterElementResult_Encoding_DefaultXml = 605, - ContentFilterElementResult_Encoding_DefaultBinary = 606, - ContentFilterResult = 607, - ContentFilterResult_Encoding_DefaultXml = 608, - ContentFilterResult_Encoding_DefaultBinary = 609, - ParsingResult = 610, - ParsingResult_Encoding_DefaultXml = 611, - ParsingResult_Encoding_DefaultBinary = 612, - QueryFirstRequest = 613, - QueryFirstRequest_Encoding_DefaultXml = 614, - QueryFirstRequest_Encoding_DefaultBinary = 615, - QueryFirstResponse = 616, - QueryFirstResponse_Encoding_DefaultXml = 617, - QueryFirstResponse_Encoding_DefaultBinary = 618, - QueryNextRequest = 619, - QueryNextRequest_Encoding_DefaultXml = 620, - QueryNextRequest_Encoding_DefaultBinary = 621, - QueryNextResponse = 622, - QueryNextResponse_Encoding_DefaultXml = 623, - QueryNextResponse_Encoding_DefaultBinary = 624, - TimestampsToReturn = 625, - ReadValueId = 626, - ReadValueId_Encoding_DefaultXml = 627, - ReadValueId_Encoding_DefaultBinary = 628, - ReadRequest = 629, - ReadRequest_Encoding_DefaultXml = 630, - ReadRequest_Encoding_DefaultBinary = 631, - ReadResponse = 632, - ReadResponse_Encoding_DefaultXml = 633, - ReadResponse_Encoding_DefaultBinary = 634, - HistoryReadValueId = 635, - HistoryReadValueId_Encoding_DefaultXml = 636, - HistoryReadValueId_Encoding_DefaultBinary = 637, - HistoryReadResult = 638, - HistoryReadResult_Encoding_DefaultXml = 639, - HistoryReadResult_Encoding_DefaultBinary = 640, - HistoryReadDetails = 641, - HistoryReadDetails_Encoding_DefaultXml = 642, - HistoryReadDetails_Encoding_DefaultBinary = 643, - ReadEventDetails = 644, - ReadEventDetails_Encoding_DefaultXml = 645, - ReadEventDetails_Encoding_DefaultBinary = 646, - ReadRawModifiedDetails = 647, - ReadRawModifiedDetails_Encoding_DefaultXml = 648, - ReadRawModifiedDetails_Encoding_DefaultBinary = 649, - ReadProcessedDetails = 650, - ReadProcessedDetails_Encoding_DefaultXml = 651, - ReadProcessedDetails_Encoding_DefaultBinary = 652, - ReadAtTimeDetails = 653, - ReadAtTimeDetails_Encoding_DefaultXml = 654, - ReadAtTimeDetails_Encoding_DefaultBinary = 655, - HistoryData = 656, - HistoryData_Encoding_DefaultXml = 657, - HistoryData_Encoding_DefaultBinary = 658, - HistoryEvent = 659, - HistoryEvent_Encoding_DefaultXml = 660, - HistoryEvent_Encoding_DefaultBinary = 661, - HistoryReadRequest = 662, - HistoryReadRequest_Encoding_DefaultXml = 663, - HistoryReadRequest_Encoding_DefaultBinary = 664, - HistoryReadResponse = 665, - HistoryReadResponse_Encoding_DefaultXml = 666, - HistoryReadResponse_Encoding_DefaultBinary = 667, - WriteValue = 668, - WriteValue_Encoding_DefaultXml = 669, - WriteValue_Encoding_DefaultBinary = 670, - WriteRequest = 671, - WriteRequest_Encoding_DefaultXml = 672, - WriteRequest_Encoding_DefaultBinary = 673, - WriteResponse = 674, - WriteResponse_Encoding_DefaultXml = 675, - WriteResponse_Encoding_DefaultBinary = 676, - HistoryUpdateDetails = 677, - HistoryUpdateDetails_Encoding_DefaultXml = 678, - HistoryUpdateDetails_Encoding_DefaultBinary = 679, - UpdateDataDetails = 680, - UpdateDataDetails_Encoding_DefaultXml = 681, - UpdateDataDetails_Encoding_DefaultBinary = 682, - UpdateEventDetails = 683, - UpdateEventDetails_Encoding_DefaultXml = 684, - UpdateEventDetails_Encoding_DefaultBinary = 685, - DeleteRawModifiedDetails = 686, - DeleteRawModifiedDetails_Encoding_DefaultXml = 687, - DeleteRawModifiedDetails_Encoding_DefaultBinary = 688, - DeleteAtTimeDetails = 689, - DeleteAtTimeDetails_Encoding_DefaultXml = 690, - DeleteAtTimeDetails_Encoding_DefaultBinary = 691, - DeleteEventDetails = 692, - DeleteEventDetails_Encoding_DefaultXml = 693, - DeleteEventDetails_Encoding_DefaultBinary = 694, - HistoryUpdateResult = 695, - HistoryUpdateResult_Encoding_DefaultXml = 696, - HistoryUpdateResult_Encoding_DefaultBinary = 697, - HistoryUpdateRequest = 698, - HistoryUpdateRequest_Encoding_DefaultXml = 699, - HistoryUpdateRequest_Encoding_DefaultBinary = 700, - HistoryUpdateResponse = 701, - HistoryUpdateResponse_Encoding_DefaultXml = 702, - HistoryUpdateResponse_Encoding_DefaultBinary = 703, - CallMethodRequest = 704, - CallMethodRequest_Encoding_DefaultXml = 705, - CallMethodRequest_Encoding_DefaultBinary = 706, - CallMethodResult = 707, - CallMethodResult_Encoding_DefaultXml = 708, - CallMethodResult_Encoding_DefaultBinary = 709, - CallRequest = 710, - CallRequest_Encoding_DefaultXml = 711, - CallRequest_Encoding_DefaultBinary = 712, - CallResponse = 713, - CallResponse_Encoding_DefaultXml = 714, - CallResponse_Encoding_DefaultBinary = 715, - MonitoringMode = 716, - DataChangeTrigger = 717, - DeadbandType = 718, - MonitoringFilter = 719, - MonitoringFilter_Encoding_DefaultXml = 720, - MonitoringFilter_Encoding_DefaultBinary = 721, - DataChangeFilter = 722, - DataChangeFilter_Encoding_DefaultXml = 723, - DataChangeFilter_Encoding_DefaultBinary = 724, - EventFilter = 725, - EventFilter_Encoding_DefaultXml = 726, - EventFilter_Encoding_DefaultBinary = 727, - AggregateFilter = 728, - AggregateFilter_Encoding_DefaultXml = 729, - AggregateFilter_Encoding_DefaultBinary = 730, - MonitoringFilterResult = 731, - MonitoringFilterResult_Encoding_DefaultXml = 732, - MonitoringFilterResult_Encoding_DefaultBinary = 733, - EventFilterResult = 734, - EventFilterResult_Encoding_DefaultXml = 735, - EventFilterResult_Encoding_DefaultBinary = 736, - AggregateFilterResult = 737, - AggregateFilterResult_Encoding_DefaultXml = 738, - AggregateFilterResult_Encoding_DefaultBinary = 739, - MonitoringParameters = 740, - MonitoringParameters_Encoding_DefaultXml = 741, - MonitoringParameters_Encoding_DefaultBinary = 742, - MonitoredItemCreateRequest = 743, - MonitoredItemCreateRequest_Encoding_DefaultXml = 744, - MonitoredItemCreateRequest_Encoding_DefaultBinary = 745, - MonitoredItemCreateResult = 746, - MonitoredItemCreateResult_Encoding_DefaultXml = 747, - MonitoredItemCreateResult_Encoding_DefaultBinary = 748, - CreateMonitoredItemsRequest = 749, - CreateMonitoredItemsRequest_Encoding_DefaultXml = 750, - CreateMonitoredItemsRequest_Encoding_DefaultBinary = 751, - CreateMonitoredItemsResponse = 752, - CreateMonitoredItemsResponse_Encoding_DefaultXml = 753, - CreateMonitoredItemsResponse_Encoding_DefaultBinary = 754, - MonitoredItemModifyRequest = 755, - MonitoredItemModifyRequest_Encoding_DefaultXml = 756, - MonitoredItemModifyRequest_Encoding_DefaultBinary = 757, - MonitoredItemModifyResult = 758, - MonitoredItemModifyResult_Encoding_DefaultXml = 759, - MonitoredItemModifyResult_Encoding_DefaultBinary = 760, - ModifyMonitoredItemsRequest = 761, - ModifyMonitoredItemsRequest_Encoding_DefaultXml = 762, - ModifyMonitoredItemsRequest_Encoding_DefaultBinary = 763, - ModifyMonitoredItemsResponse = 764, - ModifyMonitoredItemsResponse_Encoding_DefaultXml = 765, - ModifyMonitoredItemsResponse_Encoding_DefaultBinary = 766, - SetMonitoringModeRequest = 767, - SetMonitoringModeRequest_Encoding_DefaultXml = 768, - SetMonitoringModeRequest_Encoding_DefaultBinary = 769, - SetMonitoringModeResponse = 770, - SetMonitoringModeResponse_Encoding_DefaultXml = 771, - SetMonitoringModeResponse_Encoding_DefaultBinary = 772, - SetTriggeringRequest = 773, - SetTriggeringRequest_Encoding_DefaultXml = 774, - SetTriggeringRequest_Encoding_DefaultBinary = 775, - SetTriggeringResponse = 776, - SetTriggeringResponse_Encoding_DefaultXml = 777, - SetTriggeringResponse_Encoding_DefaultBinary = 778, - DeleteMonitoredItemsRequest = 779, - DeleteMonitoredItemsRequest_Encoding_DefaultXml = 780, - DeleteMonitoredItemsRequest_Encoding_DefaultBinary = 781, - DeleteMonitoredItemsResponse = 782, - DeleteMonitoredItemsResponse_Encoding_DefaultXml = 783, - DeleteMonitoredItemsResponse_Encoding_DefaultBinary = 784, - CreateSubscriptionRequest = 785, - CreateSubscriptionRequest_Encoding_DefaultXml = 786, - CreateSubscriptionRequest_Encoding_DefaultBinary = 787, - CreateSubscriptionResponse = 788, - CreateSubscriptionResponse_Encoding_DefaultXml = 789, - CreateSubscriptionResponse_Encoding_DefaultBinary = 790, - ModifySubscriptionRequest = 791, - ModifySubscriptionRequest_Encoding_DefaultXml = 792, - ModifySubscriptionRequest_Encoding_DefaultBinary = 793, - ModifySubscriptionResponse = 794, - ModifySubscriptionResponse_Encoding_DefaultXml = 795, - ModifySubscriptionResponse_Encoding_DefaultBinary = 796, - SetPublishingModeRequest = 797, - SetPublishingModeRequest_Encoding_DefaultXml = 798, - SetPublishingModeRequest_Encoding_DefaultBinary = 799, - SetPublishingModeResponse = 800, - SetPublishingModeResponse_Encoding_DefaultXml = 801, - SetPublishingModeResponse_Encoding_DefaultBinary = 802, - NotificationMessage = 803, - NotificationMessage_Encoding_DefaultXml = 804, - NotificationMessage_Encoding_DefaultBinary = 805, - MonitoredItemNotification = 806, - MonitoredItemNotification_Encoding_DefaultXml = 807, - MonitoredItemNotification_Encoding_DefaultBinary = 808, - DataChangeNotification = 809, - DataChangeNotification_Encoding_DefaultXml = 810, - DataChangeNotification_Encoding_DefaultBinary = 811, - StatusChangeNotification = 818, - StatusChangeNotification_Encoding_DefaultXml = 819, - StatusChangeNotification_Encoding_DefaultBinary = 820, - SubscriptionAcknowledgement = 821, - SubscriptionAcknowledgement_Encoding_DefaultXml = 822, - SubscriptionAcknowledgement_Encoding_DefaultBinary = 823, - PublishRequest = 824, - PublishRequest_Encoding_DefaultXml = 825, - PublishRequest_Encoding_DefaultBinary = 826, - PublishResponse = 827, - PublishResponse_Encoding_DefaultXml = 828, - PublishResponse_Encoding_DefaultBinary = 829, - RepublishRequest = 830, - RepublishRequest_Encoding_DefaultXml = 831, - RepublishRequest_Encoding_DefaultBinary = 832, - RepublishResponse = 833, - RepublishResponse_Encoding_DefaultXml = 834, - RepublishResponse_Encoding_DefaultBinary = 835, - TransferResult = 836, - TransferResult_Encoding_DefaultXml = 837, - TransferResult_Encoding_DefaultBinary = 838, - TransferSubscriptionsRequest = 839, - TransferSubscriptionsRequest_Encoding_DefaultXml = 840, - TransferSubscriptionsRequest_Encoding_DefaultBinary = 841, - TransferSubscriptionsResponse = 842, - TransferSubscriptionsResponse_Encoding_DefaultXml = 843, - TransferSubscriptionsResponse_Encoding_DefaultBinary = 844, - DeleteSubscriptionsRequest = 845, - DeleteSubscriptionsRequest_Encoding_DefaultXml = 846, - DeleteSubscriptionsRequest_Encoding_DefaultBinary = 847, - DeleteSubscriptionsResponse = 848, - DeleteSubscriptionsResponse_Encoding_DefaultXml = 849, - DeleteSubscriptionsResponse_Encoding_DefaultBinary = 850, - RedundancySupport = 851, - ServerState = 852, - RedundantServerDataType = 853, - RedundantServerDataType_Encoding_DefaultXml = 854, - RedundantServerDataType_Encoding_DefaultBinary = 855, - SamplingIntervalDiagnosticsDataType = 856, - SamplingIntervalDiagnosticsDataType_Encoding_DefaultXml = 857, - SamplingIntervalDiagnosticsDataType_Encoding_DefaultBinary = 858, - ServerDiagnosticsSummaryDataType = 859, - ServerDiagnosticsSummaryDataType_Encoding_DefaultXml = 860, - ServerDiagnosticsSummaryDataType_Encoding_DefaultBinary = 861, - ServerStatusDataType = 862, - ServerStatusDataType_Encoding_DefaultXml = 863, - ServerStatusDataType_Encoding_DefaultBinary = 864, - SessionDiagnosticsDataType = 865, - SessionDiagnosticsDataType_Encoding_DefaultXml = 866, - SessionDiagnosticsDataType_Encoding_DefaultBinary = 867, - SessionSecurityDiagnosticsDataType = 868, - SessionSecurityDiagnosticsDataType_Encoding_DefaultXml = 869, - SessionSecurityDiagnosticsDataType_Encoding_DefaultBinary = 870, - ServiceCounterDataType = 871, - ServiceCounterDataType_Encoding_DefaultXml = 872, - ServiceCounterDataType_Encoding_DefaultBinary = 873, - SubscriptionDiagnosticsDataType = 874, - SubscriptionDiagnosticsDataType_Encoding_DefaultXml = 875, - SubscriptionDiagnosticsDataType_Encoding_DefaultBinary = 876, - ModelChangeStructureDataType = 877, - ModelChangeStructureDataType_Encoding_DefaultXml = 878, - ModelChangeStructureDataType_Encoding_DefaultBinary = 879, - Range = 884, - Range_Encoding_DefaultXml = 885, - Range_Encoding_DefaultBinary = 886, - EUInformation = 887, - EUInformation_Encoding_DefaultXml = 888, - EUInformation_Encoding_DefaultBinary = 889, - ExceptionDeviationFormat = 890, - Annotation = 891, - Annotation_Encoding_DefaultXml = 892, - Annotation_Encoding_DefaultBinary = 893, - ProgramDiagnosticDataType = 894, - ProgramDiagnosticDataType_Encoding_DefaultXml = 895, - ProgramDiagnosticDataType_Encoding_DefaultBinary = 896, - SemanticChangeStructureDataType = 897, - SemanticChangeStructureDataType_Encoding_DefaultXml = 898, - SemanticChangeStructureDataType_Encoding_DefaultBinary = 899, - EventNotificationList = 914, - EventNotificationList_Encoding_DefaultXml = 915, - EventNotificationList_Encoding_DefaultBinary = 916, - EventFieldList = 917, - EventFieldList_Encoding_DefaultXml = 918, - EventFieldList_Encoding_DefaultBinary = 919, - HistoryEventFieldList = 920, - HistoryEventFieldList_Encoding_DefaultXml = 921, - HistoryEventFieldList_Encoding_DefaultBinary = 922, - HistoryUpdateEventResult = 929, - HistoryUpdateEventResult_Encoding_DefaultXml = 930, - HistoryUpdateEventResult_Encoding_DefaultBinary = 931, - IssuedIdentityToken = 938, - IssuedIdentityToken_Encoding_DefaultXml = 939, - IssuedIdentityToken_Encoding_DefaultBinary = 940, - NotificationData = 945, - NotificationData_Encoding_DefaultXml = 946, - NotificationData_Encoding_DefaultBinary = 947, - AggregateConfiguration = 948, - AggregateConfiguration_Encoding_DefaultXml = 949, - AggregateConfiguration_Encoding_DefaultBinary = 950, - ImageBMP = 2000, - ImageGIF = 2001, - ImageJPG = 2002, - ImagePNG = 2003, - ServerType = 2004, - ServerType_ServerArray = 2005, - ServerType_NamespaceArray = 2006, - ServerType_ServerStatus = 2007, - ServerType_ServiceLevel = 2008, - ServerType_ServerCapabilities = 2009, - ServerType_ServerDiagnostics = 2010, - ServerType_VendorServerInfo = 2011, - ServerType_ServerRedundancy = 2012, - ServerCapabilitiesType = 2013, - ServerCapabilitiesType_ServerProfileArray = 2014, - ServerCapabilitiesType_LocaleIdArray = 2016, - ServerCapabilitiesType_MinSupportedSampleRate = 2017, - ServerCapabilitiesType_ModellingRules = 2019, - ServerDiagnosticsType = 2020, - ServerDiagnosticsType_ServerDiagnosticsSummary = 2021, - ServerDiagnosticsType_SamplingIntervalDiagnosticsArray = 2022, - ServerDiagnosticsType_SubscriptionDiagnosticsArray = 2023, - ServerDiagnosticsType_EnabledFlag = 2025, - SessionsDiagnosticsSummaryType = 2026, - SessionsDiagnosticsSummaryType_SessionDiagnosticsArray = 2027, - SessionsDiagnosticsSummaryType_SessionSecurityDiagnosticsArray = 2028, - SessionDiagnosticsObjectType = 2029, - SessionDiagnosticsObjectType_SessionDiagnostics = 2030, - SessionDiagnosticsObjectType_SessionSecurityDiagnostics = 2031, - SessionDiagnosticsObjectType_SubscriptionDiagnosticsArray = 2032, - VendorServerInfoType = 2033, - ServerRedundancyType = 2034, - ServerRedundancyType_RedundancySupport = 2035, - TransparentRedundancyType = 2036, - TransparentRedundancyType_CurrentServerId = 2037, - TransparentRedundancyType_RedundantServerArray = 2038, - NonTransparentRedundancyType = 2039, - NonTransparentRedundancyType_ServerUriArray = 2040, - BaseEventType = 2041, - BaseEventType_EventId = 2042, - BaseEventType_EventType = 2043, - BaseEventType_SourceNode = 2044, - BaseEventType_SourceName = 2045, - BaseEventType_Time = 2046, - BaseEventType_ReceiveTime = 2047, - BaseEventType_Message = 2050, - BaseEventType_Severity = 2051, - AuditEventType = 2052, - AuditEventType_ActionTimeStamp = 2053, - AuditEventType_Status = 2054, - AuditEventType_ServerId = 2055, - AuditEventType_ClientAuditEntryId = 2056, - AuditEventType_ClientUserId = 2057, - AuditSecurityEventType = 2058, - AuditChannelEventType = 2059, - AuditOpenSecureChannelEventType = 2060, - AuditOpenSecureChannelEventType_ClientCertificate = 2061, - AuditOpenSecureChannelEventType_RequestType = 2062, - AuditOpenSecureChannelEventType_SecurityPolicyUri = 2063, - AuditOpenSecureChannelEventType_SecurityMode = 2065, - AuditOpenSecureChannelEventType_RequestedLifetime = 2066, - AuditSessionEventType = 2069, - AuditSessionEventType_SessionId = 2070, - AuditCreateSessionEventType = 2071, - AuditCreateSessionEventType_SecureChannelId = 2072, - AuditCreateSessionEventType_ClientCertificate = 2073, - AuditCreateSessionEventType_RevisedSessionTimeout = 2074, - AuditActivateSessionEventType = 2075, - AuditActivateSessionEventType_ClientSoftwareCertificates = 2076, - AuditActivateSessionEventType_UserIdentityToken = 2077, - AuditCancelEventType = 2078, - AuditCancelEventType_RequestHandle = 2079, - AuditCertificateEventType = 2080, - AuditCertificateEventType_Certificate = 2081, - AuditCertificateDataMismatchEventType = 2082, - AuditCertificateDataMismatchEventType_InvalidHostname = 2083, - AuditCertificateDataMismatchEventType_InvalidUri = 2084, - AuditCertificateExpiredEventType = 2085, - AuditCertificateInvalidEventType = 2086, - AuditCertificateUntrustedEventType = 2087, - AuditCertificateRevokedEventType = 2088, - AuditCertificateMismatchEventType = 2089, - AuditNodeManagementEventType = 2090, - AuditAddNodesEventType = 2091, - AuditAddNodesEventType_NodesToAdd = 2092, - AuditDeleteNodesEventType = 2093, - AuditDeleteNodesEventType_NodesToDelete = 2094, - AuditAddReferencesEventType = 2095, - AuditAddReferencesEventType_ReferencesToAdd = 2096, - AuditDeleteReferencesEventType = 2097, - AuditDeleteReferencesEventType_ReferencesToDelete = 2098, - AuditUpdateEventType = 2099, - AuditWriteUpdateEventType = 2100, - AuditWriteUpdateEventType_IndexRange = 2101, - AuditWriteUpdateEventType_OldValue = 2102, - AuditWriteUpdateEventType_NewValue = 2103, - AuditHistoryUpdateEventType = 2104, - AuditUpdateMethodEventType = 2127, - AuditUpdateMethodEventType_MethodId = 2128, - AuditUpdateMethodEventType_InputArguments = 2129, - SystemEventType = 2130, - DeviceFailureEventType = 2131, - BaseModelChangeEventType = 2132, - GeneralModelChangeEventType = 2133, - GeneralModelChangeEventType_Changes = 2134, - ServerVendorCapabilityType = 2137, - ServerStatusType = 2138, - ServerStatusType_StartTime = 2139, - ServerStatusType_CurrentTime = 2140, - ServerStatusType_State = 2141, - ServerStatusType_BuildInfo = 2142, - ServerDiagnosticsSummaryType = 2150, - ServerDiagnosticsSummaryType_ServerViewCount = 2151, - ServerDiagnosticsSummaryType_CurrentSessionCount = 2152, - ServerDiagnosticsSummaryType_CumulatedSessionCount = 2153, - ServerDiagnosticsSummaryType_SecurityRejectedSessionCount = 2154, - ServerDiagnosticsSummaryType_RejectedSessionCount = 2155, - ServerDiagnosticsSummaryType_SessionTimeoutCount = 2156, - ServerDiagnosticsSummaryType_SessionAbortCount = 2157, - ServerDiagnosticsSummaryType_PublishingIntervalCount = 2159, - ServerDiagnosticsSummaryType_CurrentSubscriptionCount = 2160, - ServerDiagnosticsSummaryType_CumulatedSubscriptionCount = 2161, - ServerDiagnosticsSummaryType_SecurityRejectedRequestsCount = 2162, - ServerDiagnosticsSummaryType_RejectedRequestsCount = 2163, - SamplingIntervalDiagnosticsArrayType = 2164, - SamplingIntervalDiagnosticsType = 2165, - SamplingIntervalDiagnosticsType_SamplingInterval = 2166, - SubscriptionDiagnosticsArrayType = 2171, - SubscriptionDiagnosticsType = 2172, - SubscriptionDiagnosticsType_SessionId = 2173, - SubscriptionDiagnosticsType_SubscriptionId = 2174, - SubscriptionDiagnosticsType_Priority = 2175, - SubscriptionDiagnosticsType_PublishingInterval = 2176, - SubscriptionDiagnosticsType_MaxKeepAliveCount = 2177, - SubscriptionDiagnosticsType_MaxNotificationsPerPublish = 2179, - SubscriptionDiagnosticsType_PublishingEnabled = 2180, - SubscriptionDiagnosticsType_ModifyCount = 2181, - SubscriptionDiagnosticsType_EnableCount = 2182, - SubscriptionDiagnosticsType_DisableCount = 2183, - SubscriptionDiagnosticsType_RepublishRequestCount = 2184, - SubscriptionDiagnosticsType_RepublishMessageRequestCount = 2185, - SubscriptionDiagnosticsType_RepublishMessageCount = 2186, - SubscriptionDiagnosticsType_TransferRequestCount = 2187, - SubscriptionDiagnosticsType_TransferredToAltClientCount = 2188, - SubscriptionDiagnosticsType_TransferredToSameClientCount = 2189, - SubscriptionDiagnosticsType_PublishRequestCount = 2190, - SubscriptionDiagnosticsType_DataChangeNotificationsCount = 2191, - SubscriptionDiagnosticsType_NotificationsCount = 2193, - SessionDiagnosticsArrayType = 2196, - SessionDiagnosticsVariableType = 2197, - SessionDiagnosticsVariableType_SessionId = 2198, - SessionDiagnosticsVariableType_SessionName = 2199, - SessionDiagnosticsVariableType_ClientDescription = 2200, - SessionDiagnosticsVariableType_ServerUri = 2201, - SessionDiagnosticsVariableType_EndpointUrl = 2202, - SessionDiagnosticsVariableType_LocaleIds = 2203, - SessionDiagnosticsVariableType_ActualSessionTimeout = 2204, - SessionDiagnosticsVariableType_ClientConnectionTime = 2205, - SessionDiagnosticsVariableType_ClientLastContactTime = 2206, - SessionDiagnosticsVariableType_CurrentSubscriptionsCount = 2207, - SessionDiagnosticsVariableType_CurrentMonitoredItemsCount = 2208, - SessionDiagnosticsVariableType_CurrentPublishRequestsInQueue = 2209, - SessionDiagnosticsVariableType_ReadCount = 2217, - SessionDiagnosticsVariableType_HistoryReadCount = 2218, - SessionDiagnosticsVariableType_WriteCount = 2219, - SessionDiagnosticsVariableType_HistoryUpdateCount = 2220, - SessionDiagnosticsVariableType_CallCount = 2221, - SessionDiagnosticsVariableType_CreateMonitoredItemsCount = 2222, - SessionDiagnosticsVariableType_ModifyMonitoredItemsCount = 2223, - SessionDiagnosticsVariableType_SetMonitoringModeCount = 2224, - SessionDiagnosticsVariableType_SetTriggeringCount = 2225, - SessionDiagnosticsVariableType_DeleteMonitoredItemsCount = 2226, - SessionDiagnosticsVariableType_CreateSubscriptionCount = 2227, - SessionDiagnosticsVariableType_ModifySubscriptionCount = 2228, - SessionDiagnosticsVariableType_SetPublishingModeCount = 2229, - SessionDiagnosticsVariableType_PublishCount = 2230, - SessionDiagnosticsVariableType_RepublishCount = 2231, - SessionDiagnosticsVariableType_TransferSubscriptionsCount = 2232, - SessionDiagnosticsVariableType_DeleteSubscriptionsCount = 2233, - SessionDiagnosticsVariableType_AddNodesCount = 2234, - SessionDiagnosticsVariableType_AddReferencesCount = 2235, - SessionDiagnosticsVariableType_DeleteNodesCount = 2236, - SessionDiagnosticsVariableType_DeleteReferencesCount = 2237, - SessionDiagnosticsVariableType_BrowseCount = 2238, - SessionDiagnosticsVariableType_BrowseNextCount = 2239, - SessionDiagnosticsVariableType_TranslateBrowsePathsToNodeIdsCount = 2240, - SessionDiagnosticsVariableType_QueryFirstCount = 2241, - SessionDiagnosticsVariableType_QueryNextCount = 2242, - SessionSecurityDiagnosticsArrayType = 2243, - SessionSecurityDiagnosticsType = 2244, - SessionSecurityDiagnosticsType_SessionId = 2245, - SessionSecurityDiagnosticsType_ClientUserIdOfSession = 2246, - SessionSecurityDiagnosticsType_ClientUserIdHistory = 2247, - SessionSecurityDiagnosticsType_AuthenticationMechanism = 2248, - SessionSecurityDiagnosticsType_Encoding = 2249, - SessionSecurityDiagnosticsType_TransportProtocol = 2250, - SessionSecurityDiagnosticsType_SecurityMode = 2251, - SessionSecurityDiagnosticsType_SecurityPolicyUri = 2252, - Server = 2253, - Server_ServerArray = 2254, - Server_NamespaceArray = 2255, - Server_ServerStatus = 2256, - Server_ServerStatus_StartTime = 2257, - Server_ServerStatus_CurrentTime = 2258, - Server_ServerStatus_State = 2259, - Server_ServerStatus_BuildInfo = 2260, - Server_ServerStatus_BuildInfo_ProductName = 2261, - Server_ServerStatus_BuildInfo_ProductUri = 2262, - Server_ServerStatus_BuildInfo_ManufacturerName = 2263, - Server_ServerStatus_BuildInfo_SoftwareVersion = 2264, - Server_ServerStatus_BuildInfo_BuildNumber = 2265, - Server_ServerStatus_BuildInfo_BuildDate = 2266, - Server_ServiceLevel = 2267, - Server_ServerCapabilities = 2268, - Server_ServerCapabilities_ServerProfileArray = 2269, - Server_ServerCapabilities_LocaleIdArray = 2271, - Server_ServerCapabilities_MinSupportedSampleRate = 2272, - Server_ServerDiagnostics = 2274, - Server_ServerDiagnostics_ServerDiagnosticsSummary = 2275, - Server_ServerDiagnostics_ServerDiagnosticsSummary_ServerViewCount = 2276, - Server_ServerDiagnostics_ServerDiagnosticsSummary_CurrentSessionCount = 2277, - Server_ServerDiagnostics_ServerDiagnosticsSummary_CumulatedSessionCount = 2278, - Server_ServerDiagnostics_ServerDiagnosticsSummary_SecurityRejectedSessionCount = 2279, - Server_ServerDiagnostics_ServerDiagnosticsSummary_SessionTimeoutCount = 2281, - Server_ServerDiagnostics_ServerDiagnosticsSummary_SessionAbortCount = 2282, - Server_ServerDiagnostics_ServerDiagnosticsSummary_PublishingIntervalCount = 2284, - Server_ServerDiagnostics_ServerDiagnosticsSummary_CurrentSubscriptionCount = 2285, - Server_ServerDiagnostics_ServerDiagnosticsSummary_CumulatedSubscriptionCount = 2286, - Server_ServerDiagnostics_ServerDiagnosticsSummary_SecurityRejectedRequestsCount = 2287, - Server_ServerDiagnostics_ServerDiagnosticsSummary_RejectedRequestsCount = 2288, - Server_ServerDiagnostics_SamplingIntervalDiagnosticsArray = 2289, - Server_ServerDiagnostics_SubscriptionDiagnosticsArray = 2290, - Server_ServerDiagnostics_EnabledFlag = 2294, - Server_VendorServerInfo = 2295, - Server_ServerRedundancy = 2296, - StateMachineType = 2299, - StateType = 2307, - StateType_StateNumber = 2308, - InitialStateType = 2309, - TransitionType = 2310, - TransitionEventType = 2311, - TransitionType_TransitionNumber = 2312, - AuditUpdateStateEventType = 2315, - HistoricalDataConfigurationType = 2318, - HistoricalDataConfigurationType_Stepped = 2323, - HistoricalDataConfigurationType_Definition = 2324, - HistoricalDataConfigurationType_MaxTimeInterval = 2325, - HistoricalDataConfigurationType_MinTimeInterval = 2326, - HistoricalDataConfigurationType_ExceptionDeviation = 2327, - HistoricalDataConfigurationType_ExceptionDeviationFormat = 2328, - HistoryServerCapabilitiesType = 2330, - HistoryServerCapabilitiesType_AccessHistoryDataCapability = 2331, - HistoryServerCapabilitiesType_AccessHistoryEventsCapability = 2332, - HistoryServerCapabilitiesType_InsertDataCapability = 2334, - HistoryServerCapabilitiesType_ReplaceDataCapability = 2335, - HistoryServerCapabilitiesType_UpdateDataCapability = 2336, - HistoryServerCapabilitiesType_DeleteRawCapability = 2337, - HistoryServerCapabilitiesType_DeleteAtTimeCapability = 2338, - AggregateFunctionType = 2340, - AggregateFunction_Interpolative = 2341, - AggregateFunction_Average = 2342, - AggregateFunction_TimeAverage = 2343, - AggregateFunction_Total = 2344, - AggregateFunction_Minimum = 2346, - AggregateFunction_Maximum = 2347, - AggregateFunction_MinimumActualTime = 2348, - AggregateFunction_MaximumActualTime = 2349, - AggregateFunction_Range = 2350, - AggregateFunction_AnnotationCount = 2351, - AggregateFunction_Count = 2352, - AggregateFunction_NumberOfTransitions = 2355, - AggregateFunction_Start = 2357, - AggregateFunction_End = 2358, - AggregateFunction_Delta = 2359, - AggregateFunction_DurationGood = 2360, - AggregateFunction_DurationBad = 2361, - AggregateFunction_PercentGood = 2362, - AggregateFunction_PercentBad = 2363, - AggregateFunction_WorstQuality = 2364, - DataItemType = 2365, - DataItemType_Definition = 2366, - DataItemType_ValuePrecision = 2367, - AnalogItemType = 2368, - AnalogItemType_EURange = 2369, - AnalogItemType_InstrumentRange = 2370, - AnalogItemType_EngineeringUnits = 2371, - DiscreteItemType = 2372, - TwoStateDiscreteType = 2373, - TwoStateDiscreteType_FalseState = 2374, - TwoStateDiscreteType_TrueState = 2375, - MultiStateDiscreteType = 2376, - MultiStateDiscreteType_EnumStrings = 2377, - ProgramTransitionEventType = 2378, - ProgramTransitionEventType_IntermediateResult = 2379, - ProgramDiagnosticType = 2380, - ProgramDiagnosticType_CreateSessionId = 2381, - ProgramDiagnosticType_CreateClientName = 2382, - ProgramDiagnosticType_InvocationCreationTime = 2383, - ProgramDiagnosticType_LastTransitionTime = 2384, - ProgramDiagnosticType_LastMethodCall = 2385, - ProgramDiagnosticType_LastMethodSessionId = 2386, - ProgramDiagnosticType_LastMethodInputArguments = 2387, - ProgramDiagnosticType_LastMethodOutputArguments = 2388, - ProgramDiagnosticType_LastMethodCallTime = 2389, - ProgramDiagnosticType_LastMethodReturnStatus = 2390, - ProgramStateMachineType = 2391, - ProgramStateMachineType_Creatable = 2392, - ProgramStateMachineType_Deletable = 2393, - ProgramStateMachineType_AutoDelete = 2394, - ProgramStateMachineType_RecycleCount = 2395, - ProgramStateMachineType_InstanceCount = 2396, - ProgramStateMachineType_MaxInstanceCount = 2397, - ProgramStateMachineType_MaxRecycleCount = 2398, - ProgramStateMachineType_ProgramDiagnostics = 2399, - ProgramStateMachineType_Ready = 2400, - ProgramStateMachineType_Ready_StateNumber = 2401, - ProgramStateMachineType_Running = 2402, - ProgramStateMachineType_Running_StateNumber = 2403, - ProgramStateMachineType_Suspended = 2404, - ProgramStateMachineType_Suspended_StateNumber = 2405, - ProgramStateMachineType_Halted = 2406, - ProgramStateMachineType_Halted_StateNumber = 2407, - ProgramStateMachineType_HaltedToReady = 2408, - ProgramStateMachineType_HaltedToReady_TransitionNumber = 2409, - ProgramStateMachineType_ReadyToRunning = 2410, - ProgramStateMachineType_ReadyToRunning_TransitionNumber = 2411, - ProgramStateMachineType_RunningToHalted = 2412, - ProgramStateMachineType_RunningToHalted_TransitionNumber = 2413, - ProgramStateMachineType_RunningToReady = 2414, - ProgramStateMachineType_RunningToReady_TransitionNumber = 2415, - ProgramStateMachineType_RunningToSuspended = 2416, - ProgramStateMachineType_RunningToSuspended_TransitionNumber = 2417, - ProgramStateMachineType_SuspendedToRunning = 2418, - ProgramStateMachineType_SuspendedToRunning_TransitionNumber = 2419, - ProgramStateMachineType_SuspendedToHalted = 2420, - ProgramStateMachineType_SuspendedToHalted_TransitionNumber = 2421, - ProgramStateMachineType_SuspendedToReady = 2422, - ProgramStateMachineType_SuspendedToReady_TransitionNumber = 2423, - ProgramStateMachineType_ReadyToHalted = 2424, - ProgramStateMachineType_ReadyToHalted_TransitionNumber = 2425, - ProgramStateMachineType_Start = 2426, - ProgramStateMachineType_Suspend = 2427, - ProgramStateMachineType_Resume = 2428, - ProgramStateMachineType_Halt = 2429, - ProgramStateMachineType_Reset = 2430, - SessionDiagnosticsVariableType_RegisterNodesCount = 2730, - SessionDiagnosticsVariableType_UnregisterNodesCount = 2731, - ServerCapabilitiesType_MaxBrowseContinuationPoints = 2732, - ServerCapabilitiesType_MaxQueryContinuationPoints = 2733, - ServerCapabilitiesType_MaxHistoryContinuationPoints = 2734, - Server_ServerCapabilities_MaxBrowseContinuationPoints = 2735, - Server_ServerCapabilities_MaxQueryContinuationPoints = 2736, - Server_ServerCapabilities_MaxHistoryContinuationPoints = 2737, - SemanticChangeEventType = 2738, - SemanticChangeEventType_Changes = 2739, - ServerType_Auditing = 2742, - ServerDiagnosticsType_SessionsDiagnosticsSummary = 2744, - AuditChannelEventType_SecureChannelId = 2745, - AuditOpenSecureChannelEventType_ClientCertificateThumbprint = 2746, - AuditCreateSessionEventType_ClientCertificateThumbprint = 2747, - AuditUrlMismatchEventType = 2748, - AuditUrlMismatchEventType_EndpointUrl = 2749, - AuditWriteUpdateEventType_AttributeId = 2750, - AuditHistoryUpdateEventType_ParameterDataTypeId = 2751, - ServerStatusType_SecondsTillShutdown = 2752, - ServerStatusType_ShutdownReason = 2753, - ServerCapabilitiesType_AggregateFunctions = 2754, - StateVariableType = 2755, - StateVariableType_Id = 2756, - StateVariableType_Name = 2757, - StateVariableType_Number = 2758, - StateVariableType_EffectiveDisplayName = 2759, - FiniteStateVariableType = 2760, - FiniteStateVariableType_Id = 2761, - TransitionVariableType = 2762, - TransitionVariableType_Id = 2763, - TransitionVariableType_Name = 2764, - TransitionVariableType_Number = 2765, - TransitionVariableType_TransitionTime = 2766, - FiniteTransitionVariableType = 2767, - FiniteTransitionVariableType_Id = 2768, - StateMachineType_CurrentState = 2769, - StateMachineType_LastTransition = 2770, - FiniteStateMachineType = 2771, - FiniteStateMachineType_CurrentState = 2772, - FiniteStateMachineType_LastTransition = 2773, - TransitionEventType_Transition = 2774, - TransitionEventType_FromState = 2775, - TransitionEventType_ToState = 2776, - AuditUpdateStateEventType_OldStateId = 2777, - AuditUpdateStateEventType_NewStateId = 2778, - ConditionType = 2782, - RefreshStartEventType = 2787, - RefreshEndEventType = 2788, - RefreshRequiredEventType = 2789, - AuditConditionEventType = 2790, - AuditConditionEnableEventType = 2803, - AuditConditionCommentEventType = 2829, - DialogConditionType = 2830, - DialogConditionType_Prompt = 2831, - AcknowledgeableConditionType = 2881, - AlarmConditionType = 2915, - ShelvedStateMachineType = 2929, - ShelvedStateMachineType_Unshelved = 2930, - ShelvedStateMachineType_TimedShelved = 2932, - ShelvedStateMachineType_OneShotShelved = 2933, - ShelvedStateMachineType_UnshelvedToTimedShelved = 2935, - ShelvedStateMachineType_UnshelvedToOneShotShelved = 2936, - ShelvedStateMachineType_TimedShelvedToUnshelved = 2940, - ShelvedStateMachineType_TimedShelvedToOneShotShelved = 2942, - ShelvedStateMachineType_OneShotShelvedToUnshelved = 2943, - ShelvedStateMachineType_OneShotShelvedToTimedShelved = 2945, - ShelvedStateMachineType_Unshelve = 2947, - ShelvedStateMachineType_OneShotShelve = 2948, - ShelvedStateMachineType_TimedShelve = 2949, - LimitAlarmType = 2955, - ShelvedStateMachineType_TimedShelve_InputArguments = 2991, - Server_ServerStatus_SecondsTillShutdown = 2992, - Server_ServerStatus_ShutdownReason = 2993, - Server_Auditing = 2994, - Server_ServerCapabilities_ModellingRules = 2996, - Server_ServerCapabilities_AggregateFunctions = 2997, - SubscriptionDiagnosticsType_EventNotificationsCount = 2998, - AuditHistoryEventUpdateEventType = 2999, - AuditHistoryEventUpdateEventType_Filter = 3003, - AuditHistoryValueUpdateEventType = 3006, - AuditHistoryDeleteEventType = 3012, - AuditHistoryRawModifyDeleteEventType = 3014, - AuditHistoryRawModifyDeleteEventType_IsDeleteModified = 3015, - AuditHistoryRawModifyDeleteEventType_StartTime = 3016, - AuditHistoryRawModifyDeleteEventType_EndTime = 3017, - AuditHistoryAtTimeDeleteEventType = 3019, - AuditHistoryAtTimeDeleteEventType_ReqTimes = 3020, - AuditHistoryAtTimeDeleteEventType_OldValues = 3021, - AuditHistoryEventDeleteEventType = 3022, - AuditHistoryEventDeleteEventType_EventIds = 3023, - AuditHistoryEventDeleteEventType_OldValues = 3024, - AuditHistoryEventUpdateEventType_UpdatedNode = 3025, - AuditHistoryValueUpdateEventType_UpdatedNode = 3026, - AuditHistoryDeleteEventType_UpdatedNode = 3027, - AuditHistoryEventUpdateEventType_PerformInsertReplace = 3028, - AuditHistoryEventUpdateEventType_NewValues = 3029, - AuditHistoryEventUpdateEventType_OldValues = 3030, - AuditHistoryValueUpdateEventType_PerformInsertReplace = 3031, - AuditHistoryValueUpdateEventType_NewValues = 3032, - AuditHistoryValueUpdateEventType_OldValues = 3033, - AuditHistoryRawModifyDeleteEventType_OldValues = 3034, - EventQueueOverflowEventType = 3035, - EventTypesFolder = 3048, - ServerCapabilitiesType_SoftwareCertificates = 3049, - SessionDiagnosticsVariableType_MaxResponseMessageSize = 3050, - BuildInfoType = 3051, - BuildInfoType_ProductUri = 3052, - BuildInfoType_ManufacturerName = 3053, - BuildInfoType_ProductName = 3054, - BuildInfoType_SoftwareVersion = 3055, - BuildInfoType_BuildNumber = 3056, - BuildInfoType_BuildDate = 3057, - SessionSecurityDiagnosticsType_ClientCertificate = 3058, - HistoricalDataConfigurationType_AggregateConfiguration = 3059, - DefaultBinary = 3062, - DefaultXml = 3063, - AlwaysGeneratesEvent = 3065, - Icon = 3067, - NodeVersion = 3068, - LocalTime = 3069, - AllowNulls = 3070, - EnumValues = 3071, - InputArguments = 3072, - OutputArguments = 3073, - ServerType_ServerStatus_StartTime = 3074, - ServerType_ServerStatus_CurrentTime = 3075, - ServerType_ServerStatus_State = 3076, - ServerType_ServerStatus_BuildInfo = 3077, - ServerType_ServerStatus_BuildInfo_ProductUri = 3078, - ServerType_ServerStatus_BuildInfo_ManufacturerName = 3079, - ServerType_ServerStatus_BuildInfo_ProductName = 3080, - ServerType_ServerStatus_BuildInfo_SoftwareVersion = 3081, - ServerType_ServerStatus_BuildInfo_BuildNumber = 3082, - ServerType_ServerStatus_BuildInfo_BuildDate = 3083, - ServerType_ServerStatus_SecondsTillShutdown = 3084, - ServerType_ServerStatus_ShutdownReason = 3085, - ServerType_ServerCapabilities_ServerProfileArray = 3086, - ServerType_ServerCapabilities_LocaleIdArray = 3087, - ServerType_ServerCapabilities_MinSupportedSampleRate = 3088, - ServerType_ServerCapabilities_MaxBrowseContinuationPoints = 3089, - ServerType_ServerCapabilities_MaxQueryContinuationPoints = 3090, - ServerType_ServerCapabilities_MaxHistoryContinuationPoints = 3091, - ServerType_ServerCapabilities_SoftwareCertificates = 3092, - ServerType_ServerCapabilities_ModellingRules = 3093, - ServerType_ServerCapabilities_AggregateFunctions = 3094, - ServerType_ServerDiagnostics_ServerDiagnosticsSummary = 3095, - ServerType_ServerDiagnostics_ServerDiagnosticsSummary_ServerViewCount = 3096, - ServerType_ServerDiagnostics_ServerDiagnosticsSummary_CurrentSessionCount = 3097, - ServerType_ServerDiagnostics_ServerDiagnosticsSummary_CumulatedSessionCount = 3098, - ServerType_ServerDiagnostics_ServerDiagnosticsSummary_SecurityRejectedSessionCount = 3099, - ServerType_ServerDiagnostics_ServerDiagnosticsSummary_RejectedSessionCount = 3100, - ServerType_ServerDiagnostics_ServerDiagnosticsSummary_SessionTimeoutCount = 3101, - ServerType_ServerDiagnostics_ServerDiagnosticsSummary_SessionAbortCount = 3102, - ServerType_ServerDiagnostics_ServerDiagnosticsSummary_PublishingIntervalCount = 3104, - ServerType_ServerDiagnostics_ServerDiagnosticsSummary_CurrentSubscriptionCount = 3105, - ServerType_ServerDiagnostics_ServerDiagnosticsSummary_CumulatedSubscriptionCount = 3106, - ServerType_ServerDiagnostics_ServerDiagnosticsSummary_SecurityRejectedRequestsCount = 3107, - ServerType_ServerDiagnostics_ServerDiagnosticsSummary_RejectedRequestsCount = 3108, - ServerType_ServerDiagnostics_SamplingIntervalDiagnosticsArray = 3109, - ServerType_ServerDiagnostics_SubscriptionDiagnosticsArray = 3110, - ServerType_ServerDiagnostics_SessionsDiagnosticsSummary = 3111, - ServerType_ServerDiagnostics_SessionsDiagnosticsSummary_SessionDiagnosticsArray = 3112, - ServerType_ServerDiagnostics_SessionsDiagnosticsSummary_SessionSecurityDiagnosticsArray = 3113, - ServerType_ServerDiagnostics_EnabledFlag = 3114, - ServerType_ServerRedundancy_RedundancySupport = 3115, - ServerDiagnosticsType_ServerDiagnosticsSummary_ServerViewCount = 3116, - ServerDiagnosticsType_ServerDiagnosticsSummary_CurrentSessionCount = 3117, - ServerDiagnosticsType_ServerDiagnosticsSummary_CumulatedSessionCount = 3118, - ServerDiagnosticsType_ServerDiagnosticsSummary_SecurityRejectedSessionCount = 3119, - ServerDiagnosticsType_ServerDiagnosticsSummary_RejectedSessionCount = 3120, - ServerDiagnosticsType_ServerDiagnosticsSummary_SessionTimeoutCount = 3121, - ServerDiagnosticsType_ServerDiagnosticsSummary_SessionAbortCount = 3122, - ServerDiagnosticsType_ServerDiagnosticsSummary_PublishingIntervalCount = 3124, - ServerDiagnosticsType_ServerDiagnosticsSummary_CurrentSubscriptionCount = 3125, - ServerDiagnosticsType_ServerDiagnosticsSummary_CumulatedSubscriptionCount = 3126, - ServerDiagnosticsType_ServerDiagnosticsSummary_SecurityRejectedRequestsCount = 3127, - ServerDiagnosticsType_ServerDiagnosticsSummary_RejectedRequestsCount = 3128, - ServerDiagnosticsType_SessionsDiagnosticsSummary_SessionDiagnosticsArray = 3129, - ServerDiagnosticsType_SessionsDiagnosticsSummary_SessionSecurityDiagnosticsArray = 3130, - SessionDiagnosticsObjectType_SessionDiagnostics_SessionId = 3131, - SessionDiagnosticsObjectType_SessionDiagnostics_SessionName = 3132, - SessionDiagnosticsObjectType_SessionDiagnostics_ClientDescription = 3133, - SessionDiagnosticsObjectType_SessionDiagnostics_ServerUri = 3134, - SessionDiagnosticsObjectType_SessionDiagnostics_EndpointUrl = 3135, - SessionDiagnosticsObjectType_SessionDiagnostics_LocaleIds = 3136, - SessionDiagnosticsObjectType_SessionDiagnostics_ActualSessionTimeout = 3137, - SessionDiagnosticsObjectType_SessionDiagnostics_MaxResponseMessageSize = 3138, - SessionDiagnosticsObjectType_SessionDiagnostics_ClientConnectionTime = 3139, - SessionDiagnosticsObjectType_SessionDiagnostics_ClientLastContactTime = 3140, - SessionDiagnosticsObjectType_SessionDiagnostics_CurrentSubscriptionsCount = 3141, - SessionDiagnosticsObjectType_SessionDiagnostics_CurrentMonitoredItemsCount = 3142, - SessionDiagnosticsObjectType_SessionDiagnostics_CurrentPublishRequestsInQueue = 3143, - SessionDiagnosticsObjectType_SessionDiagnostics_ReadCount = 3151, - SessionDiagnosticsObjectType_SessionDiagnostics_HistoryReadCount = 3152, - SessionDiagnosticsObjectType_SessionDiagnostics_WriteCount = 3153, - SessionDiagnosticsObjectType_SessionDiagnostics_HistoryUpdateCount = 3154, - SessionDiagnosticsObjectType_SessionDiagnostics_CallCount = 3155, - SessionDiagnosticsObjectType_SessionDiagnostics_CreateMonitoredItemsCount = 3156, - SessionDiagnosticsObjectType_SessionDiagnostics_ModifyMonitoredItemsCount = 3157, - SessionDiagnosticsObjectType_SessionDiagnostics_SetMonitoringModeCount = 3158, - SessionDiagnosticsObjectType_SessionDiagnostics_SetTriggeringCount = 3159, - SessionDiagnosticsObjectType_SessionDiagnostics_DeleteMonitoredItemsCount = 3160, - SessionDiagnosticsObjectType_SessionDiagnostics_CreateSubscriptionCount = 3161, - SessionDiagnosticsObjectType_SessionDiagnostics_ModifySubscriptionCount = 3162, - SessionDiagnosticsObjectType_SessionDiagnostics_SetPublishingModeCount = 3163, - SessionDiagnosticsObjectType_SessionDiagnostics_PublishCount = 3164, - SessionDiagnosticsObjectType_SessionDiagnostics_RepublishCount = 3165, - SessionDiagnosticsObjectType_SessionDiagnostics_TransferSubscriptionsCount = 3166, - SessionDiagnosticsObjectType_SessionDiagnostics_DeleteSubscriptionsCount = 3167, - SessionDiagnosticsObjectType_SessionDiagnostics_AddNodesCount = 3168, - SessionDiagnosticsObjectType_SessionDiagnostics_AddReferencesCount = 3169, - SessionDiagnosticsObjectType_SessionDiagnostics_DeleteNodesCount = 3170, - SessionDiagnosticsObjectType_SessionDiagnostics_DeleteReferencesCount = 3171, - SessionDiagnosticsObjectType_SessionDiagnostics_BrowseCount = 3172, - SessionDiagnosticsObjectType_SessionDiagnostics_BrowseNextCount = 3173, - SessionDiagnosticsObjectType_SessionDiagnostics_TranslateBrowsePathsToNodeIdsCount = 3174, - SessionDiagnosticsObjectType_SessionDiagnostics_QueryFirstCount = 3175, - SessionDiagnosticsObjectType_SessionDiagnostics_QueryNextCount = 3176, - SessionDiagnosticsObjectType_SessionDiagnostics_RegisterNodesCount = 3177, - SessionDiagnosticsObjectType_SessionDiagnostics_UnregisterNodesCount = 3178, - SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SessionId = 3179, - SessionDiagnosticsObjectType_SessionSecurityDiagnostics_ClientUserIdOfSession = 3180, - SessionDiagnosticsObjectType_SessionSecurityDiagnostics_ClientUserIdHistory = 3181, - SessionDiagnosticsObjectType_SessionSecurityDiagnostics_AuthenticationMechanism = 3182, - SessionDiagnosticsObjectType_SessionSecurityDiagnostics_Encoding = 3183, - SessionDiagnosticsObjectType_SessionSecurityDiagnostics_TransportProtocol = 3184, - SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SecurityMode = 3185, - SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SecurityPolicyUri = 3186, - SessionDiagnosticsObjectType_SessionSecurityDiagnostics_ClientCertificate = 3187, - TransparentRedundancyType_RedundancySupport = 3188, - NonTransparentRedundancyType_RedundancySupport = 3189, - BaseEventType_LocalTime = 3190, - EventQueueOverflowEventType_EventId = 3191, - EventQueueOverflowEventType_EventType = 3192, - EventQueueOverflowEventType_SourceNode = 3193, - EventQueueOverflowEventType_SourceName = 3194, - EventQueueOverflowEventType_Time = 3195, - EventQueueOverflowEventType_ReceiveTime = 3196, - EventQueueOverflowEventType_LocalTime = 3197, - EventQueueOverflowEventType_Message = 3198, - EventQueueOverflowEventType_Severity = 3199, - AuditEventType_EventId = 3200, - AuditEventType_EventType = 3201, - AuditEventType_SourceNode = 3202, - AuditEventType_SourceName = 3203, - AuditEventType_Time = 3204, - AuditEventType_ReceiveTime = 3205, - AuditEventType_LocalTime = 3206, - AuditEventType_Message = 3207, - AuditEventType_Severity = 3208, - AuditSecurityEventType_EventId = 3209, - AuditSecurityEventType_EventType = 3210, - AuditSecurityEventType_SourceNode = 3211, - AuditSecurityEventType_SourceName = 3212, - AuditSecurityEventType_Time = 3213, - AuditSecurityEventType_ReceiveTime = 3214, - AuditSecurityEventType_LocalTime = 3215, - AuditSecurityEventType_Message = 3216, - AuditSecurityEventType_Severity = 3217, - AuditSecurityEventType_ActionTimeStamp = 3218, - AuditSecurityEventType_Status = 3219, - AuditSecurityEventType_ServerId = 3220, - AuditSecurityEventType_ClientAuditEntryId = 3221, - AuditSecurityEventType_ClientUserId = 3222, - AuditChannelEventType_EventId = 3223, - AuditChannelEventType_EventType = 3224, - AuditChannelEventType_SourceNode = 3225, - AuditChannelEventType_SourceName = 3226, - AuditChannelEventType_Time = 3227, - AuditChannelEventType_ReceiveTime = 3228, - AuditChannelEventType_LocalTime = 3229, - AuditChannelEventType_Message = 3230, - AuditChannelEventType_Severity = 3231, - AuditChannelEventType_ActionTimeStamp = 3232, - AuditChannelEventType_Status = 3233, - AuditChannelEventType_ServerId = 3234, - AuditChannelEventType_ClientAuditEntryId = 3235, - AuditChannelEventType_ClientUserId = 3236, - AuditOpenSecureChannelEventType_EventId = 3237, - AuditOpenSecureChannelEventType_EventType = 3238, - AuditOpenSecureChannelEventType_SourceNode = 3239, - AuditOpenSecureChannelEventType_SourceName = 3240, - AuditOpenSecureChannelEventType_Time = 3241, - AuditOpenSecureChannelEventType_ReceiveTime = 3242, - AuditOpenSecureChannelEventType_LocalTime = 3243, - AuditOpenSecureChannelEventType_Message = 3244, - AuditOpenSecureChannelEventType_Severity = 3245, - AuditOpenSecureChannelEventType_ActionTimeStamp = 3246, - AuditOpenSecureChannelEventType_Status = 3247, - AuditOpenSecureChannelEventType_ServerId = 3248, - AuditOpenSecureChannelEventType_ClientAuditEntryId = 3249, - AuditOpenSecureChannelEventType_ClientUserId = 3250, - AuditOpenSecureChannelEventType_SecureChannelId = 3251, - AuditSessionEventType_EventId = 3252, - AuditSessionEventType_EventType = 3253, - AuditSessionEventType_SourceNode = 3254, - AuditSessionEventType_SourceName = 3255, - AuditSessionEventType_Time = 3256, - AuditSessionEventType_ReceiveTime = 3257, - AuditSessionEventType_LocalTime = 3258, - AuditSessionEventType_Message = 3259, - AuditSessionEventType_Severity = 3260, - AuditSessionEventType_ActionTimeStamp = 3261, - AuditSessionEventType_Status = 3262, - AuditSessionEventType_ServerId = 3263, - AuditSessionEventType_ClientAuditEntryId = 3264, - AuditSessionEventType_ClientUserId = 3265, - AuditCreateSessionEventType_EventId = 3266, - AuditCreateSessionEventType_EventType = 3267, - AuditCreateSessionEventType_SourceNode = 3268, - AuditCreateSessionEventType_SourceName = 3269, - AuditCreateSessionEventType_Time = 3270, - AuditCreateSessionEventType_ReceiveTime = 3271, - AuditCreateSessionEventType_LocalTime = 3272, - AuditCreateSessionEventType_Message = 3273, - AuditCreateSessionEventType_Severity = 3274, - AuditCreateSessionEventType_ActionTimeStamp = 3275, - AuditCreateSessionEventType_Status = 3276, - AuditCreateSessionEventType_ServerId = 3277, - AuditCreateSessionEventType_ClientAuditEntryId = 3278, - AuditCreateSessionEventType_ClientUserId = 3279, - AuditCreateSessionEventType_SessionId = 3280, - AuditUrlMismatchEventType_EventId = 3281, - AuditUrlMismatchEventType_EventType = 3282, - AuditUrlMismatchEventType_SourceNode = 3283, - AuditUrlMismatchEventType_SourceName = 3284, - AuditUrlMismatchEventType_Time = 3285, - AuditUrlMismatchEventType_ReceiveTime = 3286, - AuditUrlMismatchEventType_LocalTime = 3287, - AuditUrlMismatchEventType_Message = 3288, - AuditUrlMismatchEventType_Severity = 3289, - AuditUrlMismatchEventType_ActionTimeStamp = 3290, - AuditUrlMismatchEventType_Status = 3291, - AuditUrlMismatchEventType_ServerId = 3292, - AuditUrlMismatchEventType_ClientAuditEntryId = 3293, - AuditUrlMismatchEventType_ClientUserId = 3294, - AuditUrlMismatchEventType_SessionId = 3295, - AuditUrlMismatchEventType_SecureChannelId = 3296, - AuditUrlMismatchEventType_ClientCertificate = 3297, - AuditUrlMismatchEventType_ClientCertificateThumbprint = 3298, - AuditUrlMismatchEventType_RevisedSessionTimeout = 3299, - AuditActivateSessionEventType_EventId = 3300, - AuditActivateSessionEventType_EventType = 3301, - AuditActivateSessionEventType_SourceNode = 3302, - AuditActivateSessionEventType_SourceName = 3303, - AuditActivateSessionEventType_Time = 3304, - AuditActivateSessionEventType_ReceiveTime = 3305, - AuditActivateSessionEventType_LocalTime = 3306, - AuditActivateSessionEventType_Message = 3307, - AuditActivateSessionEventType_Severity = 3308, - AuditActivateSessionEventType_ActionTimeStamp = 3309, - AuditActivateSessionEventType_Status = 3310, - AuditActivateSessionEventType_ServerId = 3311, - AuditActivateSessionEventType_ClientAuditEntryId = 3312, - AuditActivateSessionEventType_ClientUserId = 3313, - AuditActivateSessionEventType_SessionId = 3314, - AuditCancelEventType_EventId = 3315, - AuditCancelEventType_EventType = 3316, - AuditCancelEventType_SourceNode = 3317, - AuditCancelEventType_SourceName = 3318, - AuditCancelEventType_Time = 3319, - AuditCancelEventType_ReceiveTime = 3320, - AuditCancelEventType_LocalTime = 3321, - AuditCancelEventType_Message = 3322, - AuditCancelEventType_Severity = 3323, - AuditCancelEventType_ActionTimeStamp = 3324, - AuditCancelEventType_Status = 3325, - AuditCancelEventType_ServerId = 3326, - AuditCancelEventType_ClientAuditEntryId = 3327, - AuditCancelEventType_ClientUserId = 3328, - AuditCancelEventType_SessionId = 3329, - AuditCertificateEventType_EventId = 3330, - AuditCertificateEventType_EventType = 3331, - AuditCertificateEventType_SourceNode = 3332, - AuditCertificateEventType_SourceName = 3333, - AuditCertificateEventType_Time = 3334, - AuditCertificateEventType_ReceiveTime = 3335, - AuditCertificateEventType_LocalTime = 3336, - AuditCertificateEventType_Message = 3337, - AuditCertificateEventType_Severity = 3338, - AuditCertificateEventType_ActionTimeStamp = 3339, - AuditCertificateEventType_Status = 3340, - AuditCertificateEventType_ServerId = 3341, - AuditCertificateEventType_ClientAuditEntryId = 3342, - AuditCertificateEventType_ClientUserId = 3343, - AuditCertificateDataMismatchEventType_EventId = 3344, - AuditCertificateDataMismatchEventType_EventType = 3345, - AuditCertificateDataMismatchEventType_SourceNode = 3346, - AuditCertificateDataMismatchEventType_SourceName = 3347, - AuditCertificateDataMismatchEventType_Time = 3348, - AuditCertificateDataMismatchEventType_ReceiveTime = 3349, - AuditCertificateDataMismatchEventType_LocalTime = 3350, - AuditCertificateDataMismatchEventType_Message = 3351, - AuditCertificateDataMismatchEventType_Severity = 3352, - AuditCertificateDataMismatchEventType_ActionTimeStamp = 3353, - AuditCertificateDataMismatchEventType_Status = 3354, - AuditCertificateDataMismatchEventType_ServerId = 3355, - AuditCertificateDataMismatchEventType_ClientAuditEntryId = 3356, - AuditCertificateDataMismatchEventType_ClientUserId = 3357, - AuditCertificateDataMismatchEventType_Certificate = 3358, - AuditCertificateExpiredEventType_EventId = 3359, - AuditCertificateExpiredEventType_EventType = 3360, - AuditCertificateExpiredEventType_SourceNode = 3361, - AuditCertificateExpiredEventType_SourceName = 3362, - AuditCertificateExpiredEventType_Time = 3363, - AuditCertificateExpiredEventType_ReceiveTime = 3364, - AuditCertificateExpiredEventType_LocalTime = 3365, - AuditCertificateExpiredEventType_Message = 3366, - AuditCertificateExpiredEventType_Severity = 3367, - AuditCertificateExpiredEventType_ActionTimeStamp = 3368, - AuditCertificateExpiredEventType_Status = 3369, - AuditCertificateExpiredEventType_ServerId = 3370, - AuditCertificateExpiredEventType_ClientAuditEntryId = 3371, - AuditCertificateExpiredEventType_ClientUserId = 3372, - AuditCertificateExpiredEventType_Certificate = 3373, - AuditCertificateInvalidEventType_EventId = 3374, - AuditCertificateInvalidEventType_EventType = 3375, - AuditCertificateInvalidEventType_SourceNode = 3376, - AuditCertificateInvalidEventType_SourceName = 3377, - AuditCertificateInvalidEventType_Time = 3378, - AuditCertificateInvalidEventType_ReceiveTime = 3379, - AuditCertificateInvalidEventType_LocalTime = 3380, - AuditCertificateInvalidEventType_Message = 3381, - AuditCertificateInvalidEventType_Severity = 3382, - AuditCertificateInvalidEventType_ActionTimeStamp = 3383, - AuditCertificateInvalidEventType_Status = 3384, - AuditCertificateInvalidEventType_ServerId = 3385, - AuditCertificateInvalidEventType_ClientAuditEntryId = 3386, - AuditCertificateInvalidEventType_ClientUserId = 3387, - AuditCertificateInvalidEventType_Certificate = 3388, - AuditCertificateUntrustedEventType_EventId = 3389, - AuditCertificateUntrustedEventType_EventType = 3390, - AuditCertificateUntrustedEventType_SourceNode = 3391, - AuditCertificateUntrustedEventType_SourceName = 3392, - AuditCertificateUntrustedEventType_Time = 3393, - AuditCertificateUntrustedEventType_ReceiveTime = 3394, - AuditCertificateUntrustedEventType_LocalTime = 3395, - AuditCertificateUntrustedEventType_Message = 3396, - AuditCertificateUntrustedEventType_Severity = 3397, - AuditCertificateUntrustedEventType_ActionTimeStamp = 3398, - AuditCertificateUntrustedEventType_Status = 3399, - AuditCertificateUntrustedEventType_ServerId = 3400, - AuditCertificateUntrustedEventType_ClientAuditEntryId = 3401, - AuditCertificateUntrustedEventType_ClientUserId = 3402, - AuditCertificateUntrustedEventType_Certificate = 3403, - AuditCertificateRevokedEventType_EventId = 3404, - AuditCertificateRevokedEventType_EventType = 3405, - AuditCertificateRevokedEventType_SourceNode = 3406, - AuditCertificateRevokedEventType_SourceName = 3407, - AuditCertificateRevokedEventType_Time = 3408, - AuditCertificateRevokedEventType_ReceiveTime = 3409, - AuditCertificateRevokedEventType_LocalTime = 3410, - AuditCertificateRevokedEventType_Message = 3411, - AuditCertificateRevokedEventType_Severity = 3412, - AuditCertificateRevokedEventType_ActionTimeStamp = 3413, - AuditCertificateRevokedEventType_Status = 3414, - AuditCertificateRevokedEventType_ServerId = 3415, - AuditCertificateRevokedEventType_ClientAuditEntryId = 3416, - AuditCertificateRevokedEventType_ClientUserId = 3417, - AuditCertificateRevokedEventType_Certificate = 3418, - AuditCertificateMismatchEventType_EventId = 3419, - AuditCertificateMismatchEventType_EventType = 3420, - AuditCertificateMismatchEventType_SourceNode = 3421, - AuditCertificateMismatchEventType_SourceName = 3422, - AuditCertificateMismatchEventType_Time = 3423, - AuditCertificateMismatchEventType_ReceiveTime = 3424, - AuditCertificateMismatchEventType_LocalTime = 3425, - AuditCertificateMismatchEventType_Message = 3426, - AuditCertificateMismatchEventType_Severity = 3427, - AuditCertificateMismatchEventType_ActionTimeStamp = 3428, - AuditCertificateMismatchEventType_Status = 3429, - AuditCertificateMismatchEventType_ServerId = 3430, - AuditCertificateMismatchEventType_ClientAuditEntryId = 3431, - AuditCertificateMismatchEventType_ClientUserId = 3432, - AuditCertificateMismatchEventType_Certificate = 3433, - AuditNodeManagementEventType_EventId = 3434, - AuditNodeManagementEventType_EventType = 3435, - AuditNodeManagementEventType_SourceNode = 3436, - AuditNodeManagementEventType_SourceName = 3437, - AuditNodeManagementEventType_Time = 3438, - AuditNodeManagementEventType_ReceiveTime = 3439, - AuditNodeManagementEventType_LocalTime = 3440, - AuditNodeManagementEventType_Message = 3441, - AuditNodeManagementEventType_Severity = 3442, - AuditNodeManagementEventType_ActionTimeStamp = 3443, - AuditNodeManagementEventType_Status = 3444, - AuditNodeManagementEventType_ServerId = 3445, - AuditNodeManagementEventType_ClientAuditEntryId = 3446, - AuditNodeManagementEventType_ClientUserId = 3447, - AuditAddNodesEventType_EventId = 3448, - AuditAddNodesEventType_EventType = 3449, - AuditAddNodesEventType_SourceNode = 3450, - AuditAddNodesEventType_SourceName = 3451, - AuditAddNodesEventType_Time = 3452, - AuditAddNodesEventType_ReceiveTime = 3453, - AuditAddNodesEventType_LocalTime = 3454, - AuditAddNodesEventType_Message = 3455, - AuditAddNodesEventType_Severity = 3456, - AuditAddNodesEventType_ActionTimeStamp = 3457, - AuditAddNodesEventType_Status = 3458, - AuditAddNodesEventType_ServerId = 3459, - AuditAddNodesEventType_ClientAuditEntryId = 3460, - AuditAddNodesEventType_ClientUserId = 3461, - AuditDeleteNodesEventType_EventId = 3462, - AuditDeleteNodesEventType_EventType = 3463, - AuditDeleteNodesEventType_SourceNode = 3464, - AuditDeleteNodesEventType_SourceName = 3465, - AuditDeleteNodesEventType_Time = 3466, - AuditDeleteNodesEventType_ReceiveTime = 3467, - AuditDeleteNodesEventType_LocalTime = 3468, - AuditDeleteNodesEventType_Message = 3469, - AuditDeleteNodesEventType_Severity = 3470, - AuditDeleteNodesEventType_ActionTimeStamp = 3471, - AuditDeleteNodesEventType_Status = 3472, - AuditDeleteNodesEventType_ServerId = 3473, - AuditDeleteNodesEventType_ClientAuditEntryId = 3474, - AuditDeleteNodesEventType_ClientUserId = 3475, - AuditAddReferencesEventType_EventId = 3476, - AuditAddReferencesEventType_EventType = 3477, - AuditAddReferencesEventType_SourceNode = 3478, - AuditAddReferencesEventType_SourceName = 3479, - AuditAddReferencesEventType_Time = 3480, - AuditAddReferencesEventType_ReceiveTime = 3481, - AuditAddReferencesEventType_LocalTime = 3482, - AuditAddReferencesEventType_Message = 3483, - AuditAddReferencesEventType_Severity = 3484, - AuditAddReferencesEventType_ActionTimeStamp = 3485, - AuditAddReferencesEventType_Status = 3486, - AuditAddReferencesEventType_ServerId = 3487, - AuditAddReferencesEventType_ClientAuditEntryId = 3488, - AuditAddReferencesEventType_ClientUserId = 3489, - AuditDeleteReferencesEventType_EventId = 3490, - AuditDeleteReferencesEventType_EventType = 3491, - AuditDeleteReferencesEventType_SourceNode = 3492, - AuditDeleteReferencesEventType_SourceName = 3493, - AuditDeleteReferencesEventType_Time = 3494, - AuditDeleteReferencesEventType_ReceiveTime = 3495, - AuditDeleteReferencesEventType_LocalTime = 3496, - AuditDeleteReferencesEventType_Message = 3497, - AuditDeleteReferencesEventType_Severity = 3498, - AuditDeleteReferencesEventType_ActionTimeStamp = 3499, - AuditDeleteReferencesEventType_Status = 3500, - AuditDeleteReferencesEventType_ServerId = 3501, - AuditDeleteReferencesEventType_ClientAuditEntryId = 3502, - AuditDeleteReferencesEventType_ClientUserId = 3503, - AuditUpdateEventType_EventId = 3504, - AuditUpdateEventType_EventType = 3505, - AuditUpdateEventType_SourceNode = 3506, - AuditUpdateEventType_SourceName = 3507, - AuditUpdateEventType_Time = 3508, - AuditUpdateEventType_ReceiveTime = 3509, - AuditUpdateEventType_LocalTime = 3510, - AuditUpdateEventType_Message = 3511, - AuditUpdateEventType_Severity = 3512, - AuditUpdateEventType_ActionTimeStamp = 3513, - AuditUpdateEventType_Status = 3514, - AuditUpdateEventType_ServerId = 3515, - AuditUpdateEventType_ClientAuditEntryId = 3516, - AuditUpdateEventType_ClientUserId = 3517, - AuditWriteUpdateEventType_EventId = 3518, - AuditWriteUpdateEventType_EventType = 3519, - AuditWriteUpdateEventType_SourceNode = 3520, - AuditWriteUpdateEventType_SourceName = 3521, - AuditWriteUpdateEventType_Time = 3522, - AuditWriteUpdateEventType_ReceiveTime = 3523, - AuditWriteUpdateEventType_LocalTime = 3524, - AuditWriteUpdateEventType_Message = 3525, - AuditWriteUpdateEventType_Severity = 3526, - AuditWriteUpdateEventType_ActionTimeStamp = 3527, - AuditWriteUpdateEventType_Status = 3528, - AuditWriteUpdateEventType_ServerId = 3529, - AuditWriteUpdateEventType_ClientAuditEntryId = 3530, - AuditWriteUpdateEventType_ClientUserId = 3531, - AuditHistoryUpdateEventType_EventId = 3532, - AuditHistoryUpdateEventType_EventType = 3533, - AuditHistoryUpdateEventType_SourceNode = 3534, - AuditHistoryUpdateEventType_SourceName = 3535, - AuditHistoryUpdateEventType_Time = 3536, - AuditHistoryUpdateEventType_ReceiveTime = 3537, - AuditHistoryUpdateEventType_LocalTime = 3538, - AuditHistoryUpdateEventType_Message = 3539, - AuditHistoryUpdateEventType_Severity = 3540, - AuditHistoryUpdateEventType_ActionTimeStamp = 3541, - AuditHistoryUpdateEventType_Status = 3542, - AuditHistoryUpdateEventType_ServerId = 3543, - AuditHistoryUpdateEventType_ClientAuditEntryId = 3544, - AuditHistoryUpdateEventType_ClientUserId = 3545, - AuditHistoryEventUpdateEventType_EventId = 3546, - AuditHistoryEventUpdateEventType_EventType = 3547, - AuditHistoryEventUpdateEventType_SourceNode = 3548, - AuditHistoryEventUpdateEventType_SourceName = 3549, - AuditHistoryEventUpdateEventType_Time = 3550, - AuditHistoryEventUpdateEventType_ReceiveTime = 3551, - AuditHistoryEventUpdateEventType_LocalTime = 3552, - AuditHistoryEventUpdateEventType_Message = 3553, - AuditHistoryEventUpdateEventType_Severity = 3554, - AuditHistoryEventUpdateEventType_ActionTimeStamp = 3555, - AuditHistoryEventUpdateEventType_Status = 3556, - AuditHistoryEventUpdateEventType_ServerId = 3557, - AuditHistoryEventUpdateEventType_ClientAuditEntryId = 3558, - AuditHistoryEventUpdateEventType_ClientUserId = 3559, - AuditHistoryEventUpdateEventType_ParameterDataTypeId = 3560, - AuditHistoryValueUpdateEventType_EventId = 3561, - AuditHistoryValueUpdateEventType_EventType = 3562, - AuditHistoryValueUpdateEventType_SourceNode = 3563, - AuditHistoryValueUpdateEventType_SourceName = 3564, - AuditHistoryValueUpdateEventType_Time = 3565, - AuditHistoryValueUpdateEventType_ReceiveTime = 3566, - AuditHistoryValueUpdateEventType_LocalTime = 3567, - AuditHistoryValueUpdateEventType_Message = 3568, - AuditHistoryValueUpdateEventType_Severity = 3569, - AuditHistoryValueUpdateEventType_ActionTimeStamp = 3570, - AuditHistoryValueUpdateEventType_Status = 3571, - AuditHistoryValueUpdateEventType_ServerId = 3572, - AuditHistoryValueUpdateEventType_ClientAuditEntryId = 3573, - AuditHistoryValueUpdateEventType_ClientUserId = 3574, - AuditHistoryValueUpdateEventType_ParameterDataTypeId = 3575, - AuditHistoryDeleteEventType_EventId = 3576, - AuditHistoryDeleteEventType_EventType = 3577, - AuditHistoryDeleteEventType_SourceNode = 3578, - AuditHistoryDeleteEventType_SourceName = 3579, - AuditHistoryDeleteEventType_Time = 3580, - AuditHistoryDeleteEventType_ReceiveTime = 3581, - AuditHistoryDeleteEventType_LocalTime = 3582, - AuditHistoryDeleteEventType_Message = 3583, - AuditHistoryDeleteEventType_Severity = 3584, - AuditHistoryDeleteEventType_ActionTimeStamp = 3585, - AuditHistoryDeleteEventType_Status = 3586, - AuditHistoryDeleteEventType_ServerId = 3587, - AuditHistoryDeleteEventType_ClientAuditEntryId = 3588, - AuditHistoryDeleteEventType_ClientUserId = 3589, - AuditHistoryDeleteEventType_ParameterDataTypeId = 3590, - AuditHistoryRawModifyDeleteEventType_EventId = 3591, - AuditHistoryRawModifyDeleteEventType_EventType = 3592, - AuditHistoryRawModifyDeleteEventType_SourceNode = 3593, - AuditHistoryRawModifyDeleteEventType_SourceName = 3594, - AuditHistoryRawModifyDeleteEventType_Time = 3595, - AuditHistoryRawModifyDeleteEventType_ReceiveTime = 3596, - AuditHistoryRawModifyDeleteEventType_LocalTime = 3597, - AuditHistoryRawModifyDeleteEventType_Message = 3598, - AuditHistoryRawModifyDeleteEventType_Severity = 3599, - AuditHistoryRawModifyDeleteEventType_ActionTimeStamp = 3600, - AuditHistoryRawModifyDeleteEventType_Status = 3601, - AuditHistoryRawModifyDeleteEventType_ServerId = 3602, - AuditHistoryRawModifyDeleteEventType_ClientAuditEntryId = 3603, - AuditHistoryRawModifyDeleteEventType_ClientUserId = 3604, - AuditHistoryRawModifyDeleteEventType_ParameterDataTypeId = 3605, - AuditHistoryRawModifyDeleteEventType_UpdatedNode = 3606, - AuditHistoryAtTimeDeleteEventType_EventId = 3607, - AuditHistoryAtTimeDeleteEventType_EventType = 3608, - AuditHistoryAtTimeDeleteEventType_SourceNode = 3609, - AuditHistoryAtTimeDeleteEventType_SourceName = 3610, - AuditHistoryAtTimeDeleteEventType_Time = 3611, - AuditHistoryAtTimeDeleteEventType_ReceiveTime = 3612, - AuditHistoryAtTimeDeleteEventType_LocalTime = 3613, - AuditHistoryAtTimeDeleteEventType_Message = 3614, - AuditHistoryAtTimeDeleteEventType_Severity = 3615, - AuditHistoryAtTimeDeleteEventType_ActionTimeStamp = 3616, - AuditHistoryAtTimeDeleteEventType_Status = 3617, - AuditHistoryAtTimeDeleteEventType_ServerId = 3618, - AuditHistoryAtTimeDeleteEventType_ClientAuditEntryId = 3619, - AuditHistoryAtTimeDeleteEventType_ClientUserId = 3620, - AuditHistoryAtTimeDeleteEventType_ParameterDataTypeId = 3621, - AuditHistoryAtTimeDeleteEventType_UpdatedNode = 3622, - AuditHistoryEventDeleteEventType_EventId = 3623, - AuditHistoryEventDeleteEventType_EventType = 3624, - AuditHistoryEventDeleteEventType_SourceNode = 3625, - AuditHistoryEventDeleteEventType_SourceName = 3626, - AuditHistoryEventDeleteEventType_Time = 3627, - AuditHistoryEventDeleteEventType_ReceiveTime = 3628, - AuditHistoryEventDeleteEventType_LocalTime = 3629, - AuditHistoryEventDeleteEventType_Message = 3630, - AuditHistoryEventDeleteEventType_Severity = 3631, - AuditHistoryEventDeleteEventType_ActionTimeStamp = 3632, - AuditHistoryEventDeleteEventType_Status = 3633, - AuditHistoryEventDeleteEventType_ServerId = 3634, - AuditHistoryEventDeleteEventType_ClientAuditEntryId = 3635, - AuditHistoryEventDeleteEventType_ClientUserId = 3636, - AuditHistoryEventDeleteEventType_ParameterDataTypeId = 3637, - AuditHistoryEventDeleteEventType_UpdatedNode = 3638, - AuditUpdateMethodEventType_EventId = 3639, - AuditUpdateMethodEventType_EventType = 3640, - AuditUpdateMethodEventType_SourceNode = 3641, - AuditUpdateMethodEventType_SourceName = 3642, - AuditUpdateMethodEventType_Time = 3643, - AuditUpdateMethodEventType_ReceiveTime = 3644, - AuditUpdateMethodEventType_LocalTime = 3645, - AuditUpdateMethodEventType_Message = 3646, - AuditUpdateMethodEventType_Severity = 3647, - AuditUpdateMethodEventType_ActionTimeStamp = 3648, - AuditUpdateMethodEventType_Status = 3649, - AuditUpdateMethodEventType_ServerId = 3650, - AuditUpdateMethodEventType_ClientAuditEntryId = 3651, - AuditUpdateMethodEventType_ClientUserId = 3652, - SystemEventType_EventId = 3653, - SystemEventType_EventType = 3654, - SystemEventType_SourceNode = 3655, - SystemEventType_SourceName = 3656, - SystemEventType_Time = 3657, - SystemEventType_ReceiveTime = 3658, - SystemEventType_LocalTime = 3659, - SystemEventType_Message = 3660, - SystemEventType_Severity = 3661, - DeviceFailureEventType_EventId = 3662, - DeviceFailureEventType_EventType = 3663, - DeviceFailureEventType_SourceNode = 3664, - DeviceFailureEventType_SourceName = 3665, - DeviceFailureEventType_Time = 3666, - DeviceFailureEventType_ReceiveTime = 3667, - DeviceFailureEventType_LocalTime = 3668, - DeviceFailureEventType_Message = 3669, - DeviceFailureEventType_Severity = 3670, - BaseModelChangeEventType_EventId = 3671, - BaseModelChangeEventType_EventType = 3672, - BaseModelChangeEventType_SourceNode = 3673, - BaseModelChangeEventType_SourceName = 3674, - BaseModelChangeEventType_Time = 3675, - BaseModelChangeEventType_ReceiveTime = 3676, - BaseModelChangeEventType_LocalTime = 3677, - BaseModelChangeEventType_Message = 3678, - BaseModelChangeEventType_Severity = 3679, - GeneralModelChangeEventType_EventId = 3680, - GeneralModelChangeEventType_EventType = 3681, - GeneralModelChangeEventType_SourceNode = 3682, - GeneralModelChangeEventType_SourceName = 3683, - GeneralModelChangeEventType_Time = 3684, - GeneralModelChangeEventType_ReceiveTime = 3685, - GeneralModelChangeEventType_LocalTime = 3686, - GeneralModelChangeEventType_Message = 3687, - GeneralModelChangeEventType_Severity = 3688, - SemanticChangeEventType_EventId = 3689, - SemanticChangeEventType_EventType = 3690, - SemanticChangeEventType_SourceNode = 3691, - SemanticChangeEventType_SourceName = 3692, - SemanticChangeEventType_Time = 3693, - SemanticChangeEventType_ReceiveTime = 3694, - SemanticChangeEventType_LocalTime = 3695, - SemanticChangeEventType_Message = 3696, - SemanticChangeEventType_Severity = 3697, - ServerStatusType_BuildInfo_ProductUri = 3698, - ServerStatusType_BuildInfo_ManufacturerName = 3699, - ServerStatusType_BuildInfo_ProductName = 3700, - ServerStatusType_BuildInfo_SoftwareVersion = 3701, - ServerStatusType_BuildInfo_BuildNumber = 3702, - ServerStatusType_BuildInfo_BuildDate = 3703, - Server_ServerCapabilities_SoftwareCertificates = 3704, - Server_ServerDiagnostics_ServerDiagnosticsSummary_RejectedSessionCount = 3705, - Server_ServerDiagnostics_SessionsDiagnosticsSummary = 3706, - Server_ServerDiagnostics_SessionsDiagnosticsSummary_SessionDiagnosticsArray = 3707, - Server_ServerDiagnostics_SessionsDiagnosticsSummary_SessionSecurityDiagnosticsArray = 3708, - Server_ServerRedundancy_RedundancySupport = 3709, - FiniteStateVariableType_Name = 3714, - FiniteStateVariableType_Number = 3715, - FiniteStateVariableType_EffectiveDisplayName = 3716, - FiniteTransitionVariableType_Name = 3717, - FiniteTransitionVariableType_Number = 3718, - FiniteTransitionVariableType_TransitionTime = 3719, - StateMachineType_CurrentState_Id = 3720, - StateMachineType_CurrentState_Name = 3721, - StateMachineType_CurrentState_Number = 3722, - StateMachineType_CurrentState_EffectiveDisplayName = 3723, - StateMachineType_LastTransition_Id = 3724, - StateMachineType_LastTransition_Name = 3725, - StateMachineType_LastTransition_Number = 3726, - StateMachineType_LastTransition_TransitionTime = 3727, - FiniteStateMachineType_CurrentState_Id = 3728, - FiniteStateMachineType_CurrentState_Name = 3729, - FiniteStateMachineType_CurrentState_Number = 3730, - FiniteStateMachineType_CurrentState_EffectiveDisplayName = 3731, - FiniteStateMachineType_LastTransition_Id = 3732, - FiniteStateMachineType_LastTransition_Name = 3733, - FiniteStateMachineType_LastTransition_Number = 3734, - FiniteStateMachineType_LastTransition_TransitionTime = 3735, - InitialStateType_StateNumber = 3736, - TransitionEventType_EventId = 3737, - TransitionEventType_EventType = 3738, - TransitionEventType_SourceNode = 3739, - TransitionEventType_SourceName = 3740, - TransitionEventType_Time = 3741, - TransitionEventType_ReceiveTime = 3742, - TransitionEventType_LocalTime = 3743, - TransitionEventType_Message = 3744, - TransitionEventType_Severity = 3745, - TransitionEventType_FromState_Id = 3746, - TransitionEventType_FromState_Name = 3747, - TransitionEventType_FromState_Number = 3748, - TransitionEventType_FromState_EffectiveDisplayName = 3749, - TransitionEventType_ToState_Id = 3750, - TransitionEventType_ToState_Name = 3751, - TransitionEventType_ToState_Number = 3752, - TransitionEventType_ToState_EffectiveDisplayName = 3753, - TransitionEventType_Transition_Id = 3754, - TransitionEventType_Transition_Name = 3755, - TransitionEventType_Transition_Number = 3756, - TransitionEventType_Transition_TransitionTime = 3757, - AuditUpdateStateEventType_EventId = 3758, - AuditUpdateStateEventType_EventType = 3759, - AuditUpdateStateEventType_SourceNode = 3760, - AuditUpdateStateEventType_SourceName = 3761, - AuditUpdateStateEventType_Time = 3762, - AuditUpdateStateEventType_ReceiveTime = 3763, - AuditUpdateStateEventType_LocalTime = 3764, - AuditUpdateStateEventType_Message = 3765, - AuditUpdateStateEventType_Severity = 3766, - AuditUpdateStateEventType_ActionTimeStamp = 3767, - AuditUpdateStateEventType_Status = 3768, - AuditUpdateStateEventType_ServerId = 3769, - AuditUpdateStateEventType_ClientAuditEntryId = 3770, - AuditUpdateStateEventType_ClientUserId = 3771, - AuditUpdateStateEventType_MethodId = 3772, - AuditUpdateStateEventType_InputArguments = 3773, - AnalogItemType_Definition = 3774, - AnalogItemType_ValuePrecision = 3775, - DiscreteItemType_Definition = 3776, - DiscreteItemType_ValuePrecision = 3777, - TwoStateDiscreteType_Definition = 3778, - TwoStateDiscreteType_ValuePrecision = 3779, - MultiStateDiscreteType_Definition = 3780, - MultiStateDiscreteType_ValuePrecision = 3781, - ProgramTransitionEventType_EventId = 3782, - ProgramTransitionEventType_EventType = 3783, - ProgramTransitionEventType_SourceNode = 3784, - ProgramTransitionEventType_SourceName = 3785, - ProgramTransitionEventType_Time = 3786, - ProgramTransitionEventType_ReceiveTime = 3787, - ProgramTransitionEventType_LocalTime = 3788, - ProgramTransitionEventType_Message = 3789, - ProgramTransitionEventType_Severity = 3790, - ProgramTransitionEventType_FromState = 3791, - ProgramTransitionEventType_FromState_Id = 3792, - ProgramTransitionEventType_FromState_Name = 3793, - ProgramTransitionEventType_FromState_Number = 3794, - ProgramTransitionEventType_FromState_EffectiveDisplayName = 3795, - ProgramTransitionEventType_ToState = 3796, - ProgramTransitionEventType_ToState_Id = 3797, - ProgramTransitionEventType_ToState_Name = 3798, - ProgramTransitionEventType_ToState_Number = 3799, - ProgramTransitionEventType_ToState_EffectiveDisplayName = 3800, - ProgramTransitionEventType_Transition = 3801, - ProgramTransitionEventType_Transition_Id = 3802, - ProgramTransitionEventType_Transition_Name = 3803, - ProgramTransitionEventType_Transition_Number = 3804, - ProgramTransitionEventType_Transition_TransitionTime = 3805, - ProgramTransitionAuditEventType = 3806, - ProgramTransitionAuditEventType_EventId = 3807, - ProgramTransitionAuditEventType_EventType = 3808, - ProgramTransitionAuditEventType_SourceNode = 3809, - ProgramTransitionAuditEventType_SourceName = 3810, - ProgramTransitionAuditEventType_Time = 3811, - ProgramTransitionAuditEventType_ReceiveTime = 3812, - ProgramTransitionAuditEventType_LocalTime = 3813, - ProgramTransitionAuditEventType_Message = 3814, - ProgramTransitionAuditEventType_Severity = 3815, - ProgramTransitionAuditEventType_ActionTimeStamp = 3816, - ProgramTransitionAuditEventType_Status = 3817, - ProgramTransitionAuditEventType_ServerId = 3818, - ProgramTransitionAuditEventType_ClientAuditEntryId = 3819, - ProgramTransitionAuditEventType_ClientUserId = 3820, - ProgramTransitionAuditEventType_MethodId = 3821, - ProgramTransitionAuditEventType_InputArguments = 3822, - ProgramTransitionAuditEventType_OldStateId = 3823, - ProgramTransitionAuditEventType_NewStateId = 3824, - ProgramTransitionAuditEventType_Transition = 3825, - ProgramTransitionAuditEventType_Transition_Id = 3826, - ProgramTransitionAuditEventType_Transition_Name = 3827, - ProgramTransitionAuditEventType_Transition_Number = 3828, - ProgramTransitionAuditEventType_Transition_TransitionTime = 3829, - ProgramStateMachineType_CurrentState = 3830, - ProgramStateMachineType_CurrentState_Id = 3831, - ProgramStateMachineType_CurrentState_Name = 3832, - ProgramStateMachineType_CurrentState_Number = 3833, - ProgramStateMachineType_CurrentState_EffectiveDisplayName = 3834, - ProgramStateMachineType_LastTransition = 3835, - ProgramStateMachineType_LastTransition_Id = 3836, - ProgramStateMachineType_LastTransition_Name = 3837, - ProgramStateMachineType_LastTransition_Number = 3838, - ProgramStateMachineType_LastTransition_TransitionTime = 3839, - ProgramStateMachineType_ProgramDiagnostics_CreateSessionId = 3840, - ProgramStateMachineType_ProgramDiagnostics_CreateClientName = 3841, - ProgramStateMachineType_ProgramDiagnostics_InvocationCreationTime = 3842, - ProgramStateMachineType_ProgramDiagnostics_LastTransitionTime = 3843, - ProgramStateMachineType_ProgramDiagnostics_LastMethodCall = 3844, - ProgramStateMachineType_ProgramDiagnostics_LastMethodSessionId = 3845, - ProgramStateMachineType_ProgramDiagnostics_LastMethodInputArguments = 3846, - ProgramStateMachineType_ProgramDiagnostics_LastMethodOutputArguments = 3847, - ProgramStateMachineType_ProgramDiagnostics_LastMethodCallTime = 3848, - ProgramStateMachineType_ProgramDiagnostics_LastMethodReturnStatus = 3849, - ProgramStateMachineType_FinalResultData = 3850, - AddCommentMethodType = 3863, - AddCommentMethodType_InputArguments = 3864, - ConditionType_EventId = 3865, - ConditionType_EventType = 3866, - ConditionType_SourceNode = 3867, - ConditionType_SourceName = 3868, - ConditionType_Time = 3869, - ConditionType_ReceiveTime = 3870, - ConditionType_LocalTime = 3871, - ConditionType_Message = 3872, - ConditionType_Severity = 3873, - ConditionType_Retain = 3874, - ConditionType_ConditionRefresh = 3875, - ConditionType_ConditionRefresh_InputArguments = 3876, - RefreshStartEventType_EventId = 3969, - RefreshStartEventType_EventType = 3970, - RefreshStartEventType_SourceNode = 3971, - RefreshStartEventType_SourceName = 3972, - RefreshStartEventType_Time = 3973, - RefreshStartEventType_ReceiveTime = 3974, - RefreshStartEventType_LocalTime = 3975, - RefreshStartEventType_Message = 3976, - RefreshStartEventType_Severity = 3977, - RefreshEndEventType_EventId = 3978, - RefreshEndEventType_EventType = 3979, - RefreshEndEventType_SourceNode = 3980, - RefreshEndEventType_SourceName = 3981, - RefreshEndEventType_Time = 3982, - RefreshEndEventType_ReceiveTime = 3983, - RefreshEndEventType_LocalTime = 3984, - RefreshEndEventType_Message = 3985, - RefreshEndEventType_Severity = 3986, - RefreshRequiredEventType_EventId = 3987, - RefreshRequiredEventType_EventType = 3988, - RefreshRequiredEventType_SourceNode = 3989, - RefreshRequiredEventType_SourceName = 3990, - RefreshRequiredEventType_Time = 3991, - RefreshRequiredEventType_ReceiveTime = 3992, - RefreshRequiredEventType_LocalTime = 3993, - RefreshRequiredEventType_Message = 3994, - RefreshRequiredEventType_Severity = 3995, - AuditConditionEventType_EventId = 3996, - AuditConditionEventType_EventType = 3997, - AuditConditionEventType_SourceNode = 3998, - AuditConditionEventType_SourceName = 3999, - AuditConditionEventType_Time = 4000, - AuditConditionEventType_ReceiveTime = 4001, - AuditConditionEventType_LocalTime = 4002, - AuditConditionEventType_Message = 4003, - AuditConditionEventType_Severity = 4004, - AuditConditionEventType_ActionTimeStamp = 4005, - AuditConditionEventType_Status = 4006, - AuditConditionEventType_ServerId = 4007, - AuditConditionEventType_ClientAuditEntryId = 4008, - AuditConditionEventType_ClientUserId = 4009, - AuditConditionEventType_MethodId = 4010, - AuditConditionEventType_InputArguments = 4011, - AuditConditionEnableEventType_EventId = 4106, - AuditConditionEnableEventType_EventType = 4107, - AuditConditionEnableEventType_SourceNode = 4108, - AuditConditionEnableEventType_SourceName = 4109, - AuditConditionEnableEventType_Time = 4110, - AuditConditionEnableEventType_ReceiveTime = 4111, - AuditConditionEnableEventType_LocalTime = 4112, - AuditConditionEnableEventType_Message = 4113, - AuditConditionEnableEventType_Severity = 4114, - AuditConditionEnableEventType_ActionTimeStamp = 4115, - AuditConditionEnableEventType_Status = 4116, - AuditConditionEnableEventType_ServerId = 4117, - AuditConditionEnableEventType_ClientAuditEntryId = 4118, - AuditConditionEnableEventType_ClientUserId = 4119, - AuditConditionEnableEventType_MethodId = 4120, - AuditConditionEnableEventType_InputArguments = 4121, - AuditConditionCommentEventType_EventId = 4170, - AuditConditionCommentEventType_EventType = 4171, - AuditConditionCommentEventType_SourceNode = 4172, - AuditConditionCommentEventType_SourceName = 4173, - AuditConditionCommentEventType_Time = 4174, - AuditConditionCommentEventType_ReceiveTime = 4175, - AuditConditionCommentEventType_LocalTime = 4176, - AuditConditionCommentEventType_Message = 4177, - AuditConditionCommentEventType_Severity = 4178, - AuditConditionCommentEventType_ActionTimeStamp = 4179, - AuditConditionCommentEventType_Status = 4180, - AuditConditionCommentEventType_ServerId = 4181, - AuditConditionCommentEventType_ClientAuditEntryId = 4182, - AuditConditionCommentEventType_ClientUserId = 4183, - AuditConditionCommentEventType_MethodId = 4184, - AuditConditionCommentEventType_InputArguments = 4185, - DialogConditionType_EventId = 4188, - DialogConditionType_EventType = 4189, - DialogConditionType_SourceNode = 4190, - DialogConditionType_SourceName = 4191, - DialogConditionType_Time = 4192, - DialogConditionType_ReceiveTime = 4193, - DialogConditionType_LocalTime = 4194, - DialogConditionType_Message = 4195, - DialogConditionType_Severity = 4196, - DialogConditionType_Retain = 4197, - DialogConditionType_ConditionRefresh = 4198, - DialogConditionType_ConditionRefresh_InputArguments = 4199, - AcknowledgeableConditionType_EventId = 5113, - AcknowledgeableConditionType_EventType = 5114, - AcknowledgeableConditionType_SourceNode = 5115, - AcknowledgeableConditionType_SourceName = 5116, - AcknowledgeableConditionType_Time = 5117, - AcknowledgeableConditionType_ReceiveTime = 5118, - AcknowledgeableConditionType_LocalTime = 5119, - AcknowledgeableConditionType_Message = 5120, - AcknowledgeableConditionType_Severity = 5121, - AcknowledgeableConditionType_Retain = 5122, - AcknowledgeableConditionType_ConditionRefresh = 5123, - AcknowledgeableConditionType_ConditionRefresh_InputArguments = 5124, - AlarmConditionType_EventId = 5540, - AlarmConditionType_EventType = 5541, - AlarmConditionType_SourceNode = 5542, - AlarmConditionType_SourceName = 5543, - AlarmConditionType_Time = 5544, - AlarmConditionType_ReceiveTime = 5545, - AlarmConditionType_LocalTime = 5546, - AlarmConditionType_Message = 5547, - AlarmConditionType_Severity = 5548, - AlarmConditionType_Retain = 5549, - AlarmConditionType_ConditionRefresh = 5550, - AlarmConditionType_ConditionRefresh_InputArguments = 5551, - ShelvedStateMachineType_CurrentState = 6088, - ShelvedStateMachineType_CurrentState_Id = 6089, - ShelvedStateMachineType_CurrentState_Name = 6090, - ShelvedStateMachineType_CurrentState_Number = 6091, - ShelvedStateMachineType_CurrentState_EffectiveDisplayName = 6092, - ShelvedStateMachineType_LastTransition = 6093, - ShelvedStateMachineType_LastTransition_Id = 6094, - ShelvedStateMachineType_LastTransition_Name = 6095, - ShelvedStateMachineType_LastTransition_Number = 6096, - ShelvedStateMachineType_LastTransition_TransitionTime = 6097, - ShelvedStateMachineType_Unshelved_StateNumber = 6098, - ShelvedStateMachineType_TimedShelved_StateNumber = 6100, - ShelvedStateMachineType_OneShotShelved_StateNumber = 6101, - TimedShelveMethodType = 6102, - TimedShelveMethodType_InputArguments = 6103, - LimitAlarmType_EventId = 6116, - LimitAlarmType_EventType = 6117, - LimitAlarmType_SourceNode = 6118, - LimitAlarmType_SourceName = 6119, - LimitAlarmType_Time = 6120, - LimitAlarmType_ReceiveTime = 6121, - LimitAlarmType_LocalTime = 6122, - LimitAlarmType_Message = 6123, - LimitAlarmType_Severity = 6124, - LimitAlarmType_Retain = 6125, - LimitAlarmType_ConditionRefresh = 6126, - LimitAlarmType_ConditionRefresh_InputArguments = 6127, - IdType_EnumStrings = 7591, - EnumValueType = 7594, - MessageSecurityMode_EnumStrings = 7595, - UserTokenType_EnumStrings = 7596, - ApplicationType_EnumStrings = 7597, - SecurityTokenRequestType_EnumStrings = 7598, - ComplianceLevel_EnumStrings = 7599, - BrowseDirection_EnumStrings = 7603, - FilterOperator_EnumStrings = 7605, - TimestampsToReturn_EnumStrings = 7606, - MonitoringMode_EnumStrings = 7608, - DataChangeTrigger_EnumStrings = 7609, - DeadbandType_EnumStrings = 7610, - RedundancySupport_EnumStrings = 7611, - ServerState_EnumStrings = 7612, - ExceptionDeviationFormat_EnumStrings = 7614, - EnumValueType_Encoding_DefaultXml = 7616, - OpcUa_BinarySchema = 7617, - OpcUa_BinarySchema_DataTypeVersion = 7618, - OpcUa_BinarySchema_NamespaceUri = 7619, - OpcUa_BinarySchema_Argument = 7650, - OpcUa_BinarySchema_Argument_DataTypeVersion = 7651, - OpcUa_BinarySchema_Argument_DictionaryFragment = 7652, - OpcUa_BinarySchema_EnumValueType = 7656, - OpcUa_BinarySchema_EnumValueType_DataTypeVersion = 7657, - OpcUa_BinarySchema_EnumValueType_DictionaryFragment = 7658, - OpcUa_BinarySchema_StatusResult = 7659, - OpcUa_BinarySchema_StatusResult_DataTypeVersion = 7660, - OpcUa_BinarySchema_StatusResult_DictionaryFragment = 7661, - OpcUa_BinarySchema_UserTokenPolicy = 7662, - OpcUa_BinarySchema_UserTokenPolicy_DataTypeVersion = 7663, - OpcUa_BinarySchema_UserTokenPolicy_DictionaryFragment = 7664, - OpcUa_BinarySchema_ApplicationDescription = 7665, - OpcUa_BinarySchema_ApplicationDescription_DataTypeVersion = 7666, - OpcUa_BinarySchema_ApplicationDescription_DictionaryFragment = 7667, - OpcUa_BinarySchema_EndpointDescription = 7668, - OpcUa_BinarySchema_EndpointDescription_DataTypeVersion = 7669, - OpcUa_BinarySchema_EndpointDescription_DictionaryFragment = 7670, - OpcUa_BinarySchema_UserIdentityToken = 7671, - OpcUa_BinarySchema_UserIdentityToken_DataTypeVersion = 7672, - OpcUa_BinarySchema_UserIdentityToken_DictionaryFragment = 7673, - OpcUa_BinarySchema_AnonymousIdentityToken = 7674, - OpcUa_BinarySchema_AnonymousIdentityToken_DataTypeVersion = 7675, - OpcUa_BinarySchema_AnonymousIdentityToken_DictionaryFragment = 7676, - OpcUa_BinarySchema_UserNameIdentityToken = 7677, - OpcUa_BinarySchema_UserNameIdentityToken_DataTypeVersion = 7678, - OpcUa_BinarySchema_UserNameIdentityToken_DictionaryFragment = 7679, - OpcUa_BinarySchema_X509IdentityToken = 7680, - OpcUa_BinarySchema_X509IdentityToken_DataTypeVersion = 7681, - OpcUa_BinarySchema_X509IdentityToken_DictionaryFragment = 7682, - OpcUa_BinarySchema_IssuedIdentityToken = 7683, - OpcUa_BinarySchema_IssuedIdentityToken_DataTypeVersion = 7684, - OpcUa_BinarySchema_IssuedIdentityToken_DictionaryFragment = 7685, - OpcUa_BinarySchema_EndpointConfiguration = 7686, - OpcUa_BinarySchema_EndpointConfiguration_DataTypeVersion = 7687, - OpcUa_BinarySchema_EndpointConfiguration_DictionaryFragment = 7688, - OpcUa_BinarySchema_SupportedProfile = 7689, - OpcUa_BinarySchema_SupportedProfile_DataTypeVersion = 7690, - OpcUa_BinarySchema_SupportedProfile_DictionaryFragment = 7691, - OpcUa_BinarySchema_BuildInfo = 7692, - OpcUa_BinarySchema_BuildInfo_DataTypeVersion = 7693, - OpcUa_BinarySchema_BuildInfo_DictionaryFragment = 7694, - OpcUa_BinarySchema_SoftwareCertificate = 7695, - OpcUa_BinarySchema_SoftwareCertificate_DataTypeVersion = 7696, - OpcUa_BinarySchema_SoftwareCertificate_DictionaryFragment = 7697, - OpcUa_BinarySchema_SignedSoftwareCertificate = 7698, - OpcUa_BinarySchema_SignedSoftwareCertificate_DataTypeVersion = 7699, - OpcUa_BinarySchema_SignedSoftwareCertificate_DictionaryFragment = 7700, - OpcUa_BinarySchema_AddNodesItem = 7728, - OpcUa_BinarySchema_AddNodesItem_DataTypeVersion = 7729, - OpcUa_BinarySchema_AddNodesItem_DictionaryFragment = 7730, - OpcUa_BinarySchema_AddReferencesItem = 7731, - OpcUa_BinarySchema_AddReferencesItem_DataTypeVersion = 7732, - OpcUa_BinarySchema_AddReferencesItem_DictionaryFragment = 7733, - OpcUa_BinarySchema_DeleteNodesItem = 7734, - OpcUa_BinarySchema_DeleteNodesItem_DataTypeVersion = 7735, - OpcUa_BinarySchema_DeleteNodesItem_DictionaryFragment = 7736, - OpcUa_BinarySchema_DeleteReferencesItem = 7737, - OpcUa_BinarySchema_DeleteReferencesItem_DataTypeVersion = 7738, - OpcUa_BinarySchema_DeleteReferencesItem_DictionaryFragment = 7739, - OpcUa_BinarySchema_ScalarTestType = 7749, - OpcUa_BinarySchema_ScalarTestType_DataTypeVersion = 7750, - OpcUa_BinarySchema_ScalarTestType_DictionaryFragment = 7751, - OpcUa_BinarySchema_ArrayTestType = 7752, - OpcUa_BinarySchema_ArrayTestType_DataTypeVersion = 7753, - OpcUa_BinarySchema_ArrayTestType_DictionaryFragment = 7754, - OpcUa_BinarySchema_CompositeTestType = 7755, - OpcUa_BinarySchema_CompositeTestType_DataTypeVersion = 7756, - OpcUa_BinarySchema_CompositeTestType_DictionaryFragment = 7757, - OpcUa_BinarySchema_RegisteredServer = 7782, - OpcUa_BinarySchema_RegisteredServer_DataTypeVersion = 7783, - OpcUa_BinarySchema_RegisteredServer_DictionaryFragment = 7784, - OpcUa_BinarySchema_ContentFilterElement = 7929, - OpcUa_BinarySchema_ContentFilterElement_DataTypeVersion = 7930, - OpcUa_BinarySchema_ContentFilterElement_DictionaryFragment = 7931, - OpcUa_BinarySchema_ContentFilter = 7932, - OpcUa_BinarySchema_ContentFilter_DataTypeVersion = 7933, - OpcUa_BinarySchema_ContentFilter_DictionaryFragment = 7934, - OpcUa_BinarySchema_FilterOperand = 7935, - OpcUa_BinarySchema_FilterOperand_DataTypeVersion = 7936, - OpcUa_BinarySchema_FilterOperand_DictionaryFragment = 7937, - OpcUa_BinarySchema_ElementOperand = 7938, - OpcUa_BinarySchema_ElementOperand_DataTypeVersion = 7939, - OpcUa_BinarySchema_ElementOperand_DictionaryFragment = 7940, - OpcUa_BinarySchema_LiteralOperand = 7941, - OpcUa_BinarySchema_LiteralOperand_DataTypeVersion = 7942, - OpcUa_BinarySchema_LiteralOperand_DictionaryFragment = 7943, - OpcUa_BinarySchema_AttributeOperand = 7944, - OpcUa_BinarySchema_AttributeOperand_DataTypeVersion = 7945, - OpcUa_BinarySchema_AttributeOperand_DictionaryFragment = 7946, - OpcUa_BinarySchema_SimpleAttributeOperand = 7947, - OpcUa_BinarySchema_SimpleAttributeOperand_DataTypeVersion = 7948, - OpcUa_BinarySchema_SimpleAttributeOperand_DictionaryFragment = 7949, - OpcUa_BinarySchema_HistoryEvent = 8004, - OpcUa_BinarySchema_HistoryEvent_DataTypeVersion = 8005, - OpcUa_BinarySchema_HistoryEvent_DictionaryFragment = 8006, - OpcUa_BinarySchema_MonitoringFilter = 8067, - OpcUa_BinarySchema_MonitoringFilter_DataTypeVersion = 8068, - OpcUa_BinarySchema_MonitoringFilter_DictionaryFragment = 8069, - OpcUa_BinarySchema_EventFilter = 8073, - OpcUa_BinarySchema_EventFilter_DataTypeVersion = 8074, - OpcUa_BinarySchema_EventFilter_DictionaryFragment = 8075, - OpcUa_BinarySchema_AggregateConfiguration = 8076, - OpcUa_BinarySchema_AggregateConfiguration_DataTypeVersion = 8077, - OpcUa_BinarySchema_AggregateConfiguration_DictionaryFragment = 8078, - OpcUa_BinarySchema_HistoryEventFieldList = 8172, - OpcUa_BinarySchema_HistoryEventFieldList_DataTypeVersion = 8173, - OpcUa_BinarySchema_HistoryEventFieldList_DictionaryFragment = 8174, - OpcUa_BinarySchema_RedundantServerDataType = 8208, - OpcUa_BinarySchema_RedundantServerDataType_DataTypeVersion = 8209, - OpcUa_BinarySchema_RedundantServerDataType_DictionaryFragment = 8210, - OpcUa_BinarySchema_SamplingIntervalDiagnosticsDataType = 8211, - OpcUa_BinarySchema_SamplingIntervalDiagnosticsDataType_DataTypeVersion = 8212, - OpcUa_BinarySchema_SamplingIntervalDiagnosticsDataType_DictionaryFragment = 8213, - OpcUa_BinarySchema_ServerDiagnosticsSummaryDataType = 8214, - OpcUa_BinarySchema_ServerDiagnosticsSummaryDataType_DataTypeVersion = 8215, - OpcUa_BinarySchema_ServerDiagnosticsSummaryDataType_DictionaryFragment = 8216, - OpcUa_BinarySchema_ServerStatusDataType = 8217, - OpcUa_BinarySchema_ServerStatusDataType_DataTypeVersion = 8218, - OpcUa_BinarySchema_ServerStatusDataType_DictionaryFragment = 8219, - OpcUa_BinarySchema_SessionDiagnosticsDataType = 8220, - OpcUa_BinarySchema_SessionDiagnosticsDataType_DataTypeVersion = 8221, - OpcUa_BinarySchema_SessionDiagnosticsDataType_DictionaryFragment = 8222, - OpcUa_BinarySchema_SessionSecurityDiagnosticsDataType = 8223, - OpcUa_BinarySchema_SessionSecurityDiagnosticsDataType_DataTypeVersion = 8224, - OpcUa_BinarySchema_SessionSecurityDiagnosticsDataType_DictionaryFragment = 8225, - OpcUa_BinarySchema_ServiceCounterDataType = 8226, - OpcUa_BinarySchema_ServiceCounterDataType_DataTypeVersion = 8227, - OpcUa_BinarySchema_ServiceCounterDataType_DictionaryFragment = 8228, - OpcUa_BinarySchema_SubscriptionDiagnosticsDataType = 8229, - OpcUa_BinarySchema_SubscriptionDiagnosticsDataType_DataTypeVersion = 8230, - OpcUa_BinarySchema_SubscriptionDiagnosticsDataType_DictionaryFragment = 8231, - OpcUa_BinarySchema_ModelChangeStructureDataType = 8232, - OpcUa_BinarySchema_ModelChangeStructureDataType_DataTypeVersion = 8233, - OpcUa_BinarySchema_ModelChangeStructureDataType_DictionaryFragment = 8234, - OpcUa_BinarySchema_SemanticChangeStructureDataType = 8235, - OpcUa_BinarySchema_SemanticChangeStructureDataType_DataTypeVersion = 8236, - OpcUa_BinarySchema_SemanticChangeStructureDataType_DictionaryFragment = 8237, - OpcUa_BinarySchema_Range = 8238, - OpcUa_BinarySchema_Range_DataTypeVersion = 8239, - OpcUa_BinarySchema_Range_DictionaryFragment = 8240, - OpcUa_BinarySchema_EUInformation = 8241, - OpcUa_BinarySchema_EUInformation_DataTypeVersion = 8242, - OpcUa_BinarySchema_EUInformation_DictionaryFragment = 8243, - OpcUa_BinarySchema_Annotation = 8244, - OpcUa_BinarySchema_Annotation_DataTypeVersion = 8245, - OpcUa_BinarySchema_Annotation_DictionaryFragment = 8246, - OpcUa_BinarySchema_ProgramDiagnosticDataType = 8247, - OpcUa_BinarySchema_ProgramDiagnosticDataType_DataTypeVersion = 8248, - OpcUa_BinarySchema_ProgramDiagnosticDataType_DictionaryFragment = 8249, - EnumValueType_Encoding_DefaultBinary = 8251, - OpcUa_XmlSchema = 8252, - OpcUa_XmlSchema_DataTypeVersion = 8253, - OpcUa_XmlSchema_NamespaceUri = 8254, - OpcUa_XmlSchema_Argument = 8285, - OpcUa_XmlSchema_Argument_DataTypeVersion = 8286, - OpcUa_XmlSchema_Argument_DictionaryFragment = 8287, - OpcUa_XmlSchema_EnumValueType = 8291, - OpcUa_XmlSchema_EnumValueType_DataTypeVersion = 8292, - OpcUa_XmlSchema_EnumValueType_DictionaryFragment = 8293, - OpcUa_XmlSchema_StatusResult = 8294, - OpcUa_XmlSchema_StatusResult_DataTypeVersion = 8295, - OpcUa_XmlSchema_StatusResult_DictionaryFragment = 8296, - OpcUa_XmlSchema_UserTokenPolicy = 8297, - OpcUa_XmlSchema_UserTokenPolicy_DataTypeVersion = 8298, - OpcUa_XmlSchema_UserTokenPolicy_DictionaryFragment = 8299, - OpcUa_XmlSchema_ApplicationDescription = 8300, - OpcUa_XmlSchema_ApplicationDescription_DataTypeVersion = 8301, - OpcUa_XmlSchema_ApplicationDescription_DictionaryFragment = 8302, - OpcUa_XmlSchema_EndpointDescription = 8303, - OpcUa_XmlSchema_EndpointDescription_DataTypeVersion = 8304, - OpcUa_XmlSchema_EndpointDescription_DictionaryFragment = 8305, - OpcUa_XmlSchema_UserIdentityToken = 8306, - OpcUa_XmlSchema_UserIdentityToken_DataTypeVersion = 8307, - OpcUa_XmlSchema_UserIdentityToken_DictionaryFragment = 8308, - OpcUa_XmlSchema_AnonymousIdentityToken = 8309, - OpcUa_XmlSchema_AnonymousIdentityToken_DataTypeVersion = 8310, - OpcUa_XmlSchema_AnonymousIdentityToken_DictionaryFragment = 8311, - OpcUa_XmlSchema_UserNameIdentityToken = 8312, - OpcUa_XmlSchema_UserNameIdentityToken_DataTypeVersion = 8313, - OpcUa_XmlSchema_UserNameIdentityToken_DictionaryFragment = 8314, - OpcUa_XmlSchema_X509IdentityToken = 8315, - OpcUa_XmlSchema_X509IdentityToken_DataTypeVersion = 8316, - OpcUa_XmlSchema_X509IdentityToken_DictionaryFragment = 8317, - OpcUa_XmlSchema_IssuedIdentityToken = 8318, - OpcUa_XmlSchema_IssuedIdentityToken_DataTypeVersion = 8319, - OpcUa_XmlSchema_IssuedIdentityToken_DictionaryFragment = 8320, - OpcUa_XmlSchema_EndpointConfiguration = 8321, - OpcUa_XmlSchema_EndpointConfiguration_DataTypeVersion = 8322, - OpcUa_XmlSchema_EndpointConfiguration_DictionaryFragment = 8323, - OpcUa_XmlSchema_SupportedProfile = 8324, - OpcUa_XmlSchema_SupportedProfile_DataTypeVersion = 8325, - OpcUa_XmlSchema_SupportedProfile_DictionaryFragment = 8326, - OpcUa_XmlSchema_BuildInfo = 8327, - OpcUa_XmlSchema_BuildInfo_DataTypeVersion = 8328, - OpcUa_XmlSchema_BuildInfo_DictionaryFragment = 8329, - OpcUa_XmlSchema_SoftwareCertificate = 8330, - OpcUa_XmlSchema_SoftwareCertificate_DataTypeVersion = 8331, - OpcUa_XmlSchema_SoftwareCertificate_DictionaryFragment = 8332, - OpcUa_XmlSchema_SignedSoftwareCertificate = 8333, - OpcUa_XmlSchema_SignedSoftwareCertificate_DataTypeVersion = 8334, - OpcUa_XmlSchema_SignedSoftwareCertificate_DictionaryFragment = 8335, - OpcUa_XmlSchema_AddNodesItem = 8363, - OpcUa_XmlSchema_AddNodesItem_DataTypeVersion = 8364, - OpcUa_XmlSchema_AddNodesItem_DictionaryFragment = 8365, - OpcUa_XmlSchema_AddReferencesItem = 8366, - OpcUa_XmlSchema_AddReferencesItem_DataTypeVersion = 8367, - OpcUa_XmlSchema_AddReferencesItem_DictionaryFragment = 8368, - OpcUa_XmlSchema_DeleteNodesItem = 8369, - OpcUa_XmlSchema_DeleteNodesItem_DataTypeVersion = 8370, - OpcUa_XmlSchema_DeleteNodesItem_DictionaryFragment = 8371, - OpcUa_XmlSchema_DeleteReferencesItem = 8372, - OpcUa_XmlSchema_DeleteReferencesItem_DataTypeVersion = 8373, - OpcUa_XmlSchema_DeleteReferencesItem_DictionaryFragment = 8374, - OpcUa_XmlSchema_ScalarTestType = 8384, - OpcUa_XmlSchema_ScalarTestType_DataTypeVersion = 8385, - OpcUa_XmlSchema_ScalarTestType_DictionaryFragment = 8386, - OpcUa_XmlSchema_ArrayTestType = 8387, - OpcUa_XmlSchema_ArrayTestType_DataTypeVersion = 8388, - OpcUa_XmlSchema_ArrayTestType_DictionaryFragment = 8389, - OpcUa_XmlSchema_CompositeTestType = 8390, - OpcUa_XmlSchema_CompositeTestType_DataTypeVersion = 8391, - OpcUa_XmlSchema_CompositeTestType_DictionaryFragment = 8392, - OpcUa_XmlSchema_RegisteredServer = 8417, - OpcUa_XmlSchema_RegisteredServer_DataTypeVersion = 8418, - OpcUa_XmlSchema_RegisteredServer_DictionaryFragment = 8419, - OpcUa_XmlSchema_ContentFilterElement = 8564, - OpcUa_XmlSchema_ContentFilterElement_DataTypeVersion = 8565, - OpcUa_XmlSchema_ContentFilterElement_DictionaryFragment = 8566, - OpcUa_XmlSchema_ContentFilter = 8567, - OpcUa_XmlSchema_ContentFilter_DataTypeVersion = 8568, - OpcUa_XmlSchema_ContentFilter_DictionaryFragment = 8569, - OpcUa_XmlSchema_FilterOperand = 8570, - OpcUa_XmlSchema_FilterOperand_DataTypeVersion = 8571, - OpcUa_XmlSchema_FilterOperand_DictionaryFragment = 8572, - OpcUa_XmlSchema_ElementOperand = 8573, - OpcUa_XmlSchema_ElementOperand_DataTypeVersion = 8574, - OpcUa_XmlSchema_ElementOperand_DictionaryFragment = 8575, - OpcUa_XmlSchema_LiteralOperand = 8576, - OpcUa_XmlSchema_LiteralOperand_DataTypeVersion = 8577, - OpcUa_XmlSchema_LiteralOperand_DictionaryFragment = 8578, - OpcUa_XmlSchema_AttributeOperand = 8579, - OpcUa_XmlSchema_AttributeOperand_DataTypeVersion = 8580, - OpcUa_XmlSchema_AttributeOperand_DictionaryFragment = 8581, - OpcUa_XmlSchema_SimpleAttributeOperand = 8582, - OpcUa_XmlSchema_SimpleAttributeOperand_DataTypeVersion = 8583, - OpcUa_XmlSchema_SimpleAttributeOperand_DictionaryFragment = 8584, - OpcUa_XmlSchema_HistoryEvent = 8639, - OpcUa_XmlSchema_HistoryEvent_DataTypeVersion = 8640, - OpcUa_XmlSchema_HistoryEvent_DictionaryFragment = 8641, - OpcUa_XmlSchema_MonitoringFilter = 8702, - OpcUa_XmlSchema_MonitoringFilter_DataTypeVersion = 8703, - OpcUa_XmlSchema_MonitoringFilter_DictionaryFragment = 8704, - OpcUa_XmlSchema_EventFilter = 8708, - OpcUa_XmlSchema_EventFilter_DataTypeVersion = 8709, - OpcUa_XmlSchema_EventFilter_DictionaryFragment = 8710, - OpcUa_XmlSchema_AggregateConfiguration = 8711, - OpcUa_XmlSchema_AggregateConfiguration_DataTypeVersion = 8712, - OpcUa_XmlSchema_AggregateConfiguration_DictionaryFragment = 8713, - OpcUa_XmlSchema_HistoryEventFieldList = 8807, - OpcUa_XmlSchema_HistoryEventFieldList_DataTypeVersion = 8808, - OpcUa_XmlSchema_HistoryEventFieldList_DictionaryFragment = 8809, - OpcUa_XmlSchema_RedundantServerDataType = 8843, - OpcUa_XmlSchema_RedundantServerDataType_DataTypeVersion = 8844, - OpcUa_XmlSchema_RedundantServerDataType_DictionaryFragment = 8845, - OpcUa_XmlSchema_SamplingIntervalDiagnosticsDataType = 8846, - OpcUa_XmlSchema_SamplingIntervalDiagnosticsDataType_DataTypeVersion = 8847, - OpcUa_XmlSchema_SamplingIntervalDiagnosticsDataType_DictionaryFragment = 8848, - OpcUa_XmlSchema_ServerDiagnosticsSummaryDataType = 8849, - OpcUa_XmlSchema_ServerDiagnosticsSummaryDataType_DataTypeVersion = 8850, - OpcUa_XmlSchema_ServerDiagnosticsSummaryDataType_DictionaryFragment = 8851, - OpcUa_XmlSchema_ServerStatusDataType = 8852, - OpcUa_XmlSchema_ServerStatusDataType_DataTypeVersion = 8853, - OpcUa_XmlSchema_ServerStatusDataType_DictionaryFragment = 8854, - OpcUa_XmlSchema_SessionDiagnosticsDataType = 8855, - OpcUa_XmlSchema_SessionDiagnosticsDataType_DataTypeVersion = 8856, - OpcUa_XmlSchema_SessionDiagnosticsDataType_DictionaryFragment = 8857, - OpcUa_XmlSchema_SessionSecurityDiagnosticsDataType = 8858, - OpcUa_XmlSchema_SessionSecurityDiagnosticsDataType_DataTypeVersion = 8859, - OpcUa_XmlSchema_SessionSecurityDiagnosticsDataType_DictionaryFragment = 8860, - OpcUa_XmlSchema_ServiceCounterDataType = 8861, - OpcUa_XmlSchema_ServiceCounterDataType_DataTypeVersion = 8862, - OpcUa_XmlSchema_ServiceCounterDataType_DictionaryFragment = 8863, - OpcUa_XmlSchema_SubscriptionDiagnosticsDataType = 8864, - OpcUa_XmlSchema_SubscriptionDiagnosticsDataType_DataTypeVersion = 8865, - OpcUa_XmlSchema_SubscriptionDiagnosticsDataType_DictionaryFragment = 8866, - OpcUa_XmlSchema_ModelChangeStructureDataType = 8867, - OpcUa_XmlSchema_ModelChangeStructureDataType_DataTypeVersion = 8868, - OpcUa_XmlSchema_ModelChangeStructureDataType_DictionaryFragment = 8869, - OpcUa_XmlSchema_SemanticChangeStructureDataType = 8870, - OpcUa_XmlSchema_SemanticChangeStructureDataType_DataTypeVersion = 8871, - OpcUa_XmlSchema_SemanticChangeStructureDataType_DictionaryFragment = 8872, - OpcUa_XmlSchema_Range = 8873, - OpcUa_XmlSchema_Range_DataTypeVersion = 8874, - OpcUa_XmlSchema_Range_DictionaryFragment = 8875, - OpcUa_XmlSchema_EUInformation = 8876, - OpcUa_XmlSchema_EUInformation_DataTypeVersion = 8877, - OpcUa_XmlSchema_EUInformation_DictionaryFragment = 8878, - OpcUa_XmlSchema_Annotation = 8879, - OpcUa_XmlSchema_Annotation_DataTypeVersion = 8880, - OpcUa_XmlSchema_Annotation_DictionaryFragment = 8881, - OpcUa_XmlSchema_ProgramDiagnosticDataType = 8882, - OpcUa_XmlSchema_ProgramDiagnosticDataType_DataTypeVersion = 8883, - OpcUa_XmlSchema_ProgramDiagnosticDataType_DictionaryFragment = 8884, - SubscriptionDiagnosticsType_MaxLifetimeCount = 8888, - SubscriptionDiagnosticsType_LatePublishRequestCount = 8889, - SubscriptionDiagnosticsType_CurrentKeepAliveCount = 8890, - SubscriptionDiagnosticsType_CurrentLifetimeCount = 8891, - SubscriptionDiagnosticsType_UnacknowledgedMessageCount = 8892, - SubscriptionDiagnosticsType_DiscardedMessageCount = 8893, - SubscriptionDiagnosticsType_MonitoredItemCount = 8894, - SubscriptionDiagnosticsType_DisabledMonitoredItemCount = 8895, - SubscriptionDiagnosticsType_MonitoringQueueOverflowCount = 8896, - SubscriptionDiagnosticsType_NextSequenceNumber = 8897, - SessionDiagnosticsObjectType_SessionDiagnostics_TotalRequestCount = 8898, - SessionDiagnosticsVariableType_TotalRequestCount = 8900, - SubscriptionDiagnosticsType_EventQueueOverFlowCount = 8902, - TimeZoneDataType = 8912, - TimeZoneDataType_Encoding_DefaultXml = 8913, - OpcUa_BinarySchema_TimeZoneDataType = 8914, - OpcUa_BinarySchema_TimeZoneDataType_DataTypeVersion = 8915, - OpcUa_BinarySchema_TimeZoneDataType_DictionaryFragment = 8916, - TimeZoneDataType_Encoding_DefaultBinary = 8917, - OpcUa_XmlSchema_TimeZoneDataType = 8918, - OpcUa_XmlSchema_TimeZoneDataType_DataTypeVersion = 8919, - OpcUa_XmlSchema_TimeZoneDataType_DictionaryFragment = 8920, - LockType = 8921, - LockType_Lock = 8922, - LockType_Unlock = 8923, - ServerLock = 8924, - ServerLock_Lock = 8925, - ServerLock_Unlock = 8926, - AuditConditionRespondEventType = 8927, - AuditConditionRespondEventType_EventId = 8928, - AuditConditionRespondEventType_EventType = 8929, - AuditConditionRespondEventType_SourceNode = 8930, - AuditConditionRespondEventType_SourceName = 8931, - AuditConditionRespondEventType_Time = 8932, - AuditConditionRespondEventType_ReceiveTime = 8933, - AuditConditionRespondEventType_LocalTime = 8934, - AuditConditionRespondEventType_Message = 8935, - AuditConditionRespondEventType_Severity = 8936, - AuditConditionRespondEventType_ActionTimeStamp = 8937, - AuditConditionRespondEventType_Status = 8938, - AuditConditionRespondEventType_ServerId = 8939, - AuditConditionRespondEventType_ClientAuditEntryId = 8940, - AuditConditionRespondEventType_ClientUserId = 8941, - AuditConditionRespondEventType_MethodId = 8942, - AuditConditionRespondEventType_InputArguments = 8943, - AuditConditionAcknowledgeEventType = 8944, - AuditConditionAcknowledgeEventType_EventId = 8945, - AuditConditionAcknowledgeEventType_EventType = 8946, - AuditConditionAcknowledgeEventType_SourceNode = 8947, - AuditConditionAcknowledgeEventType_SourceName = 8948, - AuditConditionAcknowledgeEventType_Time = 8949, - AuditConditionAcknowledgeEventType_ReceiveTime = 8950, - AuditConditionAcknowledgeEventType_LocalTime = 8951, - AuditConditionAcknowledgeEventType_Message = 8952, - AuditConditionAcknowledgeEventType_Severity = 8953, - AuditConditionAcknowledgeEventType_ActionTimeStamp = 8954, - AuditConditionAcknowledgeEventType_Status = 8955, - AuditConditionAcknowledgeEventType_ServerId = 8956, - AuditConditionAcknowledgeEventType_ClientAuditEntryId = 8957, - AuditConditionAcknowledgeEventType_ClientUserId = 8958, - AuditConditionAcknowledgeEventType_MethodId = 8959, - AuditConditionAcknowledgeEventType_InputArguments = 8960, - AuditConditionConfirmEventType = 8961, - AuditConditionConfirmEventType_EventId = 8962, - AuditConditionConfirmEventType_EventType = 8963, - AuditConditionConfirmEventType_SourceNode = 8964, - AuditConditionConfirmEventType_SourceName = 8965, - AuditConditionConfirmEventType_Time = 8966, - AuditConditionConfirmEventType_ReceiveTime = 8967, - AuditConditionConfirmEventType_LocalTime = 8968, - AuditConditionConfirmEventType_Message = 8969, - AuditConditionConfirmEventType_Severity = 8970, - AuditConditionConfirmEventType_ActionTimeStamp = 8971, - AuditConditionConfirmEventType_Status = 8972, - AuditConditionConfirmEventType_ServerId = 8973, - AuditConditionConfirmEventType_ClientAuditEntryId = 8974, - AuditConditionConfirmEventType_ClientUserId = 8975, - AuditConditionConfirmEventType_MethodId = 8976, - AuditConditionConfirmEventType_InputArguments = 8977, - TwoStateVariableType = 8995, - TwoStateVariableType_Id = 8996, - TwoStateVariableType_Name = 8997, - TwoStateVariableType_Number = 8998, - TwoStateVariableType_EffectiveDisplayName = 8999, - TwoStateVariableType_TransitionTime = 9000, - TwoStateVariableType_EffectiveTransitionTime = 9001, - ConditionVariableType = 9002, - ConditionVariableType_SourceTimestamp = 9003, - HasTrueSubState = 9004, - HasFalseSubState = 9005, - HasCondition = 9006, - ConditionRefreshMethodType = 9007, - ConditionRefreshMethodType_InputArguments = 9008, - ConditionType_ConditionName = 9009, - ConditionType_BranchId = 9010, - ConditionType_EnabledState = 9011, - ConditionType_EnabledState_Id = 9012, - ConditionType_EnabledState_Name = 9013, - ConditionType_EnabledState_Number = 9014, - ConditionType_EnabledState_EffectiveDisplayName = 9015, - ConditionType_EnabledState_TransitionTime = 9016, - ConditionType_EnabledState_EffectiveTransitionTime = 9017, - ConditionType_EnabledState_TrueState = 9018, - ConditionType_EnabledState_FalseState = 9019, - ConditionType_Quality = 9020, - ConditionType_Quality_SourceTimestamp = 9021, - ConditionType_LastSeverity = 9022, - ConditionType_LastSeverity_SourceTimestamp = 9023, - ConditionType_Comment = 9024, - ConditionType_Comment_SourceTimestamp = 9025, - ConditionType_ClientUserId = 9026, - ConditionType_Enable = 9027, - ConditionType_Disable = 9028, - ConditionType_AddComment = 9029, - ConditionType_AddComment_InputArguments = 9030, - DialogResponseMethodType = 9031, - DialogResponseMethodType_InputArguments = 9032, - DialogConditionType_ConditionName = 9033, - DialogConditionType_BranchId = 9034, - DialogConditionType_EnabledState = 9035, - DialogConditionType_EnabledState_Id = 9036, - DialogConditionType_EnabledState_Name = 9037, - DialogConditionType_EnabledState_Number = 9038, - DialogConditionType_EnabledState_EffectiveDisplayName = 9039, - DialogConditionType_EnabledState_TransitionTime = 9040, - DialogConditionType_EnabledState_EffectiveTransitionTime = 9041, - DialogConditionType_EnabledState_TrueState = 9042, - DialogConditionType_EnabledState_FalseState = 9043, - DialogConditionType_Quality = 9044, - DialogConditionType_Quality_SourceTimestamp = 9045, - DialogConditionType_LastSeverity = 9046, - DialogConditionType_LastSeverity_SourceTimestamp = 9047, - DialogConditionType_Comment = 9048, - DialogConditionType_Comment_SourceTimestamp = 9049, - DialogConditionType_ClientUserId = 9050, - DialogConditionType_Enable = 9051, - DialogConditionType_Disable = 9052, - DialogConditionType_AddComment = 9053, - DialogConditionType_AddComment_InputArguments = 9054, - DialogConditionType_DialogState = 9055, - DialogConditionType_DialogState_Id = 9056, - DialogConditionType_DialogState_Name = 9057, - DialogConditionType_DialogState_Number = 9058, - DialogConditionType_DialogState_EffectiveDisplayName = 9059, - DialogConditionType_DialogState_TransitionTime = 9060, - DialogConditionType_DialogState_EffectiveTransitionTime = 9061, - DialogConditionType_DialogState_TrueState = 9062, - DialogConditionType_DialogState_FalseState = 9063, - DialogConditionType_ResponseOptionSet = 9064, - DialogConditionType_DefaultResponse = 9065, - DialogConditionType_OkResponse = 9066, - DialogConditionType_CancelResponse = 9067, - DialogConditionType_LastResponse = 9068, - DialogConditionType_Respond = 9069, - DialogConditionType_Respond_InputArguments = 9070, - AcknowledgeableConditionType_ConditionName = 9071, - AcknowledgeableConditionType_BranchId = 9072, - AcknowledgeableConditionType_EnabledState = 9073, - AcknowledgeableConditionType_EnabledState_Id = 9074, - AcknowledgeableConditionType_EnabledState_Name = 9075, - AcknowledgeableConditionType_EnabledState_Number = 9076, - AcknowledgeableConditionType_EnabledState_EffectiveDisplayName = 9077, - AcknowledgeableConditionType_EnabledState_TransitionTime = 9078, - AcknowledgeableConditionType_EnabledState_EffectiveTransitionTime = 9079, - AcknowledgeableConditionType_EnabledState_TrueState = 9080, - AcknowledgeableConditionType_EnabledState_FalseState = 9081, - AcknowledgeableConditionType_Quality = 9082, - AcknowledgeableConditionType_Quality_SourceTimestamp = 9083, - AcknowledgeableConditionType_LastSeverity = 9084, - AcknowledgeableConditionType_LastSeverity_SourceTimestamp = 9085, - AcknowledgeableConditionType_Comment = 9086, - AcknowledgeableConditionType_Comment_SourceTimestamp = 9087, - AcknowledgeableConditionType_ClientUserId = 9088, - AcknowledgeableConditionType_Enable = 9089, - AcknowledgeableConditionType_Disable = 9090, - AcknowledgeableConditionType_AddComment = 9091, - AcknowledgeableConditionType_AddComment_InputArguments = 9092, - AcknowledgeableConditionType_AckedState = 9093, - AcknowledgeableConditionType_AckedState_Id = 9094, - AcknowledgeableConditionType_AckedState_Name = 9095, - AcknowledgeableConditionType_AckedState_Number = 9096, - AcknowledgeableConditionType_AckedState_EffectiveDisplayName = 9097, - AcknowledgeableConditionType_AckedState_TransitionTime = 9098, - AcknowledgeableConditionType_AckedState_EffectiveTransitionTime = 9099, - AcknowledgeableConditionType_AckedState_TrueState = 9100, - AcknowledgeableConditionType_AckedState_FalseState = 9101, - AcknowledgeableConditionType_ConfirmedState = 9102, - AcknowledgeableConditionType_ConfirmedState_Id = 9103, - AcknowledgeableConditionType_ConfirmedState_Name = 9104, - AcknowledgeableConditionType_ConfirmedState_Number = 9105, - AcknowledgeableConditionType_ConfirmedState_EffectiveDisplayName = 9106, - AcknowledgeableConditionType_ConfirmedState_TransitionTime = 9107, - AcknowledgeableConditionType_ConfirmedState_EffectiveTransitionTime = 9108, - AcknowledgeableConditionType_ConfirmedState_TrueState = 9109, - AcknowledgeableConditionType_ConfirmedState_FalseState = 9110, - AcknowledgeableConditionType_Acknowledge = 9111, - AcknowledgeableConditionType_Acknowledge_InputArguments = 9112, - AcknowledgeableConditionType_Confirm = 9113, - AcknowledgeableConditionType_Confirm_InputArguments = 9114, - ShelvedStateMachineType_UnshelveTime = 9115, - AlarmConditionType_ConditionName = 9116, - AlarmConditionType_BranchId = 9117, - AlarmConditionType_EnabledState = 9118, - AlarmConditionType_EnabledState_Id = 9119, - AlarmConditionType_EnabledState_Name = 9120, - AlarmConditionType_EnabledState_Number = 9121, - AlarmConditionType_EnabledState_EffectiveDisplayName = 9122, - AlarmConditionType_EnabledState_TransitionTime = 9123, - AlarmConditionType_EnabledState_EffectiveTransitionTime = 9124, - AlarmConditionType_EnabledState_TrueState = 9125, - AlarmConditionType_EnabledState_FalseState = 9126, - AlarmConditionType_Quality = 9127, - AlarmConditionType_Quality_SourceTimestamp = 9128, - AlarmConditionType_LastSeverity = 9129, - AlarmConditionType_LastSeverity_SourceTimestamp = 9130, - AlarmConditionType_Comment = 9131, - AlarmConditionType_Comment_SourceTimestamp = 9132, - AlarmConditionType_ClientUserId = 9133, - AlarmConditionType_Enable = 9134, - AlarmConditionType_Disable = 9135, - AlarmConditionType_AddComment = 9136, - AlarmConditionType_AddComment_InputArguments = 9137, - AlarmConditionType_AckedState = 9138, - AlarmConditionType_AckedState_Id = 9139, - AlarmConditionType_AckedState_Name = 9140, - AlarmConditionType_AckedState_Number = 9141, - AlarmConditionType_AckedState_EffectiveDisplayName = 9142, - AlarmConditionType_AckedState_TransitionTime = 9143, - AlarmConditionType_AckedState_EffectiveTransitionTime = 9144, - AlarmConditionType_AckedState_TrueState = 9145, - AlarmConditionType_AckedState_FalseState = 9146, - AlarmConditionType_ConfirmedState = 9147, - AlarmConditionType_ConfirmedState_Id = 9148, - AlarmConditionType_ConfirmedState_Name = 9149, - AlarmConditionType_ConfirmedState_Number = 9150, - AlarmConditionType_ConfirmedState_EffectiveDisplayName = 9151, - AlarmConditionType_ConfirmedState_TransitionTime = 9152, - AlarmConditionType_ConfirmedState_EffectiveTransitionTime = 9153, - AlarmConditionType_ConfirmedState_TrueState = 9154, - AlarmConditionType_ConfirmedState_FalseState = 9155, - AlarmConditionType_Acknowledge = 9156, - AlarmConditionType_Acknowledge_InputArguments = 9157, - AlarmConditionType_Confirm = 9158, - AlarmConditionType_Confirm_InputArguments = 9159, - AlarmConditionType_ActiveState = 9160, - AlarmConditionType_ActiveState_Id = 9161, - AlarmConditionType_ActiveState_Name = 9162, - AlarmConditionType_ActiveState_Number = 9163, - AlarmConditionType_ActiveState_EffectiveDisplayName = 9164, - AlarmConditionType_ActiveState_TransitionTime = 9165, - AlarmConditionType_ActiveState_EffectiveTransitionTime = 9166, - AlarmConditionType_ActiveState_TrueState = 9167, - AlarmConditionType_ActiveState_FalseState = 9168, - AlarmConditionType_SuppressedState = 9169, - AlarmConditionType_SuppressedState_Id = 9170, - AlarmConditionType_SuppressedState_Name = 9171, - AlarmConditionType_SuppressedState_Number = 9172, - AlarmConditionType_SuppressedState_EffectiveDisplayName = 9173, - AlarmConditionType_SuppressedState_TransitionTime = 9174, - AlarmConditionType_SuppressedState_EffectiveTransitionTime = 9175, - AlarmConditionType_SuppressedState_TrueState = 9176, - AlarmConditionType_SuppressedState_FalseState = 9177, - AlarmConditionType_ShelvingState = 9178, - AlarmConditionType_ShelvingState_CurrentState = 9179, - AlarmConditionType_ShelvingState_CurrentState_Id = 9180, - AlarmConditionType_ShelvingState_CurrentState_Name = 9181, - AlarmConditionType_ShelvingState_CurrentState_Number = 9182, - AlarmConditionType_ShelvingState_CurrentState_EffectiveDisplayName = 9183, - AlarmConditionType_ShelvingState_LastTransition = 9184, - AlarmConditionType_ShelvingState_LastTransition_Id = 9185, - AlarmConditionType_ShelvingState_LastTransition_Name = 9186, - AlarmConditionType_ShelvingState_LastTransition_Number = 9187, - AlarmConditionType_ShelvingState_LastTransition_TransitionTime = 9188, - AlarmConditionType_ShelvingState_UnshelveTime = 9189, - AlarmConditionType_ShelvingState_Unshelve = 9211, - AlarmConditionType_ShelvingState_OneShotShelve = 9212, - AlarmConditionType_ShelvingState_TimedShelve = 9213, - AlarmConditionType_ShelvingState_TimedShelve_InputArguments = 9214, - AlarmConditionType_SuppressedOrShelved = 9215, - AlarmConditionType_MaxTimeShelved = 9216, - LimitAlarmType_ConditionName = 9217, - LimitAlarmType_BranchId = 9218, - LimitAlarmType_EnabledState = 9219, - LimitAlarmType_EnabledState_Id = 9220, - LimitAlarmType_EnabledState_Name = 9221, - LimitAlarmType_EnabledState_Number = 9222, - LimitAlarmType_EnabledState_EffectiveDisplayName = 9223, - LimitAlarmType_EnabledState_TransitionTime = 9224, - LimitAlarmType_EnabledState_EffectiveTransitionTime = 9225, - LimitAlarmType_EnabledState_TrueState = 9226, - LimitAlarmType_EnabledState_FalseState = 9227, - LimitAlarmType_Quality = 9228, - LimitAlarmType_Quality_SourceTimestamp = 9229, - LimitAlarmType_LastSeverity = 9230, - LimitAlarmType_LastSeverity_SourceTimestamp = 9231, - LimitAlarmType_Comment = 9232, - LimitAlarmType_Comment_SourceTimestamp = 9233, - LimitAlarmType_ClientUserId = 9234, - LimitAlarmType_Enable = 9235, - LimitAlarmType_Disable = 9236, - LimitAlarmType_AddComment = 9237, - LimitAlarmType_AddComment_InputArguments = 9238, - LimitAlarmType_AckedState = 9239, - LimitAlarmType_AckedState_Id = 9240, - LimitAlarmType_AckedState_Name = 9241, - LimitAlarmType_AckedState_Number = 9242, - LimitAlarmType_AckedState_EffectiveDisplayName = 9243, - LimitAlarmType_AckedState_TransitionTime = 9244, - LimitAlarmType_AckedState_EffectiveTransitionTime = 9245, - LimitAlarmType_AckedState_TrueState = 9246, - LimitAlarmType_AckedState_FalseState = 9247, - LimitAlarmType_ConfirmedState = 9248, - LimitAlarmType_ConfirmedState_Id = 9249, - LimitAlarmType_ConfirmedState_Name = 9250, - LimitAlarmType_ConfirmedState_Number = 9251, - LimitAlarmType_ConfirmedState_EffectiveDisplayName = 9252, - LimitAlarmType_ConfirmedState_TransitionTime = 9253, - LimitAlarmType_ConfirmedState_EffectiveTransitionTime = 9254, - LimitAlarmType_ConfirmedState_TrueState = 9255, - LimitAlarmType_ConfirmedState_FalseState = 9256, - LimitAlarmType_Acknowledge = 9257, - LimitAlarmType_Acknowledge_InputArguments = 9258, - LimitAlarmType_Confirm = 9259, - LimitAlarmType_Confirm_InputArguments = 9260, - LimitAlarmType_ActiveState = 9261, - LimitAlarmType_ActiveState_Id = 9262, - LimitAlarmType_ActiveState_Name = 9263, - LimitAlarmType_ActiveState_Number = 9264, - LimitAlarmType_ActiveState_EffectiveDisplayName = 9265, - LimitAlarmType_ActiveState_TransitionTime = 9266, - LimitAlarmType_ActiveState_EffectiveTransitionTime = 9267, - LimitAlarmType_ActiveState_TrueState = 9268, - LimitAlarmType_ActiveState_FalseState = 9269, - LimitAlarmType_SuppressedState = 9270, - LimitAlarmType_SuppressedState_Id = 9271, - LimitAlarmType_SuppressedState_Name = 9272, - LimitAlarmType_SuppressedState_Number = 9273, - LimitAlarmType_SuppressedState_EffectiveDisplayName = 9274, - LimitAlarmType_SuppressedState_TransitionTime = 9275, - LimitAlarmType_SuppressedState_EffectiveTransitionTime = 9276, - LimitAlarmType_SuppressedState_TrueState = 9277, - LimitAlarmType_SuppressedState_FalseState = 9278, - LimitAlarmType_ShelvingState = 9279, - LimitAlarmType_ShelvingState_CurrentState = 9280, - LimitAlarmType_ShelvingState_CurrentState_Id = 9281, - LimitAlarmType_ShelvingState_CurrentState_Name = 9282, - LimitAlarmType_ShelvingState_CurrentState_Number = 9283, - LimitAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 9284, - LimitAlarmType_ShelvingState_LastTransition = 9285, - LimitAlarmType_ShelvingState_LastTransition_Id = 9286, - LimitAlarmType_ShelvingState_LastTransition_Name = 9287, - LimitAlarmType_ShelvingState_LastTransition_Number = 9288, - LimitAlarmType_ShelvingState_LastTransition_TransitionTime = 9289, - LimitAlarmType_ShelvingState_UnshelveTime = 9290, - LimitAlarmType_ShelvingState_Unshelve = 9312, - LimitAlarmType_ShelvingState_OneShotShelve = 9313, - LimitAlarmType_ShelvingState_TimedShelve = 9314, - LimitAlarmType_ShelvingState_TimedShelve_InputArguments = 9315, - LimitAlarmType_SuppressedOrShelved = 9316, - LimitAlarmType_MaxTimeShelved = 9317, - ExclusiveLimitStateMachineType = 9318, - ExclusiveLimitStateMachineType_CurrentState = 9319, - ExclusiveLimitStateMachineType_CurrentState_Id = 9320, - ExclusiveLimitStateMachineType_CurrentState_Name = 9321, - ExclusiveLimitStateMachineType_CurrentState_Number = 9322, - ExclusiveLimitStateMachineType_CurrentState_EffectiveDisplayName = 9323, - ExclusiveLimitStateMachineType_LastTransition = 9324, - ExclusiveLimitStateMachineType_LastTransition_Id = 9325, - ExclusiveLimitStateMachineType_LastTransition_Name = 9326, - ExclusiveLimitStateMachineType_LastTransition_Number = 9327, - ExclusiveLimitStateMachineType_LastTransition_TransitionTime = 9328, - ExclusiveLimitStateMachineType_HighHigh = 9329, - ExclusiveLimitStateMachineType_HighHigh_StateNumber = 9330, - ExclusiveLimitStateMachineType_High = 9331, - ExclusiveLimitStateMachineType_High_StateNumber = 9332, - ExclusiveLimitStateMachineType_Low = 9333, - ExclusiveLimitStateMachineType_Low_StateNumber = 9334, - ExclusiveLimitStateMachineType_LowLow = 9335, - ExclusiveLimitStateMachineType_LowLow_StateNumber = 9336, - ExclusiveLimitStateMachineType_LowLowToLow = 9337, - ExclusiveLimitStateMachineType_LowToLowLow = 9338, - ExclusiveLimitStateMachineType_HighHighToHigh = 9339, - ExclusiveLimitStateMachineType_HighToHighHigh = 9340, - ExclusiveLimitAlarmType = 9341, - ExclusiveLimitAlarmType_EventId = 9342, - ExclusiveLimitAlarmType_EventType = 9343, - ExclusiveLimitAlarmType_SourceNode = 9344, - ExclusiveLimitAlarmType_SourceName = 9345, - ExclusiveLimitAlarmType_Time = 9346, - ExclusiveLimitAlarmType_ReceiveTime = 9347, - ExclusiveLimitAlarmType_LocalTime = 9348, - ExclusiveLimitAlarmType_Message = 9349, - ExclusiveLimitAlarmType_Severity = 9350, - ExclusiveLimitAlarmType_ConditionName = 9351, - ExclusiveLimitAlarmType_BranchId = 9352, - ExclusiveLimitAlarmType_Retain = 9353, - ExclusiveLimitAlarmType_EnabledState = 9354, - ExclusiveLimitAlarmType_EnabledState_Id = 9355, - ExclusiveLimitAlarmType_EnabledState_Name = 9356, - ExclusiveLimitAlarmType_EnabledState_Number = 9357, - ExclusiveLimitAlarmType_EnabledState_EffectiveDisplayName = 9358, - ExclusiveLimitAlarmType_EnabledState_TransitionTime = 9359, - ExclusiveLimitAlarmType_EnabledState_EffectiveTransitionTime = 9360, - ExclusiveLimitAlarmType_EnabledState_TrueState = 9361, - ExclusiveLimitAlarmType_EnabledState_FalseState = 9362, - ExclusiveLimitAlarmType_Quality = 9363, - ExclusiveLimitAlarmType_Quality_SourceTimestamp = 9364, - ExclusiveLimitAlarmType_LastSeverity = 9365, - ExclusiveLimitAlarmType_LastSeverity_SourceTimestamp = 9366, - ExclusiveLimitAlarmType_Comment = 9367, - ExclusiveLimitAlarmType_Comment_SourceTimestamp = 9368, - ExclusiveLimitAlarmType_ClientUserId = 9369, - ExclusiveLimitAlarmType_Enable = 9370, - ExclusiveLimitAlarmType_Disable = 9371, - ExclusiveLimitAlarmType_AddComment = 9372, - ExclusiveLimitAlarmType_AddComment_InputArguments = 9373, - ExclusiveLimitAlarmType_ConditionRefresh = 9374, - ExclusiveLimitAlarmType_ConditionRefresh_InputArguments = 9375, - ExclusiveLimitAlarmType_AckedState = 9376, - ExclusiveLimitAlarmType_AckedState_Id = 9377, - ExclusiveLimitAlarmType_AckedState_Name = 9378, - ExclusiveLimitAlarmType_AckedState_Number = 9379, - ExclusiveLimitAlarmType_AckedState_EffectiveDisplayName = 9380, - ExclusiveLimitAlarmType_AckedState_TransitionTime = 9381, - ExclusiveLimitAlarmType_AckedState_EffectiveTransitionTime = 9382, - ExclusiveLimitAlarmType_AckedState_TrueState = 9383, - ExclusiveLimitAlarmType_AckedState_FalseState = 9384, - ExclusiveLimitAlarmType_ConfirmedState = 9385, - ExclusiveLimitAlarmType_ConfirmedState_Id = 9386, - ExclusiveLimitAlarmType_ConfirmedState_Name = 9387, - ExclusiveLimitAlarmType_ConfirmedState_Number = 9388, - ExclusiveLimitAlarmType_ConfirmedState_EffectiveDisplayName = 9389, - ExclusiveLimitAlarmType_ConfirmedState_TransitionTime = 9390, - ExclusiveLimitAlarmType_ConfirmedState_EffectiveTransitionTime = 9391, - ExclusiveLimitAlarmType_ConfirmedState_TrueState = 9392, - ExclusiveLimitAlarmType_ConfirmedState_FalseState = 9393, - ExclusiveLimitAlarmType_Acknowledge = 9394, - ExclusiveLimitAlarmType_Acknowledge_InputArguments = 9395, - ExclusiveLimitAlarmType_Confirm = 9396, - ExclusiveLimitAlarmType_Confirm_InputArguments = 9397, - ExclusiveLimitAlarmType_ActiveState = 9398, - ExclusiveLimitAlarmType_ActiveState_Id = 9399, - ExclusiveLimitAlarmType_ActiveState_Name = 9400, - ExclusiveLimitAlarmType_ActiveState_Number = 9401, - ExclusiveLimitAlarmType_ActiveState_EffectiveDisplayName = 9402, - ExclusiveLimitAlarmType_ActiveState_TransitionTime = 9403, - ExclusiveLimitAlarmType_ActiveState_EffectiveTransitionTime = 9404, - ExclusiveLimitAlarmType_ActiveState_TrueState = 9405, - ExclusiveLimitAlarmType_ActiveState_FalseState = 9406, - ExclusiveLimitAlarmType_SuppressedState = 9407, - ExclusiveLimitAlarmType_SuppressedState_Id = 9408, - ExclusiveLimitAlarmType_SuppressedState_Name = 9409, - ExclusiveLimitAlarmType_SuppressedState_Number = 9410, - ExclusiveLimitAlarmType_SuppressedState_EffectiveDisplayName = 9411, - ExclusiveLimitAlarmType_SuppressedState_TransitionTime = 9412, - ExclusiveLimitAlarmType_SuppressedState_EffectiveTransitionTime = 9413, - ExclusiveLimitAlarmType_SuppressedState_TrueState = 9414, - ExclusiveLimitAlarmType_SuppressedState_FalseState = 9415, - ExclusiveLimitAlarmType_ShelvingState = 9416, - ExclusiveLimitAlarmType_ShelvingState_CurrentState = 9417, - ExclusiveLimitAlarmType_ShelvingState_CurrentState_Id = 9418, - ExclusiveLimitAlarmType_ShelvingState_CurrentState_Name = 9419, - ExclusiveLimitAlarmType_ShelvingState_CurrentState_Number = 9420, - ExclusiveLimitAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 9421, - ExclusiveLimitAlarmType_ShelvingState_LastTransition = 9422, - ExclusiveLimitAlarmType_ShelvingState_LastTransition_Id = 9423, - ExclusiveLimitAlarmType_ShelvingState_LastTransition_Name = 9424, - ExclusiveLimitAlarmType_ShelvingState_LastTransition_Number = 9425, - ExclusiveLimitAlarmType_ShelvingState_LastTransition_TransitionTime = 9426, - ExclusiveLimitAlarmType_ShelvingState_UnshelveTime = 9427, - ExclusiveLimitAlarmType_ShelvingState_Unshelve = 9449, - ExclusiveLimitAlarmType_ShelvingState_OneShotShelve = 9450, - ExclusiveLimitAlarmType_ShelvingState_TimedShelve = 9451, - ExclusiveLimitAlarmType_ShelvingState_TimedShelve_InputArguments = 9452, - ExclusiveLimitAlarmType_SuppressedOrShelved = 9453, - ExclusiveLimitAlarmType_MaxTimeShelved = 9454, - ExclusiveLimitAlarmType_LimitState = 9455, - ExclusiveLimitAlarmType_LimitState_CurrentState = 9456, - ExclusiveLimitAlarmType_LimitState_CurrentState_Id = 9457, - ExclusiveLimitAlarmType_LimitState_CurrentState_Name = 9458, - ExclusiveLimitAlarmType_LimitState_CurrentState_Number = 9459, - ExclusiveLimitAlarmType_LimitState_CurrentState_EffectiveDisplayName = 9460, - ExclusiveLimitAlarmType_LimitState_LastTransition = 9461, - ExclusiveLimitAlarmType_LimitState_LastTransition_Id = 9462, - ExclusiveLimitAlarmType_LimitState_LastTransition_Name = 9463, - ExclusiveLimitAlarmType_LimitState_LastTransition_Number = 9464, - ExclusiveLimitAlarmType_LimitState_LastTransition_TransitionTime = 9465, - ExclusiveLimitAlarmType_HighHighLimit = 9478, - ExclusiveLimitAlarmType_HighLimit = 9479, - ExclusiveLimitAlarmType_LowLimit = 9480, - ExclusiveLimitAlarmType_LowLowLimit = 9481, - ExclusiveLevelAlarmType = 9482, - ExclusiveLevelAlarmType_EventId = 9483, - ExclusiveLevelAlarmType_EventType = 9484, - ExclusiveLevelAlarmType_SourceNode = 9485, - ExclusiveLevelAlarmType_SourceName = 9486, - ExclusiveLevelAlarmType_Time = 9487, - ExclusiveLevelAlarmType_ReceiveTime = 9488, - ExclusiveLevelAlarmType_LocalTime = 9489, - ExclusiveLevelAlarmType_Message = 9490, - ExclusiveLevelAlarmType_Severity = 9491, - ExclusiveLevelAlarmType_ConditionName = 9492, - ExclusiveLevelAlarmType_BranchId = 9493, - ExclusiveLevelAlarmType_Retain = 9494, - ExclusiveLevelAlarmType_EnabledState = 9495, - ExclusiveLevelAlarmType_EnabledState_Id = 9496, - ExclusiveLevelAlarmType_EnabledState_Name = 9497, - ExclusiveLevelAlarmType_EnabledState_Number = 9498, - ExclusiveLevelAlarmType_EnabledState_EffectiveDisplayName = 9499, - ExclusiveLevelAlarmType_EnabledState_TransitionTime = 9500, - ExclusiveLevelAlarmType_EnabledState_EffectiveTransitionTime = 9501, - ExclusiveLevelAlarmType_EnabledState_TrueState = 9502, - ExclusiveLevelAlarmType_EnabledState_FalseState = 9503, - ExclusiveLevelAlarmType_Quality = 9504, - ExclusiveLevelAlarmType_Quality_SourceTimestamp = 9505, - ExclusiveLevelAlarmType_LastSeverity = 9506, - ExclusiveLevelAlarmType_LastSeverity_SourceTimestamp = 9507, - ExclusiveLevelAlarmType_Comment = 9508, - ExclusiveLevelAlarmType_Comment_SourceTimestamp = 9509, - ExclusiveLevelAlarmType_ClientUserId = 9510, - ExclusiveLevelAlarmType_Enable = 9511, - ExclusiveLevelAlarmType_Disable = 9512, - ExclusiveLevelAlarmType_AddComment = 9513, - ExclusiveLevelAlarmType_AddComment_InputArguments = 9514, - ExclusiveLevelAlarmType_ConditionRefresh = 9515, - ExclusiveLevelAlarmType_ConditionRefresh_InputArguments = 9516, - ExclusiveLevelAlarmType_AckedState = 9517, - ExclusiveLevelAlarmType_AckedState_Id = 9518, - ExclusiveLevelAlarmType_AckedState_Name = 9519, - ExclusiveLevelAlarmType_AckedState_Number = 9520, - ExclusiveLevelAlarmType_AckedState_EffectiveDisplayName = 9521, - ExclusiveLevelAlarmType_AckedState_TransitionTime = 9522, - ExclusiveLevelAlarmType_AckedState_EffectiveTransitionTime = 9523, - ExclusiveLevelAlarmType_AckedState_TrueState = 9524, - ExclusiveLevelAlarmType_AckedState_FalseState = 9525, - ExclusiveLevelAlarmType_ConfirmedState = 9526, - ExclusiveLevelAlarmType_ConfirmedState_Id = 9527, - ExclusiveLevelAlarmType_ConfirmedState_Name = 9528, - ExclusiveLevelAlarmType_ConfirmedState_Number = 9529, - ExclusiveLevelAlarmType_ConfirmedState_EffectiveDisplayName = 9530, - ExclusiveLevelAlarmType_ConfirmedState_TransitionTime = 9531, - ExclusiveLevelAlarmType_ConfirmedState_EffectiveTransitionTime = 9532, - ExclusiveLevelAlarmType_ConfirmedState_TrueState = 9533, - ExclusiveLevelAlarmType_ConfirmedState_FalseState = 9534, - ExclusiveLevelAlarmType_Acknowledge = 9535, - ExclusiveLevelAlarmType_Acknowledge_InputArguments = 9536, - ExclusiveLevelAlarmType_Confirm = 9537, - ExclusiveLevelAlarmType_Confirm_InputArguments = 9538, - ExclusiveLevelAlarmType_ActiveState = 9539, - ExclusiveLevelAlarmType_ActiveState_Id = 9540, - ExclusiveLevelAlarmType_ActiveState_Name = 9541, - ExclusiveLevelAlarmType_ActiveState_Number = 9542, - ExclusiveLevelAlarmType_ActiveState_EffectiveDisplayName = 9543, - ExclusiveLevelAlarmType_ActiveState_TransitionTime = 9544, - ExclusiveLevelAlarmType_ActiveState_EffectiveTransitionTime = 9545, - ExclusiveLevelAlarmType_ActiveState_TrueState = 9546, - ExclusiveLevelAlarmType_ActiveState_FalseState = 9547, - ExclusiveLevelAlarmType_SuppressedState = 9548, - ExclusiveLevelAlarmType_SuppressedState_Id = 9549, - ExclusiveLevelAlarmType_SuppressedState_Name = 9550, - ExclusiveLevelAlarmType_SuppressedState_Number = 9551, - ExclusiveLevelAlarmType_SuppressedState_EffectiveDisplayName = 9552, - ExclusiveLevelAlarmType_SuppressedState_TransitionTime = 9553, - ExclusiveLevelAlarmType_SuppressedState_EffectiveTransitionTime = 9554, - ExclusiveLevelAlarmType_SuppressedState_TrueState = 9555, - ExclusiveLevelAlarmType_SuppressedState_FalseState = 9556, - ExclusiveLevelAlarmType_ShelvingState = 9557, - ExclusiveLevelAlarmType_ShelvingState_CurrentState = 9558, - ExclusiveLevelAlarmType_ShelvingState_CurrentState_Id = 9559, - ExclusiveLevelAlarmType_ShelvingState_CurrentState_Name = 9560, - ExclusiveLevelAlarmType_ShelvingState_CurrentState_Number = 9561, - ExclusiveLevelAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 9562, - ExclusiveLevelAlarmType_ShelvingState_LastTransition = 9563, - ExclusiveLevelAlarmType_ShelvingState_LastTransition_Id = 9564, - ExclusiveLevelAlarmType_ShelvingState_LastTransition_Name = 9565, - ExclusiveLevelAlarmType_ShelvingState_LastTransition_Number = 9566, - ExclusiveLevelAlarmType_ShelvingState_LastTransition_TransitionTime = 9567, - ExclusiveLevelAlarmType_ShelvingState_UnshelveTime = 9568, - ExclusiveLevelAlarmType_ShelvingState_Unshelve = 9590, - ExclusiveLevelAlarmType_ShelvingState_OneShotShelve = 9591, - ExclusiveLevelAlarmType_ShelvingState_TimedShelve = 9592, - ExclusiveLevelAlarmType_ShelvingState_TimedShelve_InputArguments = 9593, - ExclusiveLevelAlarmType_SuppressedOrShelved = 9594, - ExclusiveLevelAlarmType_MaxTimeShelved = 9595, - ExclusiveLevelAlarmType_LimitState = 9596, - ExclusiveLevelAlarmType_LimitState_CurrentState = 9597, - ExclusiveLevelAlarmType_LimitState_CurrentState_Id = 9598, - ExclusiveLevelAlarmType_LimitState_CurrentState_Name = 9599, - ExclusiveLevelAlarmType_LimitState_CurrentState_Number = 9600, - ExclusiveLevelAlarmType_LimitState_CurrentState_EffectiveDisplayName = 9601, - ExclusiveLevelAlarmType_LimitState_LastTransition = 9602, - ExclusiveLevelAlarmType_LimitState_LastTransition_Id = 9603, - ExclusiveLevelAlarmType_LimitState_LastTransition_Name = 9604, - ExclusiveLevelAlarmType_LimitState_LastTransition_Number = 9605, - ExclusiveLevelAlarmType_LimitState_LastTransition_TransitionTime = 9606, - ExclusiveLevelAlarmType_HighHighLimit = 9619, - ExclusiveLevelAlarmType_HighLimit = 9620, - ExclusiveLevelAlarmType_LowLimit = 9621, - ExclusiveLevelAlarmType_LowLowLimit = 9622, - ExclusiveRateOfChangeAlarmType = 9623, - ExclusiveRateOfChangeAlarmType_EventId = 9624, - ExclusiveRateOfChangeAlarmType_EventType = 9625, - ExclusiveRateOfChangeAlarmType_SourceNode = 9626, - ExclusiveRateOfChangeAlarmType_SourceName = 9627, - ExclusiveRateOfChangeAlarmType_Time = 9628, - ExclusiveRateOfChangeAlarmType_ReceiveTime = 9629, - ExclusiveRateOfChangeAlarmType_LocalTime = 9630, - ExclusiveRateOfChangeAlarmType_Message = 9631, - ExclusiveRateOfChangeAlarmType_Severity = 9632, - ExclusiveRateOfChangeAlarmType_ConditionName = 9633, - ExclusiveRateOfChangeAlarmType_BranchId = 9634, - ExclusiveRateOfChangeAlarmType_Retain = 9635, - ExclusiveRateOfChangeAlarmType_EnabledState = 9636, - ExclusiveRateOfChangeAlarmType_EnabledState_Id = 9637, - ExclusiveRateOfChangeAlarmType_EnabledState_Name = 9638, - ExclusiveRateOfChangeAlarmType_EnabledState_Number = 9639, - ExclusiveRateOfChangeAlarmType_EnabledState_EffectiveDisplayName = 9640, - ExclusiveRateOfChangeAlarmType_EnabledState_TransitionTime = 9641, - ExclusiveRateOfChangeAlarmType_EnabledState_EffectiveTransitionTime = 9642, - ExclusiveRateOfChangeAlarmType_EnabledState_TrueState = 9643, - ExclusiveRateOfChangeAlarmType_EnabledState_FalseState = 9644, - ExclusiveRateOfChangeAlarmType_Quality = 9645, - ExclusiveRateOfChangeAlarmType_Quality_SourceTimestamp = 9646, - ExclusiveRateOfChangeAlarmType_LastSeverity = 9647, - ExclusiveRateOfChangeAlarmType_LastSeverity_SourceTimestamp = 9648, - ExclusiveRateOfChangeAlarmType_Comment = 9649, - ExclusiveRateOfChangeAlarmType_Comment_SourceTimestamp = 9650, - ExclusiveRateOfChangeAlarmType_ClientUserId = 9651, - ExclusiveRateOfChangeAlarmType_Enable = 9652, - ExclusiveRateOfChangeAlarmType_Disable = 9653, - ExclusiveRateOfChangeAlarmType_AddComment = 9654, - ExclusiveRateOfChangeAlarmType_AddComment_InputArguments = 9655, - ExclusiveRateOfChangeAlarmType_ConditionRefresh = 9656, - ExclusiveRateOfChangeAlarmType_ConditionRefresh_InputArguments = 9657, - ExclusiveRateOfChangeAlarmType_AckedState = 9658, - ExclusiveRateOfChangeAlarmType_AckedState_Id = 9659, - ExclusiveRateOfChangeAlarmType_AckedState_Name = 9660, - ExclusiveRateOfChangeAlarmType_AckedState_Number = 9661, - ExclusiveRateOfChangeAlarmType_AckedState_EffectiveDisplayName = 9662, - ExclusiveRateOfChangeAlarmType_AckedState_TransitionTime = 9663, - ExclusiveRateOfChangeAlarmType_AckedState_EffectiveTransitionTime = 9664, - ExclusiveRateOfChangeAlarmType_AckedState_TrueState = 9665, - ExclusiveRateOfChangeAlarmType_AckedState_FalseState = 9666, - ExclusiveRateOfChangeAlarmType_ConfirmedState = 9667, - ExclusiveRateOfChangeAlarmType_ConfirmedState_Id = 9668, - ExclusiveRateOfChangeAlarmType_ConfirmedState_Name = 9669, - ExclusiveRateOfChangeAlarmType_ConfirmedState_Number = 9670, - ExclusiveRateOfChangeAlarmType_ConfirmedState_EffectiveDisplayName = 9671, - ExclusiveRateOfChangeAlarmType_ConfirmedState_TransitionTime = 9672, - ExclusiveRateOfChangeAlarmType_ConfirmedState_EffectiveTransitionTime = 9673, - ExclusiveRateOfChangeAlarmType_ConfirmedState_TrueState = 9674, - ExclusiveRateOfChangeAlarmType_ConfirmedState_FalseState = 9675, - ExclusiveRateOfChangeAlarmType_Acknowledge = 9676, - ExclusiveRateOfChangeAlarmType_Acknowledge_InputArguments = 9677, - ExclusiveRateOfChangeAlarmType_Confirm = 9678, - ExclusiveRateOfChangeAlarmType_Confirm_InputArguments = 9679, - ExclusiveRateOfChangeAlarmType_ActiveState = 9680, - ExclusiveRateOfChangeAlarmType_ActiveState_Id = 9681, - ExclusiveRateOfChangeAlarmType_ActiveState_Name = 9682, - ExclusiveRateOfChangeAlarmType_ActiveState_Number = 9683, - ExclusiveRateOfChangeAlarmType_ActiveState_EffectiveDisplayName = 9684, - ExclusiveRateOfChangeAlarmType_ActiveState_TransitionTime = 9685, - ExclusiveRateOfChangeAlarmType_ActiveState_EffectiveTransitionTime = 9686, - ExclusiveRateOfChangeAlarmType_ActiveState_TrueState = 9687, - ExclusiveRateOfChangeAlarmType_ActiveState_FalseState = 9688, - ExclusiveRateOfChangeAlarmType_SuppressedState = 9689, - ExclusiveRateOfChangeAlarmType_SuppressedState_Id = 9690, - ExclusiveRateOfChangeAlarmType_SuppressedState_Name = 9691, - ExclusiveRateOfChangeAlarmType_SuppressedState_Number = 9692, - ExclusiveRateOfChangeAlarmType_SuppressedState_EffectiveDisplayName = 9693, - ExclusiveRateOfChangeAlarmType_SuppressedState_TransitionTime = 9694, - ExclusiveRateOfChangeAlarmType_SuppressedState_EffectiveTransitionTime = 9695, - ExclusiveRateOfChangeAlarmType_SuppressedState_TrueState = 9696, - ExclusiveRateOfChangeAlarmType_SuppressedState_FalseState = 9697, - ExclusiveRateOfChangeAlarmType_ShelvingState = 9698, - ExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState = 9699, - ExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_Id = 9700, - ExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_Name = 9701, - ExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_Number = 9702, - ExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 9703, - ExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition = 9704, - ExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_Id = 9705, - ExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_Name = 9706, - ExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_Number = 9707, - ExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_TransitionTime = 9708, - ExclusiveRateOfChangeAlarmType_ShelvingState_UnshelveTime = 9709, - ExclusiveRateOfChangeAlarmType_ShelvingState_Unshelve = 9731, - ExclusiveRateOfChangeAlarmType_ShelvingState_OneShotShelve = 9732, - ExclusiveRateOfChangeAlarmType_ShelvingState_TimedShelve = 9733, - ExclusiveRateOfChangeAlarmType_ShelvingState_TimedShelve_InputArguments = 9734, - ExclusiveRateOfChangeAlarmType_SuppressedOrShelved = 9735, - ExclusiveRateOfChangeAlarmType_MaxTimeShelved = 9736, - ExclusiveRateOfChangeAlarmType_LimitState = 9737, - ExclusiveRateOfChangeAlarmType_LimitState_CurrentState = 9738, - ExclusiveRateOfChangeAlarmType_LimitState_CurrentState_Id = 9739, - ExclusiveRateOfChangeAlarmType_LimitState_CurrentState_Name = 9740, - ExclusiveRateOfChangeAlarmType_LimitState_CurrentState_Number = 9741, - ExclusiveRateOfChangeAlarmType_LimitState_CurrentState_EffectiveDisplayName = 9742, - ExclusiveRateOfChangeAlarmType_LimitState_LastTransition = 9743, - ExclusiveRateOfChangeAlarmType_LimitState_LastTransition_Id = 9744, - ExclusiveRateOfChangeAlarmType_LimitState_LastTransition_Name = 9745, - ExclusiveRateOfChangeAlarmType_LimitState_LastTransition_Number = 9746, - ExclusiveRateOfChangeAlarmType_LimitState_LastTransition_TransitionTime = 9747, - ExclusiveRateOfChangeAlarmType_HighHighLimit = 9760, - ExclusiveRateOfChangeAlarmType_HighLimit = 9761, - ExclusiveRateOfChangeAlarmType_LowLimit = 9762, - ExclusiveRateOfChangeAlarmType_LowLowLimit = 9763, - ExclusiveDeviationAlarmType = 9764, - ExclusiveDeviationAlarmType_EventId = 9765, - ExclusiveDeviationAlarmType_EventType = 9766, - ExclusiveDeviationAlarmType_SourceNode = 9767, - ExclusiveDeviationAlarmType_SourceName = 9768, - ExclusiveDeviationAlarmType_Time = 9769, - ExclusiveDeviationAlarmType_ReceiveTime = 9770, - ExclusiveDeviationAlarmType_LocalTime = 9771, - ExclusiveDeviationAlarmType_Message = 9772, - ExclusiveDeviationAlarmType_Severity = 9773, - ExclusiveDeviationAlarmType_ConditionName = 9774, - ExclusiveDeviationAlarmType_BranchId = 9775, - ExclusiveDeviationAlarmType_Retain = 9776, - ExclusiveDeviationAlarmType_EnabledState = 9777, - ExclusiveDeviationAlarmType_EnabledState_Id = 9778, - ExclusiveDeviationAlarmType_EnabledState_Name = 9779, - ExclusiveDeviationAlarmType_EnabledState_Number = 9780, - ExclusiveDeviationAlarmType_EnabledState_EffectiveDisplayName = 9781, - ExclusiveDeviationAlarmType_EnabledState_TransitionTime = 9782, - ExclusiveDeviationAlarmType_EnabledState_EffectiveTransitionTime = 9783, - ExclusiveDeviationAlarmType_EnabledState_TrueState = 9784, - ExclusiveDeviationAlarmType_EnabledState_FalseState = 9785, - ExclusiveDeviationAlarmType_Quality = 9786, - ExclusiveDeviationAlarmType_Quality_SourceTimestamp = 9787, - ExclusiveDeviationAlarmType_LastSeverity = 9788, - ExclusiveDeviationAlarmType_LastSeverity_SourceTimestamp = 9789, - ExclusiveDeviationAlarmType_Comment = 9790, - ExclusiveDeviationAlarmType_Comment_SourceTimestamp = 9791, - ExclusiveDeviationAlarmType_ClientUserId = 9792, - ExclusiveDeviationAlarmType_Enable = 9793, - ExclusiveDeviationAlarmType_Disable = 9794, - ExclusiveDeviationAlarmType_AddComment = 9795, - ExclusiveDeviationAlarmType_AddComment_InputArguments = 9796, - ExclusiveDeviationAlarmType_ConditionRefresh = 9797, - ExclusiveDeviationAlarmType_ConditionRefresh_InputArguments = 9798, - ExclusiveDeviationAlarmType_AckedState = 9799, - ExclusiveDeviationAlarmType_AckedState_Id = 9800, - ExclusiveDeviationAlarmType_AckedState_Name = 9801, - ExclusiveDeviationAlarmType_AckedState_Number = 9802, - ExclusiveDeviationAlarmType_AckedState_EffectiveDisplayName = 9803, - ExclusiveDeviationAlarmType_AckedState_TransitionTime = 9804, - ExclusiveDeviationAlarmType_AckedState_EffectiveTransitionTime = 9805, - ExclusiveDeviationAlarmType_AckedState_TrueState = 9806, - ExclusiveDeviationAlarmType_AckedState_FalseState = 9807, - ExclusiveDeviationAlarmType_ConfirmedState = 9808, - ExclusiveDeviationAlarmType_ConfirmedState_Id = 9809, - ExclusiveDeviationAlarmType_ConfirmedState_Name = 9810, - ExclusiveDeviationAlarmType_ConfirmedState_Number = 9811, - ExclusiveDeviationAlarmType_ConfirmedState_EffectiveDisplayName = 9812, - ExclusiveDeviationAlarmType_ConfirmedState_TransitionTime = 9813, - ExclusiveDeviationAlarmType_ConfirmedState_EffectiveTransitionTime = 9814, - ExclusiveDeviationAlarmType_ConfirmedState_TrueState = 9815, - ExclusiveDeviationAlarmType_ConfirmedState_FalseState = 9816, - ExclusiveDeviationAlarmType_Acknowledge = 9817, - ExclusiveDeviationAlarmType_Acknowledge_InputArguments = 9818, - ExclusiveDeviationAlarmType_Confirm = 9819, - ExclusiveDeviationAlarmType_Confirm_InputArguments = 9820, - ExclusiveDeviationAlarmType_ActiveState = 9821, - ExclusiveDeviationAlarmType_ActiveState_Id = 9822, - ExclusiveDeviationAlarmType_ActiveState_Name = 9823, - ExclusiveDeviationAlarmType_ActiveState_Number = 9824, - ExclusiveDeviationAlarmType_ActiveState_EffectiveDisplayName = 9825, - ExclusiveDeviationAlarmType_ActiveState_TransitionTime = 9826, - ExclusiveDeviationAlarmType_ActiveState_EffectiveTransitionTime = 9827, - ExclusiveDeviationAlarmType_ActiveState_TrueState = 9828, - ExclusiveDeviationAlarmType_ActiveState_FalseState = 9829, - ExclusiveDeviationAlarmType_SuppressedState = 9830, - ExclusiveDeviationAlarmType_SuppressedState_Id = 9831, - ExclusiveDeviationAlarmType_SuppressedState_Name = 9832, - ExclusiveDeviationAlarmType_SuppressedState_Number = 9833, - ExclusiveDeviationAlarmType_SuppressedState_EffectiveDisplayName = 9834, - ExclusiveDeviationAlarmType_SuppressedState_TransitionTime = 9835, - ExclusiveDeviationAlarmType_SuppressedState_EffectiveTransitionTime = 9836, - ExclusiveDeviationAlarmType_SuppressedState_TrueState = 9837, - ExclusiveDeviationAlarmType_SuppressedState_FalseState = 9838, - ExclusiveDeviationAlarmType_ShelvingState = 9839, - ExclusiveDeviationAlarmType_ShelvingState_CurrentState = 9840, - ExclusiveDeviationAlarmType_ShelvingState_CurrentState_Id = 9841, - ExclusiveDeviationAlarmType_ShelvingState_CurrentState_Name = 9842, - ExclusiveDeviationAlarmType_ShelvingState_CurrentState_Number = 9843, - ExclusiveDeviationAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 9844, - ExclusiveDeviationAlarmType_ShelvingState_LastTransition = 9845, - ExclusiveDeviationAlarmType_ShelvingState_LastTransition_Id = 9846, - ExclusiveDeviationAlarmType_ShelvingState_LastTransition_Name = 9847, - ExclusiveDeviationAlarmType_ShelvingState_LastTransition_Number = 9848, - ExclusiveDeviationAlarmType_ShelvingState_LastTransition_TransitionTime = 9849, - ExclusiveDeviationAlarmType_ShelvingState_UnshelveTime = 9850, - ExclusiveDeviationAlarmType_ShelvingState_Unshelve = 9872, - ExclusiveDeviationAlarmType_ShelvingState_OneShotShelve = 9873, - ExclusiveDeviationAlarmType_ShelvingState_TimedShelve = 9874, - ExclusiveDeviationAlarmType_ShelvingState_TimedShelve_InputArguments = 9875, - ExclusiveDeviationAlarmType_SuppressedOrShelved = 9876, - ExclusiveDeviationAlarmType_MaxTimeShelved = 9877, - ExclusiveDeviationAlarmType_LimitState = 9878, - ExclusiveDeviationAlarmType_LimitState_CurrentState = 9879, - ExclusiveDeviationAlarmType_LimitState_CurrentState_Id = 9880, - ExclusiveDeviationAlarmType_LimitState_CurrentState_Name = 9881, - ExclusiveDeviationAlarmType_LimitState_CurrentState_Number = 9882, - ExclusiveDeviationAlarmType_LimitState_CurrentState_EffectiveDisplayName = 9883, - ExclusiveDeviationAlarmType_LimitState_LastTransition = 9884, - ExclusiveDeviationAlarmType_LimitState_LastTransition_Id = 9885, - ExclusiveDeviationAlarmType_LimitState_LastTransition_Name = 9886, - ExclusiveDeviationAlarmType_LimitState_LastTransition_Number = 9887, - ExclusiveDeviationAlarmType_LimitState_LastTransition_TransitionTime = 9888, - ExclusiveDeviationAlarmType_HighHighLimit = 9901, - ExclusiveDeviationAlarmType_HighLimit = 9902, - ExclusiveDeviationAlarmType_LowLimit = 9903, - ExclusiveDeviationAlarmType_LowLowLimit = 9904, - ExclusiveDeviationAlarmType_SetpointNode = 9905, - NonExclusiveLimitAlarmType = 9906, - NonExclusiveLimitAlarmType_EventId = 9907, - NonExclusiveLimitAlarmType_EventType = 9908, - NonExclusiveLimitAlarmType_SourceNode = 9909, - NonExclusiveLimitAlarmType_SourceName = 9910, - NonExclusiveLimitAlarmType_Time = 9911, - NonExclusiveLimitAlarmType_ReceiveTime = 9912, - NonExclusiveLimitAlarmType_LocalTime = 9913, - NonExclusiveLimitAlarmType_Message = 9914, - NonExclusiveLimitAlarmType_Severity = 9915, - NonExclusiveLimitAlarmType_ConditionName = 9916, - NonExclusiveLimitAlarmType_BranchId = 9917, - NonExclusiveLimitAlarmType_Retain = 9918, - NonExclusiveLimitAlarmType_EnabledState = 9919, - NonExclusiveLimitAlarmType_EnabledState_Id = 9920, - NonExclusiveLimitAlarmType_EnabledState_Name = 9921, - NonExclusiveLimitAlarmType_EnabledState_Number = 9922, - NonExclusiveLimitAlarmType_EnabledState_EffectiveDisplayName = 9923, - NonExclusiveLimitAlarmType_EnabledState_TransitionTime = 9924, - NonExclusiveLimitAlarmType_EnabledState_EffectiveTransitionTime = 9925, - NonExclusiveLimitAlarmType_EnabledState_TrueState = 9926, - NonExclusiveLimitAlarmType_EnabledState_FalseState = 9927, - NonExclusiveLimitAlarmType_Quality = 9928, - NonExclusiveLimitAlarmType_Quality_SourceTimestamp = 9929, - NonExclusiveLimitAlarmType_LastSeverity = 9930, - NonExclusiveLimitAlarmType_LastSeverity_SourceTimestamp = 9931, - NonExclusiveLimitAlarmType_Comment = 9932, - NonExclusiveLimitAlarmType_Comment_SourceTimestamp = 9933, - NonExclusiveLimitAlarmType_ClientUserId = 9934, - NonExclusiveLimitAlarmType_Enable = 9935, - NonExclusiveLimitAlarmType_Disable = 9936, - NonExclusiveLimitAlarmType_AddComment = 9937, - NonExclusiveLimitAlarmType_AddComment_InputArguments = 9938, - NonExclusiveLimitAlarmType_ConditionRefresh = 9939, - NonExclusiveLimitAlarmType_ConditionRefresh_InputArguments = 9940, - NonExclusiveLimitAlarmType_AckedState = 9941, - NonExclusiveLimitAlarmType_AckedState_Id = 9942, - NonExclusiveLimitAlarmType_AckedState_Name = 9943, - NonExclusiveLimitAlarmType_AckedState_Number = 9944, - NonExclusiveLimitAlarmType_AckedState_EffectiveDisplayName = 9945, - NonExclusiveLimitAlarmType_AckedState_TransitionTime = 9946, - NonExclusiveLimitAlarmType_AckedState_EffectiveTransitionTime = 9947, - NonExclusiveLimitAlarmType_AckedState_TrueState = 9948, - NonExclusiveLimitAlarmType_AckedState_FalseState = 9949, - NonExclusiveLimitAlarmType_ConfirmedState = 9950, - NonExclusiveLimitAlarmType_ConfirmedState_Id = 9951, - NonExclusiveLimitAlarmType_ConfirmedState_Name = 9952, - NonExclusiveLimitAlarmType_ConfirmedState_Number = 9953, - NonExclusiveLimitAlarmType_ConfirmedState_EffectiveDisplayName = 9954, - NonExclusiveLimitAlarmType_ConfirmedState_TransitionTime = 9955, - NonExclusiveLimitAlarmType_ConfirmedState_EffectiveTransitionTime = 9956, - NonExclusiveLimitAlarmType_ConfirmedState_TrueState = 9957, - NonExclusiveLimitAlarmType_ConfirmedState_FalseState = 9958, - NonExclusiveLimitAlarmType_Acknowledge = 9959, - NonExclusiveLimitAlarmType_Acknowledge_InputArguments = 9960, - NonExclusiveLimitAlarmType_Confirm = 9961, - NonExclusiveLimitAlarmType_Confirm_InputArguments = 9962, - NonExclusiveLimitAlarmType_ActiveState = 9963, - NonExclusiveLimitAlarmType_ActiveState_Id = 9964, - NonExclusiveLimitAlarmType_ActiveState_Name = 9965, - NonExclusiveLimitAlarmType_ActiveState_Number = 9966, - NonExclusiveLimitAlarmType_ActiveState_EffectiveDisplayName = 9967, - NonExclusiveLimitAlarmType_ActiveState_TransitionTime = 9968, - NonExclusiveLimitAlarmType_ActiveState_EffectiveTransitionTime = 9969, - NonExclusiveLimitAlarmType_ActiveState_TrueState = 9970, - NonExclusiveLimitAlarmType_ActiveState_FalseState = 9971, - NonExclusiveLimitAlarmType_SuppressedState = 9972, - NonExclusiveLimitAlarmType_SuppressedState_Id = 9973, - NonExclusiveLimitAlarmType_SuppressedState_Name = 9974, - NonExclusiveLimitAlarmType_SuppressedState_Number = 9975, - NonExclusiveLimitAlarmType_SuppressedState_EffectiveDisplayName = 9976, - NonExclusiveLimitAlarmType_SuppressedState_TransitionTime = 9977, - NonExclusiveLimitAlarmType_SuppressedState_EffectiveTransitionTime = 9978, - NonExclusiveLimitAlarmType_SuppressedState_TrueState = 9979, - NonExclusiveLimitAlarmType_SuppressedState_FalseState = 9980, - NonExclusiveLimitAlarmType_ShelvingState = 9981, - NonExclusiveLimitAlarmType_ShelvingState_CurrentState = 9982, - NonExclusiveLimitAlarmType_ShelvingState_CurrentState_Id = 9983, - NonExclusiveLimitAlarmType_ShelvingState_CurrentState_Name = 9984, - NonExclusiveLimitAlarmType_ShelvingState_CurrentState_Number = 9985, - NonExclusiveLimitAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 9986, - NonExclusiveLimitAlarmType_ShelvingState_LastTransition = 9987, - NonExclusiveLimitAlarmType_ShelvingState_LastTransition_Id = 9988, - NonExclusiveLimitAlarmType_ShelvingState_LastTransition_Name = 9989, - NonExclusiveLimitAlarmType_ShelvingState_LastTransition_Number = 9990, - NonExclusiveLimitAlarmType_ShelvingState_LastTransition_TransitionTime = 9991, - NonExclusiveLimitAlarmType_ShelvingState_UnshelveTime = 9992, - NonExclusiveLimitAlarmType_ShelvingState_Unshelve = 10014, - NonExclusiveLimitAlarmType_ShelvingState_OneShotShelve = 10015, - NonExclusiveLimitAlarmType_ShelvingState_TimedShelve = 10016, - NonExclusiveLimitAlarmType_ShelvingState_TimedShelve_InputArguments = 10017, - NonExclusiveLimitAlarmType_SuppressedOrShelved = 10018, - NonExclusiveLimitAlarmType_MaxTimeShelved = 10019, - NonExclusiveLimitAlarmType_HighHighState = 10020, - NonExclusiveLimitAlarmType_HighHighState_Id = 10021, - NonExclusiveLimitAlarmType_HighHighState_Name = 10022, - NonExclusiveLimitAlarmType_HighHighState_Number = 10023, - NonExclusiveLimitAlarmType_HighHighState_EffectiveDisplayName = 10024, - NonExclusiveLimitAlarmType_HighHighState_TransitionTime = 10025, - NonExclusiveLimitAlarmType_HighHighState_EffectiveTransitionTime = 10026, - NonExclusiveLimitAlarmType_HighHighState_TrueState = 10027, - NonExclusiveLimitAlarmType_HighHighState_FalseState = 10028, - NonExclusiveLimitAlarmType_HighState = 10029, - NonExclusiveLimitAlarmType_HighState_Id = 10030, - NonExclusiveLimitAlarmType_HighState_Name = 10031, - NonExclusiveLimitAlarmType_HighState_Number = 10032, - NonExclusiveLimitAlarmType_HighState_EffectiveDisplayName = 10033, - NonExclusiveLimitAlarmType_HighState_TransitionTime = 10034, - NonExclusiveLimitAlarmType_HighState_EffectiveTransitionTime = 10035, - NonExclusiveLimitAlarmType_HighState_TrueState = 10036, - NonExclusiveLimitAlarmType_HighState_FalseState = 10037, - NonExclusiveLimitAlarmType_LowState = 10038, - NonExclusiveLimitAlarmType_LowState_Id = 10039, - NonExclusiveLimitAlarmType_LowState_Name = 10040, - NonExclusiveLimitAlarmType_LowState_Number = 10041, - NonExclusiveLimitAlarmType_LowState_EffectiveDisplayName = 10042, - NonExclusiveLimitAlarmType_LowState_TransitionTime = 10043, - NonExclusiveLimitAlarmType_LowState_EffectiveTransitionTime = 10044, - NonExclusiveLimitAlarmType_LowState_TrueState = 10045, - NonExclusiveLimitAlarmType_LowState_FalseState = 10046, - NonExclusiveLimitAlarmType_LowLowState = 10047, - NonExclusiveLimitAlarmType_LowLowState_Id = 10048, - NonExclusiveLimitAlarmType_LowLowState_Name = 10049, - NonExclusiveLimitAlarmType_LowLowState_Number = 10050, - NonExclusiveLimitAlarmType_LowLowState_EffectiveDisplayName = 10051, - NonExclusiveLimitAlarmType_LowLowState_TransitionTime = 10052, - NonExclusiveLimitAlarmType_LowLowState_EffectiveTransitionTime = 10053, - NonExclusiveLimitAlarmType_LowLowState_TrueState = 10054, - NonExclusiveLimitAlarmType_LowLowState_FalseState = 10055, - NonExclusiveLimitAlarmType_HighHighLimit = 10056, - NonExclusiveLimitAlarmType_HighLimit = 10057, - NonExclusiveLimitAlarmType_LowLimit = 10058, - NonExclusiveLimitAlarmType_LowLowLimit = 10059, - NonExclusiveLevelAlarmType = 10060, - NonExclusiveLevelAlarmType_EventId = 10061, - NonExclusiveLevelAlarmType_EventType = 10062, - NonExclusiveLevelAlarmType_SourceNode = 10063, - NonExclusiveLevelAlarmType_SourceName = 10064, - NonExclusiveLevelAlarmType_Time = 10065, - NonExclusiveLevelAlarmType_ReceiveTime = 10066, - NonExclusiveLevelAlarmType_LocalTime = 10067, - NonExclusiveLevelAlarmType_Message = 10068, - NonExclusiveLevelAlarmType_Severity = 10069, - NonExclusiveLevelAlarmType_ConditionName = 10070, - NonExclusiveLevelAlarmType_BranchId = 10071, - NonExclusiveLevelAlarmType_Retain = 10072, - NonExclusiveLevelAlarmType_EnabledState = 10073, - NonExclusiveLevelAlarmType_EnabledState_Id = 10074, - NonExclusiveLevelAlarmType_EnabledState_Name = 10075, - NonExclusiveLevelAlarmType_EnabledState_Number = 10076, - NonExclusiveLevelAlarmType_EnabledState_EffectiveDisplayName = 10077, - NonExclusiveLevelAlarmType_EnabledState_TransitionTime = 10078, - NonExclusiveLevelAlarmType_EnabledState_EffectiveTransitionTime = 10079, - NonExclusiveLevelAlarmType_EnabledState_TrueState = 10080, - NonExclusiveLevelAlarmType_EnabledState_FalseState = 10081, - NonExclusiveLevelAlarmType_Quality = 10082, - NonExclusiveLevelAlarmType_Quality_SourceTimestamp = 10083, - NonExclusiveLevelAlarmType_LastSeverity = 10084, - NonExclusiveLevelAlarmType_LastSeverity_SourceTimestamp = 10085, - NonExclusiveLevelAlarmType_Comment = 10086, - NonExclusiveLevelAlarmType_Comment_SourceTimestamp = 10087, - NonExclusiveLevelAlarmType_ClientUserId = 10088, - NonExclusiveLevelAlarmType_Enable = 10089, - NonExclusiveLevelAlarmType_Disable = 10090, - NonExclusiveLevelAlarmType_AddComment = 10091, - NonExclusiveLevelAlarmType_AddComment_InputArguments = 10092, - NonExclusiveLevelAlarmType_ConditionRefresh = 10093, - NonExclusiveLevelAlarmType_ConditionRefresh_InputArguments = 10094, - NonExclusiveLevelAlarmType_AckedState = 10095, - NonExclusiveLevelAlarmType_AckedState_Id = 10096, - NonExclusiveLevelAlarmType_AckedState_Name = 10097, - NonExclusiveLevelAlarmType_AckedState_Number = 10098, - NonExclusiveLevelAlarmType_AckedState_EffectiveDisplayName = 10099, - NonExclusiveLevelAlarmType_AckedState_TransitionTime = 10100, - NonExclusiveLevelAlarmType_AckedState_EffectiveTransitionTime = 10101, - NonExclusiveLevelAlarmType_AckedState_TrueState = 10102, - NonExclusiveLevelAlarmType_AckedState_FalseState = 10103, - NonExclusiveLevelAlarmType_ConfirmedState = 10104, - NonExclusiveLevelAlarmType_ConfirmedState_Id = 10105, - NonExclusiveLevelAlarmType_ConfirmedState_Name = 10106, - NonExclusiveLevelAlarmType_ConfirmedState_Number = 10107, - NonExclusiveLevelAlarmType_ConfirmedState_EffectiveDisplayName = 10108, - NonExclusiveLevelAlarmType_ConfirmedState_TransitionTime = 10109, - NonExclusiveLevelAlarmType_ConfirmedState_EffectiveTransitionTime = 10110, - NonExclusiveLevelAlarmType_ConfirmedState_TrueState = 10111, - NonExclusiveLevelAlarmType_ConfirmedState_FalseState = 10112, - NonExclusiveLevelAlarmType_Acknowledge = 10113, - NonExclusiveLevelAlarmType_Acknowledge_InputArguments = 10114, - NonExclusiveLevelAlarmType_Confirm = 10115, - NonExclusiveLevelAlarmType_Confirm_InputArguments = 10116, - NonExclusiveLevelAlarmType_ActiveState = 10117, - NonExclusiveLevelAlarmType_ActiveState_Id = 10118, - NonExclusiveLevelAlarmType_ActiveState_Name = 10119, - NonExclusiveLevelAlarmType_ActiveState_Number = 10120, - NonExclusiveLevelAlarmType_ActiveState_EffectiveDisplayName = 10121, - NonExclusiveLevelAlarmType_ActiveState_TransitionTime = 10122, - NonExclusiveLevelAlarmType_ActiveState_EffectiveTransitionTime = 10123, - NonExclusiveLevelAlarmType_ActiveState_TrueState = 10124, - NonExclusiveLevelAlarmType_ActiveState_FalseState = 10125, - NonExclusiveLevelAlarmType_SuppressedState = 10126, - NonExclusiveLevelAlarmType_SuppressedState_Id = 10127, - NonExclusiveLevelAlarmType_SuppressedState_Name = 10128, - NonExclusiveLevelAlarmType_SuppressedState_Number = 10129, - NonExclusiveLevelAlarmType_SuppressedState_EffectiveDisplayName = 10130, - NonExclusiveLevelAlarmType_SuppressedState_TransitionTime = 10131, - NonExclusiveLevelAlarmType_SuppressedState_EffectiveTransitionTime = 10132, - NonExclusiveLevelAlarmType_SuppressedState_TrueState = 10133, - NonExclusiveLevelAlarmType_SuppressedState_FalseState = 10134, - NonExclusiveLevelAlarmType_ShelvingState = 10135, - NonExclusiveLevelAlarmType_ShelvingState_CurrentState = 10136, - NonExclusiveLevelAlarmType_ShelvingState_CurrentState_Id = 10137, - NonExclusiveLevelAlarmType_ShelvingState_CurrentState_Name = 10138, - NonExclusiveLevelAlarmType_ShelvingState_CurrentState_Number = 10139, - NonExclusiveLevelAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 10140, - NonExclusiveLevelAlarmType_ShelvingState_LastTransition = 10141, - NonExclusiveLevelAlarmType_ShelvingState_LastTransition_Id = 10142, - NonExclusiveLevelAlarmType_ShelvingState_LastTransition_Name = 10143, - NonExclusiveLevelAlarmType_ShelvingState_LastTransition_Number = 10144, - NonExclusiveLevelAlarmType_ShelvingState_LastTransition_TransitionTime = 10145, - NonExclusiveLevelAlarmType_ShelvingState_UnshelveTime = 10146, - NonExclusiveLevelAlarmType_ShelvingState_Unshelve = 10168, - NonExclusiveLevelAlarmType_ShelvingState_OneShotShelve = 10169, - NonExclusiveLevelAlarmType_ShelvingState_TimedShelve = 10170, - NonExclusiveLevelAlarmType_ShelvingState_TimedShelve_InputArguments = 10171, - NonExclusiveLevelAlarmType_SuppressedOrShelved = 10172, - NonExclusiveLevelAlarmType_MaxTimeShelved = 10173, - NonExclusiveLevelAlarmType_HighHighState = 10174, - NonExclusiveLevelAlarmType_HighHighState_Id = 10175, - NonExclusiveLevelAlarmType_HighHighState_Name = 10176, - NonExclusiveLevelAlarmType_HighHighState_Number = 10177, - NonExclusiveLevelAlarmType_HighHighState_EffectiveDisplayName = 10178, - NonExclusiveLevelAlarmType_HighHighState_TransitionTime = 10179, - NonExclusiveLevelAlarmType_HighHighState_EffectiveTransitionTime = 10180, - NonExclusiveLevelAlarmType_HighHighState_TrueState = 10181, - NonExclusiveLevelAlarmType_HighHighState_FalseState = 10182, - NonExclusiveLevelAlarmType_HighState = 10183, - NonExclusiveLevelAlarmType_HighState_Id = 10184, - NonExclusiveLevelAlarmType_HighState_Name = 10185, - NonExclusiveLevelAlarmType_HighState_Number = 10186, - NonExclusiveLevelAlarmType_HighState_EffectiveDisplayName = 10187, - NonExclusiveLevelAlarmType_HighState_TransitionTime = 10188, - NonExclusiveLevelAlarmType_HighState_EffectiveTransitionTime = 10189, - NonExclusiveLevelAlarmType_HighState_TrueState = 10190, - NonExclusiveLevelAlarmType_HighState_FalseState = 10191, - NonExclusiveLevelAlarmType_LowState = 10192, - NonExclusiveLevelAlarmType_LowState_Id = 10193, - NonExclusiveLevelAlarmType_LowState_Name = 10194, - NonExclusiveLevelAlarmType_LowState_Number = 10195, - NonExclusiveLevelAlarmType_LowState_EffectiveDisplayName = 10196, - NonExclusiveLevelAlarmType_LowState_TransitionTime = 10197, - NonExclusiveLevelAlarmType_LowState_EffectiveTransitionTime = 10198, - NonExclusiveLevelAlarmType_LowState_TrueState = 10199, - NonExclusiveLevelAlarmType_LowState_FalseState = 10200, - NonExclusiveLevelAlarmType_LowLowState = 10201, - NonExclusiveLevelAlarmType_LowLowState_Id = 10202, - NonExclusiveLevelAlarmType_LowLowState_Name = 10203, - NonExclusiveLevelAlarmType_LowLowState_Number = 10204, - NonExclusiveLevelAlarmType_LowLowState_EffectiveDisplayName = 10205, - NonExclusiveLevelAlarmType_LowLowState_TransitionTime = 10206, - NonExclusiveLevelAlarmType_LowLowState_EffectiveTransitionTime = 10207, - NonExclusiveLevelAlarmType_LowLowState_TrueState = 10208, - NonExclusiveLevelAlarmType_LowLowState_FalseState = 10209, - NonExclusiveLevelAlarmType_HighHighLimit = 10210, - NonExclusiveLevelAlarmType_HighLimit = 10211, - NonExclusiveLevelAlarmType_LowLimit = 10212, - NonExclusiveLevelAlarmType_LowLowLimit = 10213, - NonExclusiveRateOfChangeAlarmType = 10214, - NonExclusiveRateOfChangeAlarmType_EventId = 10215, - NonExclusiveRateOfChangeAlarmType_EventType = 10216, - NonExclusiveRateOfChangeAlarmType_SourceNode = 10217, - NonExclusiveRateOfChangeAlarmType_SourceName = 10218, - NonExclusiveRateOfChangeAlarmType_Time = 10219, - NonExclusiveRateOfChangeAlarmType_ReceiveTime = 10220, - NonExclusiveRateOfChangeAlarmType_LocalTime = 10221, - NonExclusiveRateOfChangeAlarmType_Message = 10222, - NonExclusiveRateOfChangeAlarmType_Severity = 10223, - NonExclusiveRateOfChangeAlarmType_ConditionName = 10224, - NonExclusiveRateOfChangeAlarmType_BranchId = 10225, - NonExclusiveRateOfChangeAlarmType_Retain = 10226, - NonExclusiveRateOfChangeAlarmType_EnabledState = 10227, - NonExclusiveRateOfChangeAlarmType_EnabledState_Id = 10228, - NonExclusiveRateOfChangeAlarmType_EnabledState_Name = 10229, - NonExclusiveRateOfChangeAlarmType_EnabledState_Number = 10230, - NonExclusiveRateOfChangeAlarmType_EnabledState_EffectiveDisplayName = 10231, - NonExclusiveRateOfChangeAlarmType_EnabledState_TransitionTime = 10232, - NonExclusiveRateOfChangeAlarmType_EnabledState_EffectiveTransitionTime = 10233, - NonExclusiveRateOfChangeAlarmType_EnabledState_TrueState = 10234, - NonExclusiveRateOfChangeAlarmType_EnabledState_FalseState = 10235, - NonExclusiveRateOfChangeAlarmType_Quality = 10236, - NonExclusiveRateOfChangeAlarmType_Quality_SourceTimestamp = 10237, - NonExclusiveRateOfChangeAlarmType_LastSeverity = 10238, - NonExclusiveRateOfChangeAlarmType_LastSeverity_SourceTimestamp = 10239, - NonExclusiveRateOfChangeAlarmType_Comment = 10240, - NonExclusiveRateOfChangeAlarmType_Comment_SourceTimestamp = 10241, - NonExclusiveRateOfChangeAlarmType_ClientUserId = 10242, - NonExclusiveRateOfChangeAlarmType_Enable = 10243, - NonExclusiveRateOfChangeAlarmType_Disable = 10244, - NonExclusiveRateOfChangeAlarmType_AddComment = 10245, - NonExclusiveRateOfChangeAlarmType_AddComment_InputArguments = 10246, - NonExclusiveRateOfChangeAlarmType_ConditionRefresh = 10247, - NonExclusiveRateOfChangeAlarmType_ConditionRefresh_InputArguments = 10248, - NonExclusiveRateOfChangeAlarmType_AckedState = 10249, - NonExclusiveRateOfChangeAlarmType_AckedState_Id = 10250, - NonExclusiveRateOfChangeAlarmType_AckedState_Name = 10251, - NonExclusiveRateOfChangeAlarmType_AckedState_Number = 10252, - NonExclusiveRateOfChangeAlarmType_AckedState_EffectiveDisplayName = 10253, - NonExclusiveRateOfChangeAlarmType_AckedState_TransitionTime = 10254, - NonExclusiveRateOfChangeAlarmType_AckedState_EffectiveTransitionTime = 10255, - NonExclusiveRateOfChangeAlarmType_AckedState_TrueState = 10256, - NonExclusiveRateOfChangeAlarmType_AckedState_FalseState = 10257, - NonExclusiveRateOfChangeAlarmType_ConfirmedState = 10258, - NonExclusiveRateOfChangeAlarmType_ConfirmedState_Id = 10259, - NonExclusiveRateOfChangeAlarmType_ConfirmedState_Name = 10260, - NonExclusiveRateOfChangeAlarmType_ConfirmedState_Number = 10261, - NonExclusiveRateOfChangeAlarmType_ConfirmedState_EffectiveDisplayName = 10262, - NonExclusiveRateOfChangeAlarmType_ConfirmedState_TransitionTime = 10263, - NonExclusiveRateOfChangeAlarmType_ConfirmedState_EffectiveTransitionTime = 10264, - NonExclusiveRateOfChangeAlarmType_ConfirmedState_TrueState = 10265, - NonExclusiveRateOfChangeAlarmType_ConfirmedState_FalseState = 10266, - NonExclusiveRateOfChangeAlarmType_Acknowledge = 10267, - NonExclusiveRateOfChangeAlarmType_Acknowledge_InputArguments = 10268, - NonExclusiveRateOfChangeAlarmType_Confirm = 10269, - NonExclusiveRateOfChangeAlarmType_Confirm_InputArguments = 10270, - NonExclusiveRateOfChangeAlarmType_ActiveState = 10271, - NonExclusiveRateOfChangeAlarmType_ActiveState_Id = 10272, - NonExclusiveRateOfChangeAlarmType_ActiveState_Name = 10273, - NonExclusiveRateOfChangeAlarmType_ActiveState_Number = 10274, - NonExclusiveRateOfChangeAlarmType_ActiveState_EffectiveDisplayName = 10275, - NonExclusiveRateOfChangeAlarmType_ActiveState_TransitionTime = 10276, - NonExclusiveRateOfChangeAlarmType_ActiveState_EffectiveTransitionTime = 10277, - NonExclusiveRateOfChangeAlarmType_ActiveState_TrueState = 10278, - NonExclusiveRateOfChangeAlarmType_ActiveState_FalseState = 10279, - NonExclusiveRateOfChangeAlarmType_SuppressedState = 10280, - NonExclusiveRateOfChangeAlarmType_SuppressedState_Id = 10281, - NonExclusiveRateOfChangeAlarmType_SuppressedState_Name = 10282, - NonExclusiveRateOfChangeAlarmType_SuppressedState_Number = 10283, - NonExclusiveRateOfChangeAlarmType_SuppressedState_EffectiveDisplayName = 10284, - NonExclusiveRateOfChangeAlarmType_SuppressedState_TransitionTime = 10285, - NonExclusiveRateOfChangeAlarmType_SuppressedState_EffectiveTransitionTime = 10286, - NonExclusiveRateOfChangeAlarmType_SuppressedState_TrueState = 10287, - NonExclusiveRateOfChangeAlarmType_SuppressedState_FalseState = 10288, - NonExclusiveRateOfChangeAlarmType_ShelvingState = 10289, - NonExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState = 10290, - NonExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_Id = 10291, - NonExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_Name = 10292, - NonExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_Number = 10293, - NonExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 10294, - NonExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition = 10295, - NonExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_Id = 10296, - NonExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_Name = 10297, - NonExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_Number = 10298, - NonExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_TransitionTime = 10299, - NonExclusiveRateOfChangeAlarmType_ShelvingState_UnshelveTime = 10300, - NonExclusiveRateOfChangeAlarmType_ShelvingState_Unshelve = 10322, - NonExclusiveRateOfChangeAlarmType_ShelvingState_OneShotShelve = 10323, - NonExclusiveRateOfChangeAlarmType_ShelvingState_TimedShelve = 10324, - NonExclusiveRateOfChangeAlarmType_ShelvingState_TimedShelve_InputArguments = 10325, - NonExclusiveRateOfChangeAlarmType_SuppressedOrShelved = 10326, - NonExclusiveRateOfChangeAlarmType_MaxTimeShelved = 10327, - NonExclusiveRateOfChangeAlarmType_HighHighState = 10328, - NonExclusiveRateOfChangeAlarmType_HighHighState_Id = 10329, - NonExclusiveRateOfChangeAlarmType_HighHighState_Name = 10330, - NonExclusiveRateOfChangeAlarmType_HighHighState_Number = 10331, - NonExclusiveRateOfChangeAlarmType_HighHighState_EffectiveDisplayName = 10332, - NonExclusiveRateOfChangeAlarmType_HighHighState_TransitionTime = 10333, - NonExclusiveRateOfChangeAlarmType_HighHighState_EffectiveTransitionTime = 10334, - NonExclusiveRateOfChangeAlarmType_HighHighState_TrueState = 10335, - NonExclusiveRateOfChangeAlarmType_HighHighState_FalseState = 10336, - NonExclusiveRateOfChangeAlarmType_HighState = 10337, - NonExclusiveRateOfChangeAlarmType_HighState_Id = 10338, - NonExclusiveRateOfChangeAlarmType_HighState_Name = 10339, - NonExclusiveRateOfChangeAlarmType_HighState_Number = 10340, - NonExclusiveRateOfChangeAlarmType_HighState_EffectiveDisplayName = 10341, - NonExclusiveRateOfChangeAlarmType_HighState_TransitionTime = 10342, - NonExclusiveRateOfChangeAlarmType_HighState_EffectiveTransitionTime = 10343, - NonExclusiveRateOfChangeAlarmType_HighState_TrueState = 10344, - NonExclusiveRateOfChangeAlarmType_HighState_FalseState = 10345, - NonExclusiveRateOfChangeAlarmType_LowState = 10346, - NonExclusiveRateOfChangeAlarmType_LowState_Id = 10347, - NonExclusiveRateOfChangeAlarmType_LowState_Name = 10348, - NonExclusiveRateOfChangeAlarmType_LowState_Number = 10349, - NonExclusiveRateOfChangeAlarmType_LowState_EffectiveDisplayName = 10350, - NonExclusiveRateOfChangeAlarmType_LowState_TransitionTime = 10351, - NonExclusiveRateOfChangeAlarmType_LowState_EffectiveTransitionTime = 10352, - NonExclusiveRateOfChangeAlarmType_LowState_TrueState = 10353, - NonExclusiveRateOfChangeAlarmType_LowState_FalseState = 10354, - NonExclusiveRateOfChangeAlarmType_LowLowState = 10355, - NonExclusiveRateOfChangeAlarmType_LowLowState_Id = 10356, - NonExclusiveRateOfChangeAlarmType_LowLowState_Name = 10357, - NonExclusiveRateOfChangeAlarmType_LowLowState_Number = 10358, - NonExclusiveRateOfChangeAlarmType_LowLowState_EffectiveDisplayName = 10359, - NonExclusiveRateOfChangeAlarmType_LowLowState_TransitionTime = 10360, - NonExclusiveRateOfChangeAlarmType_LowLowState_EffectiveTransitionTime = 10361, - NonExclusiveRateOfChangeAlarmType_LowLowState_TrueState = 10362, - NonExclusiveRateOfChangeAlarmType_LowLowState_FalseState = 10363, - NonExclusiveRateOfChangeAlarmType_HighHighLimit = 10364, - NonExclusiveRateOfChangeAlarmType_HighLimit = 10365, - NonExclusiveRateOfChangeAlarmType_LowLimit = 10366, - NonExclusiveRateOfChangeAlarmType_LowLowLimit = 10367, - NonExclusiveDeviationAlarmType = 10368, - NonExclusiveDeviationAlarmType_EventId = 10369, - NonExclusiveDeviationAlarmType_EventType = 10370, - NonExclusiveDeviationAlarmType_SourceNode = 10371, - NonExclusiveDeviationAlarmType_SourceName = 10372, - NonExclusiveDeviationAlarmType_Time = 10373, - NonExclusiveDeviationAlarmType_ReceiveTime = 10374, - NonExclusiveDeviationAlarmType_LocalTime = 10375, - NonExclusiveDeviationAlarmType_Message = 10376, - NonExclusiveDeviationAlarmType_Severity = 10377, - NonExclusiveDeviationAlarmType_ConditionName = 10378, - NonExclusiveDeviationAlarmType_BranchId = 10379, - NonExclusiveDeviationAlarmType_Retain = 10380, - NonExclusiveDeviationAlarmType_EnabledState = 10381, - NonExclusiveDeviationAlarmType_EnabledState_Id = 10382, - NonExclusiveDeviationAlarmType_EnabledState_Name = 10383, - NonExclusiveDeviationAlarmType_EnabledState_Number = 10384, - NonExclusiveDeviationAlarmType_EnabledState_EffectiveDisplayName = 10385, - NonExclusiveDeviationAlarmType_EnabledState_TransitionTime = 10386, - NonExclusiveDeviationAlarmType_EnabledState_EffectiveTransitionTime = 10387, - NonExclusiveDeviationAlarmType_EnabledState_TrueState = 10388, - NonExclusiveDeviationAlarmType_EnabledState_FalseState = 10389, - NonExclusiveDeviationAlarmType_Quality = 10390, - NonExclusiveDeviationAlarmType_Quality_SourceTimestamp = 10391, - NonExclusiveDeviationAlarmType_LastSeverity = 10392, - NonExclusiveDeviationAlarmType_LastSeverity_SourceTimestamp = 10393, - NonExclusiveDeviationAlarmType_Comment = 10394, - NonExclusiveDeviationAlarmType_Comment_SourceTimestamp = 10395, - NonExclusiveDeviationAlarmType_ClientUserId = 10396, - NonExclusiveDeviationAlarmType_Enable = 10397, - NonExclusiveDeviationAlarmType_Disable = 10398, - NonExclusiveDeviationAlarmType_AddComment = 10399, - NonExclusiveDeviationAlarmType_AddComment_InputArguments = 10400, - NonExclusiveDeviationAlarmType_ConditionRefresh = 10401, - NonExclusiveDeviationAlarmType_ConditionRefresh_InputArguments = 10402, - NonExclusiveDeviationAlarmType_AckedState = 10403, - NonExclusiveDeviationAlarmType_AckedState_Id = 10404, - NonExclusiveDeviationAlarmType_AckedState_Name = 10405, - NonExclusiveDeviationAlarmType_AckedState_Number = 10406, - NonExclusiveDeviationAlarmType_AckedState_EffectiveDisplayName = 10407, - NonExclusiveDeviationAlarmType_AckedState_TransitionTime = 10408, - NonExclusiveDeviationAlarmType_AckedState_EffectiveTransitionTime = 10409, - NonExclusiveDeviationAlarmType_AckedState_TrueState = 10410, - NonExclusiveDeviationAlarmType_AckedState_FalseState = 10411, - NonExclusiveDeviationAlarmType_ConfirmedState = 10412, - NonExclusiveDeviationAlarmType_ConfirmedState_Id = 10413, - NonExclusiveDeviationAlarmType_ConfirmedState_Name = 10414, - NonExclusiveDeviationAlarmType_ConfirmedState_Number = 10415, - NonExclusiveDeviationAlarmType_ConfirmedState_EffectiveDisplayName = 10416, - NonExclusiveDeviationAlarmType_ConfirmedState_TransitionTime = 10417, - NonExclusiveDeviationAlarmType_ConfirmedState_EffectiveTransitionTime = 10418, - NonExclusiveDeviationAlarmType_ConfirmedState_TrueState = 10419, - NonExclusiveDeviationAlarmType_ConfirmedState_FalseState = 10420, - NonExclusiveDeviationAlarmType_Acknowledge = 10421, - NonExclusiveDeviationAlarmType_Acknowledge_InputArguments = 10422, - NonExclusiveDeviationAlarmType_Confirm = 10423, - NonExclusiveDeviationAlarmType_Confirm_InputArguments = 10424, - NonExclusiveDeviationAlarmType_ActiveState = 10425, - NonExclusiveDeviationAlarmType_ActiveState_Id = 10426, - NonExclusiveDeviationAlarmType_ActiveState_Name = 10427, - NonExclusiveDeviationAlarmType_ActiveState_Number = 10428, - NonExclusiveDeviationAlarmType_ActiveState_EffectiveDisplayName = 10429, - NonExclusiveDeviationAlarmType_ActiveState_TransitionTime = 10430, - NonExclusiveDeviationAlarmType_ActiveState_EffectiveTransitionTime = 10431, - NonExclusiveDeviationAlarmType_ActiveState_TrueState = 10432, - NonExclusiveDeviationAlarmType_ActiveState_FalseState = 10433, - NonExclusiveDeviationAlarmType_SuppressedState = 10434, - NonExclusiveDeviationAlarmType_SuppressedState_Id = 10435, - NonExclusiveDeviationAlarmType_SuppressedState_Name = 10436, - NonExclusiveDeviationAlarmType_SuppressedState_Number = 10437, - NonExclusiveDeviationAlarmType_SuppressedState_EffectiveDisplayName = 10438, - NonExclusiveDeviationAlarmType_SuppressedState_TransitionTime = 10439, - NonExclusiveDeviationAlarmType_SuppressedState_EffectiveTransitionTime = 10440, - NonExclusiveDeviationAlarmType_SuppressedState_TrueState = 10441, - NonExclusiveDeviationAlarmType_SuppressedState_FalseState = 10442, - NonExclusiveDeviationAlarmType_ShelvingState = 10443, - NonExclusiveDeviationAlarmType_ShelvingState_CurrentState = 10444, - NonExclusiveDeviationAlarmType_ShelvingState_CurrentState_Id = 10445, - NonExclusiveDeviationAlarmType_ShelvingState_CurrentState_Name = 10446, - NonExclusiveDeviationAlarmType_ShelvingState_CurrentState_Number = 10447, - NonExclusiveDeviationAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 10448, - NonExclusiveDeviationAlarmType_ShelvingState_LastTransition = 10449, - NonExclusiveDeviationAlarmType_ShelvingState_LastTransition_Id = 10450, - NonExclusiveDeviationAlarmType_ShelvingState_LastTransition_Name = 10451, - NonExclusiveDeviationAlarmType_ShelvingState_LastTransition_Number = 10452, - NonExclusiveDeviationAlarmType_ShelvingState_LastTransition_TransitionTime = 10453, - NonExclusiveDeviationAlarmType_ShelvingState_UnshelveTime = 10454, - NonExclusiveDeviationAlarmType_ShelvingState_Unshelve = 10476, - NonExclusiveDeviationAlarmType_ShelvingState_OneShotShelve = 10477, - NonExclusiveDeviationAlarmType_ShelvingState_TimedShelve = 10478, - NonExclusiveDeviationAlarmType_ShelvingState_TimedShelve_InputArguments = 10479, - NonExclusiveDeviationAlarmType_SuppressedOrShelved = 10480, - NonExclusiveDeviationAlarmType_MaxTimeShelved = 10481, - NonExclusiveDeviationAlarmType_HighHighState = 10482, - NonExclusiveDeviationAlarmType_HighHighState_Id = 10483, - NonExclusiveDeviationAlarmType_HighHighState_Name = 10484, - NonExclusiveDeviationAlarmType_HighHighState_Number = 10485, - NonExclusiveDeviationAlarmType_HighHighState_EffectiveDisplayName = 10486, - NonExclusiveDeviationAlarmType_HighHighState_TransitionTime = 10487, - NonExclusiveDeviationAlarmType_HighHighState_EffectiveTransitionTime = 10488, - NonExclusiveDeviationAlarmType_HighHighState_TrueState = 10489, - NonExclusiveDeviationAlarmType_HighHighState_FalseState = 10490, - NonExclusiveDeviationAlarmType_HighState = 10491, - NonExclusiveDeviationAlarmType_HighState_Id = 10492, - NonExclusiveDeviationAlarmType_HighState_Name = 10493, - NonExclusiveDeviationAlarmType_HighState_Number = 10494, - NonExclusiveDeviationAlarmType_HighState_EffectiveDisplayName = 10495, - NonExclusiveDeviationAlarmType_HighState_TransitionTime = 10496, - NonExclusiveDeviationAlarmType_HighState_EffectiveTransitionTime = 10497, - NonExclusiveDeviationAlarmType_HighState_TrueState = 10498, - NonExclusiveDeviationAlarmType_HighState_FalseState = 10499, - NonExclusiveDeviationAlarmType_LowState = 10500, - NonExclusiveDeviationAlarmType_LowState_Id = 10501, - NonExclusiveDeviationAlarmType_LowState_Name = 10502, - NonExclusiveDeviationAlarmType_LowState_Number = 10503, - NonExclusiveDeviationAlarmType_LowState_EffectiveDisplayName = 10504, - NonExclusiveDeviationAlarmType_LowState_TransitionTime = 10505, - NonExclusiveDeviationAlarmType_LowState_EffectiveTransitionTime = 10506, - NonExclusiveDeviationAlarmType_LowState_TrueState = 10507, - NonExclusiveDeviationAlarmType_LowState_FalseState = 10508, - NonExclusiveDeviationAlarmType_LowLowState = 10509, - NonExclusiveDeviationAlarmType_LowLowState_Id = 10510, - NonExclusiveDeviationAlarmType_LowLowState_Name = 10511, - NonExclusiveDeviationAlarmType_LowLowState_Number = 10512, - NonExclusiveDeviationAlarmType_LowLowState_EffectiveDisplayName = 10513, - NonExclusiveDeviationAlarmType_LowLowState_TransitionTime = 10514, - NonExclusiveDeviationAlarmType_LowLowState_EffectiveTransitionTime = 10515, - NonExclusiveDeviationAlarmType_LowLowState_TrueState = 10516, - NonExclusiveDeviationAlarmType_LowLowState_FalseState = 10517, - NonExclusiveDeviationAlarmType_HighHighLimit = 10518, - NonExclusiveDeviationAlarmType_HighLimit = 10519, - NonExclusiveDeviationAlarmType_LowLimit = 10520, - NonExclusiveDeviationAlarmType_LowLowLimit = 10521, - NonExclusiveDeviationAlarmType_SetpointNode = 10522, - DiscreteAlarmType = 10523, - DiscreteAlarmType_EventId = 10524, - DiscreteAlarmType_EventType = 10525, - DiscreteAlarmType_SourceNode = 10526, - DiscreteAlarmType_SourceName = 10527, - DiscreteAlarmType_Time = 10528, - DiscreteAlarmType_ReceiveTime = 10529, - DiscreteAlarmType_LocalTime = 10530, - DiscreteAlarmType_Message = 10531, - DiscreteAlarmType_Severity = 10532, - DiscreteAlarmType_ConditionName = 10533, - DiscreteAlarmType_BranchId = 10534, - DiscreteAlarmType_Retain = 10535, - DiscreteAlarmType_EnabledState = 10536, - DiscreteAlarmType_EnabledState_Id = 10537, - DiscreteAlarmType_EnabledState_Name = 10538, - DiscreteAlarmType_EnabledState_Number = 10539, - DiscreteAlarmType_EnabledState_EffectiveDisplayName = 10540, - DiscreteAlarmType_EnabledState_TransitionTime = 10541, - DiscreteAlarmType_EnabledState_EffectiveTransitionTime = 10542, - DiscreteAlarmType_EnabledState_TrueState = 10543, - DiscreteAlarmType_EnabledState_FalseState = 10544, - DiscreteAlarmType_Quality = 10545, - DiscreteAlarmType_Quality_SourceTimestamp = 10546, - DiscreteAlarmType_LastSeverity = 10547, - DiscreteAlarmType_LastSeverity_SourceTimestamp = 10548, - DiscreteAlarmType_Comment = 10549, - DiscreteAlarmType_Comment_SourceTimestamp = 10550, - DiscreteAlarmType_ClientUserId = 10551, - DiscreteAlarmType_Enable = 10552, - DiscreteAlarmType_Disable = 10553, - DiscreteAlarmType_AddComment = 10554, - DiscreteAlarmType_AddComment_InputArguments = 10555, - DiscreteAlarmType_ConditionRefresh = 10556, - DiscreteAlarmType_ConditionRefresh_InputArguments = 10557, - DiscreteAlarmType_AckedState = 10558, - DiscreteAlarmType_AckedState_Id = 10559, - DiscreteAlarmType_AckedState_Name = 10560, - DiscreteAlarmType_AckedState_Number = 10561, - DiscreteAlarmType_AckedState_EffectiveDisplayName = 10562, - DiscreteAlarmType_AckedState_TransitionTime = 10563, - DiscreteAlarmType_AckedState_EffectiveTransitionTime = 10564, - DiscreteAlarmType_AckedState_TrueState = 10565, - DiscreteAlarmType_AckedState_FalseState = 10566, - DiscreteAlarmType_ConfirmedState = 10567, - DiscreteAlarmType_ConfirmedState_Id = 10568, - DiscreteAlarmType_ConfirmedState_Name = 10569, - DiscreteAlarmType_ConfirmedState_Number = 10570, - DiscreteAlarmType_ConfirmedState_EffectiveDisplayName = 10571, - DiscreteAlarmType_ConfirmedState_TransitionTime = 10572, - DiscreteAlarmType_ConfirmedState_EffectiveTransitionTime = 10573, - DiscreteAlarmType_ConfirmedState_TrueState = 10574, - DiscreteAlarmType_ConfirmedState_FalseState = 10575, - DiscreteAlarmType_Acknowledge = 10576, - DiscreteAlarmType_Acknowledge_InputArguments = 10577, - DiscreteAlarmType_Confirm = 10578, - DiscreteAlarmType_Confirm_InputArguments = 10579, - DiscreteAlarmType_ActiveState = 10580, - DiscreteAlarmType_ActiveState_Id = 10581, - DiscreteAlarmType_ActiveState_Name = 10582, - DiscreteAlarmType_ActiveState_Number = 10583, - DiscreteAlarmType_ActiveState_EffectiveDisplayName = 10584, - DiscreteAlarmType_ActiveState_TransitionTime = 10585, - DiscreteAlarmType_ActiveState_EffectiveTransitionTime = 10586, - DiscreteAlarmType_ActiveState_TrueState = 10587, - DiscreteAlarmType_ActiveState_FalseState = 10588, - DiscreteAlarmType_SuppressedState = 10589, - DiscreteAlarmType_SuppressedState_Id = 10590, - DiscreteAlarmType_SuppressedState_Name = 10591, - DiscreteAlarmType_SuppressedState_Number = 10592, - DiscreteAlarmType_SuppressedState_EffectiveDisplayName = 10593, - DiscreteAlarmType_SuppressedState_TransitionTime = 10594, - DiscreteAlarmType_SuppressedState_EffectiveTransitionTime = 10595, - DiscreteAlarmType_SuppressedState_TrueState = 10596, - DiscreteAlarmType_SuppressedState_FalseState = 10597, - DiscreteAlarmType_ShelvingState = 10598, - DiscreteAlarmType_ShelvingState_CurrentState = 10599, - DiscreteAlarmType_ShelvingState_CurrentState_Id = 10600, - DiscreteAlarmType_ShelvingState_CurrentState_Name = 10601, - DiscreteAlarmType_ShelvingState_CurrentState_Number = 10602, - DiscreteAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 10603, - DiscreteAlarmType_ShelvingState_LastTransition = 10604, - DiscreteAlarmType_ShelvingState_LastTransition_Id = 10605, - DiscreteAlarmType_ShelvingState_LastTransition_Name = 10606, - DiscreteAlarmType_ShelvingState_LastTransition_Number = 10607, - DiscreteAlarmType_ShelvingState_LastTransition_TransitionTime = 10608, - DiscreteAlarmType_ShelvingState_UnshelveTime = 10609, - DiscreteAlarmType_ShelvingState_Unshelve = 10631, - DiscreteAlarmType_ShelvingState_OneShotShelve = 10632, - DiscreteAlarmType_ShelvingState_TimedShelve = 10633, - DiscreteAlarmType_ShelvingState_TimedShelve_InputArguments = 10634, - DiscreteAlarmType_SuppressedOrShelved = 10635, - DiscreteAlarmType_MaxTimeShelved = 10636, - OffNormalAlarmType = 10637, - OffNormalAlarmType_EventId = 10638, - OffNormalAlarmType_EventType = 10639, - OffNormalAlarmType_SourceNode = 10640, - OffNormalAlarmType_SourceName = 10641, - OffNormalAlarmType_Time = 10642, - OffNormalAlarmType_ReceiveTime = 10643, - OffNormalAlarmType_LocalTime = 10644, - OffNormalAlarmType_Message = 10645, - OffNormalAlarmType_Severity = 10646, - OffNormalAlarmType_ConditionName = 10647, - OffNormalAlarmType_BranchId = 10648, - OffNormalAlarmType_Retain = 10649, - OffNormalAlarmType_EnabledState = 10650, - OffNormalAlarmType_EnabledState_Id = 10651, - OffNormalAlarmType_EnabledState_Name = 10652, - OffNormalAlarmType_EnabledState_Number = 10653, - OffNormalAlarmType_EnabledState_EffectiveDisplayName = 10654, - OffNormalAlarmType_EnabledState_TransitionTime = 10655, - OffNormalAlarmType_EnabledState_EffectiveTransitionTime = 10656, - OffNormalAlarmType_EnabledState_TrueState = 10657, - OffNormalAlarmType_EnabledState_FalseState = 10658, - OffNormalAlarmType_Quality = 10659, - OffNormalAlarmType_Quality_SourceTimestamp = 10660, - OffNormalAlarmType_LastSeverity = 10661, - OffNormalAlarmType_LastSeverity_SourceTimestamp = 10662, - OffNormalAlarmType_Comment = 10663, - OffNormalAlarmType_Comment_SourceTimestamp = 10664, - OffNormalAlarmType_ClientUserId = 10665, - OffNormalAlarmType_Enable = 10666, - OffNormalAlarmType_Disable = 10667, - OffNormalAlarmType_AddComment = 10668, - OffNormalAlarmType_AddComment_InputArguments = 10669, - OffNormalAlarmType_ConditionRefresh = 10670, - OffNormalAlarmType_ConditionRefresh_InputArguments = 10671, - OffNormalAlarmType_AckedState = 10672, - OffNormalAlarmType_AckedState_Id = 10673, - OffNormalAlarmType_AckedState_Name = 10674, - OffNormalAlarmType_AckedState_Number = 10675, - OffNormalAlarmType_AckedState_EffectiveDisplayName = 10676, - OffNormalAlarmType_AckedState_TransitionTime = 10677, - OffNormalAlarmType_AckedState_EffectiveTransitionTime = 10678, - OffNormalAlarmType_AckedState_TrueState = 10679, - OffNormalAlarmType_AckedState_FalseState = 10680, - OffNormalAlarmType_ConfirmedState = 10681, - OffNormalAlarmType_ConfirmedState_Id = 10682, - OffNormalAlarmType_ConfirmedState_Name = 10683, - OffNormalAlarmType_ConfirmedState_Number = 10684, - OffNormalAlarmType_ConfirmedState_EffectiveDisplayName = 10685, - OffNormalAlarmType_ConfirmedState_TransitionTime = 10686, - OffNormalAlarmType_ConfirmedState_EffectiveTransitionTime = 10687, - OffNormalAlarmType_ConfirmedState_TrueState = 10688, - OffNormalAlarmType_ConfirmedState_FalseState = 10689, - OffNormalAlarmType_Acknowledge = 10690, - OffNormalAlarmType_Acknowledge_InputArguments = 10691, - OffNormalAlarmType_Confirm = 10692, - OffNormalAlarmType_Confirm_InputArguments = 10693, - OffNormalAlarmType_ActiveState = 10694, - OffNormalAlarmType_ActiveState_Id = 10695, - OffNormalAlarmType_ActiveState_Name = 10696, - OffNormalAlarmType_ActiveState_Number = 10697, - OffNormalAlarmType_ActiveState_EffectiveDisplayName = 10698, - OffNormalAlarmType_ActiveState_TransitionTime = 10699, - OffNormalAlarmType_ActiveState_EffectiveTransitionTime = 10700, - OffNormalAlarmType_ActiveState_TrueState = 10701, - OffNormalAlarmType_ActiveState_FalseState = 10702, - OffNormalAlarmType_SuppressedState = 10703, - OffNormalAlarmType_SuppressedState_Id = 10704, - OffNormalAlarmType_SuppressedState_Name = 10705, - OffNormalAlarmType_SuppressedState_Number = 10706, - OffNormalAlarmType_SuppressedState_EffectiveDisplayName = 10707, - OffNormalAlarmType_SuppressedState_TransitionTime = 10708, - OffNormalAlarmType_SuppressedState_EffectiveTransitionTime = 10709, - OffNormalAlarmType_SuppressedState_TrueState = 10710, - OffNormalAlarmType_SuppressedState_FalseState = 10711, - OffNormalAlarmType_ShelvingState = 10712, - OffNormalAlarmType_ShelvingState_CurrentState = 10713, - OffNormalAlarmType_ShelvingState_CurrentState_Id = 10714, - OffNormalAlarmType_ShelvingState_CurrentState_Name = 10715, - OffNormalAlarmType_ShelvingState_CurrentState_Number = 10716, - OffNormalAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 10717, - OffNormalAlarmType_ShelvingState_LastTransition = 10718, - OffNormalAlarmType_ShelvingState_LastTransition_Id = 10719, - OffNormalAlarmType_ShelvingState_LastTransition_Name = 10720, - OffNormalAlarmType_ShelvingState_LastTransition_Number = 10721, - OffNormalAlarmType_ShelvingState_LastTransition_TransitionTime = 10722, - OffNormalAlarmType_ShelvingState_UnshelveTime = 10723, - OffNormalAlarmType_ShelvingState_Unshelve = 10745, - OffNormalAlarmType_ShelvingState_OneShotShelve = 10746, - OffNormalAlarmType_ShelvingState_TimedShelve = 10747, - OffNormalAlarmType_ShelvingState_TimedShelve_InputArguments = 10748, - OffNormalAlarmType_SuppressedOrShelved = 10749, - OffNormalAlarmType_MaxTimeShelved = 10750, - TripAlarmType = 10751, - TripAlarmType_EventId = 10752, - TripAlarmType_EventType = 10753, - TripAlarmType_SourceNode = 10754, - TripAlarmType_SourceName = 10755, - TripAlarmType_Time = 10756, - TripAlarmType_ReceiveTime = 10757, - TripAlarmType_LocalTime = 10758, - TripAlarmType_Message = 10759, - TripAlarmType_Severity = 10760, - TripAlarmType_ConditionName = 10761, - TripAlarmType_BranchId = 10762, - TripAlarmType_Retain = 10763, - TripAlarmType_EnabledState = 10764, - TripAlarmType_EnabledState_Id = 10765, - TripAlarmType_EnabledState_Name = 10766, - TripAlarmType_EnabledState_Number = 10767, - TripAlarmType_EnabledState_EffectiveDisplayName = 10768, - TripAlarmType_EnabledState_TransitionTime = 10769, - TripAlarmType_EnabledState_EffectiveTransitionTime = 10770, - TripAlarmType_EnabledState_TrueState = 10771, - TripAlarmType_EnabledState_FalseState = 10772, - TripAlarmType_Quality = 10773, - TripAlarmType_Quality_SourceTimestamp = 10774, - TripAlarmType_LastSeverity = 10775, - TripAlarmType_LastSeverity_SourceTimestamp = 10776, - TripAlarmType_Comment = 10777, - TripAlarmType_Comment_SourceTimestamp = 10778, - TripAlarmType_ClientUserId = 10779, - TripAlarmType_Enable = 10780, - TripAlarmType_Disable = 10781, - TripAlarmType_AddComment = 10782, - TripAlarmType_AddComment_InputArguments = 10783, - TripAlarmType_ConditionRefresh = 10784, - TripAlarmType_ConditionRefresh_InputArguments = 10785, - TripAlarmType_AckedState = 10786, - TripAlarmType_AckedState_Id = 10787, - TripAlarmType_AckedState_Name = 10788, - TripAlarmType_AckedState_Number = 10789, - TripAlarmType_AckedState_EffectiveDisplayName = 10790, - TripAlarmType_AckedState_TransitionTime = 10791, - TripAlarmType_AckedState_EffectiveTransitionTime = 10792, - TripAlarmType_AckedState_TrueState = 10793, - TripAlarmType_AckedState_FalseState = 10794, - TripAlarmType_ConfirmedState = 10795, - TripAlarmType_ConfirmedState_Id = 10796, - TripAlarmType_ConfirmedState_Name = 10797, - TripAlarmType_ConfirmedState_Number = 10798, - TripAlarmType_ConfirmedState_EffectiveDisplayName = 10799, - TripAlarmType_ConfirmedState_TransitionTime = 10800, - TripAlarmType_ConfirmedState_EffectiveTransitionTime = 10801, - TripAlarmType_ConfirmedState_TrueState = 10802, - TripAlarmType_ConfirmedState_FalseState = 10803, - TripAlarmType_Acknowledge = 10804, - TripAlarmType_Acknowledge_InputArguments = 10805, - TripAlarmType_Confirm = 10806, - TripAlarmType_Confirm_InputArguments = 10807, - TripAlarmType_ActiveState = 10808, - TripAlarmType_ActiveState_Id = 10809, - TripAlarmType_ActiveState_Name = 10810, - TripAlarmType_ActiveState_Number = 10811, - TripAlarmType_ActiveState_EffectiveDisplayName = 10812, - TripAlarmType_ActiveState_TransitionTime = 10813, - TripAlarmType_ActiveState_EffectiveTransitionTime = 10814, - TripAlarmType_ActiveState_TrueState = 10815, - TripAlarmType_ActiveState_FalseState = 10816, - TripAlarmType_SuppressedState = 10817, - TripAlarmType_SuppressedState_Id = 10818, - TripAlarmType_SuppressedState_Name = 10819, - TripAlarmType_SuppressedState_Number = 10820, - TripAlarmType_SuppressedState_EffectiveDisplayName = 10821, - TripAlarmType_SuppressedState_TransitionTime = 10822, - TripAlarmType_SuppressedState_EffectiveTransitionTime = 10823, - TripAlarmType_SuppressedState_TrueState = 10824, - TripAlarmType_SuppressedState_FalseState = 10825, - TripAlarmType_ShelvingState = 10826, - TripAlarmType_ShelvingState_CurrentState = 10827, - TripAlarmType_ShelvingState_CurrentState_Id = 10828, - TripAlarmType_ShelvingState_CurrentState_Name = 10829, - TripAlarmType_ShelvingState_CurrentState_Number = 10830, - TripAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 10831, - TripAlarmType_ShelvingState_LastTransition = 10832, - TripAlarmType_ShelvingState_LastTransition_Id = 10833, - TripAlarmType_ShelvingState_LastTransition_Name = 10834, - TripAlarmType_ShelvingState_LastTransition_Number = 10835, - TripAlarmType_ShelvingState_LastTransition_TransitionTime = 10836, - TripAlarmType_ShelvingState_UnshelveTime = 10837, - TripAlarmType_ShelvingState_Unshelve = 10859, - TripAlarmType_ShelvingState_OneShotShelve = 10860, - TripAlarmType_ShelvingState_TimedShelve = 10861, - TripAlarmType_ShelvingState_TimedShelve_InputArguments = 10862, - TripAlarmType_SuppressedOrShelved = 10863, - TripAlarmType_MaxTimeShelved = 10864, - AuditConditionShelvingEventType = 11093, - AuditConditionShelvingEventType_EventId = 11094, - AuditConditionShelvingEventType_EventType = 11095, - AuditConditionShelvingEventType_SourceNode = 11096, - AuditConditionShelvingEventType_SourceName = 11097, - AuditConditionShelvingEventType_Time = 11098, - AuditConditionShelvingEventType_ReceiveTime = 11099, - AuditConditionShelvingEventType_LocalTime = 11100, - AuditConditionShelvingEventType_Message = 11101, - AuditConditionShelvingEventType_Severity = 11102, - AuditConditionShelvingEventType_ActionTimeStamp = 11103, - AuditConditionShelvingEventType_Status = 11104, - AuditConditionShelvingEventType_ServerId = 11105, - AuditConditionShelvingEventType_ClientAuditEntryId = 11106, - AuditConditionShelvingEventType_ClientUserId = 11107, - AuditConditionShelvingEventType_MethodId = 11108, - AuditConditionShelvingEventType_InputArguments = 11109, - TwoStateVariableType_TrueState = 11110, - TwoStateVariableType_FalseState = 11111, - ConditionType_ConditionClassId = 11112, - ConditionType_ConditionClassName = 11113, - DialogConditionType_ConditionClassId = 11114, - DialogConditionType_ConditionClassName = 11115, - AcknowledgeableConditionType_ConditionClassId = 11116, - AcknowledgeableConditionType_ConditionClassName = 11117, - AlarmConditionType_ConditionClassId = 11118, - AlarmConditionType_ConditionClassName = 11119, - AlarmConditionType_InputNode = 11120, - LimitAlarmType_ConditionClassId = 11121, - LimitAlarmType_ConditionClassName = 11122, - LimitAlarmType_InputNode = 11123, - LimitAlarmType_HighHighLimit = 11124, - LimitAlarmType_HighLimit = 11125, - LimitAlarmType_LowLimit = 11126, - LimitAlarmType_LowLowLimit = 11127, - ExclusiveLimitAlarmType_ConditionClassId = 11128, - ExclusiveLimitAlarmType_ConditionClassName = 11129, - ExclusiveLimitAlarmType_InputNode = 11130, - ExclusiveLevelAlarmType_ConditionClassId = 11131, - ExclusiveLevelAlarmType_ConditionClassName = 11132, - ExclusiveLevelAlarmType_InputNode = 11133, - ExclusiveRateOfChangeAlarmType_ConditionClassId = 11134, - ExclusiveRateOfChangeAlarmType_ConditionClassName = 11135, - ExclusiveRateOfChangeAlarmType_InputNode = 11136, - ExclusiveDeviationAlarmType_ConditionClassId = 11137, - ExclusiveDeviationAlarmType_ConditionClassName = 11138, - ExclusiveDeviationAlarmType_InputNode = 11139, - NonExclusiveLimitAlarmType_ConditionClassId = 11140, - NonExclusiveLimitAlarmType_ConditionClassName = 11141, - NonExclusiveLimitAlarmType_InputNode = 11142, - NonExclusiveLevelAlarmType_ConditionClassId = 11143, - NonExclusiveLevelAlarmType_ConditionClassName = 11144, - NonExclusiveLevelAlarmType_InputNode = 11145, - NonExclusiveRateOfChangeAlarmType_ConditionClassId = 11146, - NonExclusiveRateOfChangeAlarmType_ConditionClassName = 11147, - NonExclusiveRateOfChangeAlarmType_InputNode = 11148, - NonExclusiveDeviationAlarmType_ConditionClassId = 11149, - NonExclusiveDeviationAlarmType_ConditionClassName = 11150, - NonExclusiveDeviationAlarmType_InputNode = 11151, - DiscreteAlarmType_ConditionClassId = 11152, - DiscreteAlarmType_ConditionClassName = 11153, - DiscreteAlarmType_InputNode = 11154, - OffNormalAlarmType_ConditionClassId = 11155, - OffNormalAlarmType_ConditionClassName = 11156, - OffNormalAlarmType_InputNode = 11157, - OffNormalAlarmType_NormalState = 11158, - TripAlarmType_ConditionClassId = 11159, - TripAlarmType_ConditionClassName = 11160, - TripAlarmType_InputNode = 11161, - TripAlarmType_NormalState = 11162, - BaseConditionClassType = 11163, - ProcessConditionClassType = 11164, - MaintenanceConditionClassType = 11165, - SystemConditionClassType = 11166, - HistoricalDataConfigurationType_AggregateConfiguration_TreatUncertainAsBad = 11168, - HistoricalDataConfigurationType_AggregateConfiguration_PercentDataBad = 11169, - HistoricalDataConfigurationType_AggregateConfiguration_PercentDataGood = 11170, - HistoricalDataConfigurationType_AggregateConfiguration_UseSlopedExtrapolation = 11171, - HistoryServerCapabilitiesType_AggregateFunctions = 11172, - AggregateConfigurationType = 11187, - AggregateConfigurationType_TreatUncertainAsBad = 11188, - AggregateConfigurationType_PercentDataBad = 11189, - AggregateConfigurationType_PercentDataGood = 11190, - AggregateConfigurationType_UseSlopedExtrapolation = 11191, - HistoryServerCapabilities = 11192, - HistoryServerCapabilities_AccessHistoryDataCapability = 11193, - HistoryServerCapabilities_InsertDataCapability = 11196, - HistoryServerCapabilities_ReplaceDataCapability = 11197, - HistoryServerCapabilities_UpdateDataCapability = 11198, - HistoryServerCapabilities_DeleteRawCapability = 11199, - HistoryServerCapabilities_DeleteAtTimeCapability = 11200, - HistoryServerCapabilities_AggregateFunctions = 11201, - HAConfiguration = 11202, - HAConfiguration_AggregateConfiguration = 11203, - HAConfiguration_AggregateConfiguration_TreatUncertainAsBad = 11204, - HAConfiguration_AggregateConfiguration_PercentDataBad = 11205, - HAConfiguration_AggregateConfiguration_PercentDataGood = 11206, - HAConfiguration_AggregateConfiguration_UseSlopedExtrapolation = 11207, - HAConfiguration_Stepped = 11208, - HAConfiguration_Definition = 11209, - HAConfiguration_MaxTimeInterval = 11210, - HAConfiguration_MinTimeInterval = 11211, - HAConfiguration_ExceptionDeviation = 11212, - HAConfiguration_ExceptionDeviationFormat = 11213, - Annotations = 11214, - HistoricalEventFilter = 11215, - ModificationInfo = 11216, - HistoryModifiedData = 11217, - ModificationInfo_Encoding_DefaultXml = 11218, - HistoryModifiedData_Encoding_DefaultXml = 11219, - ModificationInfo_Encoding_DefaultBinary = 11226, - HistoryModifiedData_Encoding_DefaultBinary = 11227, - HistoryUpdateType = 11234, - MultiStateValueDiscreteType = 11238, - MultiStateValueDiscreteType_Definition = 11239, - MultiStateValueDiscreteType_ValuePrecision = 11240, - MultiStateValueDiscreteType_EnumValues = 11241, - HistoryServerCapabilities_AccessHistoryEventsCapability = 11242, - HistoryServerCapabilitiesType_MaxReturnDataValues = 11268, - HistoryServerCapabilitiesType_MaxReturnEventValues = 11269, - HistoryServerCapabilitiesType_InsertAnnotationCapability = 11270, - HistoryServerCapabilities_MaxReturnDataValues = 11273, - HistoryServerCapabilities_MaxReturnEventValues = 11274, - HistoryServerCapabilities_InsertAnnotationCapability = 11275, - HistoryServerCapabilitiesType_InsertEventCapability = 11278, - HistoryServerCapabilitiesType_ReplaceEventCapability = 11279, - HistoryServerCapabilitiesType_UpdateEventCapability = 11280, - HistoryServerCapabilities_InsertEventCapability = 11281, - HistoryServerCapabilities_ReplaceEventCapability = 11282, - HistoryServerCapabilities_UpdateEventCapability = 11283, - AggregateFunction_TimeAverage2 = 11285, - AggregateFunction_Minimum2 = 11286, - AggregateFunction_Maximum2 = 11287, - AggregateFunction_Range2 = 11288, - AggregateFunction_WorstQuality2 = 11292, - PerformUpdateType = 11293, - UpdateStructureDataDetails = 11295, - UpdateStructureDataDetails_Encoding_DefaultXml = 11296, - UpdateStructureDataDetails_Encoding_DefaultBinary = 11300, - AggregateFunction_Total2 = 11304, - AggregateFunction_MinimumActualTime2 = 11305, - AggregateFunction_MaximumActualTime2 = 11306, - AggregateFunction_DurationInStateZero = 11307, - AggregateFunction_DurationInStateNonZero = 11308, - Server_ServerRedundancy_CurrentServerId = 11312, - Server_ServerRedundancy_RedundantServerArray = 11313, - Server_ServerRedundancy_ServerUriArray = 11314, - ShelvedStateMachineType_UnshelvedToTimedShelved_TransitionNumber = 11322, - ShelvedStateMachineType_UnshelvedToOneShotShelved_TransitionNumber = 11323, - ShelvedStateMachineType_TimedShelvedToUnshelved_TransitionNumber = 11324, - ShelvedStateMachineType_TimedShelvedToOneShotShelved_TransitionNumber = 11325, - ShelvedStateMachineType_OneShotShelvedToUnshelved_TransitionNumber = 11326, - ShelvedStateMachineType_OneShotShelvedToTimedShelved_TransitionNumber = 11327, - ExclusiveLimitStateMachineType_LowLowToLow_TransitionNumber = 11340, - ExclusiveLimitStateMachineType_LowToLowLow_TransitionNumber = 11341, - ExclusiveLimitStateMachineType_HighHighToHigh_TransitionNumber = 11342, - ExclusiveLimitStateMachineType_HighToHighHigh_TransitionNumber = 11343, - AggregateFunction_StandardDeviationSample = 11426, - AggregateFunction_StandardDeviationPopulation = 11427, - AggregateFunction_VarianceSample = 11428, - AggregateFunction_VariancePopulation = 11429, - EnumStrings = 11432, - ValueAsText = 11433, - ProgressEventType = 11436, - ProgressEventType_EventId = 11437, - ProgressEventType_EventType = 11438, - ProgressEventType_SourceNode = 11439, - ProgressEventType_SourceName = 11440, - ProgressEventType_Time = 11441, - ProgressEventType_ReceiveTime = 11442, - ProgressEventType_LocalTime = 11443, - ProgressEventType_Message = 11444, - ProgressEventType_Severity = 11445, - SystemStatusChangeEventType = 11446, - SystemStatusChangeEventType_EventId = 11447, - SystemStatusChangeEventType_EventType = 11448, - SystemStatusChangeEventType_SourceNode = 11449, - SystemStatusChangeEventType_SourceName = 11450, - SystemStatusChangeEventType_Time = 11451, - SystemStatusChangeEventType_ReceiveTime = 11452, - SystemStatusChangeEventType_LocalTime = 11453, - SystemStatusChangeEventType_Message = 11454, - SystemStatusChangeEventType_Severity = 11455, - TransitionVariableType_EffectiveTransitionTime = 11456, - FiniteTransitionVariableType_EffectiveTransitionTime = 11457, - StateMachineType_LastTransition_EffectiveTransitionTime = 11458, - FiniteStateMachineType_LastTransition_EffectiveTransitionTime = 11459, - TransitionEventType_Transition_EffectiveTransitionTime = 11460, - MultiStateValueDiscreteType_ValueAsText = 11461, - ProgramTransitionEventType_Transition_EffectiveTransitionTime = 11462, - ProgramTransitionAuditEventType_Transition_EffectiveTransitionTime = 11463, - ProgramStateMachineType_LastTransition_EffectiveTransitionTime = 11464, - ShelvedStateMachineType_LastTransition_EffectiveTransitionTime = 11465, - AlarmConditionType_ShelvingState_LastTransition_EffectiveTransitionTime = 11466, - LimitAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11467, - ExclusiveLimitStateMachineType_LastTransition_EffectiveTransitionTime = 11468, - ExclusiveLimitAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11469, - ExclusiveLimitAlarmType_LimitState_LastTransition_EffectiveTransitionTime = 11470, - ExclusiveLevelAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11471, - ExclusiveLevelAlarmType_LimitState_LastTransition_EffectiveTransitionTime = 11472, - ExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11473, - ExclusiveRateOfChangeAlarmType_LimitState_LastTransition_EffectiveTransitionTime = 11474, - ExclusiveDeviationAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11475, - ExclusiveDeviationAlarmType_LimitState_LastTransition_EffectiveTransitionTime = 11476, - NonExclusiveLimitAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11477, - NonExclusiveLevelAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11478, - NonExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11479, - NonExclusiveDeviationAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11480, - DiscreteAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11481, - OffNormalAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11482, - TripAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11483, - AuditActivateSessionEventType_SecureChannelId = 11485, - OptionSetType = 11487, - OptionSetType_OptionSetValues = 11488, - ServerType_GetMonitoredItems = 11489, - ServerType_GetMonitoredItems_InputArguments = 11490, - ServerType_GetMonitoredItems_OutputArguments = 11491, - Server_GetMonitoredItems = 11492, - Server_GetMonitoredItems_InputArguments = 11493, - Server_GetMonitoredItems_OutputArguments = 11494, - GetMonitoredItemsMethodType = 11495, - GetMonitoredItemsMethodType_InputArguments = 11496, - GetMonitoredItemsMethodType_OutputArguments = 11497, - MaxStringLength = 11498, - HistoricalDataConfigurationType_StartOfArchive = 11499, - HistoricalDataConfigurationType_StartOfOnlineArchive = 11500, - HistoryServerCapabilitiesType_DeleteEventCapability = 11501, - HistoryServerCapabilities_DeleteEventCapability = 11502, - HAConfiguration_StartOfArchive = 11503, - HAConfiguration_StartOfOnlineArchive = 11504, - AggregateFunction_StartBound = 11505, - AggregateFunction_EndBound = 11506, - AggregateFunction_DeltaBounds = 11507, - ModellingRule_OptionalPlaceholder = 11508, - ModellingRule_OptionalPlaceholder_NamingRule = 11509, - ModellingRule_MandatoryPlaceholder = 11510, - ModellingRule_MandatoryPlaceholder_NamingRule = 11511, - MaxArrayLength = 11512, - EngineeringUnits = 11513, - ServerType_ServerCapabilities_MaxArrayLength = 11514, - ServerType_ServerCapabilities_MaxStringLength = 11515, - ServerType_ServerCapabilities_OperationLimits = 11516, - ServerType_ServerCapabilities_OperationLimits_MaxNodesPerRead = 11517, - ServerType_ServerCapabilities_OperationLimits_MaxNodesPerWrite = 11519, - ServerType_ServerCapabilities_OperationLimits_MaxNodesPerMethodCall = 11521, - ServerType_ServerCapabilities_OperationLimits_MaxNodesPerBrowse = 11522, - ServerType_ServerCapabilities_OperationLimits_MaxNodesPerRegisterNodes = 11523, - ServerType_ServerCapabilities_OperationLimits_MaxNodesPerTranslateBrowsePathsToNodeIds = 11524, - ServerType_ServerCapabilities_OperationLimits_MaxNodesPerNodeManagement = 11525, - ServerType_ServerCapabilities_OperationLimits_MaxMonitoredItemsPerCall = 11526, - ServerType_Namespaces = 11527, - ServerType_Namespaces_AddressSpaceFile = 11528, - ServerType_Namespaces_AddressSpaceFile_Size = 11529, - ServerType_Namespaces_AddressSpaceFile_Writeable = 11530, - ServerType_Namespaces_AddressSpaceFile_UserWriteable = 11531, - ServerType_Namespaces_AddressSpaceFile_OpenCount = 11532, - ServerType_Namespaces_AddressSpaceFile_Open = 11533, - ServerType_Namespaces_AddressSpaceFile_Open_InputArguments = 11534, - ServerType_Namespaces_AddressSpaceFile_Open_OutputArguments = 11535, - ServerType_Namespaces_AddressSpaceFile_Close = 11536, - ServerType_Namespaces_AddressSpaceFile_Close_InputArguments = 11537, - ServerType_Namespaces_AddressSpaceFile_Read = 11538, - ServerType_Namespaces_AddressSpaceFile_Read_InputArguments = 11539, - ServerType_Namespaces_AddressSpaceFile_Read_OutputArguments = 11540, - ServerType_Namespaces_AddressSpaceFile_Write = 11541, - ServerType_Namespaces_AddressSpaceFile_Write_InputArguments = 11542, - ServerType_Namespaces_AddressSpaceFile_GetPosition = 11543, - ServerType_Namespaces_AddressSpaceFile_GetPosition_InputArguments = 11544, - ServerType_Namespaces_AddressSpaceFile_GetPosition_OutputArguments = 11545, - ServerType_Namespaces_AddressSpaceFile_SetPosition = 11546, - ServerType_Namespaces_AddressSpaceFile_SetPosition_InputArguments = 11547, - ServerType_Namespaces_AddressSpaceFile_ExportNamespace = 11548, - ServerCapabilitiesType_MaxArrayLength = 11549, - ServerCapabilitiesType_MaxStringLength = 11550, - ServerCapabilitiesType_OperationLimits = 11551, - ServerCapabilitiesType_OperationLimits_MaxNodesPerRead = 11552, - ServerCapabilitiesType_OperationLimits_MaxNodesPerWrite = 11554, - ServerCapabilitiesType_OperationLimits_MaxNodesPerMethodCall = 11556, - ServerCapabilitiesType_OperationLimits_MaxNodesPerBrowse = 11557, - ServerCapabilitiesType_OperationLimits_MaxNodesPerRegisterNodes = 11558, - ServerCapabilitiesType_OperationLimits_MaxNodesPerTranslateBrowsePathsToNodeIds = 11559, - ServerCapabilitiesType_OperationLimits_MaxNodesPerNodeManagement = 11560, - ServerCapabilitiesType_OperationLimits_MaxMonitoredItemsPerCall = 11561, - ServerCapabilitiesType_VendorCapability = 11562, - OperationLimitsType = 11564, - OperationLimitsType_MaxNodesPerRead = 11565, - OperationLimitsType_MaxNodesPerWrite = 11567, - OperationLimitsType_MaxNodesPerMethodCall = 11569, - OperationLimitsType_MaxNodesPerBrowse = 11570, - OperationLimitsType_MaxNodesPerRegisterNodes = 11571, - OperationLimitsType_MaxNodesPerTranslateBrowsePathsToNodeIds = 11572, - OperationLimitsType_MaxNodesPerNodeManagement = 11573, - OperationLimitsType_MaxMonitoredItemsPerCall = 11574, - FileType = 11575, - FileType_Size = 11576, - FileType_Writeable = 11577, - FileType_UserWriteable = 11578, - FileType_OpenCount = 11579, - FileType_Open = 11580, - FileType_Open_InputArguments = 11581, - FileType_Open_OutputArguments = 11582, - FileType_Close = 11583, - FileType_Close_InputArguments = 11584, - FileType_Read = 11585, - FileType_Read_InputArguments = 11586, - FileType_Read_OutputArguments = 11587, - FileType_Write = 11588, - FileType_Write_InputArguments = 11589, - FileType_GetPosition = 11590, - FileType_GetPosition_InputArguments = 11591, - FileType_GetPosition_OutputArguments = 11592, - FileType_SetPosition = 11593, - FileType_SetPosition_InputArguments = 11594, - AddressSpaceFileType = 11595, - AddressSpaceFileType_Size = 11596, - AddressSpaceFileType_Writeable = 11597, - AddressSpaceFileType_UserWriteable = 11598, - AddressSpaceFileType_OpenCount = 11599, - AddressSpaceFileType_Open = 11600, - AddressSpaceFileType_Open_InputArguments = 11601, - AddressSpaceFileType_Open_OutputArguments = 11602, - AddressSpaceFileType_Close = 11603, - AddressSpaceFileType_Close_InputArguments = 11604, - AddressSpaceFileType_Read = 11605, - AddressSpaceFileType_Read_InputArguments = 11606, - AddressSpaceFileType_Read_OutputArguments = 11607, - AddressSpaceFileType_Write = 11608, - AddressSpaceFileType_Write_InputArguments = 11609, - AddressSpaceFileType_GetPosition = 11610, - AddressSpaceFileType_GetPosition_InputArguments = 11611, - AddressSpaceFileType_GetPosition_OutputArguments = 11612, - AddressSpaceFileType_SetPosition = 11613, - AddressSpaceFileType_SetPosition_InputArguments = 11614, - AddressSpaceFileType_ExportNamespace = 11615, - NamespaceMetadataType = 11616, - NamespaceMetadataType_NamespaceUri = 11617, - NamespaceMetadataType_NamespaceVersion = 11618, - NamespaceMetadataType_NamespacePublicationDate = 11619, - NamespaceMetadataType_IsNamespaceSubset = 11620, - NamespaceMetadataType_StaticNodeIdIdentifierTypes = 11621, - NamespaceMetadataType_StaticNumericNodeIdRange = 11622, - NamespaceMetadataType_StaticStringNodeIdPattern = 11623, - NamespaceMetadataType_NamespaceFile = 11624, - NamespaceMetadataType_NamespaceFile_Size = 11625, - NamespaceMetadataType_NamespaceFile_Writeable = 11626, - NamespaceMetadataType_NamespaceFile_UserWriteable = 11627, - NamespaceMetadataType_NamespaceFile_OpenCount = 11628, - NamespaceMetadataType_NamespaceFile_Open = 11629, - NamespaceMetadataType_NamespaceFile_Open_InputArguments = 11630, - NamespaceMetadataType_NamespaceFile_Open_OutputArguments = 11631, - NamespaceMetadataType_NamespaceFile_Close = 11632, - NamespaceMetadataType_NamespaceFile_Close_InputArguments = 11633, - NamespaceMetadataType_NamespaceFile_Read = 11634, - NamespaceMetadataType_NamespaceFile_Read_InputArguments = 11635, - NamespaceMetadataType_NamespaceFile_Read_OutputArguments = 11636, - NamespaceMetadataType_NamespaceFile_Write = 11637, - NamespaceMetadataType_NamespaceFile_Write_InputArguments = 11638, - NamespaceMetadataType_NamespaceFile_GetPosition = 11639, - NamespaceMetadataType_NamespaceFile_GetPosition_InputArguments = 11640, - NamespaceMetadataType_NamespaceFile_GetPosition_OutputArguments = 11641, - NamespaceMetadataType_NamespaceFile_SetPosition = 11642, - NamespaceMetadataType_NamespaceFile_SetPosition_InputArguments = 11643, - NamespaceMetadataType_NamespaceFile_ExportNamespace = 11644, - NamespacesType = 11645, - NamespacesType_NamespaceIdentifier = 11646, - NamespacesType_NamespaceIdentifier_NamespaceUri = 11647, - NamespacesType_NamespaceIdentifier_NamespaceVersion = 11648, - NamespacesType_NamespaceIdentifier_NamespacePublicationDate = 11649, - NamespacesType_NamespaceIdentifier_IsNamespaceSubset = 11650, - NamespacesType_NamespaceIdentifier_StaticNodeIdIdentifierTypes = 11651, - NamespacesType_NamespaceIdentifier_StaticNumericNodeIdRange = 11652, - NamespacesType_NamespaceIdentifier_StaticStringNodeIdPattern = 11653, - NamespacesType_NamespaceIdentifier_NamespaceFile = 11654, - NamespacesType_NamespaceIdentifier_NamespaceFile_Size = 11655, - NamespacesType_NamespaceIdentifier_NamespaceFile_Writeable = 11656, - NamespacesType_NamespaceIdentifier_NamespaceFile_UserWriteable = 11657, - NamespacesType_NamespaceIdentifier_NamespaceFile_OpenCount = 11658, - NamespacesType_NamespaceIdentifier_NamespaceFile_Open = 11659, - NamespacesType_NamespaceIdentifier_NamespaceFile_Open_InputArguments = 11660, - NamespacesType_NamespaceIdentifier_NamespaceFile_Open_OutputArguments = 11661, - NamespacesType_NamespaceIdentifier_NamespaceFile_Close = 11662, - NamespacesType_NamespaceIdentifier_NamespaceFile_Close_InputArguments = 11663, - NamespacesType_NamespaceIdentifier_NamespaceFile_Read = 11664, - NamespacesType_NamespaceIdentifier_NamespaceFile_Read_InputArguments = 11665, - NamespacesType_NamespaceIdentifier_NamespaceFile_Read_OutputArguments = 11666, - NamespacesType_NamespaceIdentifier_NamespaceFile_Write = 11667, - NamespacesType_NamespaceIdentifier_NamespaceFile_Write_InputArguments = 11668, - NamespacesType_NamespaceIdentifier_NamespaceFile_GetPosition = 11669, - NamespacesType_NamespaceIdentifier_NamespaceFile_GetPosition_InputArguments = 11670, - NamespacesType_NamespaceIdentifier_NamespaceFile_GetPosition_OutputArguments = 11671, - NamespacesType_NamespaceIdentifier_NamespaceFile_SetPosition = 11672, - NamespacesType_NamespaceIdentifier_NamespaceFile_SetPosition_InputArguments = 11673, - NamespacesType_NamespaceIdentifier_NamespaceFile_ExportNamespace = 11674, - NamespacesType_AddressSpaceFile = 11675, - NamespacesType_AddressSpaceFile_Size = 11676, - NamespacesType_AddressSpaceFile_Writeable = 11677, - NamespacesType_AddressSpaceFile_UserWriteable = 11678, - NamespacesType_AddressSpaceFile_OpenCount = 11679, - NamespacesType_AddressSpaceFile_Open = 11680, - NamespacesType_AddressSpaceFile_Open_InputArguments = 11681, - NamespacesType_AddressSpaceFile_Open_OutputArguments = 11682, - NamespacesType_AddressSpaceFile_Close = 11683, - NamespacesType_AddressSpaceFile_Close_InputArguments = 11684, - NamespacesType_AddressSpaceFile_Read = 11685, - NamespacesType_AddressSpaceFile_Read_InputArguments = 11686, - NamespacesType_AddressSpaceFile_Read_OutputArguments = 11687, - NamespacesType_AddressSpaceFile_Write = 11688, - NamespacesType_AddressSpaceFile_Write_InputArguments = 11689, - NamespacesType_AddressSpaceFile_GetPosition = 11690, - NamespacesType_AddressSpaceFile_GetPosition_InputArguments = 11691, - NamespacesType_AddressSpaceFile_GetPosition_OutputArguments = 11692, - NamespacesType_AddressSpaceFile_SetPosition = 11693, - NamespacesType_AddressSpaceFile_SetPosition_InputArguments = 11694, - NamespacesType_AddressSpaceFile_ExportNamespace = 11695, - SystemStatusChangeEventType_SystemState = 11696, - SamplingIntervalDiagnosticsType_SampledMonitoredItemsCount = 11697, - SamplingIntervalDiagnosticsType_MaxSampledMonitoredItemsCount = 11698, - SamplingIntervalDiagnosticsType_DisabledMonitoredItemsSamplingCount = 11699, - OptionSetType_BitMask = 11701, - Server_ServerCapabilities_MaxArrayLength = 11702, - Server_ServerCapabilities_MaxStringLength = 11703, - Server_ServerCapabilities_OperationLimits = 11704, - Server_ServerCapabilities_OperationLimits_MaxNodesPerRead = 11705, - Server_ServerCapabilities_OperationLimits_MaxNodesPerWrite = 11707, - Server_ServerCapabilities_OperationLimits_MaxNodesPerMethodCall = 11709, - Server_ServerCapabilities_OperationLimits_MaxNodesPerBrowse = 11710, - Server_ServerCapabilities_OperationLimits_MaxNodesPerRegisterNodes = 11711, - Server_ServerCapabilities_OperationLimits_MaxNodesPerTranslateBrowsePathsToNodeIds = 11712, - Server_ServerCapabilities_OperationLimits_MaxNodesPerNodeManagement = 11713, - Server_ServerCapabilities_OperationLimits_MaxMonitoredItemsPerCall = 11714, - Server_Namespaces = 11715, - Server_Namespaces_AddressSpaceFile = 11716, - Server_Namespaces_AddressSpaceFile_Size = 11717, - Server_Namespaces_AddressSpaceFile_Writeable = 11718, - Server_Namespaces_AddressSpaceFile_UserWriteable = 11719, - Server_Namespaces_AddressSpaceFile_OpenCount = 11720, - Server_Namespaces_AddressSpaceFile_Open = 11721, - Server_Namespaces_AddressSpaceFile_Open_InputArguments = 11722, - Server_Namespaces_AddressSpaceFile_Open_OutputArguments = 11723, - Server_Namespaces_AddressSpaceFile_Close = 11724, - Server_Namespaces_AddressSpaceFile_Close_InputArguments = 11725, - Server_Namespaces_AddressSpaceFile_Read = 11726, - Server_Namespaces_AddressSpaceFile_Read_InputArguments = 11727, - Server_Namespaces_AddressSpaceFile_Read_OutputArguments = 11728, - Server_Namespaces_AddressSpaceFile_Write = 11729, - Server_Namespaces_AddressSpaceFile_Write_InputArguments = 11730, - Server_Namespaces_AddressSpaceFile_GetPosition = 11731, - Server_Namespaces_AddressSpaceFile_GetPosition_InputArguments = 11732, - Server_Namespaces_AddressSpaceFile_GetPosition_OutputArguments = 11733, - Server_Namespaces_AddressSpaceFile_SetPosition = 11734, - Server_Namespaces_AddressSpaceFile_SetPosition_InputArguments = 11735, - Server_Namespaces_AddressSpaceFile_ExportNamespace = 11736, - BitFieldMaskDataType = 11737, - OpenMethodType = 11738, - OpenMethodType_InputArguments = 11739, - OpenMethodType_OutputArguments = 11740, - CloseMethodType = 11741, - CloseMethodType_InputArguments = 11742, - ReadMethodType = 11743, - ReadMethodType_InputArguments = 11744, - ReadMethodType_OutputArguments = 11745, - WriteMethodType = 11746, - WriteMethodType_InputArguments = 11747, - GetPositionMethodType = 11748, - GetPositionMethodType_InputArguments = 11749, - GetPositionMethodType_OutputArguments = 11750, - SetPositionMethodType = 11751, - SetPositionMethodType_InputArguments = 11752, - SystemOffNormalAlarmType = 11753, - SystemOffNormalAlarmType_EventId = 11754, - SystemOffNormalAlarmType_EventType = 11755, - SystemOffNormalAlarmType_SourceNode = 11756, - SystemOffNormalAlarmType_SourceName = 11757, - SystemOffNormalAlarmType_Time = 11758, - SystemOffNormalAlarmType_ReceiveTime = 11759, - SystemOffNormalAlarmType_LocalTime = 11760, - SystemOffNormalAlarmType_Message = 11761, - SystemOffNormalAlarmType_Severity = 11762, - SystemOffNormalAlarmType_ConditionClassId = 11763, - SystemOffNormalAlarmType_ConditionClassName = 11764, - SystemOffNormalAlarmType_ConditionName = 11765, - SystemOffNormalAlarmType_BranchId = 11766, - SystemOffNormalAlarmType_Retain = 11767, - SystemOffNormalAlarmType_EnabledState = 11768, - SystemOffNormalAlarmType_EnabledState_Id = 11769, - SystemOffNormalAlarmType_EnabledState_Name = 11770, - SystemOffNormalAlarmType_EnabledState_Number = 11771, - SystemOffNormalAlarmType_EnabledState_EffectiveDisplayName = 11772, - SystemOffNormalAlarmType_EnabledState_TransitionTime = 11773, - SystemOffNormalAlarmType_EnabledState_EffectiveTransitionTime = 11774, - SystemOffNormalAlarmType_EnabledState_TrueState = 11775, - SystemOffNormalAlarmType_EnabledState_FalseState = 11776, - SystemOffNormalAlarmType_Quality = 11777, - SystemOffNormalAlarmType_Quality_SourceTimestamp = 11778, - SystemOffNormalAlarmType_LastSeverity = 11779, - SystemOffNormalAlarmType_LastSeverity_SourceTimestamp = 11780, - SystemOffNormalAlarmType_Comment = 11781, - SystemOffNormalAlarmType_Comment_SourceTimestamp = 11782, - SystemOffNormalAlarmType_ClientUserId = 11783, - SystemOffNormalAlarmType_Disable = 11784, - SystemOffNormalAlarmType_Enable = 11785, - SystemOffNormalAlarmType_AddComment = 11786, - SystemOffNormalAlarmType_AddComment_InputArguments = 11787, - SystemOffNormalAlarmType_ConditionRefresh = 11788, - SystemOffNormalAlarmType_ConditionRefresh_InputArguments = 11789, - SystemOffNormalAlarmType_AckedState = 11790, - SystemOffNormalAlarmType_AckedState_Id = 11791, - SystemOffNormalAlarmType_AckedState_Name = 11792, - SystemOffNormalAlarmType_AckedState_Number = 11793, - SystemOffNormalAlarmType_AckedState_EffectiveDisplayName = 11794, - SystemOffNormalAlarmType_AckedState_TransitionTime = 11795, - SystemOffNormalAlarmType_AckedState_EffectiveTransitionTime = 11796, - SystemOffNormalAlarmType_AckedState_TrueState = 11797, - SystemOffNormalAlarmType_AckedState_FalseState = 11798, - SystemOffNormalAlarmType_ConfirmedState = 11799, - SystemOffNormalAlarmType_ConfirmedState_Id = 11800, - SystemOffNormalAlarmType_ConfirmedState_Name = 11801, - SystemOffNormalAlarmType_ConfirmedState_Number = 11802, - SystemOffNormalAlarmType_ConfirmedState_EffectiveDisplayName = 11803, - SystemOffNormalAlarmType_ConfirmedState_TransitionTime = 11804, - SystemOffNormalAlarmType_ConfirmedState_EffectiveTransitionTime = 11805, - SystemOffNormalAlarmType_ConfirmedState_TrueState = 11806, - SystemOffNormalAlarmType_ConfirmedState_FalseState = 11807, - SystemOffNormalAlarmType_Acknowledge = 11808, - SystemOffNormalAlarmType_Acknowledge_InputArguments = 11809, - SystemOffNormalAlarmType_Confirm = 11810, - SystemOffNormalAlarmType_Confirm_InputArguments = 11811, - SystemOffNormalAlarmType_ActiveState = 11812, - SystemOffNormalAlarmType_ActiveState_Id = 11813, - SystemOffNormalAlarmType_ActiveState_Name = 11814, - SystemOffNormalAlarmType_ActiveState_Number = 11815, - SystemOffNormalAlarmType_ActiveState_EffectiveDisplayName = 11816, - SystemOffNormalAlarmType_ActiveState_TransitionTime = 11817, - SystemOffNormalAlarmType_ActiveState_EffectiveTransitionTime = 11818, - SystemOffNormalAlarmType_ActiveState_TrueState = 11819, - SystemOffNormalAlarmType_ActiveState_FalseState = 11820, - SystemOffNormalAlarmType_InputNode = 11821, - SystemOffNormalAlarmType_SuppressedState = 11822, - SystemOffNormalAlarmType_SuppressedState_Id = 11823, - SystemOffNormalAlarmType_SuppressedState_Name = 11824, - SystemOffNormalAlarmType_SuppressedState_Number = 11825, - SystemOffNormalAlarmType_SuppressedState_EffectiveDisplayName = 11826, - SystemOffNormalAlarmType_SuppressedState_TransitionTime = 11827, - SystemOffNormalAlarmType_SuppressedState_EffectiveTransitionTime = 11828, - SystemOffNormalAlarmType_SuppressedState_TrueState = 11829, - SystemOffNormalAlarmType_SuppressedState_FalseState = 11830, - SystemOffNormalAlarmType_ShelvingState = 11831, - SystemOffNormalAlarmType_ShelvingState_CurrentState = 11832, - SystemOffNormalAlarmType_ShelvingState_CurrentState_Id = 11833, - SystemOffNormalAlarmType_ShelvingState_CurrentState_Name = 11834, - SystemOffNormalAlarmType_ShelvingState_CurrentState_Number = 11835, - SystemOffNormalAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 11836, - SystemOffNormalAlarmType_ShelvingState_LastTransition = 11837, - SystemOffNormalAlarmType_ShelvingState_LastTransition_Id = 11838, - SystemOffNormalAlarmType_ShelvingState_LastTransition_Name = 11839, - SystemOffNormalAlarmType_ShelvingState_LastTransition_Number = 11840, - SystemOffNormalAlarmType_ShelvingState_LastTransition_TransitionTime = 11841, - SystemOffNormalAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11842, - SystemOffNormalAlarmType_ShelvingState_UnshelveTime = 11843, - SystemOffNormalAlarmType_ShelvingState_Unshelve = 11844, - SystemOffNormalAlarmType_ShelvingState_OneShotShelve = 11845, - SystemOffNormalAlarmType_ShelvingState_TimedShelve = 11846, - SystemOffNormalAlarmType_ShelvingState_TimedShelve_InputArguments = 11847, - SystemOffNormalAlarmType_SuppressedOrShelved = 11848, - SystemOffNormalAlarmType_MaxTimeShelved = 11849, - SystemOffNormalAlarmType_NormalState = 11850, - AuditConditionCommentEventType_Comment = 11851, - AuditConditionRespondEventType_SelectedResponse = 11852, - AuditConditionAcknowledgeEventType_Comment = 11853, - AuditConditionConfirmEventType_Comment = 11854, - AuditConditionShelvingEventType_ShelvingTime = 11855, - AuditProgramTransitionEventType = 11856, - AuditProgramTransitionEventType_EventId = 11857, - AuditProgramTransitionEventType_EventType = 11858, - AuditProgramTransitionEventType_SourceNode = 11859, - AuditProgramTransitionEventType_SourceName = 11860, - AuditProgramTransitionEventType_Time = 11861, - AuditProgramTransitionEventType_ReceiveTime = 11862, - AuditProgramTransitionEventType_LocalTime = 11863, - AuditProgramTransitionEventType_Message = 11864, - AuditProgramTransitionEventType_Severity = 11865, - AuditProgramTransitionEventType_ActionTimeStamp = 11866, - AuditProgramTransitionEventType_Status = 11867, - AuditProgramTransitionEventType_ServerId = 11868, - AuditProgramTransitionEventType_ClientAuditEntryId = 11869, - AuditProgramTransitionEventType_ClientUserId = 11870, - AuditProgramTransitionEventType_MethodId = 11871, - AuditProgramTransitionEventType_InputArguments = 11872, - AuditProgramTransitionEventType_OldStateId = 11873, - AuditProgramTransitionEventType_NewStateId = 11874, - AuditProgramTransitionEventType_TransitionNumber = 11875, - HistoricalDataConfigurationType_AggregateFunctions = 11876, - HAConfiguration_AggregateFunctions = 11877, - NodeClass_EnumValues = 11878, - InstanceNode = 11879, - TypeNode = 11880, - NodeAttributesMask_EnumValues = 11881, - AttributeWriteMask_EnumValues = 11882, - BrowseResultMask_EnumValues = 11883, - HistoryUpdateType_EnumValues = 11884, - PerformUpdateType_EnumValues = 11885, - EnumeratedTestType_EnumValues = 11886, - InstanceNode_Encoding_DefaultXml = 11887, - TypeNode_Encoding_DefaultXml = 11888, - InstanceNode_Encoding_DefaultBinary = 11889, - TypeNode_Encoding_DefaultBinary = 11890, - SessionDiagnosticsObjectType_SessionDiagnostics_UnauthorizedRequestCount = 11891, - SessionDiagnosticsVariableType_UnauthorizedRequestCount = 11892, - OpenFileMode = 11939, - OpenFileMode_EnumValues = 11940, - ModelChangeStructureVerbMask = 11941, - ModelChangeStructureVerbMask_EnumValues = 11942, - EndpointUrlListDataType = 11943, - NetworkGroupDataType = 11944, - NonTransparentNetworkRedundancyType = 11945, - NonTransparentNetworkRedundancyType_RedundancySupport = 11946, - NonTransparentNetworkRedundancyType_ServerUriArray = 11947, - NonTransparentNetworkRedundancyType_ServerNetworkGroups = 11948, - EndpointUrlListDataType_Encoding_DefaultXml = 11949, - NetworkGroupDataType_Encoding_DefaultXml = 11950, - OpcUa_XmlSchema_EndpointUrlListDataType = 11951, - OpcUa_XmlSchema_EndpointUrlListDataType_DataTypeVersion = 11952, - OpcUa_XmlSchema_EndpointUrlListDataType_DictionaryFragment = 11953, - OpcUa_XmlSchema_NetworkGroupDataType = 11954, - OpcUa_XmlSchema_NetworkGroupDataType_DataTypeVersion = 11955, - OpcUa_XmlSchema_NetworkGroupDataType_DictionaryFragment = 11956, - EndpointUrlListDataType_Encoding_DefaultBinary = 11957, - NetworkGroupDataType_Encoding_DefaultBinary = 11958, - OpcUa_BinarySchema_EndpointUrlListDataType = 11959, - OpcUa_BinarySchema_EndpointUrlListDataType_DataTypeVersion = 11960, - OpcUa_BinarySchema_EndpointUrlListDataType_DictionaryFragment = 11961, - OpcUa_BinarySchema_NetworkGroupDataType = 11962, - OpcUa_BinarySchema_NetworkGroupDataType_DataTypeVersion = 11963, - OpcUa_BinarySchema_NetworkGroupDataType_DictionaryFragment = 11964, - ArrayItemType = 12021, - ArrayItemType_Definition = 12022, - ArrayItemType_ValuePrecision = 12023, - ArrayItemType_InstrumentRange = 12024, - ArrayItemType_EURange = 12025, - ArrayItemType_EngineeringUnits = 12026, - ArrayItemType_Title = 12027, - ArrayItemType_AxisScaleType = 12028, - YArrayItemType = 12029, - YArrayItemType_Definition = 12030, - YArrayItemType_ValuePrecision = 12031, - YArrayItemType_InstrumentRange = 12032, - YArrayItemType_EURange = 12033, - YArrayItemType_EngineeringUnits = 12034, - YArrayItemType_Title = 12035, - YArrayItemType_AxisScaleType = 12036, - YArrayItemType_XAxisDefinition = 12037, - XYArrayItemType = 12038, - XYArrayItemType_Definition = 12039, - XYArrayItemType_ValuePrecision = 12040, - XYArrayItemType_InstrumentRange = 12041, - XYArrayItemType_EURange = 12042, - XYArrayItemType_EngineeringUnits = 12043, - XYArrayItemType_Title = 12044, - XYArrayItemType_AxisScaleType = 12045, - XYArrayItemType_XAxisDefinition = 12046, - ImageItemType = 12047, - ImageItemType_Definition = 12048, - ImageItemType_ValuePrecision = 12049, - ImageItemType_InstrumentRange = 12050, - ImageItemType_EURange = 12051, - ImageItemType_EngineeringUnits = 12052, - ImageItemType_Title = 12053, - ImageItemType_AxisScaleType = 12054, - ImageItemType_XAxisDefinition = 12055, - ImageItemType_YAxisDefinition = 12056, - CubeItemType = 12057, - CubeItemType_Definition = 12058, - CubeItemType_ValuePrecision = 12059, - CubeItemType_InstrumentRange = 12060, - CubeItemType_EURange = 12061, - CubeItemType_EngineeringUnits = 12062, - CubeItemType_Title = 12063, - CubeItemType_AxisScaleType = 12064, - CubeItemType_XAxisDefinition = 12065, - CubeItemType_YAxisDefinition = 12066, - CubeItemType_ZAxisDefinition = 12067, - NDimensionArrayItemType = 12068, - NDimensionArrayItemType_Definition = 12069, - NDimensionArrayItemType_ValuePrecision = 12070, - NDimensionArrayItemType_InstrumentRange = 12071, - NDimensionArrayItemType_EURange = 12072, - NDimensionArrayItemType_EngineeringUnits = 12073, - NDimensionArrayItemType_Title = 12074, - NDimensionArrayItemType_AxisScaleType = 12075, - NDimensionArrayItemType_AxisDefinition = 12076, - AxisScaleEnumeration = 12077, - AxisScaleEnumeration_EnumStrings = 12078, - AxisInformation = 12079, - XVType = 12080, - AxisInformation_Encoding_DefaultXml = 12081, - XVType_Encoding_DefaultXml = 12082, - OpcUa_XmlSchema_AxisInformation = 12083, - OpcUa_XmlSchema_AxisInformation_DataTypeVersion = 12084, - OpcUa_XmlSchema_AxisInformation_DictionaryFragment = 12085, - OpcUa_XmlSchema_XVType = 12086, - OpcUa_XmlSchema_XVType_DataTypeVersion = 12087, - OpcUa_XmlSchema_XVType_DictionaryFragment = 12088, - AxisInformation_Encoding_DefaultBinary = 12089, - XVType_Encoding_DefaultBinary = 12090, - OpcUa_BinarySchema_AxisInformation = 12091, - OpcUa_BinarySchema_AxisInformation_DataTypeVersion = 12092, - OpcUa_BinarySchema_AxisInformation_DictionaryFragment = 12093, - OpcUa_BinarySchema_XVType = 12094, - OpcUa_BinarySchema_XVType_DataTypeVersion = 12095, - OpcUa_BinarySchema_XVType_DictionaryFragment = 12096, - SessionsDiagnosticsSummaryType_SessionPlaceholder = 12097, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics = 12098, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_SessionId = 12099, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_SessionName = 12100, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ClientDescription = 12101, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ServerUri = 12102, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_EndpointUrl = 12103, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_LocaleIds = 12104, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ActualSessionTimeout = 12105, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_MaxResponseMessageSize = 12106, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ClientConnectionTime = 12107, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ClientLastContactTime = 12108, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_CurrentSubscriptionsCount = 12109, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_CurrentMonitoredItemsCount = 12110, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_CurrentPublishRequestsInQueue = 12111, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_TotalRequestCount = 12112, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_UnauthorizedRequestCount = 12113, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ReadCount = 12114, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_HistoryReadCount = 12115, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_WriteCount = 12116, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_HistoryUpdateCount = 12117, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_CallCount = 12118, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_CreateMonitoredItemsCount = 12119, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ModifyMonitoredItemsCount = 12120, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_SetMonitoringModeCount = 12121, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_SetTriggeringCount = 12122, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_DeleteMonitoredItemsCount = 12123, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_CreateSubscriptionCount = 12124, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ModifySubscriptionCount = 12125, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_SetPublishingModeCount = 12126, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_PublishCount = 12127, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_RepublishCount = 12128, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_TransferSubscriptionsCount = 12129, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_DeleteSubscriptionsCount = 12130, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_AddNodesCount = 12131, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_AddReferencesCount = 12132, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_DeleteNodesCount = 12133, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_DeleteReferencesCount = 12134, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_BrowseCount = 12135, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_BrowseNextCount = 12136, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_TranslateBrowsePathsToNodeIdsCount = 12137, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_QueryFirstCount = 12138, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_QueryNextCount = 12139, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_RegisterNodesCount = 12140, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_UnregisterNodesCount = 12141, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics = 12142, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_SessionId = 12143, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_ClientUserIdOfSession = 12144, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_ClientUserIdHistory = 12145, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_AuthenticationMechanism = 12146, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_Encoding = 12147, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_TransportProtocol = 12148, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_SecurityMode = 12149, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_SecurityPolicyUri = 12150, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_ClientCertificate = 12151, - SessionsDiagnosticsSummaryType_SessionPlaceholder_SubscriptionDiagnosticsArray = 12152, - ServerType_ServerCapabilities_OperationLimits_MaxNodesPerHistoryReadData = 12153, - ServerType_ServerCapabilities_OperationLimits_MaxNodesPerHistoryReadEvents = 12154, - ServerType_ServerCapabilities_OperationLimits_MaxNodesPerHistoryUpdateData = 12155, - ServerType_ServerCapabilities_OperationLimits_MaxNodesPerHistoryUpdateEvents = 12156, - ServerCapabilitiesType_OperationLimits_MaxNodesPerHistoryReadData = 12157, - ServerCapabilitiesType_OperationLimits_MaxNodesPerHistoryReadEvents = 12158, - ServerCapabilitiesType_OperationLimits_MaxNodesPerHistoryUpdateData = 12159, - ServerCapabilitiesType_OperationLimits_MaxNodesPerHistoryUpdateEvents = 12160, - OperationLimitsType_MaxNodesPerHistoryReadData = 12161, - OperationLimitsType_MaxNodesPerHistoryReadEvents = 12162, - OperationLimitsType_MaxNodesPerHistoryUpdateData = 12163, - OperationLimitsType_MaxNodesPerHistoryUpdateEvents = 12164, - Server_ServerCapabilities_OperationLimits_MaxNodesPerHistoryReadData = 12165, - Server_ServerCapabilities_OperationLimits_MaxNodesPerHistoryReadEvents = 12166, - Server_ServerCapabilities_OperationLimits_MaxNodesPerHistoryUpdateData = 12167, - Server_ServerCapabilities_OperationLimits_MaxNodesPerHistoryUpdateEvents = 12168, - NamingRuleType_EnumValues = 12169, - ViewVersion = 12170, - ComplexNumberType = 12171, - DoubleComplexNumberType = 12172, - ComplexNumberType_Encoding_DefaultXml = 12173, - DoubleComplexNumberType_Encoding_DefaultXml = 12174, - OpcUa_XmlSchema_ComplexNumberType = 12175, - OpcUa_XmlSchema_ComplexNumberType_DataTypeVersion = 12176, - OpcUa_XmlSchema_ComplexNumberType_DictionaryFragment = 12177, - OpcUa_XmlSchema_DoubleComplexNumberType = 12178, - OpcUa_XmlSchema_DoubleComplexNumberType_DataTypeVersion = 12179, - OpcUa_XmlSchema_DoubleComplexNumberType_DictionaryFragment = 12180, - ComplexNumberType_Encoding_DefaultBinary = 12181, - DoubleComplexNumberType_Encoding_DefaultBinary = 12182, - OpcUa_BinarySchema_ComplexNumberType = 12183, - OpcUa_BinarySchema_ComplexNumberType_DataTypeVersion = 12184, - OpcUa_BinarySchema_ComplexNumberType_DictionaryFragment = 12185, - OpcUa_BinarySchema_DoubleComplexNumberType = 12186, - OpcUa_BinarySchema_DoubleComplexNumberType_DataTypeVersion = 12187, - OpcUa_BinarySchema_DoubleComplexNumberType_DictionaryFragment = 12188, - }; +enum class ObjectId : uint32_t +{ + Null = 0, + Boolean = 1, + SByte = 2, + Byte = 3, + Int16 = 4, + UInt16 = 5, + Int32 = 6, + UInt32 = 7, + Int64 = 8, + UInt64 = 9, + Float = 10, + Double = 11, + String = 12, + DateTime = 13, + Guid = 14, + ByteString = 15, + XmlElement = 16, + NodeId = 17, + ExpandedNodeId = 18, + StatusCode = 19, + QualifiedName = 20, + LocalizedText = 21, + Structure = 22, + DataValue = 23, + BaseDataType = 24, + DiagnosticInfo = 25, + Number = 26, + Integer = 27, + UInteger = 28, + Enumeration = 29, + Image = 30, + References = 31, + NonHierarchicalReferences = 32, + HierarchicalReferences = 33, + HasChild = 34, + Organizes = 35, + HasEventSource = 36, + HasModellingRule = 37, + HasEncoding = 38, + HasDescription = 39, + HasTypeDefinition = 40, + GeneratesEvent = 41, + Aggregates = 44, + HasSubtype = 45, + HasProperty = 46, + HasComponent = 47, + HasNotifier = 48, + HasOrderedComponent = 49, + FromState = 51, + ToState = 52, + HasCause = 53, + HasEffect = 54, + HasHistoricalConfiguration = 56, + BaseObjectType = 58, + FolderType = 61, + BaseVariableType = 62, + BaseDataVariableType = 63, + PropertyType = 68, + DataTypeDescriptionType = 69, + DataTypeDictionaryType = 72, + DataTypeSystemType = 75, + DataTypeEncodingType = 76, + ModellingRuleType = 77, + ModellingRule_Mandatory = 78, + ModellingRule_MandatoryShared = 79, + ModellingRule_Optional = 80, + ModellingRule_ExposesItsArray = 83, + RootFolder = 84, + ObjectsFolder = 85, + TypesFolder = 86, + ViewsFolder = 87, + ObjectTypesFolder = 88, + VariableTypesFolder = 89, + DataTypesFolder = 90, + ReferenceTypesFolder = 91, + XmlSchema_TypeSystem = 92, + OPCBinarySchema_TypeSystem = 93, + DataTypeDescriptionType_DataTypeVersion = 104, + DataTypeDescriptionType_DictionaryFragment = 105, + DataTypeDictionaryType_DataTypeVersion = 106, + DataTypeDictionaryType_NamespaceUri = 107, + ModellingRuleType_NamingRule = 111, + ModellingRule_Mandatory_NamingRule = 112, + ModellingRule_Optional_NamingRule = 113, + ModellingRule_ExposesItsArray_NamingRule = 114, + ModellingRule_MandatoryShared_NamingRule = 116, + HasSubStateMachine = 117, + NamingRuleType = 120, + IdType = 256, + NodeClass = 257, + Node = 258, + Node_Encoding_DefaultXml = 259, + Node_Encoding_DefaultBinary = 260, + ObjectNode = 261, + ObjectNode_Encoding_DefaultXml = 262, + ObjectNode_Encoding_DefaultBinary = 263, + ObjectTypeNode = 264, + ObjectTypeNode_Encoding_DefaultXml = 265, + ObjectTypeNode_Encoding_DefaultBinary = 266, + VariableNode = 267, + VariableNode_Encoding_DefaultXml = 268, + VariableNode_Encoding_DefaultBinary = 269, + VariableTypeNode = 270, + VariableTypeNode_Encoding_DefaultXml = 271, + VariableTypeNode_Encoding_DefaultBinary = 272, + ReferenceTypeNode = 273, + ReferenceTypeNode_Encoding_DefaultXml = 274, + ReferenceTypeNode_Encoding_DefaultBinary = 275, + MethodNode = 276, + MethodNode_Encoding_DefaultXml = 277, + MethodNode_Encoding_DefaultBinary = 278, + ViewNode = 279, + ViewNode_Encoding_DefaultXml = 280, + ViewNode_Encoding_DefaultBinary = 281, + DataTypeNode = 282, + DataTypeNode_Encoding_DefaultXml = 283, + DataTypeNode_Encoding_DefaultBinary = 284, + ReferenceNode = 285, + ReferenceNode_Encoding_DefaultXml = 286, + ReferenceNode_Encoding_DefaultBinary = 287, + IntegerId = 288, + Counter = 289, + Duration = 290, + NumericRange = 291, + Time = 292, + Date = 293, + UtcTime = 294, + LocaleId = 295, + Argument = 296, + Argument_Encoding_DefaultXml = 297, + Argument_Encoding_DefaultBinary = 298, + StatusResult = 299, + StatusResult_Encoding_DefaultXml = 300, + StatusResult_Encoding_DefaultBinary = 301, + MessageSecurityMode = 302, + UserTokenType = 303, + UserTokenPolicy = 304, + UserTokenPolicy_Encoding_DefaultXml = 305, + UserTokenPolicy_Encoding_DefaultBinary = 306, + ApplicationType = 307, + ApplicationDescription = 308, + ApplicationDescription_Encoding_DefaultXml = 309, + ApplicationDescription_Encoding_DefaultBinary = 310, + ApplicationInstanceCertificate = 311, + EndpointDescription = 312, + EndpointDescription_Encoding_DefaultXml = 313, + EndpointDescription_Encoding_DefaultBinary = 314, + SecurityTokenRequestType = 315, + UserIdentityToken = 316, + UserIdentityToken_Encoding_DefaultXml = 317, + UserIdentityToken_Encoding_DefaultBinary = 318, + AnonymousIdentityToken = 319, + AnonymousIdentityToken_Encoding_DefaultXml = 320, + AnonymousIdentityToken_Encoding_DefaultBinary = 321, + UserNameIdentityToken = 322, + UserNameIdentityToken_Encoding_DefaultXml = 323, + UserNameIdentityToken_Encoding_DefaultBinary = 324, + X509IdentityToken = 325, + X509IdentityToken_Encoding_DefaultXml = 326, + X509IdentityToken_Encoding_DefaultBinary = 327, + EndpointConfiguration = 331, + EndpointConfiguration_Encoding_DefaultXml = 332, + EndpointConfiguration_Encoding_DefaultBinary = 333, + ComplianceLevel = 334, + SupportedProfile = 335, + SupportedProfile_Encoding_DefaultXml = 336, + SupportedProfile_Encoding_DefaultBinary = 337, + BuildInfo = 338, + BuildInfo_Encoding_DefaultXml = 339, + BuildInfo_Encoding_DefaultBinary = 340, + SoftwareCertificate = 341, + SoftwareCertificate_Encoding_DefaultXml = 342, + SoftwareCertificate_Encoding_DefaultBinary = 343, + SignedSoftwareCertificate = 344, + SignedSoftwareCertificate_Encoding_DefaultXml = 345, + SignedSoftwareCertificate_Encoding_DefaultBinary = 346, + AttributeWriteMask = 347, + NodeAttributesMask = 348, + NodeAttributes = 349, + NodeAttributes_Encoding_DefaultXml = 350, + NodeAttributes_Encoding_DefaultBinary = 351, + ObjectAttributes = 352, + ObjectAttributes_Encoding_DefaultXml = 353, + ObjectAttributes_Encoding_DefaultBinary = 354, + VariableAttributes = 355, + VariableAttributes_Encoding_DefaultXml = 356, + VariableAttributes_Encoding_DefaultBinary = 357, + MethodAttributes = 358, + MethodAttributes_Encoding_DefaultXml = 359, + MethodAttributes_Encoding_DefaultBinary = 360, + ObjectTypeAttributes = 361, + ObjectTypeAttributes_Encoding_DefaultXml = 362, + ObjectTypeAttributes_Encoding_DefaultBinary = 363, + VariableTypeAttributes = 364, + VariableTypeAttributes_Encoding_DefaultXml = 365, + VariableTypeAttributes_Encoding_DefaultBinary = 366, + ReferenceTypeAttributes = 367, + ReferenceTypeAttributes_Encoding_DefaultXml = 368, + ReferenceTypeAttributes_Encoding_DefaultBinary = 369, + DataTypeAttributes = 370, + DataTypeAttributes_Encoding_DefaultXml = 371, + DataTypeAttributes_Encoding_DefaultBinary = 372, + ViewAttributes = 373, + ViewAttributes_Encoding_DefaultXml = 374, + ViewAttributes_Encoding_DefaultBinary = 375, + AddNodesItem = 376, + AddNodesItem_Encoding_DefaultXml = 377, + AddNodesItem_Encoding_DefaultBinary = 378, + AddReferencesItem = 379, + AddReferencesItem_Encoding_DefaultXml = 380, + AddReferencesItem_Encoding_DefaultBinary = 381, + DeleteNodesItem = 382, + DeleteNodesItem_Encoding_DefaultXml = 383, + DeleteNodesItem_Encoding_DefaultBinary = 384, + DeleteReferencesItem = 385, + DeleteReferencesItem_Encoding_DefaultXml = 386, + DeleteReferencesItem_Encoding_DefaultBinary = 387, + SessionAuthenticationToken = 388, + RequestHeader = 389, + RequestHeader_Encoding_DefaultXml = 390, + RequestHeader_Encoding_DefaultBinary = 391, + ResponseHeader = 392, + ResponseHeader_Encoding_DefaultXml = 393, + ResponseHeader_Encoding_DefaultBinary = 394, + ServiceFault = 395, + ServiceFault_Encoding_DefaultXml = 396, + ServiceFault_Encoding_DefaultBinary = 397, + EnumeratedTestType = 398, + ScalarTestType = 399, + ScalarTestType_Encoding_DefaultXml = 400, + ScalarTestType_Encoding_DefaultBinary = 401, + ArrayTestType = 402, + ArrayTestType_Encoding_DefaultXml = 403, + ArrayTestType_Encoding_DefaultBinary = 404, + CompositeTestType = 405, + CompositeTestType_Encoding_DefaultXml = 406, + CompositeTestType_Encoding_DefaultBinary = 407, + TestStackRequest = 408, + TestStackRequest_Encoding_DefaultXml = 409, + TestStackRequest_Encoding_DefaultBinary = 410, + TestStackResponse = 411, + TestStackResponse_Encoding_DefaultXml = 412, + TestStackResponse_Encoding_DefaultBinary = 413, + TestStackExRequest = 414, + TestStackExRequest_Encoding_DefaultXml = 415, + TestStackExRequest_Encoding_DefaultBinary = 416, + TestStackExResponse = 417, + TestStackExResponse_Encoding_DefaultXml = 418, + TestStackExResponse_Encoding_DefaultBinary = 419, + FindServersRequest = 420, + FindServersRequest_Encoding_DefaultXml = 421, + FindServersRequest_Encoding_DefaultBinary = 422, + FindServersResponse = 423, + FindServersResponse_Encoding_DefaultXml = 424, + FindServersResponse_Encoding_DefaultBinary = 425, + GetEndpointsRequest = 426, + GetEndpointsRequest_Encoding_DefaultXml = 427, + GetEndpointsRequest_Encoding_DefaultBinary = 428, + GetEndpointsResponse = 429, + GetEndpointsResponse_Encoding_DefaultXml = 430, + GetEndpointsResponse_Encoding_DefaultBinary = 431, + RegisteredServer = 432, + RegisteredServer_Encoding_DefaultXml = 433, + RegisteredServer_Encoding_DefaultBinary = 434, + RegisterServerRequest = 435, + RegisterServerRequest_Encoding_DefaultXml = 436, + RegisterServerRequest_Encoding_DefaultBinary = 437, + RegisterServerResponse = 438, + RegisterServerResponse_Encoding_DefaultXml = 439, + RegisterServerResponse_Encoding_DefaultBinary = 440, + ChannelSecurityToken = 441, + ChannelSecurityToken_Encoding_DefaultXml = 442, + ChannelSecurityToken_Encoding_DefaultBinary = 443, + OpenSecureChannelRequest = 444, + OpenSecureChannelRequest_Encoding_DefaultXml = 445, + OpenSecureChannelRequest_Encoding_DefaultBinary = 446, + OpenSecureChannelResponse = 447, + OpenSecureChannelResponse_Encoding_DefaultXml = 448, + OpenSecureChannelResponse_Encoding_DefaultBinary = 449, + CloseSecureChannelRequest = 450, + CloseSecureChannelRequest_Encoding_DefaultXml = 451, + CloseSecureChannelRequest_Encoding_DefaultBinary = 452, + CloseSecureChannelResponse = 453, + CloseSecureChannelResponse_Encoding_DefaultXml = 454, + CloseSecureChannelResponse_Encoding_DefaultBinary = 455, + SignatureData = 456, + SignatureData_Encoding_DefaultXml = 457, + SignatureData_Encoding_DefaultBinary = 458, + CreateSessionRequest = 459, + CreateSessionRequest_Encoding_DefaultXml = 460, + CreateSessionRequest_Encoding_DefaultBinary = 461, + CreateSessionResponse = 462, + CreateSessionResponse_Encoding_DefaultXml = 463, + CreateSessionResponse_Encoding_DefaultBinary = 464, + ActivateSessionRequest = 465, + ActivateSessionRequest_Encoding_DefaultXml = 466, + ActivateSessionRequest_Encoding_DefaultBinary = 467, + ActivateSessionResponse = 468, + ActivateSessionResponse_Encoding_DefaultXml = 469, + ActivateSessionResponse_Encoding_DefaultBinary = 470, + CloseSessionRequest = 471, + CloseSessionRequest_Encoding_DefaultXml = 472, + CloseSessionRequest_Encoding_DefaultBinary = 473, + CloseSessionResponse = 474, + CloseSessionResponse_Encoding_DefaultXml = 475, + CloseSessionResponse_Encoding_DefaultBinary = 476, + CancelRequest = 477, + CancelRequest_Encoding_DefaultXml = 478, + CancelRequest_Encoding_DefaultBinary = 479, + CancelResponse = 480, + CancelResponse_Encoding_DefaultXml = 481, + CancelResponse_Encoding_DefaultBinary = 482, + AddNodesResult = 483, + AddNodesResult_Encoding_DefaultXml = 484, + AddNodesResult_Encoding_DefaultBinary = 485, + AddNodesRequest = 486, + AddNodesRequest_Encoding_DefaultXml = 487, + AddNodesRequest_Encoding_DefaultBinary = 488, + AddNodesResponse = 489, + AddNodesResponse_Encoding_DefaultXml = 490, + AddNodesResponse_Encoding_DefaultBinary = 491, + AddReferencesRequest = 492, + AddReferencesRequest_Encoding_DefaultXml = 493, + AddReferencesRequest_Encoding_DefaultBinary = 494, + AddReferencesResponse = 495, + AddReferencesResponse_Encoding_DefaultXml = 496, + AddReferencesResponse_Encoding_DefaultBinary = 497, + DeleteNodesRequest = 498, + DeleteNodesRequest_Encoding_DefaultXml = 499, + DeleteNodesRequest_Encoding_DefaultBinary = 500, + DeleteNodesResponse = 501, + DeleteNodesResponse_Encoding_DefaultXml = 502, + DeleteNodesResponse_Encoding_DefaultBinary = 503, + DeleteReferencesRequest = 504, + DeleteReferencesRequest_Encoding_DefaultXml = 505, + DeleteReferencesRequest_Encoding_DefaultBinary = 506, + DeleteReferencesResponse = 507, + DeleteReferencesResponse_Encoding_DefaultXml = 508, + DeleteReferencesResponse_Encoding_DefaultBinary = 509, + BrowseDirection = 510, + ViewDescription = 511, + ViewDescription_Encoding_DefaultXml = 512, + ViewDescription_Encoding_DefaultBinary = 513, + BrowseDescription = 514, + BrowseDescription_Encoding_DefaultXml = 515, + BrowseDescription_Encoding_DefaultBinary = 516, + BrowseResultMask = 517, + ReferenceDescription = 518, + ReferenceDescription_Encoding_DefaultXml = 519, + ReferenceDescription_Encoding_DefaultBinary = 520, + ContinuationPoint = 521, + BrowseResult = 522, + BrowseResult_Encoding_DefaultXml = 523, + BrowseResult_Encoding_DefaultBinary = 524, + BrowseRequest = 525, + BrowseRequest_Encoding_DefaultXml = 526, + BrowseRequest_Encoding_DefaultBinary = 527, + BrowseResponse = 528, + BrowseResponse_Encoding_DefaultXml = 529, + BrowseResponse_Encoding_DefaultBinary = 530, + BrowseNextRequest = 531, + BrowseNextRequest_Encoding_DefaultXml = 532, + BrowseNextRequest_Encoding_DefaultBinary = 533, + BrowseNextResponse = 534, + BrowseNextResponse_Encoding_DefaultXml = 535, + BrowseNextResponse_Encoding_DefaultBinary = 536, + RelativePathElement = 537, + RelativePathElement_Encoding_DefaultXml = 538, + RelativePathElement_Encoding_DefaultBinary = 539, + RelativePath = 540, + RelativePath_Encoding_DefaultXml = 541, + RelativePath_Encoding_DefaultBinary = 542, + BrowsePath = 543, + BrowsePath_Encoding_DefaultXml = 544, + BrowsePath_Encoding_DefaultBinary = 545, + BrowsePathTarget = 546, + BrowsePathTarget_Encoding_DefaultXml = 547, + BrowsePathTarget_Encoding_DefaultBinary = 548, + BrowsePathResult = 549, + BrowsePathResult_Encoding_DefaultXml = 550, + BrowsePathResult_Encoding_DefaultBinary = 551, + TranslateBrowsePathsToNodeIdsRequest = 552, + TranslateBrowsePathsToNodeIdsRequest_Encoding_DefaultXml = 553, + TranslateBrowsePathsToNodeIdsRequest_Encoding_DefaultBinary = 554, + TranslateBrowsePathsToNodeIdsResponse = 555, + TranslateBrowsePathsToNodeIdsResponse_Encoding_DefaultXml = 556, + TranslateBrowsePathsToNodeIdsResponse_Encoding_DefaultBinary = 557, + RegisterNodesRequest = 558, + RegisterNodesRequest_Encoding_DefaultXml = 559, + RegisterNodesRequest_Encoding_DefaultBinary = 560, + RegisterNodesResponse = 561, + RegisterNodesResponse_Encoding_DefaultXml = 562, + RegisterNodesResponse_Encoding_DefaultBinary = 563, + UnregisterNodesRequest = 564, + UnregisterNodesRequest_Encoding_DefaultXml = 565, + UnregisterNodesRequest_Encoding_DefaultBinary = 566, + UnregisterNodesResponse = 567, + UnregisterNodesResponse_Encoding_DefaultXml = 568, + UnregisterNodesResponse_Encoding_DefaultBinary = 569, + QueryDataDescription = 570, + QueryDataDescription_Encoding_DefaultXml = 571, + QueryDataDescription_Encoding_DefaultBinary = 572, + NodeTypeDescription = 573, + NodeTypeDescription_Encoding_DefaultXml = 574, + NodeTypeDescription_Encoding_DefaultBinary = 575, + FilterOperator = 576, + QueryDataSet = 577, + QueryDataSet_Encoding_DefaultXml = 578, + QueryDataSet_Encoding_DefaultBinary = 579, + NodeReference = 580, + NodeReference_Encoding_DefaultXml = 581, + NodeReference_Encoding_DefaultBinary = 582, + ContentFilterElement = 583, + ContentFilterElement_Encoding_DefaultXml = 584, + ContentFilterElement_Encoding_DefaultBinary = 585, + ContentFilter = 586, + ContentFilter_Encoding_DefaultXml = 587, + ContentFilter_Encoding_DefaultBinary = 588, + FilterOperand = 589, + FilterOperand_Encoding_DefaultXml = 590, + FilterOperand_Encoding_DefaultBinary = 591, + ElementOperand = 592, + ElementOperand_Encoding_DefaultXml = 593, + ElementOperand_Encoding_DefaultBinary = 594, + LiteralOperand = 595, + LiteralOperand_Encoding_DefaultXml = 596, + LiteralOperand_Encoding_DefaultBinary = 597, + AttributeOperand = 598, + AttributeOperand_Encoding_DefaultXml = 599, + AttributeOperand_Encoding_DefaultBinary = 600, + SimpleAttributeOperand = 601, + SimpleAttributeOperand_Encoding_DefaultXml = 602, + SimpleAttributeOperand_Encoding_DefaultBinary = 603, + ContentFilterElementResult = 604, + ContentFilterElementResult_Encoding_DefaultXml = 605, + ContentFilterElementResult_Encoding_DefaultBinary = 606, + ContentFilterResult = 607, + ContentFilterResult_Encoding_DefaultXml = 608, + ContentFilterResult_Encoding_DefaultBinary = 609, + ParsingResult = 610, + ParsingResult_Encoding_DefaultXml = 611, + ParsingResult_Encoding_DefaultBinary = 612, + QueryFirstRequest = 613, + QueryFirstRequest_Encoding_DefaultXml = 614, + QueryFirstRequest_Encoding_DefaultBinary = 615, + QueryFirstResponse = 616, + QueryFirstResponse_Encoding_DefaultXml = 617, + QueryFirstResponse_Encoding_DefaultBinary = 618, + QueryNextRequest = 619, + QueryNextRequest_Encoding_DefaultXml = 620, + QueryNextRequest_Encoding_DefaultBinary = 621, + QueryNextResponse = 622, + QueryNextResponse_Encoding_DefaultXml = 623, + QueryNextResponse_Encoding_DefaultBinary = 624, + TimestampsToReturn = 625, + ReadValueId = 626, + ReadValueId_Encoding_DefaultXml = 627, + ReadValueId_Encoding_DefaultBinary = 628, + ReadRequest = 629, + ReadRequest_Encoding_DefaultXml = 630, + ReadRequest_Encoding_DefaultBinary = 631, + ReadResponse = 632, + ReadResponse_Encoding_DefaultXml = 633, + ReadResponse_Encoding_DefaultBinary = 634, + HistoryReadValueId = 635, + HistoryReadValueId_Encoding_DefaultXml = 636, + HistoryReadValueId_Encoding_DefaultBinary = 637, + HistoryReadResult = 638, + HistoryReadResult_Encoding_DefaultXml = 639, + HistoryReadResult_Encoding_DefaultBinary = 640, + HistoryReadDetails = 641, + HistoryReadDetails_Encoding_DefaultXml = 642, + HistoryReadDetails_Encoding_DefaultBinary = 643, + ReadEventDetails = 644, + ReadEventDetails_Encoding_DefaultXml = 645, + ReadEventDetails_Encoding_DefaultBinary = 646, + ReadRawModifiedDetails = 647, + ReadRawModifiedDetails_Encoding_DefaultXml = 648, + ReadRawModifiedDetails_Encoding_DefaultBinary = 649, + ReadProcessedDetails = 650, + ReadProcessedDetails_Encoding_DefaultXml = 651, + ReadProcessedDetails_Encoding_DefaultBinary = 652, + ReadAtTimeDetails = 653, + ReadAtTimeDetails_Encoding_DefaultXml = 654, + ReadAtTimeDetails_Encoding_DefaultBinary = 655, + HistoryData = 656, + HistoryData_Encoding_DefaultXml = 657, + HistoryData_Encoding_DefaultBinary = 658, + HistoryEvent = 659, + HistoryEvent_Encoding_DefaultXml = 660, + HistoryEvent_Encoding_DefaultBinary = 661, + HistoryReadRequest = 662, + HistoryReadRequest_Encoding_DefaultXml = 663, + HistoryReadRequest_Encoding_DefaultBinary = 664, + HistoryReadResponse = 665, + HistoryReadResponse_Encoding_DefaultXml = 666, + HistoryReadResponse_Encoding_DefaultBinary = 667, + WriteValue = 668, + WriteValue_Encoding_DefaultXml = 669, + WriteValue_Encoding_DefaultBinary = 670, + WriteRequest = 671, + WriteRequest_Encoding_DefaultXml = 672, + WriteRequest_Encoding_DefaultBinary = 673, + WriteResponse = 674, + WriteResponse_Encoding_DefaultXml = 675, + WriteResponse_Encoding_DefaultBinary = 676, + HistoryUpdateDetails = 677, + HistoryUpdateDetails_Encoding_DefaultXml = 678, + HistoryUpdateDetails_Encoding_DefaultBinary = 679, + UpdateDataDetails = 680, + UpdateDataDetails_Encoding_DefaultXml = 681, + UpdateDataDetails_Encoding_DefaultBinary = 682, + UpdateEventDetails = 683, + UpdateEventDetails_Encoding_DefaultXml = 684, + UpdateEventDetails_Encoding_DefaultBinary = 685, + DeleteRawModifiedDetails = 686, + DeleteRawModifiedDetails_Encoding_DefaultXml = 687, + DeleteRawModifiedDetails_Encoding_DefaultBinary = 688, + DeleteAtTimeDetails = 689, + DeleteAtTimeDetails_Encoding_DefaultXml = 690, + DeleteAtTimeDetails_Encoding_DefaultBinary = 691, + DeleteEventDetails = 692, + DeleteEventDetails_Encoding_DefaultXml = 693, + DeleteEventDetails_Encoding_DefaultBinary = 694, + HistoryUpdateResult = 695, + HistoryUpdateResult_Encoding_DefaultXml = 696, + HistoryUpdateResult_Encoding_DefaultBinary = 697, + HistoryUpdateRequest = 698, + HistoryUpdateRequest_Encoding_DefaultXml = 699, + HistoryUpdateRequest_Encoding_DefaultBinary = 700, + HistoryUpdateResponse = 701, + HistoryUpdateResponse_Encoding_DefaultXml = 702, + HistoryUpdateResponse_Encoding_DefaultBinary = 703, + CallMethodRequest = 704, + CallMethodRequest_Encoding_DefaultXml = 705, + CallMethodRequest_Encoding_DefaultBinary = 706, + CallMethodResult = 707, + CallMethodResult_Encoding_DefaultXml = 708, + CallMethodResult_Encoding_DefaultBinary = 709, + CallRequest = 710, + CallRequest_Encoding_DefaultXml = 711, + CallRequest_Encoding_DefaultBinary = 712, + CallResponse = 713, + CallResponse_Encoding_DefaultXml = 714, + CallResponse_Encoding_DefaultBinary = 715, + MonitoringMode = 716, + DataChangeTrigger = 717, + DeadbandType = 718, + MonitoringFilter = 719, + MonitoringFilter_Encoding_DefaultXml = 720, + MonitoringFilter_Encoding_DefaultBinary = 721, + DataChangeFilter = 722, + DataChangeFilter_Encoding_DefaultXml = 723, + DataChangeFilter_Encoding_DefaultBinary = 724, + EventFilter = 725, + EventFilter_Encoding_DefaultXml = 726, + EventFilter_Encoding_DefaultBinary = 727, + AggregateFilter = 728, + AggregateFilter_Encoding_DefaultXml = 729, + AggregateFilter_Encoding_DefaultBinary = 730, + MonitoringFilterResult = 731, + MonitoringFilterResult_Encoding_DefaultXml = 732, + MonitoringFilterResult_Encoding_DefaultBinary = 733, + EventFilterResult = 734, + EventFilterResult_Encoding_DefaultXml = 735, + EventFilterResult_Encoding_DefaultBinary = 736, + AggregateFilterResult = 737, + AggregateFilterResult_Encoding_DefaultXml = 738, + AggregateFilterResult_Encoding_DefaultBinary = 739, + MonitoringParameters = 740, + MonitoringParameters_Encoding_DefaultXml = 741, + MonitoringParameters_Encoding_DefaultBinary = 742, + MonitoredItemCreateRequest = 743, + MonitoredItemCreateRequest_Encoding_DefaultXml = 744, + MonitoredItemCreateRequest_Encoding_DefaultBinary = 745, + MonitoredItemCreateResult = 746, + MonitoredItemCreateResult_Encoding_DefaultXml = 747, + MonitoredItemCreateResult_Encoding_DefaultBinary = 748, + CreateMonitoredItemsRequest = 749, + CreateMonitoredItemsRequest_Encoding_DefaultXml = 750, + CreateMonitoredItemsRequest_Encoding_DefaultBinary = 751, + CreateMonitoredItemsResponse = 752, + CreateMonitoredItemsResponse_Encoding_DefaultXml = 753, + CreateMonitoredItemsResponse_Encoding_DefaultBinary = 754, + MonitoredItemModifyRequest = 755, + MonitoredItemModifyRequest_Encoding_DefaultXml = 756, + MonitoredItemModifyRequest_Encoding_DefaultBinary = 757, + MonitoredItemModifyResult = 758, + MonitoredItemModifyResult_Encoding_DefaultXml = 759, + MonitoredItemModifyResult_Encoding_DefaultBinary = 760, + ModifyMonitoredItemsRequest = 761, + ModifyMonitoredItemsRequest_Encoding_DefaultXml = 762, + ModifyMonitoredItemsRequest_Encoding_DefaultBinary = 763, + ModifyMonitoredItemsResponse = 764, + ModifyMonitoredItemsResponse_Encoding_DefaultXml = 765, + ModifyMonitoredItemsResponse_Encoding_DefaultBinary = 766, + SetMonitoringModeRequest = 767, + SetMonitoringModeRequest_Encoding_DefaultXml = 768, + SetMonitoringModeRequest_Encoding_DefaultBinary = 769, + SetMonitoringModeResponse = 770, + SetMonitoringModeResponse_Encoding_DefaultXml = 771, + SetMonitoringModeResponse_Encoding_DefaultBinary = 772, + SetTriggeringRequest = 773, + SetTriggeringRequest_Encoding_DefaultXml = 774, + SetTriggeringRequest_Encoding_DefaultBinary = 775, + SetTriggeringResponse = 776, + SetTriggeringResponse_Encoding_DefaultXml = 777, + SetTriggeringResponse_Encoding_DefaultBinary = 778, + DeleteMonitoredItemsRequest = 779, + DeleteMonitoredItemsRequest_Encoding_DefaultXml = 780, + DeleteMonitoredItemsRequest_Encoding_DefaultBinary = 781, + DeleteMonitoredItemsResponse = 782, + DeleteMonitoredItemsResponse_Encoding_DefaultXml = 783, + DeleteMonitoredItemsResponse_Encoding_DefaultBinary = 784, + CreateSubscriptionRequest = 785, + CreateSubscriptionRequest_Encoding_DefaultXml = 786, + CreateSubscriptionRequest_Encoding_DefaultBinary = 787, + CreateSubscriptionResponse = 788, + CreateSubscriptionResponse_Encoding_DefaultXml = 789, + CreateSubscriptionResponse_Encoding_DefaultBinary = 790, + ModifySubscriptionRequest = 791, + ModifySubscriptionRequest_Encoding_DefaultXml = 792, + ModifySubscriptionRequest_Encoding_DefaultBinary = 793, + ModifySubscriptionResponse = 794, + ModifySubscriptionResponse_Encoding_DefaultXml = 795, + ModifySubscriptionResponse_Encoding_DefaultBinary = 796, + SetPublishingModeRequest = 797, + SetPublishingModeRequest_Encoding_DefaultXml = 798, + SetPublishingModeRequest_Encoding_DefaultBinary = 799, + SetPublishingModeResponse = 800, + SetPublishingModeResponse_Encoding_DefaultXml = 801, + SetPublishingModeResponse_Encoding_DefaultBinary = 802, + NotificationMessage = 803, + NotificationMessage_Encoding_DefaultXml = 804, + NotificationMessage_Encoding_DefaultBinary = 805, + MonitoredItemNotification = 806, + MonitoredItemNotification_Encoding_DefaultXml = 807, + MonitoredItemNotification_Encoding_DefaultBinary = 808, + DataChangeNotification = 809, + DataChangeNotification_Encoding_DefaultXml = 810, + DataChangeNotification_Encoding_DefaultBinary = 811, + StatusChangeNotification = 818, + StatusChangeNotification_Encoding_DefaultXml = 819, + StatusChangeNotification_Encoding_DefaultBinary = 820, + SubscriptionAcknowledgement = 821, + SubscriptionAcknowledgement_Encoding_DefaultXml = 822, + SubscriptionAcknowledgement_Encoding_DefaultBinary = 823, + PublishRequest = 824, + PublishRequest_Encoding_DefaultXml = 825, + PublishRequest_Encoding_DefaultBinary = 826, + PublishResponse = 827, + PublishResponse_Encoding_DefaultXml = 828, + PublishResponse_Encoding_DefaultBinary = 829, + RepublishRequest = 830, + RepublishRequest_Encoding_DefaultXml = 831, + RepublishRequest_Encoding_DefaultBinary = 832, + RepublishResponse = 833, + RepublishResponse_Encoding_DefaultXml = 834, + RepublishResponse_Encoding_DefaultBinary = 835, + TransferResult = 836, + TransferResult_Encoding_DefaultXml = 837, + TransferResult_Encoding_DefaultBinary = 838, + TransferSubscriptionsRequest = 839, + TransferSubscriptionsRequest_Encoding_DefaultXml = 840, + TransferSubscriptionsRequest_Encoding_DefaultBinary = 841, + TransferSubscriptionsResponse = 842, + TransferSubscriptionsResponse_Encoding_DefaultXml = 843, + TransferSubscriptionsResponse_Encoding_DefaultBinary = 844, + DeleteSubscriptionsRequest = 845, + DeleteSubscriptionsRequest_Encoding_DefaultXml = 846, + DeleteSubscriptionsRequest_Encoding_DefaultBinary = 847, + DeleteSubscriptionsResponse = 848, + DeleteSubscriptionsResponse_Encoding_DefaultXml = 849, + DeleteSubscriptionsResponse_Encoding_DefaultBinary = 850, + RedundancySupport = 851, + ServerState = 852, + RedundantServerDataType = 853, + RedundantServerDataType_Encoding_DefaultXml = 854, + RedundantServerDataType_Encoding_DefaultBinary = 855, + SamplingIntervalDiagnosticsDataType = 856, + SamplingIntervalDiagnosticsDataType_Encoding_DefaultXml = 857, + SamplingIntervalDiagnosticsDataType_Encoding_DefaultBinary = 858, + ServerDiagnosticsSummaryDataType = 859, + ServerDiagnosticsSummaryDataType_Encoding_DefaultXml = 860, + ServerDiagnosticsSummaryDataType_Encoding_DefaultBinary = 861, + ServerStatusDataType = 862, + ServerStatusDataType_Encoding_DefaultXml = 863, + ServerStatusDataType_Encoding_DefaultBinary = 864, + SessionDiagnosticsDataType = 865, + SessionDiagnosticsDataType_Encoding_DefaultXml = 866, + SessionDiagnosticsDataType_Encoding_DefaultBinary = 867, + SessionSecurityDiagnosticsDataType = 868, + SessionSecurityDiagnosticsDataType_Encoding_DefaultXml = 869, + SessionSecurityDiagnosticsDataType_Encoding_DefaultBinary = 870, + ServiceCounterDataType = 871, + ServiceCounterDataType_Encoding_DefaultXml = 872, + ServiceCounterDataType_Encoding_DefaultBinary = 873, + SubscriptionDiagnosticsDataType = 874, + SubscriptionDiagnosticsDataType_Encoding_DefaultXml = 875, + SubscriptionDiagnosticsDataType_Encoding_DefaultBinary = 876, + ModelChangeStructureDataType = 877, + ModelChangeStructureDataType_Encoding_DefaultXml = 878, + ModelChangeStructureDataType_Encoding_DefaultBinary = 879, + Range = 884, + Range_Encoding_DefaultXml = 885, + Range_Encoding_DefaultBinary = 886, + EUInformation = 887, + EUInformation_Encoding_DefaultXml = 888, + EUInformation_Encoding_DefaultBinary = 889, + ExceptionDeviationFormat = 890, + Annotation = 891, + Annotation_Encoding_DefaultXml = 892, + Annotation_Encoding_DefaultBinary = 893, + ProgramDiagnosticDataType = 894, + ProgramDiagnosticDataType_Encoding_DefaultXml = 895, + ProgramDiagnosticDataType_Encoding_DefaultBinary = 896, + SemanticChangeStructureDataType = 897, + SemanticChangeStructureDataType_Encoding_DefaultXml = 898, + SemanticChangeStructureDataType_Encoding_DefaultBinary = 899, + EventNotificationList = 914, + EventNotificationList_Encoding_DefaultXml = 915, + EventNotificationList_Encoding_DefaultBinary = 916, + EventFieldList = 917, + EventFieldList_Encoding_DefaultXml = 918, + EventFieldList_Encoding_DefaultBinary = 919, + HistoryEventFieldList = 920, + HistoryEventFieldList_Encoding_DefaultXml = 921, + HistoryEventFieldList_Encoding_DefaultBinary = 922, + HistoryUpdateEventResult = 929, + HistoryUpdateEventResult_Encoding_DefaultXml = 930, + HistoryUpdateEventResult_Encoding_DefaultBinary = 931, + IssuedIdentityToken = 938, + IssuedIdentityToken_Encoding_DefaultXml = 939, + IssuedIdentityToken_Encoding_DefaultBinary = 940, + NotificationData = 945, + NotificationData_Encoding_DefaultXml = 946, + NotificationData_Encoding_DefaultBinary = 947, + AggregateConfiguration = 948, + AggregateConfiguration_Encoding_DefaultXml = 949, + AggregateConfiguration_Encoding_DefaultBinary = 950, + ImageBMP = 2000, + ImageGIF = 2001, + ImageJPG = 2002, + ImagePNG = 2003, + ServerType = 2004, + ServerType_ServerArray = 2005, + ServerType_NamespaceArray = 2006, + ServerType_ServerStatus = 2007, + ServerType_ServiceLevel = 2008, + ServerType_ServerCapabilities = 2009, + ServerType_ServerDiagnostics = 2010, + ServerType_VendorServerInfo = 2011, + ServerType_ServerRedundancy = 2012, + ServerCapabilitiesType = 2013, + ServerCapabilitiesType_ServerProfileArray = 2014, + ServerCapabilitiesType_LocaleIdArray = 2016, + ServerCapabilitiesType_MinSupportedSampleRate = 2017, + ServerCapabilitiesType_ModellingRules = 2019, + ServerDiagnosticsType = 2020, + ServerDiagnosticsType_ServerDiagnosticsSummary = 2021, + ServerDiagnosticsType_SamplingIntervalDiagnosticsArray = 2022, + ServerDiagnosticsType_SubscriptionDiagnosticsArray = 2023, + ServerDiagnosticsType_EnabledFlag = 2025, + SessionsDiagnosticsSummaryType = 2026, + SessionsDiagnosticsSummaryType_SessionDiagnosticsArray = 2027, + SessionsDiagnosticsSummaryType_SessionSecurityDiagnosticsArray = 2028, + SessionDiagnosticsObjectType = 2029, + SessionDiagnosticsObjectType_SessionDiagnostics = 2030, + SessionDiagnosticsObjectType_SessionSecurityDiagnostics = 2031, + SessionDiagnosticsObjectType_SubscriptionDiagnosticsArray = 2032, + VendorServerInfoType = 2033, + ServerRedundancyType = 2034, + ServerRedundancyType_RedundancySupport = 2035, + TransparentRedundancyType = 2036, + TransparentRedundancyType_CurrentServerId = 2037, + TransparentRedundancyType_RedundantServerArray = 2038, + NonTransparentRedundancyType = 2039, + NonTransparentRedundancyType_ServerUriArray = 2040, + BaseEventType = 2041, + BaseEventType_EventId = 2042, + BaseEventType_EventType = 2043, + BaseEventType_SourceNode = 2044, + BaseEventType_SourceName = 2045, + BaseEventType_Time = 2046, + BaseEventType_ReceiveTime = 2047, + BaseEventType_Message = 2050, + BaseEventType_Severity = 2051, + AuditEventType = 2052, + AuditEventType_ActionTimeStamp = 2053, + AuditEventType_Status = 2054, + AuditEventType_ServerId = 2055, + AuditEventType_ClientAuditEntryId = 2056, + AuditEventType_ClientUserId = 2057, + AuditSecurityEventType = 2058, + AuditChannelEventType = 2059, + AuditOpenSecureChannelEventType = 2060, + AuditOpenSecureChannelEventType_ClientCertificate = 2061, + AuditOpenSecureChannelEventType_RequestType = 2062, + AuditOpenSecureChannelEventType_SecurityPolicyUri = 2063, + AuditOpenSecureChannelEventType_SecurityMode = 2065, + AuditOpenSecureChannelEventType_RequestedLifetime = 2066, + AuditSessionEventType = 2069, + AuditSessionEventType_SessionId = 2070, + AuditCreateSessionEventType = 2071, + AuditCreateSessionEventType_SecureChannelId = 2072, + AuditCreateSessionEventType_ClientCertificate = 2073, + AuditCreateSessionEventType_RevisedSessionTimeout = 2074, + AuditActivateSessionEventType = 2075, + AuditActivateSessionEventType_ClientSoftwareCertificates = 2076, + AuditActivateSessionEventType_UserIdentityToken = 2077, + AuditCancelEventType = 2078, + AuditCancelEventType_RequestHandle = 2079, + AuditCertificateEventType = 2080, + AuditCertificateEventType_Certificate = 2081, + AuditCertificateDataMismatchEventType = 2082, + AuditCertificateDataMismatchEventType_InvalidHostname = 2083, + AuditCertificateDataMismatchEventType_InvalidUri = 2084, + AuditCertificateExpiredEventType = 2085, + AuditCertificateInvalidEventType = 2086, + AuditCertificateUntrustedEventType = 2087, + AuditCertificateRevokedEventType = 2088, + AuditCertificateMismatchEventType = 2089, + AuditNodeManagementEventType = 2090, + AuditAddNodesEventType = 2091, + AuditAddNodesEventType_NodesToAdd = 2092, + AuditDeleteNodesEventType = 2093, + AuditDeleteNodesEventType_NodesToDelete = 2094, + AuditAddReferencesEventType = 2095, + AuditAddReferencesEventType_ReferencesToAdd = 2096, + AuditDeleteReferencesEventType = 2097, + AuditDeleteReferencesEventType_ReferencesToDelete = 2098, + AuditUpdateEventType = 2099, + AuditWriteUpdateEventType = 2100, + AuditWriteUpdateEventType_IndexRange = 2101, + AuditWriteUpdateEventType_OldValue = 2102, + AuditWriteUpdateEventType_NewValue = 2103, + AuditHistoryUpdateEventType = 2104, + AuditUpdateMethodEventType = 2127, + AuditUpdateMethodEventType_MethodId = 2128, + AuditUpdateMethodEventType_InputArguments = 2129, + SystemEventType = 2130, + DeviceFailureEventType = 2131, + BaseModelChangeEventType = 2132, + GeneralModelChangeEventType = 2133, + GeneralModelChangeEventType_Changes = 2134, + ServerVendorCapabilityType = 2137, + ServerStatusType = 2138, + ServerStatusType_StartTime = 2139, + ServerStatusType_CurrentTime = 2140, + ServerStatusType_State = 2141, + ServerStatusType_BuildInfo = 2142, + ServerDiagnosticsSummaryType = 2150, + ServerDiagnosticsSummaryType_ServerViewCount = 2151, + ServerDiagnosticsSummaryType_CurrentSessionCount = 2152, + ServerDiagnosticsSummaryType_CumulatedSessionCount = 2153, + ServerDiagnosticsSummaryType_SecurityRejectedSessionCount = 2154, + ServerDiagnosticsSummaryType_RejectedSessionCount = 2155, + ServerDiagnosticsSummaryType_SessionTimeoutCount = 2156, + ServerDiagnosticsSummaryType_SessionAbortCount = 2157, + ServerDiagnosticsSummaryType_PublishingIntervalCount = 2159, + ServerDiagnosticsSummaryType_CurrentSubscriptionCount = 2160, + ServerDiagnosticsSummaryType_CumulatedSubscriptionCount = 2161, + ServerDiagnosticsSummaryType_SecurityRejectedRequestsCount = 2162, + ServerDiagnosticsSummaryType_RejectedRequestsCount = 2163, + SamplingIntervalDiagnosticsArrayType = 2164, + SamplingIntervalDiagnosticsType = 2165, + SamplingIntervalDiagnosticsType_SamplingInterval = 2166, + SubscriptionDiagnosticsArrayType = 2171, + SubscriptionDiagnosticsType = 2172, + SubscriptionDiagnosticsType_SessionId = 2173, + SubscriptionDiagnosticsType_SubscriptionId = 2174, + SubscriptionDiagnosticsType_Priority = 2175, + SubscriptionDiagnosticsType_PublishingInterval = 2176, + SubscriptionDiagnosticsType_MaxKeepAliveCount = 2177, + SubscriptionDiagnosticsType_MaxNotificationsPerPublish = 2179, + SubscriptionDiagnosticsType_PublishingEnabled = 2180, + SubscriptionDiagnosticsType_ModifyCount = 2181, + SubscriptionDiagnosticsType_EnableCount = 2182, + SubscriptionDiagnosticsType_DisableCount = 2183, + SubscriptionDiagnosticsType_RepublishRequestCount = 2184, + SubscriptionDiagnosticsType_RepublishMessageRequestCount = 2185, + SubscriptionDiagnosticsType_RepublishMessageCount = 2186, + SubscriptionDiagnosticsType_TransferRequestCount = 2187, + SubscriptionDiagnosticsType_TransferredToAltClientCount = 2188, + SubscriptionDiagnosticsType_TransferredToSameClientCount = 2189, + SubscriptionDiagnosticsType_PublishRequestCount = 2190, + SubscriptionDiagnosticsType_DataChangeNotificationsCount = 2191, + SubscriptionDiagnosticsType_NotificationsCount = 2193, + SessionDiagnosticsArrayType = 2196, + SessionDiagnosticsVariableType = 2197, + SessionDiagnosticsVariableType_SessionId = 2198, + SessionDiagnosticsVariableType_SessionName = 2199, + SessionDiagnosticsVariableType_ClientDescription = 2200, + SessionDiagnosticsVariableType_ServerUri = 2201, + SessionDiagnosticsVariableType_EndpointUrl = 2202, + SessionDiagnosticsVariableType_LocaleIds = 2203, + SessionDiagnosticsVariableType_ActualSessionTimeout = 2204, + SessionDiagnosticsVariableType_ClientConnectionTime = 2205, + SessionDiagnosticsVariableType_ClientLastContactTime = 2206, + SessionDiagnosticsVariableType_CurrentSubscriptionsCount = 2207, + SessionDiagnosticsVariableType_CurrentMonitoredItemsCount = 2208, + SessionDiagnosticsVariableType_CurrentPublishRequestsInQueue = 2209, + SessionDiagnosticsVariableType_ReadCount = 2217, + SessionDiagnosticsVariableType_HistoryReadCount = 2218, + SessionDiagnosticsVariableType_WriteCount = 2219, + SessionDiagnosticsVariableType_HistoryUpdateCount = 2220, + SessionDiagnosticsVariableType_CallCount = 2221, + SessionDiagnosticsVariableType_CreateMonitoredItemsCount = 2222, + SessionDiagnosticsVariableType_ModifyMonitoredItemsCount = 2223, + SessionDiagnosticsVariableType_SetMonitoringModeCount = 2224, + SessionDiagnosticsVariableType_SetTriggeringCount = 2225, + SessionDiagnosticsVariableType_DeleteMonitoredItemsCount = 2226, + SessionDiagnosticsVariableType_CreateSubscriptionCount = 2227, + SessionDiagnosticsVariableType_ModifySubscriptionCount = 2228, + SessionDiagnosticsVariableType_SetPublishingModeCount = 2229, + SessionDiagnosticsVariableType_PublishCount = 2230, + SessionDiagnosticsVariableType_RepublishCount = 2231, + SessionDiagnosticsVariableType_TransferSubscriptionsCount = 2232, + SessionDiagnosticsVariableType_DeleteSubscriptionsCount = 2233, + SessionDiagnosticsVariableType_AddNodesCount = 2234, + SessionDiagnosticsVariableType_AddReferencesCount = 2235, + SessionDiagnosticsVariableType_DeleteNodesCount = 2236, + SessionDiagnosticsVariableType_DeleteReferencesCount = 2237, + SessionDiagnosticsVariableType_BrowseCount = 2238, + SessionDiagnosticsVariableType_BrowseNextCount = 2239, + SessionDiagnosticsVariableType_TranslateBrowsePathsToNodeIdsCount = 2240, + SessionDiagnosticsVariableType_QueryFirstCount = 2241, + SessionDiagnosticsVariableType_QueryNextCount = 2242, + SessionSecurityDiagnosticsArrayType = 2243, + SessionSecurityDiagnosticsType = 2244, + SessionSecurityDiagnosticsType_SessionId = 2245, + SessionSecurityDiagnosticsType_ClientUserIdOfSession = 2246, + SessionSecurityDiagnosticsType_ClientUserIdHistory = 2247, + SessionSecurityDiagnosticsType_AuthenticationMechanism = 2248, + SessionSecurityDiagnosticsType_Encoding = 2249, + SessionSecurityDiagnosticsType_TransportProtocol = 2250, + SessionSecurityDiagnosticsType_SecurityMode = 2251, + SessionSecurityDiagnosticsType_SecurityPolicyUri = 2252, + Server = 2253, + Server_ServerArray = 2254, + Server_NamespaceArray = 2255, + Server_ServerStatus = 2256, + Server_ServerStatus_StartTime = 2257, + Server_ServerStatus_CurrentTime = 2258, + Server_ServerStatus_State = 2259, + Server_ServerStatus_BuildInfo = 2260, + Server_ServerStatus_BuildInfo_ProductName = 2261, + Server_ServerStatus_BuildInfo_ProductUri = 2262, + Server_ServerStatus_BuildInfo_ManufacturerName = 2263, + Server_ServerStatus_BuildInfo_SoftwareVersion = 2264, + Server_ServerStatus_BuildInfo_BuildNumber = 2265, + Server_ServerStatus_BuildInfo_BuildDate = 2266, + Server_ServiceLevel = 2267, + Server_ServerCapabilities = 2268, + Server_ServerCapabilities_ServerProfileArray = 2269, + Server_ServerCapabilities_LocaleIdArray = 2271, + Server_ServerCapabilities_MinSupportedSampleRate = 2272, + Server_ServerDiagnostics = 2274, + Server_ServerDiagnostics_ServerDiagnosticsSummary = 2275, + Server_ServerDiagnostics_ServerDiagnosticsSummary_ServerViewCount = 2276, + Server_ServerDiagnostics_ServerDiagnosticsSummary_CurrentSessionCount = 2277, + Server_ServerDiagnostics_ServerDiagnosticsSummary_CumulatedSessionCount = 2278, + Server_ServerDiagnostics_ServerDiagnosticsSummary_SecurityRejectedSessionCount = 2279, + Server_ServerDiagnostics_ServerDiagnosticsSummary_SessionTimeoutCount = 2281, + Server_ServerDiagnostics_ServerDiagnosticsSummary_SessionAbortCount = 2282, + Server_ServerDiagnostics_ServerDiagnosticsSummary_PublishingIntervalCount = 2284, + Server_ServerDiagnostics_ServerDiagnosticsSummary_CurrentSubscriptionCount = 2285, + Server_ServerDiagnostics_ServerDiagnosticsSummary_CumulatedSubscriptionCount = 2286, + Server_ServerDiagnostics_ServerDiagnosticsSummary_SecurityRejectedRequestsCount = 2287, + Server_ServerDiagnostics_ServerDiagnosticsSummary_RejectedRequestsCount = 2288, + Server_ServerDiagnostics_SamplingIntervalDiagnosticsArray = 2289, + Server_ServerDiagnostics_SubscriptionDiagnosticsArray = 2290, + Server_ServerDiagnostics_EnabledFlag = 2294, + Server_VendorServerInfo = 2295, + Server_ServerRedundancy = 2296, + StateMachineType = 2299, + StateType = 2307, + StateType_StateNumber = 2308, + InitialStateType = 2309, + TransitionType = 2310, + TransitionEventType = 2311, + TransitionType_TransitionNumber = 2312, + AuditUpdateStateEventType = 2315, + HistoricalDataConfigurationType = 2318, + HistoricalDataConfigurationType_Stepped = 2323, + HistoricalDataConfigurationType_Definition = 2324, + HistoricalDataConfigurationType_MaxTimeInterval = 2325, + HistoricalDataConfigurationType_MinTimeInterval = 2326, + HistoricalDataConfigurationType_ExceptionDeviation = 2327, + HistoricalDataConfigurationType_ExceptionDeviationFormat = 2328, + HistoryServerCapabilitiesType = 2330, + HistoryServerCapabilitiesType_AccessHistoryDataCapability = 2331, + HistoryServerCapabilitiesType_AccessHistoryEventsCapability = 2332, + HistoryServerCapabilitiesType_InsertDataCapability = 2334, + HistoryServerCapabilitiesType_ReplaceDataCapability = 2335, + HistoryServerCapabilitiesType_UpdateDataCapability = 2336, + HistoryServerCapabilitiesType_DeleteRawCapability = 2337, + HistoryServerCapabilitiesType_DeleteAtTimeCapability = 2338, + AggregateFunctionType = 2340, + AggregateFunction_Interpolative = 2341, + AggregateFunction_Average = 2342, + AggregateFunction_TimeAverage = 2343, + AggregateFunction_Total = 2344, + AggregateFunction_Minimum = 2346, + AggregateFunction_Maximum = 2347, + AggregateFunction_MinimumActualTime = 2348, + AggregateFunction_MaximumActualTime = 2349, + AggregateFunction_Range = 2350, + AggregateFunction_AnnotationCount = 2351, + AggregateFunction_Count = 2352, + AggregateFunction_NumberOfTransitions = 2355, + AggregateFunction_Start = 2357, + AggregateFunction_End = 2358, + AggregateFunction_Delta = 2359, + AggregateFunction_DurationGood = 2360, + AggregateFunction_DurationBad = 2361, + AggregateFunction_PercentGood = 2362, + AggregateFunction_PercentBad = 2363, + AggregateFunction_WorstQuality = 2364, + DataItemType = 2365, + DataItemType_Definition = 2366, + DataItemType_ValuePrecision = 2367, + AnalogItemType = 2368, + AnalogItemType_EURange = 2369, + AnalogItemType_InstrumentRange = 2370, + AnalogItemType_EngineeringUnits = 2371, + DiscreteItemType = 2372, + TwoStateDiscreteType = 2373, + TwoStateDiscreteType_FalseState = 2374, + TwoStateDiscreteType_TrueState = 2375, + MultiStateDiscreteType = 2376, + MultiStateDiscreteType_EnumStrings = 2377, + ProgramTransitionEventType = 2378, + ProgramTransitionEventType_IntermediateResult = 2379, + ProgramDiagnosticType = 2380, + ProgramDiagnosticType_CreateSessionId = 2381, + ProgramDiagnosticType_CreateClientName = 2382, + ProgramDiagnosticType_InvocationCreationTime = 2383, + ProgramDiagnosticType_LastTransitionTime = 2384, + ProgramDiagnosticType_LastMethodCall = 2385, + ProgramDiagnosticType_LastMethodSessionId = 2386, + ProgramDiagnosticType_LastMethodInputArguments = 2387, + ProgramDiagnosticType_LastMethodOutputArguments = 2388, + ProgramDiagnosticType_LastMethodCallTime = 2389, + ProgramDiagnosticType_LastMethodReturnStatus = 2390, + ProgramStateMachineType = 2391, + ProgramStateMachineType_Creatable = 2392, + ProgramStateMachineType_Deletable = 2393, + ProgramStateMachineType_AutoDelete = 2394, + ProgramStateMachineType_RecycleCount = 2395, + ProgramStateMachineType_InstanceCount = 2396, + ProgramStateMachineType_MaxInstanceCount = 2397, + ProgramStateMachineType_MaxRecycleCount = 2398, + ProgramStateMachineType_ProgramDiagnostics = 2399, + ProgramStateMachineType_Ready = 2400, + ProgramStateMachineType_Ready_StateNumber = 2401, + ProgramStateMachineType_Running = 2402, + ProgramStateMachineType_Running_StateNumber = 2403, + ProgramStateMachineType_Suspended = 2404, + ProgramStateMachineType_Suspended_StateNumber = 2405, + ProgramStateMachineType_Halted = 2406, + ProgramStateMachineType_Halted_StateNumber = 2407, + ProgramStateMachineType_HaltedToReady = 2408, + ProgramStateMachineType_HaltedToReady_TransitionNumber = 2409, + ProgramStateMachineType_ReadyToRunning = 2410, + ProgramStateMachineType_ReadyToRunning_TransitionNumber = 2411, + ProgramStateMachineType_RunningToHalted = 2412, + ProgramStateMachineType_RunningToHalted_TransitionNumber = 2413, + ProgramStateMachineType_RunningToReady = 2414, + ProgramStateMachineType_RunningToReady_TransitionNumber = 2415, + ProgramStateMachineType_RunningToSuspended = 2416, + ProgramStateMachineType_RunningToSuspended_TransitionNumber = 2417, + ProgramStateMachineType_SuspendedToRunning = 2418, + ProgramStateMachineType_SuspendedToRunning_TransitionNumber = 2419, + ProgramStateMachineType_SuspendedToHalted = 2420, + ProgramStateMachineType_SuspendedToHalted_TransitionNumber = 2421, + ProgramStateMachineType_SuspendedToReady = 2422, + ProgramStateMachineType_SuspendedToReady_TransitionNumber = 2423, + ProgramStateMachineType_ReadyToHalted = 2424, + ProgramStateMachineType_ReadyToHalted_TransitionNumber = 2425, + ProgramStateMachineType_Start = 2426, + ProgramStateMachineType_Suspend = 2427, + ProgramStateMachineType_Resume = 2428, + ProgramStateMachineType_Halt = 2429, + ProgramStateMachineType_Reset = 2430, + SessionDiagnosticsVariableType_RegisterNodesCount = 2730, + SessionDiagnosticsVariableType_UnregisterNodesCount = 2731, + ServerCapabilitiesType_MaxBrowseContinuationPoints = 2732, + ServerCapabilitiesType_MaxQueryContinuationPoints = 2733, + ServerCapabilitiesType_MaxHistoryContinuationPoints = 2734, + Server_ServerCapabilities_MaxBrowseContinuationPoints = 2735, + Server_ServerCapabilities_MaxQueryContinuationPoints = 2736, + Server_ServerCapabilities_MaxHistoryContinuationPoints = 2737, + SemanticChangeEventType = 2738, + SemanticChangeEventType_Changes = 2739, + ServerType_Auditing = 2742, + ServerDiagnosticsType_SessionsDiagnosticsSummary = 2744, + AuditChannelEventType_SecureChannelId = 2745, + AuditOpenSecureChannelEventType_ClientCertificateThumbprint = 2746, + AuditCreateSessionEventType_ClientCertificateThumbprint = 2747, + AuditUrlMismatchEventType = 2748, + AuditUrlMismatchEventType_EndpointUrl = 2749, + AuditWriteUpdateEventType_AttributeId = 2750, + AuditHistoryUpdateEventType_ParameterDataTypeId = 2751, + ServerStatusType_SecondsTillShutdown = 2752, + ServerStatusType_ShutdownReason = 2753, + ServerCapabilitiesType_AggregateFunctions = 2754, + StateVariableType = 2755, + StateVariableType_Id = 2756, + StateVariableType_Name = 2757, + StateVariableType_Number = 2758, + StateVariableType_EffectiveDisplayName = 2759, + FiniteStateVariableType = 2760, + FiniteStateVariableType_Id = 2761, + TransitionVariableType = 2762, + TransitionVariableType_Id = 2763, + TransitionVariableType_Name = 2764, + TransitionVariableType_Number = 2765, + TransitionVariableType_TransitionTime = 2766, + FiniteTransitionVariableType = 2767, + FiniteTransitionVariableType_Id = 2768, + StateMachineType_CurrentState = 2769, + StateMachineType_LastTransition = 2770, + FiniteStateMachineType = 2771, + FiniteStateMachineType_CurrentState = 2772, + FiniteStateMachineType_LastTransition = 2773, + TransitionEventType_Transition = 2774, + TransitionEventType_FromState = 2775, + TransitionEventType_ToState = 2776, + AuditUpdateStateEventType_OldStateId = 2777, + AuditUpdateStateEventType_NewStateId = 2778, + ConditionType = 2782, + RefreshStartEventType = 2787, + RefreshEndEventType = 2788, + RefreshRequiredEventType = 2789, + AuditConditionEventType = 2790, + AuditConditionEnableEventType = 2803, + AuditConditionCommentEventType = 2829, + DialogConditionType = 2830, + DialogConditionType_Prompt = 2831, + AcknowledgeableConditionType = 2881, + AlarmConditionType = 2915, + ShelvedStateMachineType = 2929, + ShelvedStateMachineType_Unshelved = 2930, + ShelvedStateMachineType_TimedShelved = 2932, + ShelvedStateMachineType_OneShotShelved = 2933, + ShelvedStateMachineType_UnshelvedToTimedShelved = 2935, + ShelvedStateMachineType_UnshelvedToOneShotShelved = 2936, + ShelvedStateMachineType_TimedShelvedToUnshelved = 2940, + ShelvedStateMachineType_TimedShelvedToOneShotShelved = 2942, + ShelvedStateMachineType_OneShotShelvedToUnshelved = 2943, + ShelvedStateMachineType_OneShotShelvedToTimedShelved = 2945, + ShelvedStateMachineType_Unshelve = 2947, + ShelvedStateMachineType_OneShotShelve = 2948, + ShelvedStateMachineType_TimedShelve = 2949, + LimitAlarmType = 2955, + ShelvedStateMachineType_TimedShelve_InputArguments = 2991, + Server_ServerStatus_SecondsTillShutdown = 2992, + Server_ServerStatus_ShutdownReason = 2993, + Server_Auditing = 2994, + Server_ServerCapabilities_ModellingRules = 2996, + Server_ServerCapabilities_AggregateFunctions = 2997, + SubscriptionDiagnosticsType_EventNotificationsCount = 2998, + AuditHistoryEventUpdateEventType = 2999, + AuditHistoryEventUpdateEventType_Filter = 3003, + AuditHistoryValueUpdateEventType = 3006, + AuditHistoryDeleteEventType = 3012, + AuditHistoryRawModifyDeleteEventType = 3014, + AuditHistoryRawModifyDeleteEventType_IsDeleteModified = 3015, + AuditHistoryRawModifyDeleteEventType_StartTime = 3016, + AuditHistoryRawModifyDeleteEventType_EndTime = 3017, + AuditHistoryAtTimeDeleteEventType = 3019, + AuditHistoryAtTimeDeleteEventType_ReqTimes = 3020, + AuditHistoryAtTimeDeleteEventType_OldValues = 3021, + AuditHistoryEventDeleteEventType = 3022, + AuditHistoryEventDeleteEventType_EventIds = 3023, + AuditHistoryEventDeleteEventType_OldValues = 3024, + AuditHistoryEventUpdateEventType_UpdatedNode = 3025, + AuditHistoryValueUpdateEventType_UpdatedNode = 3026, + AuditHistoryDeleteEventType_UpdatedNode = 3027, + AuditHistoryEventUpdateEventType_PerformInsertReplace = 3028, + AuditHistoryEventUpdateEventType_NewValues = 3029, + AuditHistoryEventUpdateEventType_OldValues = 3030, + AuditHistoryValueUpdateEventType_PerformInsertReplace = 3031, + AuditHistoryValueUpdateEventType_NewValues = 3032, + AuditHistoryValueUpdateEventType_OldValues = 3033, + AuditHistoryRawModifyDeleteEventType_OldValues = 3034, + EventQueueOverflowEventType = 3035, + EventTypesFolder = 3048, + ServerCapabilitiesType_SoftwareCertificates = 3049, + SessionDiagnosticsVariableType_MaxResponseMessageSize = 3050, + BuildInfoType = 3051, + BuildInfoType_ProductUri = 3052, + BuildInfoType_ManufacturerName = 3053, + BuildInfoType_ProductName = 3054, + BuildInfoType_SoftwareVersion = 3055, + BuildInfoType_BuildNumber = 3056, + BuildInfoType_BuildDate = 3057, + SessionSecurityDiagnosticsType_ClientCertificate = 3058, + HistoricalDataConfigurationType_AggregateConfiguration = 3059, + DefaultBinary = 3062, + DefaultXml = 3063, + AlwaysGeneratesEvent = 3065, + Icon = 3067, + NodeVersion = 3068, + LocalTime = 3069, + AllowNulls = 3070, + EnumValues = 3071, + InputArguments = 3072, + OutputArguments = 3073, + ServerType_ServerStatus_StartTime = 3074, + ServerType_ServerStatus_CurrentTime = 3075, + ServerType_ServerStatus_State = 3076, + ServerType_ServerStatus_BuildInfo = 3077, + ServerType_ServerStatus_BuildInfo_ProductUri = 3078, + ServerType_ServerStatus_BuildInfo_ManufacturerName = 3079, + ServerType_ServerStatus_BuildInfo_ProductName = 3080, + ServerType_ServerStatus_BuildInfo_SoftwareVersion = 3081, + ServerType_ServerStatus_BuildInfo_BuildNumber = 3082, + ServerType_ServerStatus_BuildInfo_BuildDate = 3083, + ServerType_ServerStatus_SecondsTillShutdown = 3084, + ServerType_ServerStatus_ShutdownReason = 3085, + ServerType_ServerCapabilities_ServerProfileArray = 3086, + ServerType_ServerCapabilities_LocaleIdArray = 3087, + ServerType_ServerCapabilities_MinSupportedSampleRate = 3088, + ServerType_ServerCapabilities_MaxBrowseContinuationPoints = 3089, + ServerType_ServerCapabilities_MaxQueryContinuationPoints = 3090, + ServerType_ServerCapabilities_MaxHistoryContinuationPoints = 3091, + ServerType_ServerCapabilities_SoftwareCertificates = 3092, + ServerType_ServerCapabilities_ModellingRules = 3093, + ServerType_ServerCapabilities_AggregateFunctions = 3094, + ServerType_ServerDiagnostics_ServerDiagnosticsSummary = 3095, + ServerType_ServerDiagnostics_ServerDiagnosticsSummary_ServerViewCount = 3096, + ServerType_ServerDiagnostics_ServerDiagnosticsSummary_CurrentSessionCount = 3097, + ServerType_ServerDiagnostics_ServerDiagnosticsSummary_CumulatedSessionCount = 3098, + ServerType_ServerDiagnostics_ServerDiagnosticsSummary_SecurityRejectedSessionCount = 3099, + ServerType_ServerDiagnostics_ServerDiagnosticsSummary_RejectedSessionCount = 3100, + ServerType_ServerDiagnostics_ServerDiagnosticsSummary_SessionTimeoutCount = 3101, + ServerType_ServerDiagnostics_ServerDiagnosticsSummary_SessionAbortCount = 3102, + ServerType_ServerDiagnostics_ServerDiagnosticsSummary_PublishingIntervalCount = 3104, + ServerType_ServerDiagnostics_ServerDiagnosticsSummary_CurrentSubscriptionCount = 3105, + ServerType_ServerDiagnostics_ServerDiagnosticsSummary_CumulatedSubscriptionCount = 3106, + ServerType_ServerDiagnostics_ServerDiagnosticsSummary_SecurityRejectedRequestsCount = 3107, + ServerType_ServerDiagnostics_ServerDiagnosticsSummary_RejectedRequestsCount = 3108, + ServerType_ServerDiagnostics_SamplingIntervalDiagnosticsArray = 3109, + ServerType_ServerDiagnostics_SubscriptionDiagnosticsArray = 3110, + ServerType_ServerDiagnostics_SessionsDiagnosticsSummary = 3111, + ServerType_ServerDiagnostics_SessionsDiagnosticsSummary_SessionDiagnosticsArray = 3112, + ServerType_ServerDiagnostics_SessionsDiagnosticsSummary_SessionSecurityDiagnosticsArray = 3113, + ServerType_ServerDiagnostics_EnabledFlag = 3114, + ServerType_ServerRedundancy_RedundancySupport = 3115, + ServerDiagnosticsType_ServerDiagnosticsSummary_ServerViewCount = 3116, + ServerDiagnosticsType_ServerDiagnosticsSummary_CurrentSessionCount = 3117, + ServerDiagnosticsType_ServerDiagnosticsSummary_CumulatedSessionCount = 3118, + ServerDiagnosticsType_ServerDiagnosticsSummary_SecurityRejectedSessionCount = 3119, + ServerDiagnosticsType_ServerDiagnosticsSummary_RejectedSessionCount = 3120, + ServerDiagnosticsType_ServerDiagnosticsSummary_SessionTimeoutCount = 3121, + ServerDiagnosticsType_ServerDiagnosticsSummary_SessionAbortCount = 3122, + ServerDiagnosticsType_ServerDiagnosticsSummary_PublishingIntervalCount = 3124, + ServerDiagnosticsType_ServerDiagnosticsSummary_CurrentSubscriptionCount = 3125, + ServerDiagnosticsType_ServerDiagnosticsSummary_CumulatedSubscriptionCount = 3126, + ServerDiagnosticsType_ServerDiagnosticsSummary_SecurityRejectedRequestsCount = 3127, + ServerDiagnosticsType_ServerDiagnosticsSummary_RejectedRequestsCount = 3128, + ServerDiagnosticsType_SessionsDiagnosticsSummary_SessionDiagnosticsArray = 3129, + ServerDiagnosticsType_SessionsDiagnosticsSummary_SessionSecurityDiagnosticsArray = 3130, + SessionDiagnosticsObjectType_SessionDiagnostics_SessionId = 3131, + SessionDiagnosticsObjectType_SessionDiagnostics_SessionName = 3132, + SessionDiagnosticsObjectType_SessionDiagnostics_ClientDescription = 3133, + SessionDiagnosticsObjectType_SessionDiagnostics_ServerUri = 3134, + SessionDiagnosticsObjectType_SessionDiagnostics_EndpointUrl = 3135, + SessionDiagnosticsObjectType_SessionDiagnostics_LocaleIds = 3136, + SessionDiagnosticsObjectType_SessionDiagnostics_ActualSessionTimeout = 3137, + SessionDiagnosticsObjectType_SessionDiagnostics_MaxResponseMessageSize = 3138, + SessionDiagnosticsObjectType_SessionDiagnostics_ClientConnectionTime = 3139, + SessionDiagnosticsObjectType_SessionDiagnostics_ClientLastContactTime = 3140, + SessionDiagnosticsObjectType_SessionDiagnostics_CurrentSubscriptionsCount = 3141, + SessionDiagnosticsObjectType_SessionDiagnostics_CurrentMonitoredItemsCount = 3142, + SessionDiagnosticsObjectType_SessionDiagnostics_CurrentPublishRequestsInQueue = 3143, + SessionDiagnosticsObjectType_SessionDiagnostics_ReadCount = 3151, + SessionDiagnosticsObjectType_SessionDiagnostics_HistoryReadCount = 3152, + SessionDiagnosticsObjectType_SessionDiagnostics_WriteCount = 3153, + SessionDiagnosticsObjectType_SessionDiagnostics_HistoryUpdateCount = 3154, + SessionDiagnosticsObjectType_SessionDiagnostics_CallCount = 3155, + SessionDiagnosticsObjectType_SessionDiagnostics_CreateMonitoredItemsCount = 3156, + SessionDiagnosticsObjectType_SessionDiagnostics_ModifyMonitoredItemsCount = 3157, + SessionDiagnosticsObjectType_SessionDiagnostics_SetMonitoringModeCount = 3158, + SessionDiagnosticsObjectType_SessionDiagnostics_SetTriggeringCount = 3159, + SessionDiagnosticsObjectType_SessionDiagnostics_DeleteMonitoredItemsCount = 3160, + SessionDiagnosticsObjectType_SessionDiagnostics_CreateSubscriptionCount = 3161, + SessionDiagnosticsObjectType_SessionDiagnostics_ModifySubscriptionCount = 3162, + SessionDiagnosticsObjectType_SessionDiagnostics_SetPublishingModeCount = 3163, + SessionDiagnosticsObjectType_SessionDiagnostics_PublishCount = 3164, + SessionDiagnosticsObjectType_SessionDiagnostics_RepublishCount = 3165, + SessionDiagnosticsObjectType_SessionDiagnostics_TransferSubscriptionsCount = 3166, + SessionDiagnosticsObjectType_SessionDiagnostics_DeleteSubscriptionsCount = 3167, + SessionDiagnosticsObjectType_SessionDiagnostics_AddNodesCount = 3168, + SessionDiagnosticsObjectType_SessionDiagnostics_AddReferencesCount = 3169, + SessionDiagnosticsObjectType_SessionDiagnostics_DeleteNodesCount = 3170, + SessionDiagnosticsObjectType_SessionDiagnostics_DeleteReferencesCount = 3171, + SessionDiagnosticsObjectType_SessionDiagnostics_BrowseCount = 3172, + SessionDiagnosticsObjectType_SessionDiagnostics_BrowseNextCount = 3173, + SessionDiagnosticsObjectType_SessionDiagnostics_TranslateBrowsePathsToNodeIdsCount = 3174, + SessionDiagnosticsObjectType_SessionDiagnostics_QueryFirstCount = 3175, + SessionDiagnosticsObjectType_SessionDiagnostics_QueryNextCount = 3176, + SessionDiagnosticsObjectType_SessionDiagnostics_RegisterNodesCount = 3177, + SessionDiagnosticsObjectType_SessionDiagnostics_UnregisterNodesCount = 3178, + SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SessionId = 3179, + SessionDiagnosticsObjectType_SessionSecurityDiagnostics_ClientUserIdOfSession = 3180, + SessionDiagnosticsObjectType_SessionSecurityDiagnostics_ClientUserIdHistory = 3181, + SessionDiagnosticsObjectType_SessionSecurityDiagnostics_AuthenticationMechanism = 3182, + SessionDiagnosticsObjectType_SessionSecurityDiagnostics_Encoding = 3183, + SessionDiagnosticsObjectType_SessionSecurityDiagnostics_TransportProtocol = 3184, + SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SecurityMode = 3185, + SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SecurityPolicyUri = 3186, + SessionDiagnosticsObjectType_SessionSecurityDiagnostics_ClientCertificate = 3187, + TransparentRedundancyType_RedundancySupport = 3188, + NonTransparentRedundancyType_RedundancySupport = 3189, + BaseEventType_LocalTime = 3190, + EventQueueOverflowEventType_EventId = 3191, + EventQueueOverflowEventType_EventType = 3192, + EventQueueOverflowEventType_SourceNode = 3193, + EventQueueOverflowEventType_SourceName = 3194, + EventQueueOverflowEventType_Time = 3195, + EventQueueOverflowEventType_ReceiveTime = 3196, + EventQueueOverflowEventType_LocalTime = 3197, + EventQueueOverflowEventType_Message = 3198, + EventQueueOverflowEventType_Severity = 3199, + AuditEventType_EventId = 3200, + AuditEventType_EventType = 3201, + AuditEventType_SourceNode = 3202, + AuditEventType_SourceName = 3203, + AuditEventType_Time = 3204, + AuditEventType_ReceiveTime = 3205, + AuditEventType_LocalTime = 3206, + AuditEventType_Message = 3207, + AuditEventType_Severity = 3208, + AuditSecurityEventType_EventId = 3209, + AuditSecurityEventType_EventType = 3210, + AuditSecurityEventType_SourceNode = 3211, + AuditSecurityEventType_SourceName = 3212, + AuditSecurityEventType_Time = 3213, + AuditSecurityEventType_ReceiveTime = 3214, + AuditSecurityEventType_LocalTime = 3215, + AuditSecurityEventType_Message = 3216, + AuditSecurityEventType_Severity = 3217, + AuditSecurityEventType_ActionTimeStamp = 3218, + AuditSecurityEventType_Status = 3219, + AuditSecurityEventType_ServerId = 3220, + AuditSecurityEventType_ClientAuditEntryId = 3221, + AuditSecurityEventType_ClientUserId = 3222, + AuditChannelEventType_EventId = 3223, + AuditChannelEventType_EventType = 3224, + AuditChannelEventType_SourceNode = 3225, + AuditChannelEventType_SourceName = 3226, + AuditChannelEventType_Time = 3227, + AuditChannelEventType_ReceiveTime = 3228, + AuditChannelEventType_LocalTime = 3229, + AuditChannelEventType_Message = 3230, + AuditChannelEventType_Severity = 3231, + AuditChannelEventType_ActionTimeStamp = 3232, + AuditChannelEventType_Status = 3233, + AuditChannelEventType_ServerId = 3234, + AuditChannelEventType_ClientAuditEntryId = 3235, + AuditChannelEventType_ClientUserId = 3236, + AuditOpenSecureChannelEventType_EventId = 3237, + AuditOpenSecureChannelEventType_EventType = 3238, + AuditOpenSecureChannelEventType_SourceNode = 3239, + AuditOpenSecureChannelEventType_SourceName = 3240, + AuditOpenSecureChannelEventType_Time = 3241, + AuditOpenSecureChannelEventType_ReceiveTime = 3242, + AuditOpenSecureChannelEventType_LocalTime = 3243, + AuditOpenSecureChannelEventType_Message = 3244, + AuditOpenSecureChannelEventType_Severity = 3245, + AuditOpenSecureChannelEventType_ActionTimeStamp = 3246, + AuditOpenSecureChannelEventType_Status = 3247, + AuditOpenSecureChannelEventType_ServerId = 3248, + AuditOpenSecureChannelEventType_ClientAuditEntryId = 3249, + AuditOpenSecureChannelEventType_ClientUserId = 3250, + AuditOpenSecureChannelEventType_SecureChannelId = 3251, + AuditSessionEventType_EventId = 3252, + AuditSessionEventType_EventType = 3253, + AuditSessionEventType_SourceNode = 3254, + AuditSessionEventType_SourceName = 3255, + AuditSessionEventType_Time = 3256, + AuditSessionEventType_ReceiveTime = 3257, + AuditSessionEventType_LocalTime = 3258, + AuditSessionEventType_Message = 3259, + AuditSessionEventType_Severity = 3260, + AuditSessionEventType_ActionTimeStamp = 3261, + AuditSessionEventType_Status = 3262, + AuditSessionEventType_ServerId = 3263, + AuditSessionEventType_ClientAuditEntryId = 3264, + AuditSessionEventType_ClientUserId = 3265, + AuditCreateSessionEventType_EventId = 3266, + AuditCreateSessionEventType_EventType = 3267, + AuditCreateSessionEventType_SourceNode = 3268, + AuditCreateSessionEventType_SourceName = 3269, + AuditCreateSessionEventType_Time = 3270, + AuditCreateSessionEventType_ReceiveTime = 3271, + AuditCreateSessionEventType_LocalTime = 3272, + AuditCreateSessionEventType_Message = 3273, + AuditCreateSessionEventType_Severity = 3274, + AuditCreateSessionEventType_ActionTimeStamp = 3275, + AuditCreateSessionEventType_Status = 3276, + AuditCreateSessionEventType_ServerId = 3277, + AuditCreateSessionEventType_ClientAuditEntryId = 3278, + AuditCreateSessionEventType_ClientUserId = 3279, + AuditCreateSessionEventType_SessionId = 3280, + AuditUrlMismatchEventType_EventId = 3281, + AuditUrlMismatchEventType_EventType = 3282, + AuditUrlMismatchEventType_SourceNode = 3283, + AuditUrlMismatchEventType_SourceName = 3284, + AuditUrlMismatchEventType_Time = 3285, + AuditUrlMismatchEventType_ReceiveTime = 3286, + AuditUrlMismatchEventType_LocalTime = 3287, + AuditUrlMismatchEventType_Message = 3288, + AuditUrlMismatchEventType_Severity = 3289, + AuditUrlMismatchEventType_ActionTimeStamp = 3290, + AuditUrlMismatchEventType_Status = 3291, + AuditUrlMismatchEventType_ServerId = 3292, + AuditUrlMismatchEventType_ClientAuditEntryId = 3293, + AuditUrlMismatchEventType_ClientUserId = 3294, + AuditUrlMismatchEventType_SessionId = 3295, + AuditUrlMismatchEventType_SecureChannelId = 3296, + AuditUrlMismatchEventType_ClientCertificate = 3297, + AuditUrlMismatchEventType_ClientCertificateThumbprint = 3298, + AuditUrlMismatchEventType_RevisedSessionTimeout = 3299, + AuditActivateSessionEventType_EventId = 3300, + AuditActivateSessionEventType_EventType = 3301, + AuditActivateSessionEventType_SourceNode = 3302, + AuditActivateSessionEventType_SourceName = 3303, + AuditActivateSessionEventType_Time = 3304, + AuditActivateSessionEventType_ReceiveTime = 3305, + AuditActivateSessionEventType_LocalTime = 3306, + AuditActivateSessionEventType_Message = 3307, + AuditActivateSessionEventType_Severity = 3308, + AuditActivateSessionEventType_ActionTimeStamp = 3309, + AuditActivateSessionEventType_Status = 3310, + AuditActivateSessionEventType_ServerId = 3311, + AuditActivateSessionEventType_ClientAuditEntryId = 3312, + AuditActivateSessionEventType_ClientUserId = 3313, + AuditActivateSessionEventType_SessionId = 3314, + AuditCancelEventType_EventId = 3315, + AuditCancelEventType_EventType = 3316, + AuditCancelEventType_SourceNode = 3317, + AuditCancelEventType_SourceName = 3318, + AuditCancelEventType_Time = 3319, + AuditCancelEventType_ReceiveTime = 3320, + AuditCancelEventType_LocalTime = 3321, + AuditCancelEventType_Message = 3322, + AuditCancelEventType_Severity = 3323, + AuditCancelEventType_ActionTimeStamp = 3324, + AuditCancelEventType_Status = 3325, + AuditCancelEventType_ServerId = 3326, + AuditCancelEventType_ClientAuditEntryId = 3327, + AuditCancelEventType_ClientUserId = 3328, + AuditCancelEventType_SessionId = 3329, + AuditCertificateEventType_EventId = 3330, + AuditCertificateEventType_EventType = 3331, + AuditCertificateEventType_SourceNode = 3332, + AuditCertificateEventType_SourceName = 3333, + AuditCertificateEventType_Time = 3334, + AuditCertificateEventType_ReceiveTime = 3335, + AuditCertificateEventType_LocalTime = 3336, + AuditCertificateEventType_Message = 3337, + AuditCertificateEventType_Severity = 3338, + AuditCertificateEventType_ActionTimeStamp = 3339, + AuditCertificateEventType_Status = 3340, + AuditCertificateEventType_ServerId = 3341, + AuditCertificateEventType_ClientAuditEntryId = 3342, + AuditCertificateEventType_ClientUserId = 3343, + AuditCertificateDataMismatchEventType_EventId = 3344, + AuditCertificateDataMismatchEventType_EventType = 3345, + AuditCertificateDataMismatchEventType_SourceNode = 3346, + AuditCertificateDataMismatchEventType_SourceName = 3347, + AuditCertificateDataMismatchEventType_Time = 3348, + AuditCertificateDataMismatchEventType_ReceiveTime = 3349, + AuditCertificateDataMismatchEventType_LocalTime = 3350, + AuditCertificateDataMismatchEventType_Message = 3351, + AuditCertificateDataMismatchEventType_Severity = 3352, + AuditCertificateDataMismatchEventType_ActionTimeStamp = 3353, + AuditCertificateDataMismatchEventType_Status = 3354, + AuditCertificateDataMismatchEventType_ServerId = 3355, + AuditCertificateDataMismatchEventType_ClientAuditEntryId = 3356, + AuditCertificateDataMismatchEventType_ClientUserId = 3357, + AuditCertificateDataMismatchEventType_Certificate = 3358, + AuditCertificateExpiredEventType_EventId = 3359, + AuditCertificateExpiredEventType_EventType = 3360, + AuditCertificateExpiredEventType_SourceNode = 3361, + AuditCertificateExpiredEventType_SourceName = 3362, + AuditCertificateExpiredEventType_Time = 3363, + AuditCertificateExpiredEventType_ReceiveTime = 3364, + AuditCertificateExpiredEventType_LocalTime = 3365, + AuditCertificateExpiredEventType_Message = 3366, + AuditCertificateExpiredEventType_Severity = 3367, + AuditCertificateExpiredEventType_ActionTimeStamp = 3368, + AuditCertificateExpiredEventType_Status = 3369, + AuditCertificateExpiredEventType_ServerId = 3370, + AuditCertificateExpiredEventType_ClientAuditEntryId = 3371, + AuditCertificateExpiredEventType_ClientUserId = 3372, + AuditCertificateExpiredEventType_Certificate = 3373, + AuditCertificateInvalidEventType_EventId = 3374, + AuditCertificateInvalidEventType_EventType = 3375, + AuditCertificateInvalidEventType_SourceNode = 3376, + AuditCertificateInvalidEventType_SourceName = 3377, + AuditCertificateInvalidEventType_Time = 3378, + AuditCertificateInvalidEventType_ReceiveTime = 3379, + AuditCertificateInvalidEventType_LocalTime = 3380, + AuditCertificateInvalidEventType_Message = 3381, + AuditCertificateInvalidEventType_Severity = 3382, + AuditCertificateInvalidEventType_ActionTimeStamp = 3383, + AuditCertificateInvalidEventType_Status = 3384, + AuditCertificateInvalidEventType_ServerId = 3385, + AuditCertificateInvalidEventType_ClientAuditEntryId = 3386, + AuditCertificateInvalidEventType_ClientUserId = 3387, + AuditCertificateInvalidEventType_Certificate = 3388, + AuditCertificateUntrustedEventType_EventId = 3389, + AuditCertificateUntrustedEventType_EventType = 3390, + AuditCertificateUntrustedEventType_SourceNode = 3391, + AuditCertificateUntrustedEventType_SourceName = 3392, + AuditCertificateUntrustedEventType_Time = 3393, + AuditCertificateUntrustedEventType_ReceiveTime = 3394, + AuditCertificateUntrustedEventType_LocalTime = 3395, + AuditCertificateUntrustedEventType_Message = 3396, + AuditCertificateUntrustedEventType_Severity = 3397, + AuditCertificateUntrustedEventType_ActionTimeStamp = 3398, + AuditCertificateUntrustedEventType_Status = 3399, + AuditCertificateUntrustedEventType_ServerId = 3400, + AuditCertificateUntrustedEventType_ClientAuditEntryId = 3401, + AuditCertificateUntrustedEventType_ClientUserId = 3402, + AuditCertificateUntrustedEventType_Certificate = 3403, + AuditCertificateRevokedEventType_EventId = 3404, + AuditCertificateRevokedEventType_EventType = 3405, + AuditCertificateRevokedEventType_SourceNode = 3406, + AuditCertificateRevokedEventType_SourceName = 3407, + AuditCertificateRevokedEventType_Time = 3408, + AuditCertificateRevokedEventType_ReceiveTime = 3409, + AuditCertificateRevokedEventType_LocalTime = 3410, + AuditCertificateRevokedEventType_Message = 3411, + AuditCertificateRevokedEventType_Severity = 3412, + AuditCertificateRevokedEventType_ActionTimeStamp = 3413, + AuditCertificateRevokedEventType_Status = 3414, + AuditCertificateRevokedEventType_ServerId = 3415, + AuditCertificateRevokedEventType_ClientAuditEntryId = 3416, + AuditCertificateRevokedEventType_ClientUserId = 3417, + AuditCertificateRevokedEventType_Certificate = 3418, + AuditCertificateMismatchEventType_EventId = 3419, + AuditCertificateMismatchEventType_EventType = 3420, + AuditCertificateMismatchEventType_SourceNode = 3421, + AuditCertificateMismatchEventType_SourceName = 3422, + AuditCertificateMismatchEventType_Time = 3423, + AuditCertificateMismatchEventType_ReceiveTime = 3424, + AuditCertificateMismatchEventType_LocalTime = 3425, + AuditCertificateMismatchEventType_Message = 3426, + AuditCertificateMismatchEventType_Severity = 3427, + AuditCertificateMismatchEventType_ActionTimeStamp = 3428, + AuditCertificateMismatchEventType_Status = 3429, + AuditCertificateMismatchEventType_ServerId = 3430, + AuditCertificateMismatchEventType_ClientAuditEntryId = 3431, + AuditCertificateMismatchEventType_ClientUserId = 3432, + AuditCertificateMismatchEventType_Certificate = 3433, + AuditNodeManagementEventType_EventId = 3434, + AuditNodeManagementEventType_EventType = 3435, + AuditNodeManagementEventType_SourceNode = 3436, + AuditNodeManagementEventType_SourceName = 3437, + AuditNodeManagementEventType_Time = 3438, + AuditNodeManagementEventType_ReceiveTime = 3439, + AuditNodeManagementEventType_LocalTime = 3440, + AuditNodeManagementEventType_Message = 3441, + AuditNodeManagementEventType_Severity = 3442, + AuditNodeManagementEventType_ActionTimeStamp = 3443, + AuditNodeManagementEventType_Status = 3444, + AuditNodeManagementEventType_ServerId = 3445, + AuditNodeManagementEventType_ClientAuditEntryId = 3446, + AuditNodeManagementEventType_ClientUserId = 3447, + AuditAddNodesEventType_EventId = 3448, + AuditAddNodesEventType_EventType = 3449, + AuditAddNodesEventType_SourceNode = 3450, + AuditAddNodesEventType_SourceName = 3451, + AuditAddNodesEventType_Time = 3452, + AuditAddNodesEventType_ReceiveTime = 3453, + AuditAddNodesEventType_LocalTime = 3454, + AuditAddNodesEventType_Message = 3455, + AuditAddNodesEventType_Severity = 3456, + AuditAddNodesEventType_ActionTimeStamp = 3457, + AuditAddNodesEventType_Status = 3458, + AuditAddNodesEventType_ServerId = 3459, + AuditAddNodesEventType_ClientAuditEntryId = 3460, + AuditAddNodesEventType_ClientUserId = 3461, + AuditDeleteNodesEventType_EventId = 3462, + AuditDeleteNodesEventType_EventType = 3463, + AuditDeleteNodesEventType_SourceNode = 3464, + AuditDeleteNodesEventType_SourceName = 3465, + AuditDeleteNodesEventType_Time = 3466, + AuditDeleteNodesEventType_ReceiveTime = 3467, + AuditDeleteNodesEventType_LocalTime = 3468, + AuditDeleteNodesEventType_Message = 3469, + AuditDeleteNodesEventType_Severity = 3470, + AuditDeleteNodesEventType_ActionTimeStamp = 3471, + AuditDeleteNodesEventType_Status = 3472, + AuditDeleteNodesEventType_ServerId = 3473, + AuditDeleteNodesEventType_ClientAuditEntryId = 3474, + AuditDeleteNodesEventType_ClientUserId = 3475, + AuditAddReferencesEventType_EventId = 3476, + AuditAddReferencesEventType_EventType = 3477, + AuditAddReferencesEventType_SourceNode = 3478, + AuditAddReferencesEventType_SourceName = 3479, + AuditAddReferencesEventType_Time = 3480, + AuditAddReferencesEventType_ReceiveTime = 3481, + AuditAddReferencesEventType_LocalTime = 3482, + AuditAddReferencesEventType_Message = 3483, + AuditAddReferencesEventType_Severity = 3484, + AuditAddReferencesEventType_ActionTimeStamp = 3485, + AuditAddReferencesEventType_Status = 3486, + AuditAddReferencesEventType_ServerId = 3487, + AuditAddReferencesEventType_ClientAuditEntryId = 3488, + AuditAddReferencesEventType_ClientUserId = 3489, + AuditDeleteReferencesEventType_EventId = 3490, + AuditDeleteReferencesEventType_EventType = 3491, + AuditDeleteReferencesEventType_SourceNode = 3492, + AuditDeleteReferencesEventType_SourceName = 3493, + AuditDeleteReferencesEventType_Time = 3494, + AuditDeleteReferencesEventType_ReceiveTime = 3495, + AuditDeleteReferencesEventType_LocalTime = 3496, + AuditDeleteReferencesEventType_Message = 3497, + AuditDeleteReferencesEventType_Severity = 3498, + AuditDeleteReferencesEventType_ActionTimeStamp = 3499, + AuditDeleteReferencesEventType_Status = 3500, + AuditDeleteReferencesEventType_ServerId = 3501, + AuditDeleteReferencesEventType_ClientAuditEntryId = 3502, + AuditDeleteReferencesEventType_ClientUserId = 3503, + AuditUpdateEventType_EventId = 3504, + AuditUpdateEventType_EventType = 3505, + AuditUpdateEventType_SourceNode = 3506, + AuditUpdateEventType_SourceName = 3507, + AuditUpdateEventType_Time = 3508, + AuditUpdateEventType_ReceiveTime = 3509, + AuditUpdateEventType_LocalTime = 3510, + AuditUpdateEventType_Message = 3511, + AuditUpdateEventType_Severity = 3512, + AuditUpdateEventType_ActionTimeStamp = 3513, + AuditUpdateEventType_Status = 3514, + AuditUpdateEventType_ServerId = 3515, + AuditUpdateEventType_ClientAuditEntryId = 3516, + AuditUpdateEventType_ClientUserId = 3517, + AuditWriteUpdateEventType_EventId = 3518, + AuditWriteUpdateEventType_EventType = 3519, + AuditWriteUpdateEventType_SourceNode = 3520, + AuditWriteUpdateEventType_SourceName = 3521, + AuditWriteUpdateEventType_Time = 3522, + AuditWriteUpdateEventType_ReceiveTime = 3523, + AuditWriteUpdateEventType_LocalTime = 3524, + AuditWriteUpdateEventType_Message = 3525, + AuditWriteUpdateEventType_Severity = 3526, + AuditWriteUpdateEventType_ActionTimeStamp = 3527, + AuditWriteUpdateEventType_Status = 3528, + AuditWriteUpdateEventType_ServerId = 3529, + AuditWriteUpdateEventType_ClientAuditEntryId = 3530, + AuditWriteUpdateEventType_ClientUserId = 3531, + AuditHistoryUpdateEventType_EventId = 3532, + AuditHistoryUpdateEventType_EventType = 3533, + AuditHistoryUpdateEventType_SourceNode = 3534, + AuditHistoryUpdateEventType_SourceName = 3535, + AuditHistoryUpdateEventType_Time = 3536, + AuditHistoryUpdateEventType_ReceiveTime = 3537, + AuditHistoryUpdateEventType_LocalTime = 3538, + AuditHistoryUpdateEventType_Message = 3539, + AuditHistoryUpdateEventType_Severity = 3540, + AuditHistoryUpdateEventType_ActionTimeStamp = 3541, + AuditHistoryUpdateEventType_Status = 3542, + AuditHistoryUpdateEventType_ServerId = 3543, + AuditHistoryUpdateEventType_ClientAuditEntryId = 3544, + AuditHistoryUpdateEventType_ClientUserId = 3545, + AuditHistoryEventUpdateEventType_EventId = 3546, + AuditHistoryEventUpdateEventType_EventType = 3547, + AuditHistoryEventUpdateEventType_SourceNode = 3548, + AuditHistoryEventUpdateEventType_SourceName = 3549, + AuditHistoryEventUpdateEventType_Time = 3550, + AuditHistoryEventUpdateEventType_ReceiveTime = 3551, + AuditHistoryEventUpdateEventType_LocalTime = 3552, + AuditHistoryEventUpdateEventType_Message = 3553, + AuditHistoryEventUpdateEventType_Severity = 3554, + AuditHistoryEventUpdateEventType_ActionTimeStamp = 3555, + AuditHistoryEventUpdateEventType_Status = 3556, + AuditHistoryEventUpdateEventType_ServerId = 3557, + AuditHistoryEventUpdateEventType_ClientAuditEntryId = 3558, + AuditHistoryEventUpdateEventType_ClientUserId = 3559, + AuditHistoryEventUpdateEventType_ParameterDataTypeId = 3560, + AuditHistoryValueUpdateEventType_EventId = 3561, + AuditHistoryValueUpdateEventType_EventType = 3562, + AuditHistoryValueUpdateEventType_SourceNode = 3563, + AuditHistoryValueUpdateEventType_SourceName = 3564, + AuditHistoryValueUpdateEventType_Time = 3565, + AuditHistoryValueUpdateEventType_ReceiveTime = 3566, + AuditHistoryValueUpdateEventType_LocalTime = 3567, + AuditHistoryValueUpdateEventType_Message = 3568, + AuditHistoryValueUpdateEventType_Severity = 3569, + AuditHistoryValueUpdateEventType_ActionTimeStamp = 3570, + AuditHistoryValueUpdateEventType_Status = 3571, + AuditHistoryValueUpdateEventType_ServerId = 3572, + AuditHistoryValueUpdateEventType_ClientAuditEntryId = 3573, + AuditHistoryValueUpdateEventType_ClientUserId = 3574, + AuditHistoryValueUpdateEventType_ParameterDataTypeId = 3575, + AuditHistoryDeleteEventType_EventId = 3576, + AuditHistoryDeleteEventType_EventType = 3577, + AuditHistoryDeleteEventType_SourceNode = 3578, + AuditHistoryDeleteEventType_SourceName = 3579, + AuditHistoryDeleteEventType_Time = 3580, + AuditHistoryDeleteEventType_ReceiveTime = 3581, + AuditHistoryDeleteEventType_LocalTime = 3582, + AuditHistoryDeleteEventType_Message = 3583, + AuditHistoryDeleteEventType_Severity = 3584, + AuditHistoryDeleteEventType_ActionTimeStamp = 3585, + AuditHistoryDeleteEventType_Status = 3586, + AuditHistoryDeleteEventType_ServerId = 3587, + AuditHistoryDeleteEventType_ClientAuditEntryId = 3588, + AuditHistoryDeleteEventType_ClientUserId = 3589, + AuditHistoryDeleteEventType_ParameterDataTypeId = 3590, + AuditHistoryRawModifyDeleteEventType_EventId = 3591, + AuditHistoryRawModifyDeleteEventType_EventType = 3592, + AuditHistoryRawModifyDeleteEventType_SourceNode = 3593, + AuditHistoryRawModifyDeleteEventType_SourceName = 3594, + AuditHistoryRawModifyDeleteEventType_Time = 3595, + AuditHistoryRawModifyDeleteEventType_ReceiveTime = 3596, + AuditHistoryRawModifyDeleteEventType_LocalTime = 3597, + AuditHistoryRawModifyDeleteEventType_Message = 3598, + AuditHistoryRawModifyDeleteEventType_Severity = 3599, + AuditHistoryRawModifyDeleteEventType_ActionTimeStamp = 3600, + AuditHistoryRawModifyDeleteEventType_Status = 3601, + AuditHistoryRawModifyDeleteEventType_ServerId = 3602, + AuditHistoryRawModifyDeleteEventType_ClientAuditEntryId = 3603, + AuditHistoryRawModifyDeleteEventType_ClientUserId = 3604, + AuditHistoryRawModifyDeleteEventType_ParameterDataTypeId = 3605, + AuditHistoryRawModifyDeleteEventType_UpdatedNode = 3606, + AuditHistoryAtTimeDeleteEventType_EventId = 3607, + AuditHistoryAtTimeDeleteEventType_EventType = 3608, + AuditHistoryAtTimeDeleteEventType_SourceNode = 3609, + AuditHistoryAtTimeDeleteEventType_SourceName = 3610, + AuditHistoryAtTimeDeleteEventType_Time = 3611, + AuditHistoryAtTimeDeleteEventType_ReceiveTime = 3612, + AuditHistoryAtTimeDeleteEventType_LocalTime = 3613, + AuditHistoryAtTimeDeleteEventType_Message = 3614, + AuditHistoryAtTimeDeleteEventType_Severity = 3615, + AuditHistoryAtTimeDeleteEventType_ActionTimeStamp = 3616, + AuditHistoryAtTimeDeleteEventType_Status = 3617, + AuditHistoryAtTimeDeleteEventType_ServerId = 3618, + AuditHistoryAtTimeDeleteEventType_ClientAuditEntryId = 3619, + AuditHistoryAtTimeDeleteEventType_ClientUserId = 3620, + AuditHistoryAtTimeDeleteEventType_ParameterDataTypeId = 3621, + AuditHistoryAtTimeDeleteEventType_UpdatedNode = 3622, + AuditHistoryEventDeleteEventType_EventId = 3623, + AuditHistoryEventDeleteEventType_EventType = 3624, + AuditHistoryEventDeleteEventType_SourceNode = 3625, + AuditHistoryEventDeleteEventType_SourceName = 3626, + AuditHistoryEventDeleteEventType_Time = 3627, + AuditHistoryEventDeleteEventType_ReceiveTime = 3628, + AuditHistoryEventDeleteEventType_LocalTime = 3629, + AuditHistoryEventDeleteEventType_Message = 3630, + AuditHistoryEventDeleteEventType_Severity = 3631, + AuditHistoryEventDeleteEventType_ActionTimeStamp = 3632, + AuditHistoryEventDeleteEventType_Status = 3633, + AuditHistoryEventDeleteEventType_ServerId = 3634, + AuditHistoryEventDeleteEventType_ClientAuditEntryId = 3635, + AuditHistoryEventDeleteEventType_ClientUserId = 3636, + AuditHistoryEventDeleteEventType_ParameterDataTypeId = 3637, + AuditHistoryEventDeleteEventType_UpdatedNode = 3638, + AuditUpdateMethodEventType_EventId = 3639, + AuditUpdateMethodEventType_EventType = 3640, + AuditUpdateMethodEventType_SourceNode = 3641, + AuditUpdateMethodEventType_SourceName = 3642, + AuditUpdateMethodEventType_Time = 3643, + AuditUpdateMethodEventType_ReceiveTime = 3644, + AuditUpdateMethodEventType_LocalTime = 3645, + AuditUpdateMethodEventType_Message = 3646, + AuditUpdateMethodEventType_Severity = 3647, + AuditUpdateMethodEventType_ActionTimeStamp = 3648, + AuditUpdateMethodEventType_Status = 3649, + AuditUpdateMethodEventType_ServerId = 3650, + AuditUpdateMethodEventType_ClientAuditEntryId = 3651, + AuditUpdateMethodEventType_ClientUserId = 3652, + SystemEventType_EventId = 3653, + SystemEventType_EventType = 3654, + SystemEventType_SourceNode = 3655, + SystemEventType_SourceName = 3656, + SystemEventType_Time = 3657, + SystemEventType_ReceiveTime = 3658, + SystemEventType_LocalTime = 3659, + SystemEventType_Message = 3660, + SystemEventType_Severity = 3661, + DeviceFailureEventType_EventId = 3662, + DeviceFailureEventType_EventType = 3663, + DeviceFailureEventType_SourceNode = 3664, + DeviceFailureEventType_SourceName = 3665, + DeviceFailureEventType_Time = 3666, + DeviceFailureEventType_ReceiveTime = 3667, + DeviceFailureEventType_LocalTime = 3668, + DeviceFailureEventType_Message = 3669, + DeviceFailureEventType_Severity = 3670, + BaseModelChangeEventType_EventId = 3671, + BaseModelChangeEventType_EventType = 3672, + BaseModelChangeEventType_SourceNode = 3673, + BaseModelChangeEventType_SourceName = 3674, + BaseModelChangeEventType_Time = 3675, + BaseModelChangeEventType_ReceiveTime = 3676, + BaseModelChangeEventType_LocalTime = 3677, + BaseModelChangeEventType_Message = 3678, + BaseModelChangeEventType_Severity = 3679, + GeneralModelChangeEventType_EventId = 3680, + GeneralModelChangeEventType_EventType = 3681, + GeneralModelChangeEventType_SourceNode = 3682, + GeneralModelChangeEventType_SourceName = 3683, + GeneralModelChangeEventType_Time = 3684, + GeneralModelChangeEventType_ReceiveTime = 3685, + GeneralModelChangeEventType_LocalTime = 3686, + GeneralModelChangeEventType_Message = 3687, + GeneralModelChangeEventType_Severity = 3688, + SemanticChangeEventType_EventId = 3689, + SemanticChangeEventType_EventType = 3690, + SemanticChangeEventType_SourceNode = 3691, + SemanticChangeEventType_SourceName = 3692, + SemanticChangeEventType_Time = 3693, + SemanticChangeEventType_ReceiveTime = 3694, + SemanticChangeEventType_LocalTime = 3695, + SemanticChangeEventType_Message = 3696, + SemanticChangeEventType_Severity = 3697, + ServerStatusType_BuildInfo_ProductUri = 3698, + ServerStatusType_BuildInfo_ManufacturerName = 3699, + ServerStatusType_BuildInfo_ProductName = 3700, + ServerStatusType_BuildInfo_SoftwareVersion = 3701, + ServerStatusType_BuildInfo_BuildNumber = 3702, + ServerStatusType_BuildInfo_BuildDate = 3703, + Server_ServerCapabilities_SoftwareCertificates = 3704, + Server_ServerDiagnostics_ServerDiagnosticsSummary_RejectedSessionCount = 3705, + Server_ServerDiagnostics_SessionsDiagnosticsSummary = 3706, + Server_ServerDiagnostics_SessionsDiagnosticsSummary_SessionDiagnosticsArray = 3707, + Server_ServerDiagnostics_SessionsDiagnosticsSummary_SessionSecurityDiagnosticsArray = 3708, + Server_ServerRedundancy_RedundancySupport = 3709, + FiniteStateVariableType_Name = 3714, + FiniteStateVariableType_Number = 3715, + FiniteStateVariableType_EffectiveDisplayName = 3716, + FiniteTransitionVariableType_Name = 3717, + FiniteTransitionVariableType_Number = 3718, + FiniteTransitionVariableType_TransitionTime = 3719, + StateMachineType_CurrentState_Id = 3720, + StateMachineType_CurrentState_Name = 3721, + StateMachineType_CurrentState_Number = 3722, + StateMachineType_CurrentState_EffectiveDisplayName = 3723, + StateMachineType_LastTransition_Id = 3724, + StateMachineType_LastTransition_Name = 3725, + StateMachineType_LastTransition_Number = 3726, + StateMachineType_LastTransition_TransitionTime = 3727, + FiniteStateMachineType_CurrentState_Id = 3728, + FiniteStateMachineType_CurrentState_Name = 3729, + FiniteStateMachineType_CurrentState_Number = 3730, + FiniteStateMachineType_CurrentState_EffectiveDisplayName = 3731, + FiniteStateMachineType_LastTransition_Id = 3732, + FiniteStateMachineType_LastTransition_Name = 3733, + FiniteStateMachineType_LastTransition_Number = 3734, + FiniteStateMachineType_LastTransition_TransitionTime = 3735, + InitialStateType_StateNumber = 3736, + TransitionEventType_EventId = 3737, + TransitionEventType_EventType = 3738, + TransitionEventType_SourceNode = 3739, + TransitionEventType_SourceName = 3740, + TransitionEventType_Time = 3741, + TransitionEventType_ReceiveTime = 3742, + TransitionEventType_LocalTime = 3743, + TransitionEventType_Message = 3744, + TransitionEventType_Severity = 3745, + TransitionEventType_FromState_Id = 3746, + TransitionEventType_FromState_Name = 3747, + TransitionEventType_FromState_Number = 3748, + TransitionEventType_FromState_EffectiveDisplayName = 3749, + TransitionEventType_ToState_Id = 3750, + TransitionEventType_ToState_Name = 3751, + TransitionEventType_ToState_Number = 3752, + TransitionEventType_ToState_EffectiveDisplayName = 3753, + TransitionEventType_Transition_Id = 3754, + TransitionEventType_Transition_Name = 3755, + TransitionEventType_Transition_Number = 3756, + TransitionEventType_Transition_TransitionTime = 3757, + AuditUpdateStateEventType_EventId = 3758, + AuditUpdateStateEventType_EventType = 3759, + AuditUpdateStateEventType_SourceNode = 3760, + AuditUpdateStateEventType_SourceName = 3761, + AuditUpdateStateEventType_Time = 3762, + AuditUpdateStateEventType_ReceiveTime = 3763, + AuditUpdateStateEventType_LocalTime = 3764, + AuditUpdateStateEventType_Message = 3765, + AuditUpdateStateEventType_Severity = 3766, + AuditUpdateStateEventType_ActionTimeStamp = 3767, + AuditUpdateStateEventType_Status = 3768, + AuditUpdateStateEventType_ServerId = 3769, + AuditUpdateStateEventType_ClientAuditEntryId = 3770, + AuditUpdateStateEventType_ClientUserId = 3771, + AuditUpdateStateEventType_MethodId = 3772, + AuditUpdateStateEventType_InputArguments = 3773, + AnalogItemType_Definition = 3774, + AnalogItemType_ValuePrecision = 3775, + DiscreteItemType_Definition = 3776, + DiscreteItemType_ValuePrecision = 3777, + TwoStateDiscreteType_Definition = 3778, + TwoStateDiscreteType_ValuePrecision = 3779, + MultiStateDiscreteType_Definition = 3780, + MultiStateDiscreteType_ValuePrecision = 3781, + ProgramTransitionEventType_EventId = 3782, + ProgramTransitionEventType_EventType = 3783, + ProgramTransitionEventType_SourceNode = 3784, + ProgramTransitionEventType_SourceName = 3785, + ProgramTransitionEventType_Time = 3786, + ProgramTransitionEventType_ReceiveTime = 3787, + ProgramTransitionEventType_LocalTime = 3788, + ProgramTransitionEventType_Message = 3789, + ProgramTransitionEventType_Severity = 3790, + ProgramTransitionEventType_FromState = 3791, + ProgramTransitionEventType_FromState_Id = 3792, + ProgramTransitionEventType_FromState_Name = 3793, + ProgramTransitionEventType_FromState_Number = 3794, + ProgramTransitionEventType_FromState_EffectiveDisplayName = 3795, + ProgramTransitionEventType_ToState = 3796, + ProgramTransitionEventType_ToState_Id = 3797, + ProgramTransitionEventType_ToState_Name = 3798, + ProgramTransitionEventType_ToState_Number = 3799, + ProgramTransitionEventType_ToState_EffectiveDisplayName = 3800, + ProgramTransitionEventType_Transition = 3801, + ProgramTransitionEventType_Transition_Id = 3802, + ProgramTransitionEventType_Transition_Name = 3803, + ProgramTransitionEventType_Transition_Number = 3804, + ProgramTransitionEventType_Transition_TransitionTime = 3805, + ProgramTransitionAuditEventType = 3806, + ProgramTransitionAuditEventType_EventId = 3807, + ProgramTransitionAuditEventType_EventType = 3808, + ProgramTransitionAuditEventType_SourceNode = 3809, + ProgramTransitionAuditEventType_SourceName = 3810, + ProgramTransitionAuditEventType_Time = 3811, + ProgramTransitionAuditEventType_ReceiveTime = 3812, + ProgramTransitionAuditEventType_LocalTime = 3813, + ProgramTransitionAuditEventType_Message = 3814, + ProgramTransitionAuditEventType_Severity = 3815, + ProgramTransitionAuditEventType_ActionTimeStamp = 3816, + ProgramTransitionAuditEventType_Status = 3817, + ProgramTransitionAuditEventType_ServerId = 3818, + ProgramTransitionAuditEventType_ClientAuditEntryId = 3819, + ProgramTransitionAuditEventType_ClientUserId = 3820, + ProgramTransitionAuditEventType_MethodId = 3821, + ProgramTransitionAuditEventType_InputArguments = 3822, + ProgramTransitionAuditEventType_OldStateId = 3823, + ProgramTransitionAuditEventType_NewStateId = 3824, + ProgramTransitionAuditEventType_Transition = 3825, + ProgramTransitionAuditEventType_Transition_Id = 3826, + ProgramTransitionAuditEventType_Transition_Name = 3827, + ProgramTransitionAuditEventType_Transition_Number = 3828, + ProgramTransitionAuditEventType_Transition_TransitionTime = 3829, + ProgramStateMachineType_CurrentState = 3830, + ProgramStateMachineType_CurrentState_Id = 3831, + ProgramStateMachineType_CurrentState_Name = 3832, + ProgramStateMachineType_CurrentState_Number = 3833, + ProgramStateMachineType_CurrentState_EffectiveDisplayName = 3834, + ProgramStateMachineType_LastTransition = 3835, + ProgramStateMachineType_LastTransition_Id = 3836, + ProgramStateMachineType_LastTransition_Name = 3837, + ProgramStateMachineType_LastTransition_Number = 3838, + ProgramStateMachineType_LastTransition_TransitionTime = 3839, + ProgramStateMachineType_ProgramDiagnostics_CreateSessionId = 3840, + ProgramStateMachineType_ProgramDiagnostics_CreateClientName = 3841, + ProgramStateMachineType_ProgramDiagnostics_InvocationCreationTime = 3842, + ProgramStateMachineType_ProgramDiagnostics_LastTransitionTime = 3843, + ProgramStateMachineType_ProgramDiagnostics_LastMethodCall = 3844, + ProgramStateMachineType_ProgramDiagnostics_LastMethodSessionId = 3845, + ProgramStateMachineType_ProgramDiagnostics_LastMethodInputArguments = 3846, + ProgramStateMachineType_ProgramDiagnostics_LastMethodOutputArguments = 3847, + ProgramStateMachineType_ProgramDiagnostics_LastMethodCallTime = 3848, + ProgramStateMachineType_ProgramDiagnostics_LastMethodReturnStatus = 3849, + ProgramStateMachineType_FinalResultData = 3850, + AddCommentMethodType = 3863, + AddCommentMethodType_InputArguments = 3864, + ConditionType_EventId = 3865, + ConditionType_EventType = 3866, + ConditionType_SourceNode = 3867, + ConditionType_SourceName = 3868, + ConditionType_Time = 3869, + ConditionType_ReceiveTime = 3870, + ConditionType_LocalTime = 3871, + ConditionType_Message = 3872, + ConditionType_Severity = 3873, + ConditionType_Retain = 3874, + ConditionType_ConditionRefresh = 3875, + ConditionType_ConditionRefresh_InputArguments = 3876, + RefreshStartEventType_EventId = 3969, + RefreshStartEventType_EventType = 3970, + RefreshStartEventType_SourceNode = 3971, + RefreshStartEventType_SourceName = 3972, + RefreshStartEventType_Time = 3973, + RefreshStartEventType_ReceiveTime = 3974, + RefreshStartEventType_LocalTime = 3975, + RefreshStartEventType_Message = 3976, + RefreshStartEventType_Severity = 3977, + RefreshEndEventType_EventId = 3978, + RefreshEndEventType_EventType = 3979, + RefreshEndEventType_SourceNode = 3980, + RefreshEndEventType_SourceName = 3981, + RefreshEndEventType_Time = 3982, + RefreshEndEventType_ReceiveTime = 3983, + RefreshEndEventType_LocalTime = 3984, + RefreshEndEventType_Message = 3985, + RefreshEndEventType_Severity = 3986, + RefreshRequiredEventType_EventId = 3987, + RefreshRequiredEventType_EventType = 3988, + RefreshRequiredEventType_SourceNode = 3989, + RefreshRequiredEventType_SourceName = 3990, + RefreshRequiredEventType_Time = 3991, + RefreshRequiredEventType_ReceiveTime = 3992, + RefreshRequiredEventType_LocalTime = 3993, + RefreshRequiredEventType_Message = 3994, + RefreshRequiredEventType_Severity = 3995, + AuditConditionEventType_EventId = 3996, + AuditConditionEventType_EventType = 3997, + AuditConditionEventType_SourceNode = 3998, + AuditConditionEventType_SourceName = 3999, + AuditConditionEventType_Time = 4000, + AuditConditionEventType_ReceiveTime = 4001, + AuditConditionEventType_LocalTime = 4002, + AuditConditionEventType_Message = 4003, + AuditConditionEventType_Severity = 4004, + AuditConditionEventType_ActionTimeStamp = 4005, + AuditConditionEventType_Status = 4006, + AuditConditionEventType_ServerId = 4007, + AuditConditionEventType_ClientAuditEntryId = 4008, + AuditConditionEventType_ClientUserId = 4009, + AuditConditionEventType_MethodId = 4010, + AuditConditionEventType_InputArguments = 4011, + AuditConditionEnableEventType_EventId = 4106, + AuditConditionEnableEventType_EventType = 4107, + AuditConditionEnableEventType_SourceNode = 4108, + AuditConditionEnableEventType_SourceName = 4109, + AuditConditionEnableEventType_Time = 4110, + AuditConditionEnableEventType_ReceiveTime = 4111, + AuditConditionEnableEventType_LocalTime = 4112, + AuditConditionEnableEventType_Message = 4113, + AuditConditionEnableEventType_Severity = 4114, + AuditConditionEnableEventType_ActionTimeStamp = 4115, + AuditConditionEnableEventType_Status = 4116, + AuditConditionEnableEventType_ServerId = 4117, + AuditConditionEnableEventType_ClientAuditEntryId = 4118, + AuditConditionEnableEventType_ClientUserId = 4119, + AuditConditionEnableEventType_MethodId = 4120, + AuditConditionEnableEventType_InputArguments = 4121, + AuditConditionCommentEventType_EventId = 4170, + AuditConditionCommentEventType_EventType = 4171, + AuditConditionCommentEventType_SourceNode = 4172, + AuditConditionCommentEventType_SourceName = 4173, + AuditConditionCommentEventType_Time = 4174, + AuditConditionCommentEventType_ReceiveTime = 4175, + AuditConditionCommentEventType_LocalTime = 4176, + AuditConditionCommentEventType_Message = 4177, + AuditConditionCommentEventType_Severity = 4178, + AuditConditionCommentEventType_ActionTimeStamp = 4179, + AuditConditionCommentEventType_Status = 4180, + AuditConditionCommentEventType_ServerId = 4181, + AuditConditionCommentEventType_ClientAuditEntryId = 4182, + AuditConditionCommentEventType_ClientUserId = 4183, + AuditConditionCommentEventType_MethodId = 4184, + AuditConditionCommentEventType_InputArguments = 4185, + DialogConditionType_EventId = 4188, + DialogConditionType_EventType = 4189, + DialogConditionType_SourceNode = 4190, + DialogConditionType_SourceName = 4191, + DialogConditionType_Time = 4192, + DialogConditionType_ReceiveTime = 4193, + DialogConditionType_LocalTime = 4194, + DialogConditionType_Message = 4195, + DialogConditionType_Severity = 4196, + DialogConditionType_Retain = 4197, + DialogConditionType_ConditionRefresh = 4198, + DialogConditionType_ConditionRefresh_InputArguments = 4199, + AcknowledgeableConditionType_EventId = 5113, + AcknowledgeableConditionType_EventType = 5114, + AcknowledgeableConditionType_SourceNode = 5115, + AcknowledgeableConditionType_SourceName = 5116, + AcknowledgeableConditionType_Time = 5117, + AcknowledgeableConditionType_ReceiveTime = 5118, + AcknowledgeableConditionType_LocalTime = 5119, + AcknowledgeableConditionType_Message = 5120, + AcknowledgeableConditionType_Severity = 5121, + AcknowledgeableConditionType_Retain = 5122, + AcknowledgeableConditionType_ConditionRefresh = 5123, + AcknowledgeableConditionType_ConditionRefresh_InputArguments = 5124, + AlarmConditionType_EventId = 5540, + AlarmConditionType_EventType = 5541, + AlarmConditionType_SourceNode = 5542, + AlarmConditionType_SourceName = 5543, + AlarmConditionType_Time = 5544, + AlarmConditionType_ReceiveTime = 5545, + AlarmConditionType_LocalTime = 5546, + AlarmConditionType_Message = 5547, + AlarmConditionType_Severity = 5548, + AlarmConditionType_Retain = 5549, + AlarmConditionType_ConditionRefresh = 5550, + AlarmConditionType_ConditionRefresh_InputArguments = 5551, + ShelvedStateMachineType_CurrentState = 6088, + ShelvedStateMachineType_CurrentState_Id = 6089, + ShelvedStateMachineType_CurrentState_Name = 6090, + ShelvedStateMachineType_CurrentState_Number = 6091, + ShelvedStateMachineType_CurrentState_EffectiveDisplayName = 6092, + ShelvedStateMachineType_LastTransition = 6093, + ShelvedStateMachineType_LastTransition_Id = 6094, + ShelvedStateMachineType_LastTransition_Name = 6095, + ShelvedStateMachineType_LastTransition_Number = 6096, + ShelvedStateMachineType_LastTransition_TransitionTime = 6097, + ShelvedStateMachineType_Unshelved_StateNumber = 6098, + ShelvedStateMachineType_TimedShelved_StateNumber = 6100, + ShelvedStateMachineType_OneShotShelved_StateNumber = 6101, + TimedShelveMethodType = 6102, + TimedShelveMethodType_InputArguments = 6103, + LimitAlarmType_EventId = 6116, + LimitAlarmType_EventType = 6117, + LimitAlarmType_SourceNode = 6118, + LimitAlarmType_SourceName = 6119, + LimitAlarmType_Time = 6120, + LimitAlarmType_ReceiveTime = 6121, + LimitAlarmType_LocalTime = 6122, + LimitAlarmType_Message = 6123, + LimitAlarmType_Severity = 6124, + LimitAlarmType_Retain = 6125, + LimitAlarmType_ConditionRefresh = 6126, + LimitAlarmType_ConditionRefresh_InputArguments = 6127, + IdType_EnumStrings = 7591, + EnumValueType = 7594, + MessageSecurityMode_EnumStrings = 7595, + UserTokenType_EnumStrings = 7596, + ApplicationType_EnumStrings = 7597, + SecurityTokenRequestType_EnumStrings = 7598, + ComplianceLevel_EnumStrings = 7599, + BrowseDirection_EnumStrings = 7603, + FilterOperator_EnumStrings = 7605, + TimestampsToReturn_EnumStrings = 7606, + MonitoringMode_EnumStrings = 7608, + DataChangeTrigger_EnumStrings = 7609, + DeadbandType_EnumStrings = 7610, + RedundancySupport_EnumStrings = 7611, + ServerState_EnumStrings = 7612, + ExceptionDeviationFormat_EnumStrings = 7614, + EnumValueType_Encoding_DefaultXml = 7616, + OpcUa_BinarySchema = 7617, + OpcUa_BinarySchema_DataTypeVersion = 7618, + OpcUa_BinarySchema_NamespaceUri = 7619, + OpcUa_BinarySchema_Argument = 7650, + OpcUa_BinarySchema_Argument_DataTypeVersion = 7651, + OpcUa_BinarySchema_Argument_DictionaryFragment = 7652, + OpcUa_BinarySchema_EnumValueType = 7656, + OpcUa_BinarySchema_EnumValueType_DataTypeVersion = 7657, + OpcUa_BinarySchema_EnumValueType_DictionaryFragment = 7658, + OpcUa_BinarySchema_StatusResult = 7659, + OpcUa_BinarySchema_StatusResult_DataTypeVersion = 7660, + OpcUa_BinarySchema_StatusResult_DictionaryFragment = 7661, + OpcUa_BinarySchema_UserTokenPolicy = 7662, + OpcUa_BinarySchema_UserTokenPolicy_DataTypeVersion = 7663, + OpcUa_BinarySchema_UserTokenPolicy_DictionaryFragment = 7664, + OpcUa_BinarySchema_ApplicationDescription = 7665, + OpcUa_BinarySchema_ApplicationDescription_DataTypeVersion = 7666, + OpcUa_BinarySchema_ApplicationDescription_DictionaryFragment = 7667, + OpcUa_BinarySchema_EndpointDescription = 7668, + OpcUa_BinarySchema_EndpointDescription_DataTypeVersion = 7669, + OpcUa_BinarySchema_EndpointDescription_DictionaryFragment = 7670, + OpcUa_BinarySchema_UserIdentityToken = 7671, + OpcUa_BinarySchema_UserIdentityToken_DataTypeVersion = 7672, + OpcUa_BinarySchema_UserIdentityToken_DictionaryFragment = 7673, + OpcUa_BinarySchema_AnonymousIdentityToken = 7674, + OpcUa_BinarySchema_AnonymousIdentityToken_DataTypeVersion = 7675, + OpcUa_BinarySchema_AnonymousIdentityToken_DictionaryFragment = 7676, + OpcUa_BinarySchema_UserNameIdentityToken = 7677, + OpcUa_BinarySchema_UserNameIdentityToken_DataTypeVersion = 7678, + OpcUa_BinarySchema_UserNameIdentityToken_DictionaryFragment = 7679, + OpcUa_BinarySchema_X509IdentityToken = 7680, + OpcUa_BinarySchema_X509IdentityToken_DataTypeVersion = 7681, + OpcUa_BinarySchema_X509IdentityToken_DictionaryFragment = 7682, + OpcUa_BinarySchema_IssuedIdentityToken = 7683, + OpcUa_BinarySchema_IssuedIdentityToken_DataTypeVersion = 7684, + OpcUa_BinarySchema_IssuedIdentityToken_DictionaryFragment = 7685, + OpcUa_BinarySchema_EndpointConfiguration = 7686, + OpcUa_BinarySchema_EndpointConfiguration_DataTypeVersion = 7687, + OpcUa_BinarySchema_EndpointConfiguration_DictionaryFragment = 7688, + OpcUa_BinarySchema_SupportedProfile = 7689, + OpcUa_BinarySchema_SupportedProfile_DataTypeVersion = 7690, + OpcUa_BinarySchema_SupportedProfile_DictionaryFragment = 7691, + OpcUa_BinarySchema_BuildInfo = 7692, + OpcUa_BinarySchema_BuildInfo_DataTypeVersion = 7693, + OpcUa_BinarySchema_BuildInfo_DictionaryFragment = 7694, + OpcUa_BinarySchema_SoftwareCertificate = 7695, + OpcUa_BinarySchema_SoftwareCertificate_DataTypeVersion = 7696, + OpcUa_BinarySchema_SoftwareCertificate_DictionaryFragment = 7697, + OpcUa_BinarySchema_SignedSoftwareCertificate = 7698, + OpcUa_BinarySchema_SignedSoftwareCertificate_DataTypeVersion = 7699, + OpcUa_BinarySchema_SignedSoftwareCertificate_DictionaryFragment = 7700, + OpcUa_BinarySchema_AddNodesItem = 7728, + OpcUa_BinarySchema_AddNodesItem_DataTypeVersion = 7729, + OpcUa_BinarySchema_AddNodesItem_DictionaryFragment = 7730, + OpcUa_BinarySchema_AddReferencesItem = 7731, + OpcUa_BinarySchema_AddReferencesItem_DataTypeVersion = 7732, + OpcUa_BinarySchema_AddReferencesItem_DictionaryFragment = 7733, + OpcUa_BinarySchema_DeleteNodesItem = 7734, + OpcUa_BinarySchema_DeleteNodesItem_DataTypeVersion = 7735, + OpcUa_BinarySchema_DeleteNodesItem_DictionaryFragment = 7736, + OpcUa_BinarySchema_DeleteReferencesItem = 7737, + OpcUa_BinarySchema_DeleteReferencesItem_DataTypeVersion = 7738, + OpcUa_BinarySchema_DeleteReferencesItem_DictionaryFragment = 7739, + OpcUa_BinarySchema_ScalarTestType = 7749, + OpcUa_BinarySchema_ScalarTestType_DataTypeVersion = 7750, + OpcUa_BinarySchema_ScalarTestType_DictionaryFragment = 7751, + OpcUa_BinarySchema_ArrayTestType = 7752, + OpcUa_BinarySchema_ArrayTestType_DataTypeVersion = 7753, + OpcUa_BinarySchema_ArrayTestType_DictionaryFragment = 7754, + OpcUa_BinarySchema_CompositeTestType = 7755, + OpcUa_BinarySchema_CompositeTestType_DataTypeVersion = 7756, + OpcUa_BinarySchema_CompositeTestType_DictionaryFragment = 7757, + OpcUa_BinarySchema_RegisteredServer = 7782, + OpcUa_BinarySchema_RegisteredServer_DataTypeVersion = 7783, + OpcUa_BinarySchema_RegisteredServer_DictionaryFragment = 7784, + OpcUa_BinarySchema_ContentFilterElement = 7929, + OpcUa_BinarySchema_ContentFilterElement_DataTypeVersion = 7930, + OpcUa_BinarySchema_ContentFilterElement_DictionaryFragment = 7931, + OpcUa_BinarySchema_ContentFilter = 7932, + OpcUa_BinarySchema_ContentFilter_DataTypeVersion = 7933, + OpcUa_BinarySchema_ContentFilter_DictionaryFragment = 7934, + OpcUa_BinarySchema_FilterOperand = 7935, + OpcUa_BinarySchema_FilterOperand_DataTypeVersion = 7936, + OpcUa_BinarySchema_FilterOperand_DictionaryFragment = 7937, + OpcUa_BinarySchema_ElementOperand = 7938, + OpcUa_BinarySchema_ElementOperand_DataTypeVersion = 7939, + OpcUa_BinarySchema_ElementOperand_DictionaryFragment = 7940, + OpcUa_BinarySchema_LiteralOperand = 7941, + OpcUa_BinarySchema_LiteralOperand_DataTypeVersion = 7942, + OpcUa_BinarySchema_LiteralOperand_DictionaryFragment = 7943, + OpcUa_BinarySchema_AttributeOperand = 7944, + OpcUa_BinarySchema_AttributeOperand_DataTypeVersion = 7945, + OpcUa_BinarySchema_AttributeOperand_DictionaryFragment = 7946, + OpcUa_BinarySchema_SimpleAttributeOperand = 7947, + OpcUa_BinarySchema_SimpleAttributeOperand_DataTypeVersion = 7948, + OpcUa_BinarySchema_SimpleAttributeOperand_DictionaryFragment = 7949, + OpcUa_BinarySchema_HistoryEvent = 8004, + OpcUa_BinarySchema_HistoryEvent_DataTypeVersion = 8005, + OpcUa_BinarySchema_HistoryEvent_DictionaryFragment = 8006, + OpcUa_BinarySchema_MonitoringFilter = 8067, + OpcUa_BinarySchema_MonitoringFilter_DataTypeVersion = 8068, + OpcUa_BinarySchema_MonitoringFilter_DictionaryFragment = 8069, + OpcUa_BinarySchema_EventFilter = 8073, + OpcUa_BinarySchema_EventFilter_DataTypeVersion = 8074, + OpcUa_BinarySchema_EventFilter_DictionaryFragment = 8075, + OpcUa_BinarySchema_AggregateConfiguration = 8076, + OpcUa_BinarySchema_AggregateConfiguration_DataTypeVersion = 8077, + OpcUa_BinarySchema_AggregateConfiguration_DictionaryFragment = 8078, + OpcUa_BinarySchema_HistoryEventFieldList = 8172, + OpcUa_BinarySchema_HistoryEventFieldList_DataTypeVersion = 8173, + OpcUa_BinarySchema_HistoryEventFieldList_DictionaryFragment = 8174, + OpcUa_BinarySchema_RedundantServerDataType = 8208, + OpcUa_BinarySchema_RedundantServerDataType_DataTypeVersion = 8209, + OpcUa_BinarySchema_RedundantServerDataType_DictionaryFragment = 8210, + OpcUa_BinarySchema_SamplingIntervalDiagnosticsDataType = 8211, + OpcUa_BinarySchema_SamplingIntervalDiagnosticsDataType_DataTypeVersion = 8212, + OpcUa_BinarySchema_SamplingIntervalDiagnosticsDataType_DictionaryFragment = 8213, + OpcUa_BinarySchema_ServerDiagnosticsSummaryDataType = 8214, + OpcUa_BinarySchema_ServerDiagnosticsSummaryDataType_DataTypeVersion = 8215, + OpcUa_BinarySchema_ServerDiagnosticsSummaryDataType_DictionaryFragment = 8216, + OpcUa_BinarySchema_ServerStatusDataType = 8217, + OpcUa_BinarySchema_ServerStatusDataType_DataTypeVersion = 8218, + OpcUa_BinarySchema_ServerStatusDataType_DictionaryFragment = 8219, + OpcUa_BinarySchema_SessionDiagnosticsDataType = 8220, + OpcUa_BinarySchema_SessionDiagnosticsDataType_DataTypeVersion = 8221, + OpcUa_BinarySchema_SessionDiagnosticsDataType_DictionaryFragment = 8222, + OpcUa_BinarySchema_SessionSecurityDiagnosticsDataType = 8223, + OpcUa_BinarySchema_SessionSecurityDiagnosticsDataType_DataTypeVersion = 8224, + OpcUa_BinarySchema_SessionSecurityDiagnosticsDataType_DictionaryFragment = 8225, + OpcUa_BinarySchema_ServiceCounterDataType = 8226, + OpcUa_BinarySchema_ServiceCounterDataType_DataTypeVersion = 8227, + OpcUa_BinarySchema_ServiceCounterDataType_DictionaryFragment = 8228, + OpcUa_BinarySchema_SubscriptionDiagnosticsDataType = 8229, + OpcUa_BinarySchema_SubscriptionDiagnosticsDataType_DataTypeVersion = 8230, + OpcUa_BinarySchema_SubscriptionDiagnosticsDataType_DictionaryFragment = 8231, + OpcUa_BinarySchema_ModelChangeStructureDataType = 8232, + OpcUa_BinarySchema_ModelChangeStructureDataType_DataTypeVersion = 8233, + OpcUa_BinarySchema_ModelChangeStructureDataType_DictionaryFragment = 8234, + OpcUa_BinarySchema_SemanticChangeStructureDataType = 8235, + OpcUa_BinarySchema_SemanticChangeStructureDataType_DataTypeVersion = 8236, + OpcUa_BinarySchema_SemanticChangeStructureDataType_DictionaryFragment = 8237, + OpcUa_BinarySchema_Range = 8238, + OpcUa_BinarySchema_Range_DataTypeVersion = 8239, + OpcUa_BinarySchema_Range_DictionaryFragment = 8240, + OpcUa_BinarySchema_EUInformation = 8241, + OpcUa_BinarySchema_EUInformation_DataTypeVersion = 8242, + OpcUa_BinarySchema_EUInformation_DictionaryFragment = 8243, + OpcUa_BinarySchema_Annotation = 8244, + OpcUa_BinarySchema_Annotation_DataTypeVersion = 8245, + OpcUa_BinarySchema_Annotation_DictionaryFragment = 8246, + OpcUa_BinarySchema_ProgramDiagnosticDataType = 8247, + OpcUa_BinarySchema_ProgramDiagnosticDataType_DataTypeVersion = 8248, + OpcUa_BinarySchema_ProgramDiagnosticDataType_DictionaryFragment = 8249, + EnumValueType_Encoding_DefaultBinary = 8251, + OpcUa_XmlSchema = 8252, + OpcUa_XmlSchema_DataTypeVersion = 8253, + OpcUa_XmlSchema_NamespaceUri = 8254, + OpcUa_XmlSchema_Argument = 8285, + OpcUa_XmlSchema_Argument_DataTypeVersion = 8286, + OpcUa_XmlSchema_Argument_DictionaryFragment = 8287, + OpcUa_XmlSchema_EnumValueType = 8291, + OpcUa_XmlSchema_EnumValueType_DataTypeVersion = 8292, + OpcUa_XmlSchema_EnumValueType_DictionaryFragment = 8293, + OpcUa_XmlSchema_StatusResult = 8294, + OpcUa_XmlSchema_StatusResult_DataTypeVersion = 8295, + OpcUa_XmlSchema_StatusResult_DictionaryFragment = 8296, + OpcUa_XmlSchema_UserTokenPolicy = 8297, + OpcUa_XmlSchema_UserTokenPolicy_DataTypeVersion = 8298, + OpcUa_XmlSchema_UserTokenPolicy_DictionaryFragment = 8299, + OpcUa_XmlSchema_ApplicationDescription = 8300, + OpcUa_XmlSchema_ApplicationDescription_DataTypeVersion = 8301, + OpcUa_XmlSchema_ApplicationDescription_DictionaryFragment = 8302, + OpcUa_XmlSchema_EndpointDescription = 8303, + OpcUa_XmlSchema_EndpointDescription_DataTypeVersion = 8304, + OpcUa_XmlSchema_EndpointDescription_DictionaryFragment = 8305, + OpcUa_XmlSchema_UserIdentityToken = 8306, + OpcUa_XmlSchema_UserIdentityToken_DataTypeVersion = 8307, + OpcUa_XmlSchema_UserIdentityToken_DictionaryFragment = 8308, + OpcUa_XmlSchema_AnonymousIdentityToken = 8309, + OpcUa_XmlSchema_AnonymousIdentityToken_DataTypeVersion = 8310, + OpcUa_XmlSchema_AnonymousIdentityToken_DictionaryFragment = 8311, + OpcUa_XmlSchema_UserNameIdentityToken = 8312, + OpcUa_XmlSchema_UserNameIdentityToken_DataTypeVersion = 8313, + OpcUa_XmlSchema_UserNameIdentityToken_DictionaryFragment = 8314, + OpcUa_XmlSchema_X509IdentityToken = 8315, + OpcUa_XmlSchema_X509IdentityToken_DataTypeVersion = 8316, + OpcUa_XmlSchema_X509IdentityToken_DictionaryFragment = 8317, + OpcUa_XmlSchema_IssuedIdentityToken = 8318, + OpcUa_XmlSchema_IssuedIdentityToken_DataTypeVersion = 8319, + OpcUa_XmlSchema_IssuedIdentityToken_DictionaryFragment = 8320, + OpcUa_XmlSchema_EndpointConfiguration = 8321, + OpcUa_XmlSchema_EndpointConfiguration_DataTypeVersion = 8322, + OpcUa_XmlSchema_EndpointConfiguration_DictionaryFragment = 8323, + OpcUa_XmlSchema_SupportedProfile = 8324, + OpcUa_XmlSchema_SupportedProfile_DataTypeVersion = 8325, + OpcUa_XmlSchema_SupportedProfile_DictionaryFragment = 8326, + OpcUa_XmlSchema_BuildInfo = 8327, + OpcUa_XmlSchema_BuildInfo_DataTypeVersion = 8328, + OpcUa_XmlSchema_BuildInfo_DictionaryFragment = 8329, + OpcUa_XmlSchema_SoftwareCertificate = 8330, + OpcUa_XmlSchema_SoftwareCertificate_DataTypeVersion = 8331, + OpcUa_XmlSchema_SoftwareCertificate_DictionaryFragment = 8332, + OpcUa_XmlSchema_SignedSoftwareCertificate = 8333, + OpcUa_XmlSchema_SignedSoftwareCertificate_DataTypeVersion = 8334, + OpcUa_XmlSchema_SignedSoftwareCertificate_DictionaryFragment = 8335, + OpcUa_XmlSchema_AddNodesItem = 8363, + OpcUa_XmlSchema_AddNodesItem_DataTypeVersion = 8364, + OpcUa_XmlSchema_AddNodesItem_DictionaryFragment = 8365, + OpcUa_XmlSchema_AddReferencesItem = 8366, + OpcUa_XmlSchema_AddReferencesItem_DataTypeVersion = 8367, + OpcUa_XmlSchema_AddReferencesItem_DictionaryFragment = 8368, + OpcUa_XmlSchema_DeleteNodesItem = 8369, + OpcUa_XmlSchema_DeleteNodesItem_DataTypeVersion = 8370, + OpcUa_XmlSchema_DeleteNodesItem_DictionaryFragment = 8371, + OpcUa_XmlSchema_DeleteReferencesItem = 8372, + OpcUa_XmlSchema_DeleteReferencesItem_DataTypeVersion = 8373, + OpcUa_XmlSchema_DeleteReferencesItem_DictionaryFragment = 8374, + OpcUa_XmlSchema_ScalarTestType = 8384, + OpcUa_XmlSchema_ScalarTestType_DataTypeVersion = 8385, + OpcUa_XmlSchema_ScalarTestType_DictionaryFragment = 8386, + OpcUa_XmlSchema_ArrayTestType = 8387, + OpcUa_XmlSchema_ArrayTestType_DataTypeVersion = 8388, + OpcUa_XmlSchema_ArrayTestType_DictionaryFragment = 8389, + OpcUa_XmlSchema_CompositeTestType = 8390, + OpcUa_XmlSchema_CompositeTestType_DataTypeVersion = 8391, + OpcUa_XmlSchema_CompositeTestType_DictionaryFragment = 8392, + OpcUa_XmlSchema_RegisteredServer = 8417, + OpcUa_XmlSchema_RegisteredServer_DataTypeVersion = 8418, + OpcUa_XmlSchema_RegisteredServer_DictionaryFragment = 8419, + OpcUa_XmlSchema_ContentFilterElement = 8564, + OpcUa_XmlSchema_ContentFilterElement_DataTypeVersion = 8565, + OpcUa_XmlSchema_ContentFilterElement_DictionaryFragment = 8566, + OpcUa_XmlSchema_ContentFilter = 8567, + OpcUa_XmlSchema_ContentFilter_DataTypeVersion = 8568, + OpcUa_XmlSchema_ContentFilter_DictionaryFragment = 8569, + OpcUa_XmlSchema_FilterOperand = 8570, + OpcUa_XmlSchema_FilterOperand_DataTypeVersion = 8571, + OpcUa_XmlSchema_FilterOperand_DictionaryFragment = 8572, + OpcUa_XmlSchema_ElementOperand = 8573, + OpcUa_XmlSchema_ElementOperand_DataTypeVersion = 8574, + OpcUa_XmlSchema_ElementOperand_DictionaryFragment = 8575, + OpcUa_XmlSchema_LiteralOperand = 8576, + OpcUa_XmlSchema_LiteralOperand_DataTypeVersion = 8577, + OpcUa_XmlSchema_LiteralOperand_DictionaryFragment = 8578, + OpcUa_XmlSchema_AttributeOperand = 8579, + OpcUa_XmlSchema_AttributeOperand_DataTypeVersion = 8580, + OpcUa_XmlSchema_AttributeOperand_DictionaryFragment = 8581, + OpcUa_XmlSchema_SimpleAttributeOperand = 8582, + OpcUa_XmlSchema_SimpleAttributeOperand_DataTypeVersion = 8583, + OpcUa_XmlSchema_SimpleAttributeOperand_DictionaryFragment = 8584, + OpcUa_XmlSchema_HistoryEvent = 8639, + OpcUa_XmlSchema_HistoryEvent_DataTypeVersion = 8640, + OpcUa_XmlSchema_HistoryEvent_DictionaryFragment = 8641, + OpcUa_XmlSchema_MonitoringFilter = 8702, + OpcUa_XmlSchema_MonitoringFilter_DataTypeVersion = 8703, + OpcUa_XmlSchema_MonitoringFilter_DictionaryFragment = 8704, + OpcUa_XmlSchema_EventFilter = 8708, + OpcUa_XmlSchema_EventFilter_DataTypeVersion = 8709, + OpcUa_XmlSchema_EventFilter_DictionaryFragment = 8710, + OpcUa_XmlSchema_AggregateConfiguration = 8711, + OpcUa_XmlSchema_AggregateConfiguration_DataTypeVersion = 8712, + OpcUa_XmlSchema_AggregateConfiguration_DictionaryFragment = 8713, + OpcUa_XmlSchema_HistoryEventFieldList = 8807, + OpcUa_XmlSchema_HistoryEventFieldList_DataTypeVersion = 8808, + OpcUa_XmlSchema_HistoryEventFieldList_DictionaryFragment = 8809, + OpcUa_XmlSchema_RedundantServerDataType = 8843, + OpcUa_XmlSchema_RedundantServerDataType_DataTypeVersion = 8844, + OpcUa_XmlSchema_RedundantServerDataType_DictionaryFragment = 8845, + OpcUa_XmlSchema_SamplingIntervalDiagnosticsDataType = 8846, + OpcUa_XmlSchema_SamplingIntervalDiagnosticsDataType_DataTypeVersion = 8847, + OpcUa_XmlSchema_SamplingIntervalDiagnosticsDataType_DictionaryFragment = 8848, + OpcUa_XmlSchema_ServerDiagnosticsSummaryDataType = 8849, + OpcUa_XmlSchema_ServerDiagnosticsSummaryDataType_DataTypeVersion = 8850, + OpcUa_XmlSchema_ServerDiagnosticsSummaryDataType_DictionaryFragment = 8851, + OpcUa_XmlSchema_ServerStatusDataType = 8852, + OpcUa_XmlSchema_ServerStatusDataType_DataTypeVersion = 8853, + OpcUa_XmlSchema_ServerStatusDataType_DictionaryFragment = 8854, + OpcUa_XmlSchema_SessionDiagnosticsDataType = 8855, + OpcUa_XmlSchema_SessionDiagnosticsDataType_DataTypeVersion = 8856, + OpcUa_XmlSchema_SessionDiagnosticsDataType_DictionaryFragment = 8857, + OpcUa_XmlSchema_SessionSecurityDiagnosticsDataType = 8858, + OpcUa_XmlSchema_SessionSecurityDiagnosticsDataType_DataTypeVersion = 8859, + OpcUa_XmlSchema_SessionSecurityDiagnosticsDataType_DictionaryFragment = 8860, + OpcUa_XmlSchema_ServiceCounterDataType = 8861, + OpcUa_XmlSchema_ServiceCounterDataType_DataTypeVersion = 8862, + OpcUa_XmlSchema_ServiceCounterDataType_DictionaryFragment = 8863, + OpcUa_XmlSchema_SubscriptionDiagnosticsDataType = 8864, + OpcUa_XmlSchema_SubscriptionDiagnosticsDataType_DataTypeVersion = 8865, + OpcUa_XmlSchema_SubscriptionDiagnosticsDataType_DictionaryFragment = 8866, + OpcUa_XmlSchema_ModelChangeStructureDataType = 8867, + OpcUa_XmlSchema_ModelChangeStructureDataType_DataTypeVersion = 8868, + OpcUa_XmlSchema_ModelChangeStructureDataType_DictionaryFragment = 8869, + OpcUa_XmlSchema_SemanticChangeStructureDataType = 8870, + OpcUa_XmlSchema_SemanticChangeStructureDataType_DataTypeVersion = 8871, + OpcUa_XmlSchema_SemanticChangeStructureDataType_DictionaryFragment = 8872, + OpcUa_XmlSchema_Range = 8873, + OpcUa_XmlSchema_Range_DataTypeVersion = 8874, + OpcUa_XmlSchema_Range_DictionaryFragment = 8875, + OpcUa_XmlSchema_EUInformation = 8876, + OpcUa_XmlSchema_EUInformation_DataTypeVersion = 8877, + OpcUa_XmlSchema_EUInformation_DictionaryFragment = 8878, + OpcUa_XmlSchema_Annotation = 8879, + OpcUa_XmlSchema_Annotation_DataTypeVersion = 8880, + OpcUa_XmlSchema_Annotation_DictionaryFragment = 8881, + OpcUa_XmlSchema_ProgramDiagnosticDataType = 8882, + OpcUa_XmlSchema_ProgramDiagnosticDataType_DataTypeVersion = 8883, + OpcUa_XmlSchema_ProgramDiagnosticDataType_DictionaryFragment = 8884, + SubscriptionDiagnosticsType_MaxLifetimeCount = 8888, + SubscriptionDiagnosticsType_LatePublishRequestCount = 8889, + SubscriptionDiagnosticsType_CurrentKeepAliveCount = 8890, + SubscriptionDiagnosticsType_CurrentLifetimeCount = 8891, + SubscriptionDiagnosticsType_UnacknowledgedMessageCount = 8892, + SubscriptionDiagnosticsType_DiscardedMessageCount = 8893, + SubscriptionDiagnosticsType_MonitoredItemCount = 8894, + SubscriptionDiagnosticsType_DisabledMonitoredItemCount = 8895, + SubscriptionDiagnosticsType_MonitoringQueueOverflowCount = 8896, + SubscriptionDiagnosticsType_NextSequenceNumber = 8897, + SessionDiagnosticsObjectType_SessionDiagnostics_TotalRequestCount = 8898, + SessionDiagnosticsVariableType_TotalRequestCount = 8900, + SubscriptionDiagnosticsType_EventQueueOverFlowCount = 8902, + TimeZoneDataType = 8912, + TimeZoneDataType_Encoding_DefaultXml = 8913, + OpcUa_BinarySchema_TimeZoneDataType = 8914, + OpcUa_BinarySchema_TimeZoneDataType_DataTypeVersion = 8915, + OpcUa_BinarySchema_TimeZoneDataType_DictionaryFragment = 8916, + TimeZoneDataType_Encoding_DefaultBinary = 8917, + OpcUa_XmlSchema_TimeZoneDataType = 8918, + OpcUa_XmlSchema_TimeZoneDataType_DataTypeVersion = 8919, + OpcUa_XmlSchema_TimeZoneDataType_DictionaryFragment = 8920, + LockType = 8921, + LockType_Lock = 8922, + LockType_Unlock = 8923, + ServerLock = 8924, + ServerLock_Lock = 8925, + ServerLock_Unlock = 8926, + AuditConditionRespondEventType = 8927, + AuditConditionRespondEventType_EventId = 8928, + AuditConditionRespondEventType_EventType = 8929, + AuditConditionRespondEventType_SourceNode = 8930, + AuditConditionRespondEventType_SourceName = 8931, + AuditConditionRespondEventType_Time = 8932, + AuditConditionRespondEventType_ReceiveTime = 8933, + AuditConditionRespondEventType_LocalTime = 8934, + AuditConditionRespondEventType_Message = 8935, + AuditConditionRespondEventType_Severity = 8936, + AuditConditionRespondEventType_ActionTimeStamp = 8937, + AuditConditionRespondEventType_Status = 8938, + AuditConditionRespondEventType_ServerId = 8939, + AuditConditionRespondEventType_ClientAuditEntryId = 8940, + AuditConditionRespondEventType_ClientUserId = 8941, + AuditConditionRespondEventType_MethodId = 8942, + AuditConditionRespondEventType_InputArguments = 8943, + AuditConditionAcknowledgeEventType = 8944, + AuditConditionAcknowledgeEventType_EventId = 8945, + AuditConditionAcknowledgeEventType_EventType = 8946, + AuditConditionAcknowledgeEventType_SourceNode = 8947, + AuditConditionAcknowledgeEventType_SourceName = 8948, + AuditConditionAcknowledgeEventType_Time = 8949, + AuditConditionAcknowledgeEventType_ReceiveTime = 8950, + AuditConditionAcknowledgeEventType_LocalTime = 8951, + AuditConditionAcknowledgeEventType_Message = 8952, + AuditConditionAcknowledgeEventType_Severity = 8953, + AuditConditionAcknowledgeEventType_ActionTimeStamp = 8954, + AuditConditionAcknowledgeEventType_Status = 8955, + AuditConditionAcknowledgeEventType_ServerId = 8956, + AuditConditionAcknowledgeEventType_ClientAuditEntryId = 8957, + AuditConditionAcknowledgeEventType_ClientUserId = 8958, + AuditConditionAcknowledgeEventType_MethodId = 8959, + AuditConditionAcknowledgeEventType_InputArguments = 8960, + AuditConditionConfirmEventType = 8961, + AuditConditionConfirmEventType_EventId = 8962, + AuditConditionConfirmEventType_EventType = 8963, + AuditConditionConfirmEventType_SourceNode = 8964, + AuditConditionConfirmEventType_SourceName = 8965, + AuditConditionConfirmEventType_Time = 8966, + AuditConditionConfirmEventType_ReceiveTime = 8967, + AuditConditionConfirmEventType_LocalTime = 8968, + AuditConditionConfirmEventType_Message = 8969, + AuditConditionConfirmEventType_Severity = 8970, + AuditConditionConfirmEventType_ActionTimeStamp = 8971, + AuditConditionConfirmEventType_Status = 8972, + AuditConditionConfirmEventType_ServerId = 8973, + AuditConditionConfirmEventType_ClientAuditEntryId = 8974, + AuditConditionConfirmEventType_ClientUserId = 8975, + AuditConditionConfirmEventType_MethodId = 8976, + AuditConditionConfirmEventType_InputArguments = 8977, + TwoStateVariableType = 8995, + TwoStateVariableType_Id = 8996, + TwoStateVariableType_Name = 8997, + TwoStateVariableType_Number = 8998, + TwoStateVariableType_EffectiveDisplayName = 8999, + TwoStateVariableType_TransitionTime = 9000, + TwoStateVariableType_EffectiveTransitionTime = 9001, + ConditionVariableType = 9002, + ConditionVariableType_SourceTimestamp = 9003, + HasTrueSubState = 9004, + HasFalseSubState = 9005, + HasCondition = 9006, + ConditionRefreshMethodType = 9007, + ConditionRefreshMethodType_InputArguments = 9008, + ConditionType_ConditionName = 9009, + ConditionType_BranchId = 9010, + ConditionType_EnabledState = 9011, + ConditionType_EnabledState_Id = 9012, + ConditionType_EnabledState_Name = 9013, + ConditionType_EnabledState_Number = 9014, + ConditionType_EnabledState_EffectiveDisplayName = 9015, + ConditionType_EnabledState_TransitionTime = 9016, + ConditionType_EnabledState_EffectiveTransitionTime = 9017, + ConditionType_EnabledState_TrueState = 9018, + ConditionType_EnabledState_FalseState = 9019, + ConditionType_Quality = 9020, + ConditionType_Quality_SourceTimestamp = 9021, + ConditionType_LastSeverity = 9022, + ConditionType_LastSeverity_SourceTimestamp = 9023, + ConditionType_Comment = 9024, + ConditionType_Comment_SourceTimestamp = 9025, + ConditionType_ClientUserId = 9026, + ConditionType_Enable = 9027, + ConditionType_Disable = 9028, + ConditionType_AddComment = 9029, + ConditionType_AddComment_InputArguments = 9030, + DialogResponseMethodType = 9031, + DialogResponseMethodType_InputArguments = 9032, + DialogConditionType_ConditionName = 9033, + DialogConditionType_BranchId = 9034, + DialogConditionType_EnabledState = 9035, + DialogConditionType_EnabledState_Id = 9036, + DialogConditionType_EnabledState_Name = 9037, + DialogConditionType_EnabledState_Number = 9038, + DialogConditionType_EnabledState_EffectiveDisplayName = 9039, + DialogConditionType_EnabledState_TransitionTime = 9040, + DialogConditionType_EnabledState_EffectiveTransitionTime = 9041, + DialogConditionType_EnabledState_TrueState = 9042, + DialogConditionType_EnabledState_FalseState = 9043, + DialogConditionType_Quality = 9044, + DialogConditionType_Quality_SourceTimestamp = 9045, + DialogConditionType_LastSeverity = 9046, + DialogConditionType_LastSeverity_SourceTimestamp = 9047, + DialogConditionType_Comment = 9048, + DialogConditionType_Comment_SourceTimestamp = 9049, + DialogConditionType_ClientUserId = 9050, + DialogConditionType_Enable = 9051, + DialogConditionType_Disable = 9052, + DialogConditionType_AddComment = 9053, + DialogConditionType_AddComment_InputArguments = 9054, + DialogConditionType_DialogState = 9055, + DialogConditionType_DialogState_Id = 9056, + DialogConditionType_DialogState_Name = 9057, + DialogConditionType_DialogState_Number = 9058, + DialogConditionType_DialogState_EffectiveDisplayName = 9059, + DialogConditionType_DialogState_TransitionTime = 9060, + DialogConditionType_DialogState_EffectiveTransitionTime = 9061, + DialogConditionType_DialogState_TrueState = 9062, + DialogConditionType_DialogState_FalseState = 9063, + DialogConditionType_ResponseOptionSet = 9064, + DialogConditionType_DefaultResponse = 9065, + DialogConditionType_OkResponse = 9066, + DialogConditionType_CancelResponse = 9067, + DialogConditionType_LastResponse = 9068, + DialogConditionType_Respond = 9069, + DialogConditionType_Respond_InputArguments = 9070, + AcknowledgeableConditionType_ConditionName = 9071, + AcknowledgeableConditionType_BranchId = 9072, + AcknowledgeableConditionType_EnabledState = 9073, + AcknowledgeableConditionType_EnabledState_Id = 9074, + AcknowledgeableConditionType_EnabledState_Name = 9075, + AcknowledgeableConditionType_EnabledState_Number = 9076, + AcknowledgeableConditionType_EnabledState_EffectiveDisplayName = 9077, + AcknowledgeableConditionType_EnabledState_TransitionTime = 9078, + AcknowledgeableConditionType_EnabledState_EffectiveTransitionTime = 9079, + AcknowledgeableConditionType_EnabledState_TrueState = 9080, + AcknowledgeableConditionType_EnabledState_FalseState = 9081, + AcknowledgeableConditionType_Quality = 9082, + AcknowledgeableConditionType_Quality_SourceTimestamp = 9083, + AcknowledgeableConditionType_LastSeverity = 9084, + AcknowledgeableConditionType_LastSeverity_SourceTimestamp = 9085, + AcknowledgeableConditionType_Comment = 9086, + AcknowledgeableConditionType_Comment_SourceTimestamp = 9087, + AcknowledgeableConditionType_ClientUserId = 9088, + AcknowledgeableConditionType_Enable = 9089, + AcknowledgeableConditionType_Disable = 9090, + AcknowledgeableConditionType_AddComment = 9091, + AcknowledgeableConditionType_AddComment_InputArguments = 9092, + AcknowledgeableConditionType_AckedState = 9093, + AcknowledgeableConditionType_AckedState_Id = 9094, + AcknowledgeableConditionType_AckedState_Name = 9095, + AcknowledgeableConditionType_AckedState_Number = 9096, + AcknowledgeableConditionType_AckedState_EffectiveDisplayName = 9097, + AcknowledgeableConditionType_AckedState_TransitionTime = 9098, + AcknowledgeableConditionType_AckedState_EffectiveTransitionTime = 9099, + AcknowledgeableConditionType_AckedState_TrueState = 9100, + AcknowledgeableConditionType_AckedState_FalseState = 9101, + AcknowledgeableConditionType_ConfirmedState = 9102, + AcknowledgeableConditionType_ConfirmedState_Id = 9103, + AcknowledgeableConditionType_ConfirmedState_Name = 9104, + AcknowledgeableConditionType_ConfirmedState_Number = 9105, + AcknowledgeableConditionType_ConfirmedState_EffectiveDisplayName = 9106, + AcknowledgeableConditionType_ConfirmedState_TransitionTime = 9107, + AcknowledgeableConditionType_ConfirmedState_EffectiveTransitionTime = 9108, + AcknowledgeableConditionType_ConfirmedState_TrueState = 9109, + AcknowledgeableConditionType_ConfirmedState_FalseState = 9110, + AcknowledgeableConditionType_Acknowledge = 9111, + AcknowledgeableConditionType_Acknowledge_InputArguments = 9112, + AcknowledgeableConditionType_Confirm = 9113, + AcknowledgeableConditionType_Confirm_InputArguments = 9114, + ShelvedStateMachineType_UnshelveTime = 9115, + AlarmConditionType_ConditionName = 9116, + AlarmConditionType_BranchId = 9117, + AlarmConditionType_EnabledState = 9118, + AlarmConditionType_EnabledState_Id = 9119, + AlarmConditionType_EnabledState_Name = 9120, + AlarmConditionType_EnabledState_Number = 9121, + AlarmConditionType_EnabledState_EffectiveDisplayName = 9122, + AlarmConditionType_EnabledState_TransitionTime = 9123, + AlarmConditionType_EnabledState_EffectiveTransitionTime = 9124, + AlarmConditionType_EnabledState_TrueState = 9125, + AlarmConditionType_EnabledState_FalseState = 9126, + AlarmConditionType_Quality = 9127, + AlarmConditionType_Quality_SourceTimestamp = 9128, + AlarmConditionType_LastSeverity = 9129, + AlarmConditionType_LastSeverity_SourceTimestamp = 9130, + AlarmConditionType_Comment = 9131, + AlarmConditionType_Comment_SourceTimestamp = 9132, + AlarmConditionType_ClientUserId = 9133, + AlarmConditionType_Enable = 9134, + AlarmConditionType_Disable = 9135, + AlarmConditionType_AddComment = 9136, + AlarmConditionType_AddComment_InputArguments = 9137, + AlarmConditionType_AckedState = 9138, + AlarmConditionType_AckedState_Id = 9139, + AlarmConditionType_AckedState_Name = 9140, + AlarmConditionType_AckedState_Number = 9141, + AlarmConditionType_AckedState_EffectiveDisplayName = 9142, + AlarmConditionType_AckedState_TransitionTime = 9143, + AlarmConditionType_AckedState_EffectiveTransitionTime = 9144, + AlarmConditionType_AckedState_TrueState = 9145, + AlarmConditionType_AckedState_FalseState = 9146, + AlarmConditionType_ConfirmedState = 9147, + AlarmConditionType_ConfirmedState_Id = 9148, + AlarmConditionType_ConfirmedState_Name = 9149, + AlarmConditionType_ConfirmedState_Number = 9150, + AlarmConditionType_ConfirmedState_EffectiveDisplayName = 9151, + AlarmConditionType_ConfirmedState_TransitionTime = 9152, + AlarmConditionType_ConfirmedState_EffectiveTransitionTime = 9153, + AlarmConditionType_ConfirmedState_TrueState = 9154, + AlarmConditionType_ConfirmedState_FalseState = 9155, + AlarmConditionType_Acknowledge = 9156, + AlarmConditionType_Acknowledge_InputArguments = 9157, + AlarmConditionType_Confirm = 9158, + AlarmConditionType_Confirm_InputArguments = 9159, + AlarmConditionType_ActiveState = 9160, + AlarmConditionType_ActiveState_Id = 9161, + AlarmConditionType_ActiveState_Name = 9162, + AlarmConditionType_ActiveState_Number = 9163, + AlarmConditionType_ActiveState_EffectiveDisplayName = 9164, + AlarmConditionType_ActiveState_TransitionTime = 9165, + AlarmConditionType_ActiveState_EffectiveTransitionTime = 9166, + AlarmConditionType_ActiveState_TrueState = 9167, + AlarmConditionType_ActiveState_FalseState = 9168, + AlarmConditionType_SuppressedState = 9169, + AlarmConditionType_SuppressedState_Id = 9170, + AlarmConditionType_SuppressedState_Name = 9171, + AlarmConditionType_SuppressedState_Number = 9172, + AlarmConditionType_SuppressedState_EffectiveDisplayName = 9173, + AlarmConditionType_SuppressedState_TransitionTime = 9174, + AlarmConditionType_SuppressedState_EffectiveTransitionTime = 9175, + AlarmConditionType_SuppressedState_TrueState = 9176, + AlarmConditionType_SuppressedState_FalseState = 9177, + AlarmConditionType_ShelvingState = 9178, + AlarmConditionType_ShelvingState_CurrentState = 9179, + AlarmConditionType_ShelvingState_CurrentState_Id = 9180, + AlarmConditionType_ShelvingState_CurrentState_Name = 9181, + AlarmConditionType_ShelvingState_CurrentState_Number = 9182, + AlarmConditionType_ShelvingState_CurrentState_EffectiveDisplayName = 9183, + AlarmConditionType_ShelvingState_LastTransition = 9184, + AlarmConditionType_ShelvingState_LastTransition_Id = 9185, + AlarmConditionType_ShelvingState_LastTransition_Name = 9186, + AlarmConditionType_ShelvingState_LastTransition_Number = 9187, + AlarmConditionType_ShelvingState_LastTransition_TransitionTime = 9188, + AlarmConditionType_ShelvingState_UnshelveTime = 9189, + AlarmConditionType_ShelvingState_Unshelve = 9211, + AlarmConditionType_ShelvingState_OneShotShelve = 9212, + AlarmConditionType_ShelvingState_TimedShelve = 9213, + AlarmConditionType_ShelvingState_TimedShelve_InputArguments = 9214, + AlarmConditionType_SuppressedOrShelved = 9215, + AlarmConditionType_MaxTimeShelved = 9216, + LimitAlarmType_ConditionName = 9217, + LimitAlarmType_BranchId = 9218, + LimitAlarmType_EnabledState = 9219, + LimitAlarmType_EnabledState_Id = 9220, + LimitAlarmType_EnabledState_Name = 9221, + LimitAlarmType_EnabledState_Number = 9222, + LimitAlarmType_EnabledState_EffectiveDisplayName = 9223, + LimitAlarmType_EnabledState_TransitionTime = 9224, + LimitAlarmType_EnabledState_EffectiveTransitionTime = 9225, + LimitAlarmType_EnabledState_TrueState = 9226, + LimitAlarmType_EnabledState_FalseState = 9227, + LimitAlarmType_Quality = 9228, + LimitAlarmType_Quality_SourceTimestamp = 9229, + LimitAlarmType_LastSeverity = 9230, + LimitAlarmType_LastSeverity_SourceTimestamp = 9231, + LimitAlarmType_Comment = 9232, + LimitAlarmType_Comment_SourceTimestamp = 9233, + LimitAlarmType_ClientUserId = 9234, + LimitAlarmType_Enable = 9235, + LimitAlarmType_Disable = 9236, + LimitAlarmType_AddComment = 9237, + LimitAlarmType_AddComment_InputArguments = 9238, + LimitAlarmType_AckedState = 9239, + LimitAlarmType_AckedState_Id = 9240, + LimitAlarmType_AckedState_Name = 9241, + LimitAlarmType_AckedState_Number = 9242, + LimitAlarmType_AckedState_EffectiveDisplayName = 9243, + LimitAlarmType_AckedState_TransitionTime = 9244, + LimitAlarmType_AckedState_EffectiveTransitionTime = 9245, + LimitAlarmType_AckedState_TrueState = 9246, + LimitAlarmType_AckedState_FalseState = 9247, + LimitAlarmType_ConfirmedState = 9248, + LimitAlarmType_ConfirmedState_Id = 9249, + LimitAlarmType_ConfirmedState_Name = 9250, + LimitAlarmType_ConfirmedState_Number = 9251, + LimitAlarmType_ConfirmedState_EffectiveDisplayName = 9252, + LimitAlarmType_ConfirmedState_TransitionTime = 9253, + LimitAlarmType_ConfirmedState_EffectiveTransitionTime = 9254, + LimitAlarmType_ConfirmedState_TrueState = 9255, + LimitAlarmType_ConfirmedState_FalseState = 9256, + LimitAlarmType_Acknowledge = 9257, + LimitAlarmType_Acknowledge_InputArguments = 9258, + LimitAlarmType_Confirm = 9259, + LimitAlarmType_Confirm_InputArguments = 9260, + LimitAlarmType_ActiveState = 9261, + LimitAlarmType_ActiveState_Id = 9262, + LimitAlarmType_ActiveState_Name = 9263, + LimitAlarmType_ActiveState_Number = 9264, + LimitAlarmType_ActiveState_EffectiveDisplayName = 9265, + LimitAlarmType_ActiveState_TransitionTime = 9266, + LimitAlarmType_ActiveState_EffectiveTransitionTime = 9267, + LimitAlarmType_ActiveState_TrueState = 9268, + LimitAlarmType_ActiveState_FalseState = 9269, + LimitAlarmType_SuppressedState = 9270, + LimitAlarmType_SuppressedState_Id = 9271, + LimitAlarmType_SuppressedState_Name = 9272, + LimitAlarmType_SuppressedState_Number = 9273, + LimitAlarmType_SuppressedState_EffectiveDisplayName = 9274, + LimitAlarmType_SuppressedState_TransitionTime = 9275, + LimitAlarmType_SuppressedState_EffectiveTransitionTime = 9276, + LimitAlarmType_SuppressedState_TrueState = 9277, + LimitAlarmType_SuppressedState_FalseState = 9278, + LimitAlarmType_ShelvingState = 9279, + LimitAlarmType_ShelvingState_CurrentState = 9280, + LimitAlarmType_ShelvingState_CurrentState_Id = 9281, + LimitAlarmType_ShelvingState_CurrentState_Name = 9282, + LimitAlarmType_ShelvingState_CurrentState_Number = 9283, + LimitAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 9284, + LimitAlarmType_ShelvingState_LastTransition = 9285, + LimitAlarmType_ShelvingState_LastTransition_Id = 9286, + LimitAlarmType_ShelvingState_LastTransition_Name = 9287, + LimitAlarmType_ShelvingState_LastTransition_Number = 9288, + LimitAlarmType_ShelvingState_LastTransition_TransitionTime = 9289, + LimitAlarmType_ShelvingState_UnshelveTime = 9290, + LimitAlarmType_ShelvingState_Unshelve = 9312, + LimitAlarmType_ShelvingState_OneShotShelve = 9313, + LimitAlarmType_ShelvingState_TimedShelve = 9314, + LimitAlarmType_ShelvingState_TimedShelve_InputArguments = 9315, + LimitAlarmType_SuppressedOrShelved = 9316, + LimitAlarmType_MaxTimeShelved = 9317, + ExclusiveLimitStateMachineType = 9318, + ExclusiveLimitStateMachineType_CurrentState = 9319, + ExclusiveLimitStateMachineType_CurrentState_Id = 9320, + ExclusiveLimitStateMachineType_CurrentState_Name = 9321, + ExclusiveLimitStateMachineType_CurrentState_Number = 9322, + ExclusiveLimitStateMachineType_CurrentState_EffectiveDisplayName = 9323, + ExclusiveLimitStateMachineType_LastTransition = 9324, + ExclusiveLimitStateMachineType_LastTransition_Id = 9325, + ExclusiveLimitStateMachineType_LastTransition_Name = 9326, + ExclusiveLimitStateMachineType_LastTransition_Number = 9327, + ExclusiveLimitStateMachineType_LastTransition_TransitionTime = 9328, + ExclusiveLimitStateMachineType_HighHigh = 9329, + ExclusiveLimitStateMachineType_HighHigh_StateNumber = 9330, + ExclusiveLimitStateMachineType_High = 9331, + ExclusiveLimitStateMachineType_High_StateNumber = 9332, + ExclusiveLimitStateMachineType_Low = 9333, + ExclusiveLimitStateMachineType_Low_StateNumber = 9334, + ExclusiveLimitStateMachineType_LowLow = 9335, + ExclusiveLimitStateMachineType_LowLow_StateNumber = 9336, + ExclusiveLimitStateMachineType_LowLowToLow = 9337, + ExclusiveLimitStateMachineType_LowToLowLow = 9338, + ExclusiveLimitStateMachineType_HighHighToHigh = 9339, + ExclusiveLimitStateMachineType_HighToHighHigh = 9340, + ExclusiveLimitAlarmType = 9341, + ExclusiveLimitAlarmType_EventId = 9342, + ExclusiveLimitAlarmType_EventType = 9343, + ExclusiveLimitAlarmType_SourceNode = 9344, + ExclusiveLimitAlarmType_SourceName = 9345, + ExclusiveLimitAlarmType_Time = 9346, + ExclusiveLimitAlarmType_ReceiveTime = 9347, + ExclusiveLimitAlarmType_LocalTime = 9348, + ExclusiveLimitAlarmType_Message = 9349, + ExclusiveLimitAlarmType_Severity = 9350, + ExclusiveLimitAlarmType_ConditionName = 9351, + ExclusiveLimitAlarmType_BranchId = 9352, + ExclusiveLimitAlarmType_Retain = 9353, + ExclusiveLimitAlarmType_EnabledState = 9354, + ExclusiveLimitAlarmType_EnabledState_Id = 9355, + ExclusiveLimitAlarmType_EnabledState_Name = 9356, + ExclusiveLimitAlarmType_EnabledState_Number = 9357, + ExclusiveLimitAlarmType_EnabledState_EffectiveDisplayName = 9358, + ExclusiveLimitAlarmType_EnabledState_TransitionTime = 9359, + ExclusiveLimitAlarmType_EnabledState_EffectiveTransitionTime = 9360, + ExclusiveLimitAlarmType_EnabledState_TrueState = 9361, + ExclusiveLimitAlarmType_EnabledState_FalseState = 9362, + ExclusiveLimitAlarmType_Quality = 9363, + ExclusiveLimitAlarmType_Quality_SourceTimestamp = 9364, + ExclusiveLimitAlarmType_LastSeverity = 9365, + ExclusiveLimitAlarmType_LastSeverity_SourceTimestamp = 9366, + ExclusiveLimitAlarmType_Comment = 9367, + ExclusiveLimitAlarmType_Comment_SourceTimestamp = 9368, + ExclusiveLimitAlarmType_ClientUserId = 9369, + ExclusiveLimitAlarmType_Enable = 9370, + ExclusiveLimitAlarmType_Disable = 9371, + ExclusiveLimitAlarmType_AddComment = 9372, + ExclusiveLimitAlarmType_AddComment_InputArguments = 9373, + ExclusiveLimitAlarmType_ConditionRefresh = 9374, + ExclusiveLimitAlarmType_ConditionRefresh_InputArguments = 9375, + ExclusiveLimitAlarmType_AckedState = 9376, + ExclusiveLimitAlarmType_AckedState_Id = 9377, + ExclusiveLimitAlarmType_AckedState_Name = 9378, + ExclusiveLimitAlarmType_AckedState_Number = 9379, + ExclusiveLimitAlarmType_AckedState_EffectiveDisplayName = 9380, + ExclusiveLimitAlarmType_AckedState_TransitionTime = 9381, + ExclusiveLimitAlarmType_AckedState_EffectiveTransitionTime = 9382, + ExclusiveLimitAlarmType_AckedState_TrueState = 9383, + ExclusiveLimitAlarmType_AckedState_FalseState = 9384, + ExclusiveLimitAlarmType_ConfirmedState = 9385, + ExclusiveLimitAlarmType_ConfirmedState_Id = 9386, + ExclusiveLimitAlarmType_ConfirmedState_Name = 9387, + ExclusiveLimitAlarmType_ConfirmedState_Number = 9388, + ExclusiveLimitAlarmType_ConfirmedState_EffectiveDisplayName = 9389, + ExclusiveLimitAlarmType_ConfirmedState_TransitionTime = 9390, + ExclusiveLimitAlarmType_ConfirmedState_EffectiveTransitionTime = 9391, + ExclusiveLimitAlarmType_ConfirmedState_TrueState = 9392, + ExclusiveLimitAlarmType_ConfirmedState_FalseState = 9393, + ExclusiveLimitAlarmType_Acknowledge = 9394, + ExclusiveLimitAlarmType_Acknowledge_InputArguments = 9395, + ExclusiveLimitAlarmType_Confirm = 9396, + ExclusiveLimitAlarmType_Confirm_InputArguments = 9397, + ExclusiveLimitAlarmType_ActiveState = 9398, + ExclusiveLimitAlarmType_ActiveState_Id = 9399, + ExclusiveLimitAlarmType_ActiveState_Name = 9400, + ExclusiveLimitAlarmType_ActiveState_Number = 9401, + ExclusiveLimitAlarmType_ActiveState_EffectiveDisplayName = 9402, + ExclusiveLimitAlarmType_ActiveState_TransitionTime = 9403, + ExclusiveLimitAlarmType_ActiveState_EffectiveTransitionTime = 9404, + ExclusiveLimitAlarmType_ActiveState_TrueState = 9405, + ExclusiveLimitAlarmType_ActiveState_FalseState = 9406, + ExclusiveLimitAlarmType_SuppressedState = 9407, + ExclusiveLimitAlarmType_SuppressedState_Id = 9408, + ExclusiveLimitAlarmType_SuppressedState_Name = 9409, + ExclusiveLimitAlarmType_SuppressedState_Number = 9410, + ExclusiveLimitAlarmType_SuppressedState_EffectiveDisplayName = 9411, + ExclusiveLimitAlarmType_SuppressedState_TransitionTime = 9412, + ExclusiveLimitAlarmType_SuppressedState_EffectiveTransitionTime = 9413, + ExclusiveLimitAlarmType_SuppressedState_TrueState = 9414, + ExclusiveLimitAlarmType_SuppressedState_FalseState = 9415, + ExclusiveLimitAlarmType_ShelvingState = 9416, + ExclusiveLimitAlarmType_ShelvingState_CurrentState = 9417, + ExclusiveLimitAlarmType_ShelvingState_CurrentState_Id = 9418, + ExclusiveLimitAlarmType_ShelvingState_CurrentState_Name = 9419, + ExclusiveLimitAlarmType_ShelvingState_CurrentState_Number = 9420, + ExclusiveLimitAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 9421, + ExclusiveLimitAlarmType_ShelvingState_LastTransition = 9422, + ExclusiveLimitAlarmType_ShelvingState_LastTransition_Id = 9423, + ExclusiveLimitAlarmType_ShelvingState_LastTransition_Name = 9424, + ExclusiveLimitAlarmType_ShelvingState_LastTransition_Number = 9425, + ExclusiveLimitAlarmType_ShelvingState_LastTransition_TransitionTime = 9426, + ExclusiveLimitAlarmType_ShelvingState_UnshelveTime = 9427, + ExclusiveLimitAlarmType_ShelvingState_Unshelve = 9449, + ExclusiveLimitAlarmType_ShelvingState_OneShotShelve = 9450, + ExclusiveLimitAlarmType_ShelvingState_TimedShelve = 9451, + ExclusiveLimitAlarmType_ShelvingState_TimedShelve_InputArguments = 9452, + ExclusiveLimitAlarmType_SuppressedOrShelved = 9453, + ExclusiveLimitAlarmType_MaxTimeShelved = 9454, + ExclusiveLimitAlarmType_LimitState = 9455, + ExclusiveLimitAlarmType_LimitState_CurrentState = 9456, + ExclusiveLimitAlarmType_LimitState_CurrentState_Id = 9457, + ExclusiveLimitAlarmType_LimitState_CurrentState_Name = 9458, + ExclusiveLimitAlarmType_LimitState_CurrentState_Number = 9459, + ExclusiveLimitAlarmType_LimitState_CurrentState_EffectiveDisplayName = 9460, + ExclusiveLimitAlarmType_LimitState_LastTransition = 9461, + ExclusiveLimitAlarmType_LimitState_LastTransition_Id = 9462, + ExclusiveLimitAlarmType_LimitState_LastTransition_Name = 9463, + ExclusiveLimitAlarmType_LimitState_LastTransition_Number = 9464, + ExclusiveLimitAlarmType_LimitState_LastTransition_TransitionTime = 9465, + ExclusiveLimitAlarmType_HighHighLimit = 9478, + ExclusiveLimitAlarmType_HighLimit = 9479, + ExclusiveLimitAlarmType_LowLimit = 9480, + ExclusiveLimitAlarmType_LowLowLimit = 9481, + ExclusiveLevelAlarmType = 9482, + ExclusiveLevelAlarmType_EventId = 9483, + ExclusiveLevelAlarmType_EventType = 9484, + ExclusiveLevelAlarmType_SourceNode = 9485, + ExclusiveLevelAlarmType_SourceName = 9486, + ExclusiveLevelAlarmType_Time = 9487, + ExclusiveLevelAlarmType_ReceiveTime = 9488, + ExclusiveLevelAlarmType_LocalTime = 9489, + ExclusiveLevelAlarmType_Message = 9490, + ExclusiveLevelAlarmType_Severity = 9491, + ExclusiveLevelAlarmType_ConditionName = 9492, + ExclusiveLevelAlarmType_BranchId = 9493, + ExclusiveLevelAlarmType_Retain = 9494, + ExclusiveLevelAlarmType_EnabledState = 9495, + ExclusiveLevelAlarmType_EnabledState_Id = 9496, + ExclusiveLevelAlarmType_EnabledState_Name = 9497, + ExclusiveLevelAlarmType_EnabledState_Number = 9498, + ExclusiveLevelAlarmType_EnabledState_EffectiveDisplayName = 9499, + ExclusiveLevelAlarmType_EnabledState_TransitionTime = 9500, + ExclusiveLevelAlarmType_EnabledState_EffectiveTransitionTime = 9501, + ExclusiveLevelAlarmType_EnabledState_TrueState = 9502, + ExclusiveLevelAlarmType_EnabledState_FalseState = 9503, + ExclusiveLevelAlarmType_Quality = 9504, + ExclusiveLevelAlarmType_Quality_SourceTimestamp = 9505, + ExclusiveLevelAlarmType_LastSeverity = 9506, + ExclusiveLevelAlarmType_LastSeverity_SourceTimestamp = 9507, + ExclusiveLevelAlarmType_Comment = 9508, + ExclusiveLevelAlarmType_Comment_SourceTimestamp = 9509, + ExclusiveLevelAlarmType_ClientUserId = 9510, + ExclusiveLevelAlarmType_Enable = 9511, + ExclusiveLevelAlarmType_Disable = 9512, + ExclusiveLevelAlarmType_AddComment = 9513, + ExclusiveLevelAlarmType_AddComment_InputArguments = 9514, + ExclusiveLevelAlarmType_ConditionRefresh = 9515, + ExclusiveLevelAlarmType_ConditionRefresh_InputArguments = 9516, + ExclusiveLevelAlarmType_AckedState = 9517, + ExclusiveLevelAlarmType_AckedState_Id = 9518, + ExclusiveLevelAlarmType_AckedState_Name = 9519, + ExclusiveLevelAlarmType_AckedState_Number = 9520, + ExclusiveLevelAlarmType_AckedState_EffectiveDisplayName = 9521, + ExclusiveLevelAlarmType_AckedState_TransitionTime = 9522, + ExclusiveLevelAlarmType_AckedState_EffectiveTransitionTime = 9523, + ExclusiveLevelAlarmType_AckedState_TrueState = 9524, + ExclusiveLevelAlarmType_AckedState_FalseState = 9525, + ExclusiveLevelAlarmType_ConfirmedState = 9526, + ExclusiveLevelAlarmType_ConfirmedState_Id = 9527, + ExclusiveLevelAlarmType_ConfirmedState_Name = 9528, + ExclusiveLevelAlarmType_ConfirmedState_Number = 9529, + ExclusiveLevelAlarmType_ConfirmedState_EffectiveDisplayName = 9530, + ExclusiveLevelAlarmType_ConfirmedState_TransitionTime = 9531, + ExclusiveLevelAlarmType_ConfirmedState_EffectiveTransitionTime = 9532, + ExclusiveLevelAlarmType_ConfirmedState_TrueState = 9533, + ExclusiveLevelAlarmType_ConfirmedState_FalseState = 9534, + ExclusiveLevelAlarmType_Acknowledge = 9535, + ExclusiveLevelAlarmType_Acknowledge_InputArguments = 9536, + ExclusiveLevelAlarmType_Confirm = 9537, + ExclusiveLevelAlarmType_Confirm_InputArguments = 9538, + ExclusiveLevelAlarmType_ActiveState = 9539, + ExclusiveLevelAlarmType_ActiveState_Id = 9540, + ExclusiveLevelAlarmType_ActiveState_Name = 9541, + ExclusiveLevelAlarmType_ActiveState_Number = 9542, + ExclusiveLevelAlarmType_ActiveState_EffectiveDisplayName = 9543, + ExclusiveLevelAlarmType_ActiveState_TransitionTime = 9544, + ExclusiveLevelAlarmType_ActiveState_EffectiveTransitionTime = 9545, + ExclusiveLevelAlarmType_ActiveState_TrueState = 9546, + ExclusiveLevelAlarmType_ActiveState_FalseState = 9547, + ExclusiveLevelAlarmType_SuppressedState = 9548, + ExclusiveLevelAlarmType_SuppressedState_Id = 9549, + ExclusiveLevelAlarmType_SuppressedState_Name = 9550, + ExclusiveLevelAlarmType_SuppressedState_Number = 9551, + ExclusiveLevelAlarmType_SuppressedState_EffectiveDisplayName = 9552, + ExclusiveLevelAlarmType_SuppressedState_TransitionTime = 9553, + ExclusiveLevelAlarmType_SuppressedState_EffectiveTransitionTime = 9554, + ExclusiveLevelAlarmType_SuppressedState_TrueState = 9555, + ExclusiveLevelAlarmType_SuppressedState_FalseState = 9556, + ExclusiveLevelAlarmType_ShelvingState = 9557, + ExclusiveLevelAlarmType_ShelvingState_CurrentState = 9558, + ExclusiveLevelAlarmType_ShelvingState_CurrentState_Id = 9559, + ExclusiveLevelAlarmType_ShelvingState_CurrentState_Name = 9560, + ExclusiveLevelAlarmType_ShelvingState_CurrentState_Number = 9561, + ExclusiveLevelAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 9562, + ExclusiveLevelAlarmType_ShelvingState_LastTransition = 9563, + ExclusiveLevelAlarmType_ShelvingState_LastTransition_Id = 9564, + ExclusiveLevelAlarmType_ShelvingState_LastTransition_Name = 9565, + ExclusiveLevelAlarmType_ShelvingState_LastTransition_Number = 9566, + ExclusiveLevelAlarmType_ShelvingState_LastTransition_TransitionTime = 9567, + ExclusiveLevelAlarmType_ShelvingState_UnshelveTime = 9568, + ExclusiveLevelAlarmType_ShelvingState_Unshelve = 9590, + ExclusiveLevelAlarmType_ShelvingState_OneShotShelve = 9591, + ExclusiveLevelAlarmType_ShelvingState_TimedShelve = 9592, + ExclusiveLevelAlarmType_ShelvingState_TimedShelve_InputArguments = 9593, + ExclusiveLevelAlarmType_SuppressedOrShelved = 9594, + ExclusiveLevelAlarmType_MaxTimeShelved = 9595, + ExclusiveLevelAlarmType_LimitState = 9596, + ExclusiveLevelAlarmType_LimitState_CurrentState = 9597, + ExclusiveLevelAlarmType_LimitState_CurrentState_Id = 9598, + ExclusiveLevelAlarmType_LimitState_CurrentState_Name = 9599, + ExclusiveLevelAlarmType_LimitState_CurrentState_Number = 9600, + ExclusiveLevelAlarmType_LimitState_CurrentState_EffectiveDisplayName = 9601, + ExclusiveLevelAlarmType_LimitState_LastTransition = 9602, + ExclusiveLevelAlarmType_LimitState_LastTransition_Id = 9603, + ExclusiveLevelAlarmType_LimitState_LastTransition_Name = 9604, + ExclusiveLevelAlarmType_LimitState_LastTransition_Number = 9605, + ExclusiveLevelAlarmType_LimitState_LastTransition_TransitionTime = 9606, + ExclusiveLevelAlarmType_HighHighLimit = 9619, + ExclusiveLevelAlarmType_HighLimit = 9620, + ExclusiveLevelAlarmType_LowLimit = 9621, + ExclusiveLevelAlarmType_LowLowLimit = 9622, + ExclusiveRateOfChangeAlarmType = 9623, + ExclusiveRateOfChangeAlarmType_EventId = 9624, + ExclusiveRateOfChangeAlarmType_EventType = 9625, + ExclusiveRateOfChangeAlarmType_SourceNode = 9626, + ExclusiveRateOfChangeAlarmType_SourceName = 9627, + ExclusiveRateOfChangeAlarmType_Time = 9628, + ExclusiveRateOfChangeAlarmType_ReceiveTime = 9629, + ExclusiveRateOfChangeAlarmType_LocalTime = 9630, + ExclusiveRateOfChangeAlarmType_Message = 9631, + ExclusiveRateOfChangeAlarmType_Severity = 9632, + ExclusiveRateOfChangeAlarmType_ConditionName = 9633, + ExclusiveRateOfChangeAlarmType_BranchId = 9634, + ExclusiveRateOfChangeAlarmType_Retain = 9635, + ExclusiveRateOfChangeAlarmType_EnabledState = 9636, + ExclusiveRateOfChangeAlarmType_EnabledState_Id = 9637, + ExclusiveRateOfChangeAlarmType_EnabledState_Name = 9638, + ExclusiveRateOfChangeAlarmType_EnabledState_Number = 9639, + ExclusiveRateOfChangeAlarmType_EnabledState_EffectiveDisplayName = 9640, + ExclusiveRateOfChangeAlarmType_EnabledState_TransitionTime = 9641, + ExclusiveRateOfChangeAlarmType_EnabledState_EffectiveTransitionTime = 9642, + ExclusiveRateOfChangeAlarmType_EnabledState_TrueState = 9643, + ExclusiveRateOfChangeAlarmType_EnabledState_FalseState = 9644, + ExclusiveRateOfChangeAlarmType_Quality = 9645, + ExclusiveRateOfChangeAlarmType_Quality_SourceTimestamp = 9646, + ExclusiveRateOfChangeAlarmType_LastSeverity = 9647, + ExclusiveRateOfChangeAlarmType_LastSeverity_SourceTimestamp = 9648, + ExclusiveRateOfChangeAlarmType_Comment = 9649, + ExclusiveRateOfChangeAlarmType_Comment_SourceTimestamp = 9650, + ExclusiveRateOfChangeAlarmType_ClientUserId = 9651, + ExclusiveRateOfChangeAlarmType_Enable = 9652, + ExclusiveRateOfChangeAlarmType_Disable = 9653, + ExclusiveRateOfChangeAlarmType_AddComment = 9654, + ExclusiveRateOfChangeAlarmType_AddComment_InputArguments = 9655, + ExclusiveRateOfChangeAlarmType_ConditionRefresh = 9656, + ExclusiveRateOfChangeAlarmType_ConditionRefresh_InputArguments = 9657, + ExclusiveRateOfChangeAlarmType_AckedState = 9658, + ExclusiveRateOfChangeAlarmType_AckedState_Id = 9659, + ExclusiveRateOfChangeAlarmType_AckedState_Name = 9660, + ExclusiveRateOfChangeAlarmType_AckedState_Number = 9661, + ExclusiveRateOfChangeAlarmType_AckedState_EffectiveDisplayName = 9662, + ExclusiveRateOfChangeAlarmType_AckedState_TransitionTime = 9663, + ExclusiveRateOfChangeAlarmType_AckedState_EffectiveTransitionTime = 9664, + ExclusiveRateOfChangeAlarmType_AckedState_TrueState = 9665, + ExclusiveRateOfChangeAlarmType_AckedState_FalseState = 9666, + ExclusiveRateOfChangeAlarmType_ConfirmedState = 9667, + ExclusiveRateOfChangeAlarmType_ConfirmedState_Id = 9668, + ExclusiveRateOfChangeAlarmType_ConfirmedState_Name = 9669, + ExclusiveRateOfChangeAlarmType_ConfirmedState_Number = 9670, + ExclusiveRateOfChangeAlarmType_ConfirmedState_EffectiveDisplayName = 9671, + ExclusiveRateOfChangeAlarmType_ConfirmedState_TransitionTime = 9672, + ExclusiveRateOfChangeAlarmType_ConfirmedState_EffectiveTransitionTime = 9673, + ExclusiveRateOfChangeAlarmType_ConfirmedState_TrueState = 9674, + ExclusiveRateOfChangeAlarmType_ConfirmedState_FalseState = 9675, + ExclusiveRateOfChangeAlarmType_Acknowledge = 9676, + ExclusiveRateOfChangeAlarmType_Acknowledge_InputArguments = 9677, + ExclusiveRateOfChangeAlarmType_Confirm = 9678, + ExclusiveRateOfChangeAlarmType_Confirm_InputArguments = 9679, + ExclusiveRateOfChangeAlarmType_ActiveState = 9680, + ExclusiveRateOfChangeAlarmType_ActiveState_Id = 9681, + ExclusiveRateOfChangeAlarmType_ActiveState_Name = 9682, + ExclusiveRateOfChangeAlarmType_ActiveState_Number = 9683, + ExclusiveRateOfChangeAlarmType_ActiveState_EffectiveDisplayName = 9684, + ExclusiveRateOfChangeAlarmType_ActiveState_TransitionTime = 9685, + ExclusiveRateOfChangeAlarmType_ActiveState_EffectiveTransitionTime = 9686, + ExclusiveRateOfChangeAlarmType_ActiveState_TrueState = 9687, + ExclusiveRateOfChangeAlarmType_ActiveState_FalseState = 9688, + ExclusiveRateOfChangeAlarmType_SuppressedState = 9689, + ExclusiveRateOfChangeAlarmType_SuppressedState_Id = 9690, + ExclusiveRateOfChangeAlarmType_SuppressedState_Name = 9691, + ExclusiveRateOfChangeAlarmType_SuppressedState_Number = 9692, + ExclusiveRateOfChangeAlarmType_SuppressedState_EffectiveDisplayName = 9693, + ExclusiveRateOfChangeAlarmType_SuppressedState_TransitionTime = 9694, + ExclusiveRateOfChangeAlarmType_SuppressedState_EffectiveTransitionTime = 9695, + ExclusiveRateOfChangeAlarmType_SuppressedState_TrueState = 9696, + ExclusiveRateOfChangeAlarmType_SuppressedState_FalseState = 9697, + ExclusiveRateOfChangeAlarmType_ShelvingState = 9698, + ExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState = 9699, + ExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_Id = 9700, + ExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_Name = 9701, + ExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_Number = 9702, + ExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 9703, + ExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition = 9704, + ExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_Id = 9705, + ExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_Name = 9706, + ExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_Number = 9707, + ExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_TransitionTime = 9708, + ExclusiveRateOfChangeAlarmType_ShelvingState_UnshelveTime = 9709, + ExclusiveRateOfChangeAlarmType_ShelvingState_Unshelve = 9731, + ExclusiveRateOfChangeAlarmType_ShelvingState_OneShotShelve = 9732, + ExclusiveRateOfChangeAlarmType_ShelvingState_TimedShelve = 9733, + ExclusiveRateOfChangeAlarmType_ShelvingState_TimedShelve_InputArguments = 9734, + ExclusiveRateOfChangeAlarmType_SuppressedOrShelved = 9735, + ExclusiveRateOfChangeAlarmType_MaxTimeShelved = 9736, + ExclusiveRateOfChangeAlarmType_LimitState = 9737, + ExclusiveRateOfChangeAlarmType_LimitState_CurrentState = 9738, + ExclusiveRateOfChangeAlarmType_LimitState_CurrentState_Id = 9739, + ExclusiveRateOfChangeAlarmType_LimitState_CurrentState_Name = 9740, + ExclusiveRateOfChangeAlarmType_LimitState_CurrentState_Number = 9741, + ExclusiveRateOfChangeAlarmType_LimitState_CurrentState_EffectiveDisplayName = 9742, + ExclusiveRateOfChangeAlarmType_LimitState_LastTransition = 9743, + ExclusiveRateOfChangeAlarmType_LimitState_LastTransition_Id = 9744, + ExclusiveRateOfChangeAlarmType_LimitState_LastTransition_Name = 9745, + ExclusiveRateOfChangeAlarmType_LimitState_LastTransition_Number = 9746, + ExclusiveRateOfChangeAlarmType_LimitState_LastTransition_TransitionTime = 9747, + ExclusiveRateOfChangeAlarmType_HighHighLimit = 9760, + ExclusiveRateOfChangeAlarmType_HighLimit = 9761, + ExclusiveRateOfChangeAlarmType_LowLimit = 9762, + ExclusiveRateOfChangeAlarmType_LowLowLimit = 9763, + ExclusiveDeviationAlarmType = 9764, + ExclusiveDeviationAlarmType_EventId = 9765, + ExclusiveDeviationAlarmType_EventType = 9766, + ExclusiveDeviationAlarmType_SourceNode = 9767, + ExclusiveDeviationAlarmType_SourceName = 9768, + ExclusiveDeviationAlarmType_Time = 9769, + ExclusiveDeviationAlarmType_ReceiveTime = 9770, + ExclusiveDeviationAlarmType_LocalTime = 9771, + ExclusiveDeviationAlarmType_Message = 9772, + ExclusiveDeviationAlarmType_Severity = 9773, + ExclusiveDeviationAlarmType_ConditionName = 9774, + ExclusiveDeviationAlarmType_BranchId = 9775, + ExclusiveDeviationAlarmType_Retain = 9776, + ExclusiveDeviationAlarmType_EnabledState = 9777, + ExclusiveDeviationAlarmType_EnabledState_Id = 9778, + ExclusiveDeviationAlarmType_EnabledState_Name = 9779, + ExclusiveDeviationAlarmType_EnabledState_Number = 9780, + ExclusiveDeviationAlarmType_EnabledState_EffectiveDisplayName = 9781, + ExclusiveDeviationAlarmType_EnabledState_TransitionTime = 9782, + ExclusiveDeviationAlarmType_EnabledState_EffectiveTransitionTime = 9783, + ExclusiveDeviationAlarmType_EnabledState_TrueState = 9784, + ExclusiveDeviationAlarmType_EnabledState_FalseState = 9785, + ExclusiveDeviationAlarmType_Quality = 9786, + ExclusiveDeviationAlarmType_Quality_SourceTimestamp = 9787, + ExclusiveDeviationAlarmType_LastSeverity = 9788, + ExclusiveDeviationAlarmType_LastSeverity_SourceTimestamp = 9789, + ExclusiveDeviationAlarmType_Comment = 9790, + ExclusiveDeviationAlarmType_Comment_SourceTimestamp = 9791, + ExclusiveDeviationAlarmType_ClientUserId = 9792, + ExclusiveDeviationAlarmType_Enable = 9793, + ExclusiveDeviationAlarmType_Disable = 9794, + ExclusiveDeviationAlarmType_AddComment = 9795, + ExclusiveDeviationAlarmType_AddComment_InputArguments = 9796, + ExclusiveDeviationAlarmType_ConditionRefresh = 9797, + ExclusiveDeviationAlarmType_ConditionRefresh_InputArguments = 9798, + ExclusiveDeviationAlarmType_AckedState = 9799, + ExclusiveDeviationAlarmType_AckedState_Id = 9800, + ExclusiveDeviationAlarmType_AckedState_Name = 9801, + ExclusiveDeviationAlarmType_AckedState_Number = 9802, + ExclusiveDeviationAlarmType_AckedState_EffectiveDisplayName = 9803, + ExclusiveDeviationAlarmType_AckedState_TransitionTime = 9804, + ExclusiveDeviationAlarmType_AckedState_EffectiveTransitionTime = 9805, + ExclusiveDeviationAlarmType_AckedState_TrueState = 9806, + ExclusiveDeviationAlarmType_AckedState_FalseState = 9807, + ExclusiveDeviationAlarmType_ConfirmedState = 9808, + ExclusiveDeviationAlarmType_ConfirmedState_Id = 9809, + ExclusiveDeviationAlarmType_ConfirmedState_Name = 9810, + ExclusiveDeviationAlarmType_ConfirmedState_Number = 9811, + ExclusiveDeviationAlarmType_ConfirmedState_EffectiveDisplayName = 9812, + ExclusiveDeviationAlarmType_ConfirmedState_TransitionTime = 9813, + ExclusiveDeviationAlarmType_ConfirmedState_EffectiveTransitionTime = 9814, + ExclusiveDeviationAlarmType_ConfirmedState_TrueState = 9815, + ExclusiveDeviationAlarmType_ConfirmedState_FalseState = 9816, + ExclusiveDeviationAlarmType_Acknowledge = 9817, + ExclusiveDeviationAlarmType_Acknowledge_InputArguments = 9818, + ExclusiveDeviationAlarmType_Confirm = 9819, + ExclusiveDeviationAlarmType_Confirm_InputArguments = 9820, + ExclusiveDeviationAlarmType_ActiveState = 9821, + ExclusiveDeviationAlarmType_ActiveState_Id = 9822, + ExclusiveDeviationAlarmType_ActiveState_Name = 9823, + ExclusiveDeviationAlarmType_ActiveState_Number = 9824, + ExclusiveDeviationAlarmType_ActiveState_EffectiveDisplayName = 9825, + ExclusiveDeviationAlarmType_ActiveState_TransitionTime = 9826, + ExclusiveDeviationAlarmType_ActiveState_EffectiveTransitionTime = 9827, + ExclusiveDeviationAlarmType_ActiveState_TrueState = 9828, + ExclusiveDeviationAlarmType_ActiveState_FalseState = 9829, + ExclusiveDeviationAlarmType_SuppressedState = 9830, + ExclusiveDeviationAlarmType_SuppressedState_Id = 9831, + ExclusiveDeviationAlarmType_SuppressedState_Name = 9832, + ExclusiveDeviationAlarmType_SuppressedState_Number = 9833, + ExclusiveDeviationAlarmType_SuppressedState_EffectiveDisplayName = 9834, + ExclusiveDeviationAlarmType_SuppressedState_TransitionTime = 9835, + ExclusiveDeviationAlarmType_SuppressedState_EffectiveTransitionTime = 9836, + ExclusiveDeviationAlarmType_SuppressedState_TrueState = 9837, + ExclusiveDeviationAlarmType_SuppressedState_FalseState = 9838, + ExclusiveDeviationAlarmType_ShelvingState = 9839, + ExclusiveDeviationAlarmType_ShelvingState_CurrentState = 9840, + ExclusiveDeviationAlarmType_ShelvingState_CurrentState_Id = 9841, + ExclusiveDeviationAlarmType_ShelvingState_CurrentState_Name = 9842, + ExclusiveDeviationAlarmType_ShelvingState_CurrentState_Number = 9843, + ExclusiveDeviationAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 9844, + ExclusiveDeviationAlarmType_ShelvingState_LastTransition = 9845, + ExclusiveDeviationAlarmType_ShelvingState_LastTransition_Id = 9846, + ExclusiveDeviationAlarmType_ShelvingState_LastTransition_Name = 9847, + ExclusiveDeviationAlarmType_ShelvingState_LastTransition_Number = 9848, + ExclusiveDeviationAlarmType_ShelvingState_LastTransition_TransitionTime = 9849, + ExclusiveDeviationAlarmType_ShelvingState_UnshelveTime = 9850, + ExclusiveDeviationAlarmType_ShelvingState_Unshelve = 9872, + ExclusiveDeviationAlarmType_ShelvingState_OneShotShelve = 9873, + ExclusiveDeviationAlarmType_ShelvingState_TimedShelve = 9874, + ExclusiveDeviationAlarmType_ShelvingState_TimedShelve_InputArguments = 9875, + ExclusiveDeviationAlarmType_SuppressedOrShelved = 9876, + ExclusiveDeviationAlarmType_MaxTimeShelved = 9877, + ExclusiveDeviationAlarmType_LimitState = 9878, + ExclusiveDeviationAlarmType_LimitState_CurrentState = 9879, + ExclusiveDeviationAlarmType_LimitState_CurrentState_Id = 9880, + ExclusiveDeviationAlarmType_LimitState_CurrentState_Name = 9881, + ExclusiveDeviationAlarmType_LimitState_CurrentState_Number = 9882, + ExclusiveDeviationAlarmType_LimitState_CurrentState_EffectiveDisplayName = 9883, + ExclusiveDeviationAlarmType_LimitState_LastTransition = 9884, + ExclusiveDeviationAlarmType_LimitState_LastTransition_Id = 9885, + ExclusiveDeviationAlarmType_LimitState_LastTransition_Name = 9886, + ExclusiveDeviationAlarmType_LimitState_LastTransition_Number = 9887, + ExclusiveDeviationAlarmType_LimitState_LastTransition_TransitionTime = 9888, + ExclusiveDeviationAlarmType_HighHighLimit = 9901, + ExclusiveDeviationAlarmType_HighLimit = 9902, + ExclusiveDeviationAlarmType_LowLimit = 9903, + ExclusiveDeviationAlarmType_LowLowLimit = 9904, + ExclusiveDeviationAlarmType_SetpointNode = 9905, + NonExclusiveLimitAlarmType = 9906, + NonExclusiveLimitAlarmType_EventId = 9907, + NonExclusiveLimitAlarmType_EventType = 9908, + NonExclusiveLimitAlarmType_SourceNode = 9909, + NonExclusiveLimitAlarmType_SourceName = 9910, + NonExclusiveLimitAlarmType_Time = 9911, + NonExclusiveLimitAlarmType_ReceiveTime = 9912, + NonExclusiveLimitAlarmType_LocalTime = 9913, + NonExclusiveLimitAlarmType_Message = 9914, + NonExclusiveLimitAlarmType_Severity = 9915, + NonExclusiveLimitAlarmType_ConditionName = 9916, + NonExclusiveLimitAlarmType_BranchId = 9917, + NonExclusiveLimitAlarmType_Retain = 9918, + NonExclusiveLimitAlarmType_EnabledState = 9919, + NonExclusiveLimitAlarmType_EnabledState_Id = 9920, + NonExclusiveLimitAlarmType_EnabledState_Name = 9921, + NonExclusiveLimitAlarmType_EnabledState_Number = 9922, + NonExclusiveLimitAlarmType_EnabledState_EffectiveDisplayName = 9923, + NonExclusiveLimitAlarmType_EnabledState_TransitionTime = 9924, + NonExclusiveLimitAlarmType_EnabledState_EffectiveTransitionTime = 9925, + NonExclusiveLimitAlarmType_EnabledState_TrueState = 9926, + NonExclusiveLimitAlarmType_EnabledState_FalseState = 9927, + NonExclusiveLimitAlarmType_Quality = 9928, + NonExclusiveLimitAlarmType_Quality_SourceTimestamp = 9929, + NonExclusiveLimitAlarmType_LastSeverity = 9930, + NonExclusiveLimitAlarmType_LastSeverity_SourceTimestamp = 9931, + NonExclusiveLimitAlarmType_Comment = 9932, + NonExclusiveLimitAlarmType_Comment_SourceTimestamp = 9933, + NonExclusiveLimitAlarmType_ClientUserId = 9934, + NonExclusiveLimitAlarmType_Enable = 9935, + NonExclusiveLimitAlarmType_Disable = 9936, + NonExclusiveLimitAlarmType_AddComment = 9937, + NonExclusiveLimitAlarmType_AddComment_InputArguments = 9938, + NonExclusiveLimitAlarmType_ConditionRefresh = 9939, + NonExclusiveLimitAlarmType_ConditionRefresh_InputArguments = 9940, + NonExclusiveLimitAlarmType_AckedState = 9941, + NonExclusiveLimitAlarmType_AckedState_Id = 9942, + NonExclusiveLimitAlarmType_AckedState_Name = 9943, + NonExclusiveLimitAlarmType_AckedState_Number = 9944, + NonExclusiveLimitAlarmType_AckedState_EffectiveDisplayName = 9945, + NonExclusiveLimitAlarmType_AckedState_TransitionTime = 9946, + NonExclusiveLimitAlarmType_AckedState_EffectiveTransitionTime = 9947, + NonExclusiveLimitAlarmType_AckedState_TrueState = 9948, + NonExclusiveLimitAlarmType_AckedState_FalseState = 9949, + NonExclusiveLimitAlarmType_ConfirmedState = 9950, + NonExclusiveLimitAlarmType_ConfirmedState_Id = 9951, + NonExclusiveLimitAlarmType_ConfirmedState_Name = 9952, + NonExclusiveLimitAlarmType_ConfirmedState_Number = 9953, + NonExclusiveLimitAlarmType_ConfirmedState_EffectiveDisplayName = 9954, + NonExclusiveLimitAlarmType_ConfirmedState_TransitionTime = 9955, + NonExclusiveLimitAlarmType_ConfirmedState_EffectiveTransitionTime = 9956, + NonExclusiveLimitAlarmType_ConfirmedState_TrueState = 9957, + NonExclusiveLimitAlarmType_ConfirmedState_FalseState = 9958, + NonExclusiveLimitAlarmType_Acknowledge = 9959, + NonExclusiveLimitAlarmType_Acknowledge_InputArguments = 9960, + NonExclusiveLimitAlarmType_Confirm = 9961, + NonExclusiveLimitAlarmType_Confirm_InputArguments = 9962, + NonExclusiveLimitAlarmType_ActiveState = 9963, + NonExclusiveLimitAlarmType_ActiveState_Id = 9964, + NonExclusiveLimitAlarmType_ActiveState_Name = 9965, + NonExclusiveLimitAlarmType_ActiveState_Number = 9966, + NonExclusiveLimitAlarmType_ActiveState_EffectiveDisplayName = 9967, + NonExclusiveLimitAlarmType_ActiveState_TransitionTime = 9968, + NonExclusiveLimitAlarmType_ActiveState_EffectiveTransitionTime = 9969, + NonExclusiveLimitAlarmType_ActiveState_TrueState = 9970, + NonExclusiveLimitAlarmType_ActiveState_FalseState = 9971, + NonExclusiveLimitAlarmType_SuppressedState = 9972, + NonExclusiveLimitAlarmType_SuppressedState_Id = 9973, + NonExclusiveLimitAlarmType_SuppressedState_Name = 9974, + NonExclusiveLimitAlarmType_SuppressedState_Number = 9975, + NonExclusiveLimitAlarmType_SuppressedState_EffectiveDisplayName = 9976, + NonExclusiveLimitAlarmType_SuppressedState_TransitionTime = 9977, + NonExclusiveLimitAlarmType_SuppressedState_EffectiveTransitionTime = 9978, + NonExclusiveLimitAlarmType_SuppressedState_TrueState = 9979, + NonExclusiveLimitAlarmType_SuppressedState_FalseState = 9980, + NonExclusiveLimitAlarmType_ShelvingState = 9981, + NonExclusiveLimitAlarmType_ShelvingState_CurrentState = 9982, + NonExclusiveLimitAlarmType_ShelvingState_CurrentState_Id = 9983, + NonExclusiveLimitAlarmType_ShelvingState_CurrentState_Name = 9984, + NonExclusiveLimitAlarmType_ShelvingState_CurrentState_Number = 9985, + NonExclusiveLimitAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 9986, + NonExclusiveLimitAlarmType_ShelvingState_LastTransition = 9987, + NonExclusiveLimitAlarmType_ShelvingState_LastTransition_Id = 9988, + NonExclusiveLimitAlarmType_ShelvingState_LastTransition_Name = 9989, + NonExclusiveLimitAlarmType_ShelvingState_LastTransition_Number = 9990, + NonExclusiveLimitAlarmType_ShelvingState_LastTransition_TransitionTime = 9991, + NonExclusiveLimitAlarmType_ShelvingState_UnshelveTime = 9992, + NonExclusiveLimitAlarmType_ShelvingState_Unshelve = 10014, + NonExclusiveLimitAlarmType_ShelvingState_OneShotShelve = 10015, + NonExclusiveLimitAlarmType_ShelvingState_TimedShelve = 10016, + NonExclusiveLimitAlarmType_ShelvingState_TimedShelve_InputArguments = 10017, + NonExclusiveLimitAlarmType_SuppressedOrShelved = 10018, + NonExclusiveLimitAlarmType_MaxTimeShelved = 10019, + NonExclusiveLimitAlarmType_HighHighState = 10020, + NonExclusiveLimitAlarmType_HighHighState_Id = 10021, + NonExclusiveLimitAlarmType_HighHighState_Name = 10022, + NonExclusiveLimitAlarmType_HighHighState_Number = 10023, + NonExclusiveLimitAlarmType_HighHighState_EffectiveDisplayName = 10024, + NonExclusiveLimitAlarmType_HighHighState_TransitionTime = 10025, + NonExclusiveLimitAlarmType_HighHighState_EffectiveTransitionTime = 10026, + NonExclusiveLimitAlarmType_HighHighState_TrueState = 10027, + NonExclusiveLimitAlarmType_HighHighState_FalseState = 10028, + NonExclusiveLimitAlarmType_HighState = 10029, + NonExclusiveLimitAlarmType_HighState_Id = 10030, + NonExclusiveLimitAlarmType_HighState_Name = 10031, + NonExclusiveLimitAlarmType_HighState_Number = 10032, + NonExclusiveLimitAlarmType_HighState_EffectiveDisplayName = 10033, + NonExclusiveLimitAlarmType_HighState_TransitionTime = 10034, + NonExclusiveLimitAlarmType_HighState_EffectiveTransitionTime = 10035, + NonExclusiveLimitAlarmType_HighState_TrueState = 10036, + NonExclusiveLimitAlarmType_HighState_FalseState = 10037, + NonExclusiveLimitAlarmType_LowState = 10038, + NonExclusiveLimitAlarmType_LowState_Id = 10039, + NonExclusiveLimitAlarmType_LowState_Name = 10040, + NonExclusiveLimitAlarmType_LowState_Number = 10041, + NonExclusiveLimitAlarmType_LowState_EffectiveDisplayName = 10042, + NonExclusiveLimitAlarmType_LowState_TransitionTime = 10043, + NonExclusiveLimitAlarmType_LowState_EffectiveTransitionTime = 10044, + NonExclusiveLimitAlarmType_LowState_TrueState = 10045, + NonExclusiveLimitAlarmType_LowState_FalseState = 10046, + NonExclusiveLimitAlarmType_LowLowState = 10047, + NonExclusiveLimitAlarmType_LowLowState_Id = 10048, + NonExclusiveLimitAlarmType_LowLowState_Name = 10049, + NonExclusiveLimitAlarmType_LowLowState_Number = 10050, + NonExclusiveLimitAlarmType_LowLowState_EffectiveDisplayName = 10051, + NonExclusiveLimitAlarmType_LowLowState_TransitionTime = 10052, + NonExclusiveLimitAlarmType_LowLowState_EffectiveTransitionTime = 10053, + NonExclusiveLimitAlarmType_LowLowState_TrueState = 10054, + NonExclusiveLimitAlarmType_LowLowState_FalseState = 10055, + NonExclusiveLimitAlarmType_HighHighLimit = 10056, + NonExclusiveLimitAlarmType_HighLimit = 10057, + NonExclusiveLimitAlarmType_LowLimit = 10058, + NonExclusiveLimitAlarmType_LowLowLimit = 10059, + NonExclusiveLevelAlarmType = 10060, + NonExclusiveLevelAlarmType_EventId = 10061, + NonExclusiveLevelAlarmType_EventType = 10062, + NonExclusiveLevelAlarmType_SourceNode = 10063, + NonExclusiveLevelAlarmType_SourceName = 10064, + NonExclusiveLevelAlarmType_Time = 10065, + NonExclusiveLevelAlarmType_ReceiveTime = 10066, + NonExclusiveLevelAlarmType_LocalTime = 10067, + NonExclusiveLevelAlarmType_Message = 10068, + NonExclusiveLevelAlarmType_Severity = 10069, + NonExclusiveLevelAlarmType_ConditionName = 10070, + NonExclusiveLevelAlarmType_BranchId = 10071, + NonExclusiveLevelAlarmType_Retain = 10072, + NonExclusiveLevelAlarmType_EnabledState = 10073, + NonExclusiveLevelAlarmType_EnabledState_Id = 10074, + NonExclusiveLevelAlarmType_EnabledState_Name = 10075, + NonExclusiveLevelAlarmType_EnabledState_Number = 10076, + NonExclusiveLevelAlarmType_EnabledState_EffectiveDisplayName = 10077, + NonExclusiveLevelAlarmType_EnabledState_TransitionTime = 10078, + NonExclusiveLevelAlarmType_EnabledState_EffectiveTransitionTime = 10079, + NonExclusiveLevelAlarmType_EnabledState_TrueState = 10080, + NonExclusiveLevelAlarmType_EnabledState_FalseState = 10081, + NonExclusiveLevelAlarmType_Quality = 10082, + NonExclusiveLevelAlarmType_Quality_SourceTimestamp = 10083, + NonExclusiveLevelAlarmType_LastSeverity = 10084, + NonExclusiveLevelAlarmType_LastSeverity_SourceTimestamp = 10085, + NonExclusiveLevelAlarmType_Comment = 10086, + NonExclusiveLevelAlarmType_Comment_SourceTimestamp = 10087, + NonExclusiveLevelAlarmType_ClientUserId = 10088, + NonExclusiveLevelAlarmType_Enable = 10089, + NonExclusiveLevelAlarmType_Disable = 10090, + NonExclusiveLevelAlarmType_AddComment = 10091, + NonExclusiveLevelAlarmType_AddComment_InputArguments = 10092, + NonExclusiveLevelAlarmType_ConditionRefresh = 10093, + NonExclusiveLevelAlarmType_ConditionRefresh_InputArguments = 10094, + NonExclusiveLevelAlarmType_AckedState = 10095, + NonExclusiveLevelAlarmType_AckedState_Id = 10096, + NonExclusiveLevelAlarmType_AckedState_Name = 10097, + NonExclusiveLevelAlarmType_AckedState_Number = 10098, + NonExclusiveLevelAlarmType_AckedState_EffectiveDisplayName = 10099, + NonExclusiveLevelAlarmType_AckedState_TransitionTime = 10100, + NonExclusiveLevelAlarmType_AckedState_EffectiveTransitionTime = 10101, + NonExclusiveLevelAlarmType_AckedState_TrueState = 10102, + NonExclusiveLevelAlarmType_AckedState_FalseState = 10103, + NonExclusiveLevelAlarmType_ConfirmedState = 10104, + NonExclusiveLevelAlarmType_ConfirmedState_Id = 10105, + NonExclusiveLevelAlarmType_ConfirmedState_Name = 10106, + NonExclusiveLevelAlarmType_ConfirmedState_Number = 10107, + NonExclusiveLevelAlarmType_ConfirmedState_EffectiveDisplayName = 10108, + NonExclusiveLevelAlarmType_ConfirmedState_TransitionTime = 10109, + NonExclusiveLevelAlarmType_ConfirmedState_EffectiveTransitionTime = 10110, + NonExclusiveLevelAlarmType_ConfirmedState_TrueState = 10111, + NonExclusiveLevelAlarmType_ConfirmedState_FalseState = 10112, + NonExclusiveLevelAlarmType_Acknowledge = 10113, + NonExclusiveLevelAlarmType_Acknowledge_InputArguments = 10114, + NonExclusiveLevelAlarmType_Confirm = 10115, + NonExclusiveLevelAlarmType_Confirm_InputArguments = 10116, + NonExclusiveLevelAlarmType_ActiveState = 10117, + NonExclusiveLevelAlarmType_ActiveState_Id = 10118, + NonExclusiveLevelAlarmType_ActiveState_Name = 10119, + NonExclusiveLevelAlarmType_ActiveState_Number = 10120, + NonExclusiveLevelAlarmType_ActiveState_EffectiveDisplayName = 10121, + NonExclusiveLevelAlarmType_ActiveState_TransitionTime = 10122, + NonExclusiveLevelAlarmType_ActiveState_EffectiveTransitionTime = 10123, + NonExclusiveLevelAlarmType_ActiveState_TrueState = 10124, + NonExclusiveLevelAlarmType_ActiveState_FalseState = 10125, + NonExclusiveLevelAlarmType_SuppressedState = 10126, + NonExclusiveLevelAlarmType_SuppressedState_Id = 10127, + NonExclusiveLevelAlarmType_SuppressedState_Name = 10128, + NonExclusiveLevelAlarmType_SuppressedState_Number = 10129, + NonExclusiveLevelAlarmType_SuppressedState_EffectiveDisplayName = 10130, + NonExclusiveLevelAlarmType_SuppressedState_TransitionTime = 10131, + NonExclusiveLevelAlarmType_SuppressedState_EffectiveTransitionTime = 10132, + NonExclusiveLevelAlarmType_SuppressedState_TrueState = 10133, + NonExclusiveLevelAlarmType_SuppressedState_FalseState = 10134, + NonExclusiveLevelAlarmType_ShelvingState = 10135, + NonExclusiveLevelAlarmType_ShelvingState_CurrentState = 10136, + NonExclusiveLevelAlarmType_ShelvingState_CurrentState_Id = 10137, + NonExclusiveLevelAlarmType_ShelvingState_CurrentState_Name = 10138, + NonExclusiveLevelAlarmType_ShelvingState_CurrentState_Number = 10139, + NonExclusiveLevelAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 10140, + NonExclusiveLevelAlarmType_ShelvingState_LastTransition = 10141, + NonExclusiveLevelAlarmType_ShelvingState_LastTransition_Id = 10142, + NonExclusiveLevelAlarmType_ShelvingState_LastTransition_Name = 10143, + NonExclusiveLevelAlarmType_ShelvingState_LastTransition_Number = 10144, + NonExclusiveLevelAlarmType_ShelvingState_LastTransition_TransitionTime = 10145, + NonExclusiveLevelAlarmType_ShelvingState_UnshelveTime = 10146, + NonExclusiveLevelAlarmType_ShelvingState_Unshelve = 10168, + NonExclusiveLevelAlarmType_ShelvingState_OneShotShelve = 10169, + NonExclusiveLevelAlarmType_ShelvingState_TimedShelve = 10170, + NonExclusiveLevelAlarmType_ShelvingState_TimedShelve_InputArguments = 10171, + NonExclusiveLevelAlarmType_SuppressedOrShelved = 10172, + NonExclusiveLevelAlarmType_MaxTimeShelved = 10173, + NonExclusiveLevelAlarmType_HighHighState = 10174, + NonExclusiveLevelAlarmType_HighHighState_Id = 10175, + NonExclusiveLevelAlarmType_HighHighState_Name = 10176, + NonExclusiveLevelAlarmType_HighHighState_Number = 10177, + NonExclusiveLevelAlarmType_HighHighState_EffectiveDisplayName = 10178, + NonExclusiveLevelAlarmType_HighHighState_TransitionTime = 10179, + NonExclusiveLevelAlarmType_HighHighState_EffectiveTransitionTime = 10180, + NonExclusiveLevelAlarmType_HighHighState_TrueState = 10181, + NonExclusiveLevelAlarmType_HighHighState_FalseState = 10182, + NonExclusiveLevelAlarmType_HighState = 10183, + NonExclusiveLevelAlarmType_HighState_Id = 10184, + NonExclusiveLevelAlarmType_HighState_Name = 10185, + NonExclusiveLevelAlarmType_HighState_Number = 10186, + NonExclusiveLevelAlarmType_HighState_EffectiveDisplayName = 10187, + NonExclusiveLevelAlarmType_HighState_TransitionTime = 10188, + NonExclusiveLevelAlarmType_HighState_EffectiveTransitionTime = 10189, + NonExclusiveLevelAlarmType_HighState_TrueState = 10190, + NonExclusiveLevelAlarmType_HighState_FalseState = 10191, + NonExclusiveLevelAlarmType_LowState = 10192, + NonExclusiveLevelAlarmType_LowState_Id = 10193, + NonExclusiveLevelAlarmType_LowState_Name = 10194, + NonExclusiveLevelAlarmType_LowState_Number = 10195, + NonExclusiveLevelAlarmType_LowState_EffectiveDisplayName = 10196, + NonExclusiveLevelAlarmType_LowState_TransitionTime = 10197, + NonExclusiveLevelAlarmType_LowState_EffectiveTransitionTime = 10198, + NonExclusiveLevelAlarmType_LowState_TrueState = 10199, + NonExclusiveLevelAlarmType_LowState_FalseState = 10200, + NonExclusiveLevelAlarmType_LowLowState = 10201, + NonExclusiveLevelAlarmType_LowLowState_Id = 10202, + NonExclusiveLevelAlarmType_LowLowState_Name = 10203, + NonExclusiveLevelAlarmType_LowLowState_Number = 10204, + NonExclusiveLevelAlarmType_LowLowState_EffectiveDisplayName = 10205, + NonExclusiveLevelAlarmType_LowLowState_TransitionTime = 10206, + NonExclusiveLevelAlarmType_LowLowState_EffectiveTransitionTime = 10207, + NonExclusiveLevelAlarmType_LowLowState_TrueState = 10208, + NonExclusiveLevelAlarmType_LowLowState_FalseState = 10209, + NonExclusiveLevelAlarmType_HighHighLimit = 10210, + NonExclusiveLevelAlarmType_HighLimit = 10211, + NonExclusiveLevelAlarmType_LowLimit = 10212, + NonExclusiveLevelAlarmType_LowLowLimit = 10213, + NonExclusiveRateOfChangeAlarmType = 10214, + NonExclusiveRateOfChangeAlarmType_EventId = 10215, + NonExclusiveRateOfChangeAlarmType_EventType = 10216, + NonExclusiveRateOfChangeAlarmType_SourceNode = 10217, + NonExclusiveRateOfChangeAlarmType_SourceName = 10218, + NonExclusiveRateOfChangeAlarmType_Time = 10219, + NonExclusiveRateOfChangeAlarmType_ReceiveTime = 10220, + NonExclusiveRateOfChangeAlarmType_LocalTime = 10221, + NonExclusiveRateOfChangeAlarmType_Message = 10222, + NonExclusiveRateOfChangeAlarmType_Severity = 10223, + NonExclusiveRateOfChangeAlarmType_ConditionName = 10224, + NonExclusiveRateOfChangeAlarmType_BranchId = 10225, + NonExclusiveRateOfChangeAlarmType_Retain = 10226, + NonExclusiveRateOfChangeAlarmType_EnabledState = 10227, + NonExclusiveRateOfChangeAlarmType_EnabledState_Id = 10228, + NonExclusiveRateOfChangeAlarmType_EnabledState_Name = 10229, + NonExclusiveRateOfChangeAlarmType_EnabledState_Number = 10230, + NonExclusiveRateOfChangeAlarmType_EnabledState_EffectiveDisplayName = 10231, + NonExclusiveRateOfChangeAlarmType_EnabledState_TransitionTime = 10232, + NonExclusiveRateOfChangeAlarmType_EnabledState_EffectiveTransitionTime = 10233, + NonExclusiveRateOfChangeAlarmType_EnabledState_TrueState = 10234, + NonExclusiveRateOfChangeAlarmType_EnabledState_FalseState = 10235, + NonExclusiveRateOfChangeAlarmType_Quality = 10236, + NonExclusiveRateOfChangeAlarmType_Quality_SourceTimestamp = 10237, + NonExclusiveRateOfChangeAlarmType_LastSeverity = 10238, + NonExclusiveRateOfChangeAlarmType_LastSeverity_SourceTimestamp = 10239, + NonExclusiveRateOfChangeAlarmType_Comment = 10240, + NonExclusiveRateOfChangeAlarmType_Comment_SourceTimestamp = 10241, + NonExclusiveRateOfChangeAlarmType_ClientUserId = 10242, + NonExclusiveRateOfChangeAlarmType_Enable = 10243, + NonExclusiveRateOfChangeAlarmType_Disable = 10244, + NonExclusiveRateOfChangeAlarmType_AddComment = 10245, + NonExclusiveRateOfChangeAlarmType_AddComment_InputArguments = 10246, + NonExclusiveRateOfChangeAlarmType_ConditionRefresh = 10247, + NonExclusiveRateOfChangeAlarmType_ConditionRefresh_InputArguments = 10248, + NonExclusiveRateOfChangeAlarmType_AckedState = 10249, + NonExclusiveRateOfChangeAlarmType_AckedState_Id = 10250, + NonExclusiveRateOfChangeAlarmType_AckedState_Name = 10251, + NonExclusiveRateOfChangeAlarmType_AckedState_Number = 10252, + NonExclusiveRateOfChangeAlarmType_AckedState_EffectiveDisplayName = 10253, + NonExclusiveRateOfChangeAlarmType_AckedState_TransitionTime = 10254, + NonExclusiveRateOfChangeAlarmType_AckedState_EffectiveTransitionTime = 10255, + NonExclusiveRateOfChangeAlarmType_AckedState_TrueState = 10256, + NonExclusiveRateOfChangeAlarmType_AckedState_FalseState = 10257, + NonExclusiveRateOfChangeAlarmType_ConfirmedState = 10258, + NonExclusiveRateOfChangeAlarmType_ConfirmedState_Id = 10259, + NonExclusiveRateOfChangeAlarmType_ConfirmedState_Name = 10260, + NonExclusiveRateOfChangeAlarmType_ConfirmedState_Number = 10261, + NonExclusiveRateOfChangeAlarmType_ConfirmedState_EffectiveDisplayName = 10262, + NonExclusiveRateOfChangeAlarmType_ConfirmedState_TransitionTime = 10263, + NonExclusiveRateOfChangeAlarmType_ConfirmedState_EffectiveTransitionTime = 10264, + NonExclusiveRateOfChangeAlarmType_ConfirmedState_TrueState = 10265, + NonExclusiveRateOfChangeAlarmType_ConfirmedState_FalseState = 10266, + NonExclusiveRateOfChangeAlarmType_Acknowledge = 10267, + NonExclusiveRateOfChangeAlarmType_Acknowledge_InputArguments = 10268, + NonExclusiveRateOfChangeAlarmType_Confirm = 10269, + NonExclusiveRateOfChangeAlarmType_Confirm_InputArguments = 10270, + NonExclusiveRateOfChangeAlarmType_ActiveState = 10271, + NonExclusiveRateOfChangeAlarmType_ActiveState_Id = 10272, + NonExclusiveRateOfChangeAlarmType_ActiveState_Name = 10273, + NonExclusiveRateOfChangeAlarmType_ActiveState_Number = 10274, + NonExclusiveRateOfChangeAlarmType_ActiveState_EffectiveDisplayName = 10275, + NonExclusiveRateOfChangeAlarmType_ActiveState_TransitionTime = 10276, + NonExclusiveRateOfChangeAlarmType_ActiveState_EffectiveTransitionTime = 10277, + NonExclusiveRateOfChangeAlarmType_ActiveState_TrueState = 10278, + NonExclusiveRateOfChangeAlarmType_ActiveState_FalseState = 10279, + NonExclusiveRateOfChangeAlarmType_SuppressedState = 10280, + NonExclusiveRateOfChangeAlarmType_SuppressedState_Id = 10281, + NonExclusiveRateOfChangeAlarmType_SuppressedState_Name = 10282, + NonExclusiveRateOfChangeAlarmType_SuppressedState_Number = 10283, + NonExclusiveRateOfChangeAlarmType_SuppressedState_EffectiveDisplayName = 10284, + NonExclusiveRateOfChangeAlarmType_SuppressedState_TransitionTime = 10285, + NonExclusiveRateOfChangeAlarmType_SuppressedState_EffectiveTransitionTime = 10286, + NonExclusiveRateOfChangeAlarmType_SuppressedState_TrueState = 10287, + NonExclusiveRateOfChangeAlarmType_SuppressedState_FalseState = 10288, + NonExclusiveRateOfChangeAlarmType_ShelvingState = 10289, + NonExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState = 10290, + NonExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_Id = 10291, + NonExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_Name = 10292, + NonExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_Number = 10293, + NonExclusiveRateOfChangeAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 10294, + NonExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition = 10295, + NonExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_Id = 10296, + NonExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_Name = 10297, + NonExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_Number = 10298, + NonExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_TransitionTime = 10299, + NonExclusiveRateOfChangeAlarmType_ShelvingState_UnshelveTime = 10300, + NonExclusiveRateOfChangeAlarmType_ShelvingState_Unshelve = 10322, + NonExclusiveRateOfChangeAlarmType_ShelvingState_OneShotShelve = 10323, + NonExclusiveRateOfChangeAlarmType_ShelvingState_TimedShelve = 10324, + NonExclusiveRateOfChangeAlarmType_ShelvingState_TimedShelve_InputArguments = 10325, + NonExclusiveRateOfChangeAlarmType_SuppressedOrShelved = 10326, + NonExclusiveRateOfChangeAlarmType_MaxTimeShelved = 10327, + NonExclusiveRateOfChangeAlarmType_HighHighState = 10328, + NonExclusiveRateOfChangeAlarmType_HighHighState_Id = 10329, + NonExclusiveRateOfChangeAlarmType_HighHighState_Name = 10330, + NonExclusiveRateOfChangeAlarmType_HighHighState_Number = 10331, + NonExclusiveRateOfChangeAlarmType_HighHighState_EffectiveDisplayName = 10332, + NonExclusiveRateOfChangeAlarmType_HighHighState_TransitionTime = 10333, + NonExclusiveRateOfChangeAlarmType_HighHighState_EffectiveTransitionTime = 10334, + NonExclusiveRateOfChangeAlarmType_HighHighState_TrueState = 10335, + NonExclusiveRateOfChangeAlarmType_HighHighState_FalseState = 10336, + NonExclusiveRateOfChangeAlarmType_HighState = 10337, + NonExclusiveRateOfChangeAlarmType_HighState_Id = 10338, + NonExclusiveRateOfChangeAlarmType_HighState_Name = 10339, + NonExclusiveRateOfChangeAlarmType_HighState_Number = 10340, + NonExclusiveRateOfChangeAlarmType_HighState_EffectiveDisplayName = 10341, + NonExclusiveRateOfChangeAlarmType_HighState_TransitionTime = 10342, + NonExclusiveRateOfChangeAlarmType_HighState_EffectiveTransitionTime = 10343, + NonExclusiveRateOfChangeAlarmType_HighState_TrueState = 10344, + NonExclusiveRateOfChangeAlarmType_HighState_FalseState = 10345, + NonExclusiveRateOfChangeAlarmType_LowState = 10346, + NonExclusiveRateOfChangeAlarmType_LowState_Id = 10347, + NonExclusiveRateOfChangeAlarmType_LowState_Name = 10348, + NonExclusiveRateOfChangeAlarmType_LowState_Number = 10349, + NonExclusiveRateOfChangeAlarmType_LowState_EffectiveDisplayName = 10350, + NonExclusiveRateOfChangeAlarmType_LowState_TransitionTime = 10351, + NonExclusiveRateOfChangeAlarmType_LowState_EffectiveTransitionTime = 10352, + NonExclusiveRateOfChangeAlarmType_LowState_TrueState = 10353, + NonExclusiveRateOfChangeAlarmType_LowState_FalseState = 10354, + NonExclusiveRateOfChangeAlarmType_LowLowState = 10355, + NonExclusiveRateOfChangeAlarmType_LowLowState_Id = 10356, + NonExclusiveRateOfChangeAlarmType_LowLowState_Name = 10357, + NonExclusiveRateOfChangeAlarmType_LowLowState_Number = 10358, + NonExclusiveRateOfChangeAlarmType_LowLowState_EffectiveDisplayName = 10359, + NonExclusiveRateOfChangeAlarmType_LowLowState_TransitionTime = 10360, + NonExclusiveRateOfChangeAlarmType_LowLowState_EffectiveTransitionTime = 10361, + NonExclusiveRateOfChangeAlarmType_LowLowState_TrueState = 10362, + NonExclusiveRateOfChangeAlarmType_LowLowState_FalseState = 10363, + NonExclusiveRateOfChangeAlarmType_HighHighLimit = 10364, + NonExclusiveRateOfChangeAlarmType_HighLimit = 10365, + NonExclusiveRateOfChangeAlarmType_LowLimit = 10366, + NonExclusiveRateOfChangeAlarmType_LowLowLimit = 10367, + NonExclusiveDeviationAlarmType = 10368, + NonExclusiveDeviationAlarmType_EventId = 10369, + NonExclusiveDeviationAlarmType_EventType = 10370, + NonExclusiveDeviationAlarmType_SourceNode = 10371, + NonExclusiveDeviationAlarmType_SourceName = 10372, + NonExclusiveDeviationAlarmType_Time = 10373, + NonExclusiveDeviationAlarmType_ReceiveTime = 10374, + NonExclusiveDeviationAlarmType_LocalTime = 10375, + NonExclusiveDeviationAlarmType_Message = 10376, + NonExclusiveDeviationAlarmType_Severity = 10377, + NonExclusiveDeviationAlarmType_ConditionName = 10378, + NonExclusiveDeviationAlarmType_BranchId = 10379, + NonExclusiveDeviationAlarmType_Retain = 10380, + NonExclusiveDeviationAlarmType_EnabledState = 10381, + NonExclusiveDeviationAlarmType_EnabledState_Id = 10382, + NonExclusiveDeviationAlarmType_EnabledState_Name = 10383, + NonExclusiveDeviationAlarmType_EnabledState_Number = 10384, + NonExclusiveDeviationAlarmType_EnabledState_EffectiveDisplayName = 10385, + NonExclusiveDeviationAlarmType_EnabledState_TransitionTime = 10386, + NonExclusiveDeviationAlarmType_EnabledState_EffectiveTransitionTime = 10387, + NonExclusiveDeviationAlarmType_EnabledState_TrueState = 10388, + NonExclusiveDeviationAlarmType_EnabledState_FalseState = 10389, + NonExclusiveDeviationAlarmType_Quality = 10390, + NonExclusiveDeviationAlarmType_Quality_SourceTimestamp = 10391, + NonExclusiveDeviationAlarmType_LastSeverity = 10392, + NonExclusiveDeviationAlarmType_LastSeverity_SourceTimestamp = 10393, + NonExclusiveDeviationAlarmType_Comment = 10394, + NonExclusiveDeviationAlarmType_Comment_SourceTimestamp = 10395, + NonExclusiveDeviationAlarmType_ClientUserId = 10396, + NonExclusiveDeviationAlarmType_Enable = 10397, + NonExclusiveDeviationAlarmType_Disable = 10398, + NonExclusiveDeviationAlarmType_AddComment = 10399, + NonExclusiveDeviationAlarmType_AddComment_InputArguments = 10400, + NonExclusiveDeviationAlarmType_ConditionRefresh = 10401, + NonExclusiveDeviationAlarmType_ConditionRefresh_InputArguments = 10402, + NonExclusiveDeviationAlarmType_AckedState = 10403, + NonExclusiveDeviationAlarmType_AckedState_Id = 10404, + NonExclusiveDeviationAlarmType_AckedState_Name = 10405, + NonExclusiveDeviationAlarmType_AckedState_Number = 10406, + NonExclusiveDeviationAlarmType_AckedState_EffectiveDisplayName = 10407, + NonExclusiveDeviationAlarmType_AckedState_TransitionTime = 10408, + NonExclusiveDeviationAlarmType_AckedState_EffectiveTransitionTime = 10409, + NonExclusiveDeviationAlarmType_AckedState_TrueState = 10410, + NonExclusiveDeviationAlarmType_AckedState_FalseState = 10411, + NonExclusiveDeviationAlarmType_ConfirmedState = 10412, + NonExclusiveDeviationAlarmType_ConfirmedState_Id = 10413, + NonExclusiveDeviationAlarmType_ConfirmedState_Name = 10414, + NonExclusiveDeviationAlarmType_ConfirmedState_Number = 10415, + NonExclusiveDeviationAlarmType_ConfirmedState_EffectiveDisplayName = 10416, + NonExclusiveDeviationAlarmType_ConfirmedState_TransitionTime = 10417, + NonExclusiveDeviationAlarmType_ConfirmedState_EffectiveTransitionTime = 10418, + NonExclusiveDeviationAlarmType_ConfirmedState_TrueState = 10419, + NonExclusiveDeviationAlarmType_ConfirmedState_FalseState = 10420, + NonExclusiveDeviationAlarmType_Acknowledge = 10421, + NonExclusiveDeviationAlarmType_Acknowledge_InputArguments = 10422, + NonExclusiveDeviationAlarmType_Confirm = 10423, + NonExclusiveDeviationAlarmType_Confirm_InputArguments = 10424, + NonExclusiveDeviationAlarmType_ActiveState = 10425, + NonExclusiveDeviationAlarmType_ActiveState_Id = 10426, + NonExclusiveDeviationAlarmType_ActiveState_Name = 10427, + NonExclusiveDeviationAlarmType_ActiveState_Number = 10428, + NonExclusiveDeviationAlarmType_ActiveState_EffectiveDisplayName = 10429, + NonExclusiveDeviationAlarmType_ActiveState_TransitionTime = 10430, + NonExclusiveDeviationAlarmType_ActiveState_EffectiveTransitionTime = 10431, + NonExclusiveDeviationAlarmType_ActiveState_TrueState = 10432, + NonExclusiveDeviationAlarmType_ActiveState_FalseState = 10433, + NonExclusiveDeviationAlarmType_SuppressedState = 10434, + NonExclusiveDeviationAlarmType_SuppressedState_Id = 10435, + NonExclusiveDeviationAlarmType_SuppressedState_Name = 10436, + NonExclusiveDeviationAlarmType_SuppressedState_Number = 10437, + NonExclusiveDeviationAlarmType_SuppressedState_EffectiveDisplayName = 10438, + NonExclusiveDeviationAlarmType_SuppressedState_TransitionTime = 10439, + NonExclusiveDeviationAlarmType_SuppressedState_EffectiveTransitionTime = 10440, + NonExclusiveDeviationAlarmType_SuppressedState_TrueState = 10441, + NonExclusiveDeviationAlarmType_SuppressedState_FalseState = 10442, + NonExclusiveDeviationAlarmType_ShelvingState = 10443, + NonExclusiveDeviationAlarmType_ShelvingState_CurrentState = 10444, + NonExclusiveDeviationAlarmType_ShelvingState_CurrentState_Id = 10445, + NonExclusiveDeviationAlarmType_ShelvingState_CurrentState_Name = 10446, + NonExclusiveDeviationAlarmType_ShelvingState_CurrentState_Number = 10447, + NonExclusiveDeviationAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 10448, + NonExclusiveDeviationAlarmType_ShelvingState_LastTransition = 10449, + NonExclusiveDeviationAlarmType_ShelvingState_LastTransition_Id = 10450, + NonExclusiveDeviationAlarmType_ShelvingState_LastTransition_Name = 10451, + NonExclusiveDeviationAlarmType_ShelvingState_LastTransition_Number = 10452, + NonExclusiveDeviationAlarmType_ShelvingState_LastTransition_TransitionTime = 10453, + NonExclusiveDeviationAlarmType_ShelvingState_UnshelveTime = 10454, + NonExclusiveDeviationAlarmType_ShelvingState_Unshelve = 10476, + NonExclusiveDeviationAlarmType_ShelvingState_OneShotShelve = 10477, + NonExclusiveDeviationAlarmType_ShelvingState_TimedShelve = 10478, + NonExclusiveDeviationAlarmType_ShelvingState_TimedShelve_InputArguments = 10479, + NonExclusiveDeviationAlarmType_SuppressedOrShelved = 10480, + NonExclusiveDeviationAlarmType_MaxTimeShelved = 10481, + NonExclusiveDeviationAlarmType_HighHighState = 10482, + NonExclusiveDeviationAlarmType_HighHighState_Id = 10483, + NonExclusiveDeviationAlarmType_HighHighState_Name = 10484, + NonExclusiveDeviationAlarmType_HighHighState_Number = 10485, + NonExclusiveDeviationAlarmType_HighHighState_EffectiveDisplayName = 10486, + NonExclusiveDeviationAlarmType_HighHighState_TransitionTime = 10487, + NonExclusiveDeviationAlarmType_HighHighState_EffectiveTransitionTime = 10488, + NonExclusiveDeviationAlarmType_HighHighState_TrueState = 10489, + NonExclusiveDeviationAlarmType_HighHighState_FalseState = 10490, + NonExclusiveDeviationAlarmType_HighState = 10491, + NonExclusiveDeviationAlarmType_HighState_Id = 10492, + NonExclusiveDeviationAlarmType_HighState_Name = 10493, + NonExclusiveDeviationAlarmType_HighState_Number = 10494, + NonExclusiveDeviationAlarmType_HighState_EffectiveDisplayName = 10495, + NonExclusiveDeviationAlarmType_HighState_TransitionTime = 10496, + NonExclusiveDeviationAlarmType_HighState_EffectiveTransitionTime = 10497, + NonExclusiveDeviationAlarmType_HighState_TrueState = 10498, + NonExclusiveDeviationAlarmType_HighState_FalseState = 10499, + NonExclusiveDeviationAlarmType_LowState = 10500, + NonExclusiveDeviationAlarmType_LowState_Id = 10501, + NonExclusiveDeviationAlarmType_LowState_Name = 10502, + NonExclusiveDeviationAlarmType_LowState_Number = 10503, + NonExclusiveDeviationAlarmType_LowState_EffectiveDisplayName = 10504, + NonExclusiveDeviationAlarmType_LowState_TransitionTime = 10505, + NonExclusiveDeviationAlarmType_LowState_EffectiveTransitionTime = 10506, + NonExclusiveDeviationAlarmType_LowState_TrueState = 10507, + NonExclusiveDeviationAlarmType_LowState_FalseState = 10508, + NonExclusiveDeviationAlarmType_LowLowState = 10509, + NonExclusiveDeviationAlarmType_LowLowState_Id = 10510, + NonExclusiveDeviationAlarmType_LowLowState_Name = 10511, + NonExclusiveDeviationAlarmType_LowLowState_Number = 10512, + NonExclusiveDeviationAlarmType_LowLowState_EffectiveDisplayName = 10513, + NonExclusiveDeviationAlarmType_LowLowState_TransitionTime = 10514, + NonExclusiveDeviationAlarmType_LowLowState_EffectiveTransitionTime = 10515, + NonExclusiveDeviationAlarmType_LowLowState_TrueState = 10516, + NonExclusiveDeviationAlarmType_LowLowState_FalseState = 10517, + NonExclusiveDeviationAlarmType_HighHighLimit = 10518, + NonExclusiveDeviationAlarmType_HighLimit = 10519, + NonExclusiveDeviationAlarmType_LowLimit = 10520, + NonExclusiveDeviationAlarmType_LowLowLimit = 10521, + NonExclusiveDeviationAlarmType_SetpointNode = 10522, + DiscreteAlarmType = 10523, + DiscreteAlarmType_EventId = 10524, + DiscreteAlarmType_EventType = 10525, + DiscreteAlarmType_SourceNode = 10526, + DiscreteAlarmType_SourceName = 10527, + DiscreteAlarmType_Time = 10528, + DiscreteAlarmType_ReceiveTime = 10529, + DiscreteAlarmType_LocalTime = 10530, + DiscreteAlarmType_Message = 10531, + DiscreteAlarmType_Severity = 10532, + DiscreteAlarmType_ConditionName = 10533, + DiscreteAlarmType_BranchId = 10534, + DiscreteAlarmType_Retain = 10535, + DiscreteAlarmType_EnabledState = 10536, + DiscreteAlarmType_EnabledState_Id = 10537, + DiscreteAlarmType_EnabledState_Name = 10538, + DiscreteAlarmType_EnabledState_Number = 10539, + DiscreteAlarmType_EnabledState_EffectiveDisplayName = 10540, + DiscreteAlarmType_EnabledState_TransitionTime = 10541, + DiscreteAlarmType_EnabledState_EffectiveTransitionTime = 10542, + DiscreteAlarmType_EnabledState_TrueState = 10543, + DiscreteAlarmType_EnabledState_FalseState = 10544, + DiscreteAlarmType_Quality = 10545, + DiscreteAlarmType_Quality_SourceTimestamp = 10546, + DiscreteAlarmType_LastSeverity = 10547, + DiscreteAlarmType_LastSeverity_SourceTimestamp = 10548, + DiscreteAlarmType_Comment = 10549, + DiscreteAlarmType_Comment_SourceTimestamp = 10550, + DiscreteAlarmType_ClientUserId = 10551, + DiscreteAlarmType_Enable = 10552, + DiscreteAlarmType_Disable = 10553, + DiscreteAlarmType_AddComment = 10554, + DiscreteAlarmType_AddComment_InputArguments = 10555, + DiscreteAlarmType_ConditionRefresh = 10556, + DiscreteAlarmType_ConditionRefresh_InputArguments = 10557, + DiscreteAlarmType_AckedState = 10558, + DiscreteAlarmType_AckedState_Id = 10559, + DiscreteAlarmType_AckedState_Name = 10560, + DiscreteAlarmType_AckedState_Number = 10561, + DiscreteAlarmType_AckedState_EffectiveDisplayName = 10562, + DiscreteAlarmType_AckedState_TransitionTime = 10563, + DiscreteAlarmType_AckedState_EffectiveTransitionTime = 10564, + DiscreteAlarmType_AckedState_TrueState = 10565, + DiscreteAlarmType_AckedState_FalseState = 10566, + DiscreteAlarmType_ConfirmedState = 10567, + DiscreteAlarmType_ConfirmedState_Id = 10568, + DiscreteAlarmType_ConfirmedState_Name = 10569, + DiscreteAlarmType_ConfirmedState_Number = 10570, + DiscreteAlarmType_ConfirmedState_EffectiveDisplayName = 10571, + DiscreteAlarmType_ConfirmedState_TransitionTime = 10572, + DiscreteAlarmType_ConfirmedState_EffectiveTransitionTime = 10573, + DiscreteAlarmType_ConfirmedState_TrueState = 10574, + DiscreteAlarmType_ConfirmedState_FalseState = 10575, + DiscreteAlarmType_Acknowledge = 10576, + DiscreteAlarmType_Acknowledge_InputArguments = 10577, + DiscreteAlarmType_Confirm = 10578, + DiscreteAlarmType_Confirm_InputArguments = 10579, + DiscreteAlarmType_ActiveState = 10580, + DiscreteAlarmType_ActiveState_Id = 10581, + DiscreteAlarmType_ActiveState_Name = 10582, + DiscreteAlarmType_ActiveState_Number = 10583, + DiscreteAlarmType_ActiveState_EffectiveDisplayName = 10584, + DiscreteAlarmType_ActiveState_TransitionTime = 10585, + DiscreteAlarmType_ActiveState_EffectiveTransitionTime = 10586, + DiscreteAlarmType_ActiveState_TrueState = 10587, + DiscreteAlarmType_ActiveState_FalseState = 10588, + DiscreteAlarmType_SuppressedState = 10589, + DiscreteAlarmType_SuppressedState_Id = 10590, + DiscreteAlarmType_SuppressedState_Name = 10591, + DiscreteAlarmType_SuppressedState_Number = 10592, + DiscreteAlarmType_SuppressedState_EffectiveDisplayName = 10593, + DiscreteAlarmType_SuppressedState_TransitionTime = 10594, + DiscreteAlarmType_SuppressedState_EffectiveTransitionTime = 10595, + DiscreteAlarmType_SuppressedState_TrueState = 10596, + DiscreteAlarmType_SuppressedState_FalseState = 10597, + DiscreteAlarmType_ShelvingState = 10598, + DiscreteAlarmType_ShelvingState_CurrentState = 10599, + DiscreteAlarmType_ShelvingState_CurrentState_Id = 10600, + DiscreteAlarmType_ShelvingState_CurrentState_Name = 10601, + DiscreteAlarmType_ShelvingState_CurrentState_Number = 10602, + DiscreteAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 10603, + DiscreteAlarmType_ShelvingState_LastTransition = 10604, + DiscreteAlarmType_ShelvingState_LastTransition_Id = 10605, + DiscreteAlarmType_ShelvingState_LastTransition_Name = 10606, + DiscreteAlarmType_ShelvingState_LastTransition_Number = 10607, + DiscreteAlarmType_ShelvingState_LastTransition_TransitionTime = 10608, + DiscreteAlarmType_ShelvingState_UnshelveTime = 10609, + DiscreteAlarmType_ShelvingState_Unshelve = 10631, + DiscreteAlarmType_ShelvingState_OneShotShelve = 10632, + DiscreteAlarmType_ShelvingState_TimedShelve = 10633, + DiscreteAlarmType_ShelvingState_TimedShelve_InputArguments = 10634, + DiscreteAlarmType_SuppressedOrShelved = 10635, + DiscreteAlarmType_MaxTimeShelved = 10636, + OffNormalAlarmType = 10637, + OffNormalAlarmType_EventId = 10638, + OffNormalAlarmType_EventType = 10639, + OffNormalAlarmType_SourceNode = 10640, + OffNormalAlarmType_SourceName = 10641, + OffNormalAlarmType_Time = 10642, + OffNormalAlarmType_ReceiveTime = 10643, + OffNormalAlarmType_LocalTime = 10644, + OffNormalAlarmType_Message = 10645, + OffNormalAlarmType_Severity = 10646, + OffNormalAlarmType_ConditionName = 10647, + OffNormalAlarmType_BranchId = 10648, + OffNormalAlarmType_Retain = 10649, + OffNormalAlarmType_EnabledState = 10650, + OffNormalAlarmType_EnabledState_Id = 10651, + OffNormalAlarmType_EnabledState_Name = 10652, + OffNormalAlarmType_EnabledState_Number = 10653, + OffNormalAlarmType_EnabledState_EffectiveDisplayName = 10654, + OffNormalAlarmType_EnabledState_TransitionTime = 10655, + OffNormalAlarmType_EnabledState_EffectiveTransitionTime = 10656, + OffNormalAlarmType_EnabledState_TrueState = 10657, + OffNormalAlarmType_EnabledState_FalseState = 10658, + OffNormalAlarmType_Quality = 10659, + OffNormalAlarmType_Quality_SourceTimestamp = 10660, + OffNormalAlarmType_LastSeverity = 10661, + OffNormalAlarmType_LastSeverity_SourceTimestamp = 10662, + OffNormalAlarmType_Comment = 10663, + OffNormalAlarmType_Comment_SourceTimestamp = 10664, + OffNormalAlarmType_ClientUserId = 10665, + OffNormalAlarmType_Enable = 10666, + OffNormalAlarmType_Disable = 10667, + OffNormalAlarmType_AddComment = 10668, + OffNormalAlarmType_AddComment_InputArguments = 10669, + OffNormalAlarmType_ConditionRefresh = 10670, + OffNormalAlarmType_ConditionRefresh_InputArguments = 10671, + OffNormalAlarmType_AckedState = 10672, + OffNormalAlarmType_AckedState_Id = 10673, + OffNormalAlarmType_AckedState_Name = 10674, + OffNormalAlarmType_AckedState_Number = 10675, + OffNormalAlarmType_AckedState_EffectiveDisplayName = 10676, + OffNormalAlarmType_AckedState_TransitionTime = 10677, + OffNormalAlarmType_AckedState_EffectiveTransitionTime = 10678, + OffNormalAlarmType_AckedState_TrueState = 10679, + OffNormalAlarmType_AckedState_FalseState = 10680, + OffNormalAlarmType_ConfirmedState = 10681, + OffNormalAlarmType_ConfirmedState_Id = 10682, + OffNormalAlarmType_ConfirmedState_Name = 10683, + OffNormalAlarmType_ConfirmedState_Number = 10684, + OffNormalAlarmType_ConfirmedState_EffectiveDisplayName = 10685, + OffNormalAlarmType_ConfirmedState_TransitionTime = 10686, + OffNormalAlarmType_ConfirmedState_EffectiveTransitionTime = 10687, + OffNormalAlarmType_ConfirmedState_TrueState = 10688, + OffNormalAlarmType_ConfirmedState_FalseState = 10689, + OffNormalAlarmType_Acknowledge = 10690, + OffNormalAlarmType_Acknowledge_InputArguments = 10691, + OffNormalAlarmType_Confirm = 10692, + OffNormalAlarmType_Confirm_InputArguments = 10693, + OffNormalAlarmType_ActiveState = 10694, + OffNormalAlarmType_ActiveState_Id = 10695, + OffNormalAlarmType_ActiveState_Name = 10696, + OffNormalAlarmType_ActiveState_Number = 10697, + OffNormalAlarmType_ActiveState_EffectiveDisplayName = 10698, + OffNormalAlarmType_ActiveState_TransitionTime = 10699, + OffNormalAlarmType_ActiveState_EffectiveTransitionTime = 10700, + OffNormalAlarmType_ActiveState_TrueState = 10701, + OffNormalAlarmType_ActiveState_FalseState = 10702, + OffNormalAlarmType_SuppressedState = 10703, + OffNormalAlarmType_SuppressedState_Id = 10704, + OffNormalAlarmType_SuppressedState_Name = 10705, + OffNormalAlarmType_SuppressedState_Number = 10706, + OffNormalAlarmType_SuppressedState_EffectiveDisplayName = 10707, + OffNormalAlarmType_SuppressedState_TransitionTime = 10708, + OffNormalAlarmType_SuppressedState_EffectiveTransitionTime = 10709, + OffNormalAlarmType_SuppressedState_TrueState = 10710, + OffNormalAlarmType_SuppressedState_FalseState = 10711, + OffNormalAlarmType_ShelvingState = 10712, + OffNormalAlarmType_ShelvingState_CurrentState = 10713, + OffNormalAlarmType_ShelvingState_CurrentState_Id = 10714, + OffNormalAlarmType_ShelvingState_CurrentState_Name = 10715, + OffNormalAlarmType_ShelvingState_CurrentState_Number = 10716, + OffNormalAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 10717, + OffNormalAlarmType_ShelvingState_LastTransition = 10718, + OffNormalAlarmType_ShelvingState_LastTransition_Id = 10719, + OffNormalAlarmType_ShelvingState_LastTransition_Name = 10720, + OffNormalAlarmType_ShelvingState_LastTransition_Number = 10721, + OffNormalAlarmType_ShelvingState_LastTransition_TransitionTime = 10722, + OffNormalAlarmType_ShelvingState_UnshelveTime = 10723, + OffNormalAlarmType_ShelvingState_Unshelve = 10745, + OffNormalAlarmType_ShelvingState_OneShotShelve = 10746, + OffNormalAlarmType_ShelvingState_TimedShelve = 10747, + OffNormalAlarmType_ShelvingState_TimedShelve_InputArguments = 10748, + OffNormalAlarmType_SuppressedOrShelved = 10749, + OffNormalAlarmType_MaxTimeShelved = 10750, + TripAlarmType = 10751, + TripAlarmType_EventId = 10752, + TripAlarmType_EventType = 10753, + TripAlarmType_SourceNode = 10754, + TripAlarmType_SourceName = 10755, + TripAlarmType_Time = 10756, + TripAlarmType_ReceiveTime = 10757, + TripAlarmType_LocalTime = 10758, + TripAlarmType_Message = 10759, + TripAlarmType_Severity = 10760, + TripAlarmType_ConditionName = 10761, + TripAlarmType_BranchId = 10762, + TripAlarmType_Retain = 10763, + TripAlarmType_EnabledState = 10764, + TripAlarmType_EnabledState_Id = 10765, + TripAlarmType_EnabledState_Name = 10766, + TripAlarmType_EnabledState_Number = 10767, + TripAlarmType_EnabledState_EffectiveDisplayName = 10768, + TripAlarmType_EnabledState_TransitionTime = 10769, + TripAlarmType_EnabledState_EffectiveTransitionTime = 10770, + TripAlarmType_EnabledState_TrueState = 10771, + TripAlarmType_EnabledState_FalseState = 10772, + TripAlarmType_Quality = 10773, + TripAlarmType_Quality_SourceTimestamp = 10774, + TripAlarmType_LastSeverity = 10775, + TripAlarmType_LastSeverity_SourceTimestamp = 10776, + TripAlarmType_Comment = 10777, + TripAlarmType_Comment_SourceTimestamp = 10778, + TripAlarmType_ClientUserId = 10779, + TripAlarmType_Enable = 10780, + TripAlarmType_Disable = 10781, + TripAlarmType_AddComment = 10782, + TripAlarmType_AddComment_InputArguments = 10783, + TripAlarmType_ConditionRefresh = 10784, + TripAlarmType_ConditionRefresh_InputArguments = 10785, + TripAlarmType_AckedState = 10786, + TripAlarmType_AckedState_Id = 10787, + TripAlarmType_AckedState_Name = 10788, + TripAlarmType_AckedState_Number = 10789, + TripAlarmType_AckedState_EffectiveDisplayName = 10790, + TripAlarmType_AckedState_TransitionTime = 10791, + TripAlarmType_AckedState_EffectiveTransitionTime = 10792, + TripAlarmType_AckedState_TrueState = 10793, + TripAlarmType_AckedState_FalseState = 10794, + TripAlarmType_ConfirmedState = 10795, + TripAlarmType_ConfirmedState_Id = 10796, + TripAlarmType_ConfirmedState_Name = 10797, + TripAlarmType_ConfirmedState_Number = 10798, + TripAlarmType_ConfirmedState_EffectiveDisplayName = 10799, + TripAlarmType_ConfirmedState_TransitionTime = 10800, + TripAlarmType_ConfirmedState_EffectiveTransitionTime = 10801, + TripAlarmType_ConfirmedState_TrueState = 10802, + TripAlarmType_ConfirmedState_FalseState = 10803, + TripAlarmType_Acknowledge = 10804, + TripAlarmType_Acknowledge_InputArguments = 10805, + TripAlarmType_Confirm = 10806, + TripAlarmType_Confirm_InputArguments = 10807, + TripAlarmType_ActiveState = 10808, + TripAlarmType_ActiveState_Id = 10809, + TripAlarmType_ActiveState_Name = 10810, + TripAlarmType_ActiveState_Number = 10811, + TripAlarmType_ActiveState_EffectiveDisplayName = 10812, + TripAlarmType_ActiveState_TransitionTime = 10813, + TripAlarmType_ActiveState_EffectiveTransitionTime = 10814, + TripAlarmType_ActiveState_TrueState = 10815, + TripAlarmType_ActiveState_FalseState = 10816, + TripAlarmType_SuppressedState = 10817, + TripAlarmType_SuppressedState_Id = 10818, + TripAlarmType_SuppressedState_Name = 10819, + TripAlarmType_SuppressedState_Number = 10820, + TripAlarmType_SuppressedState_EffectiveDisplayName = 10821, + TripAlarmType_SuppressedState_TransitionTime = 10822, + TripAlarmType_SuppressedState_EffectiveTransitionTime = 10823, + TripAlarmType_SuppressedState_TrueState = 10824, + TripAlarmType_SuppressedState_FalseState = 10825, + TripAlarmType_ShelvingState = 10826, + TripAlarmType_ShelvingState_CurrentState = 10827, + TripAlarmType_ShelvingState_CurrentState_Id = 10828, + TripAlarmType_ShelvingState_CurrentState_Name = 10829, + TripAlarmType_ShelvingState_CurrentState_Number = 10830, + TripAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 10831, + TripAlarmType_ShelvingState_LastTransition = 10832, + TripAlarmType_ShelvingState_LastTransition_Id = 10833, + TripAlarmType_ShelvingState_LastTransition_Name = 10834, + TripAlarmType_ShelvingState_LastTransition_Number = 10835, + TripAlarmType_ShelvingState_LastTransition_TransitionTime = 10836, + TripAlarmType_ShelvingState_UnshelveTime = 10837, + TripAlarmType_ShelvingState_Unshelve = 10859, + TripAlarmType_ShelvingState_OneShotShelve = 10860, + TripAlarmType_ShelvingState_TimedShelve = 10861, + TripAlarmType_ShelvingState_TimedShelve_InputArguments = 10862, + TripAlarmType_SuppressedOrShelved = 10863, + TripAlarmType_MaxTimeShelved = 10864, + AuditConditionShelvingEventType = 11093, + AuditConditionShelvingEventType_EventId = 11094, + AuditConditionShelvingEventType_EventType = 11095, + AuditConditionShelvingEventType_SourceNode = 11096, + AuditConditionShelvingEventType_SourceName = 11097, + AuditConditionShelvingEventType_Time = 11098, + AuditConditionShelvingEventType_ReceiveTime = 11099, + AuditConditionShelvingEventType_LocalTime = 11100, + AuditConditionShelvingEventType_Message = 11101, + AuditConditionShelvingEventType_Severity = 11102, + AuditConditionShelvingEventType_ActionTimeStamp = 11103, + AuditConditionShelvingEventType_Status = 11104, + AuditConditionShelvingEventType_ServerId = 11105, + AuditConditionShelvingEventType_ClientAuditEntryId = 11106, + AuditConditionShelvingEventType_ClientUserId = 11107, + AuditConditionShelvingEventType_MethodId = 11108, + AuditConditionShelvingEventType_InputArguments = 11109, + TwoStateVariableType_TrueState = 11110, + TwoStateVariableType_FalseState = 11111, + ConditionType_ConditionClassId = 11112, + ConditionType_ConditionClassName = 11113, + DialogConditionType_ConditionClassId = 11114, + DialogConditionType_ConditionClassName = 11115, + AcknowledgeableConditionType_ConditionClassId = 11116, + AcknowledgeableConditionType_ConditionClassName = 11117, + AlarmConditionType_ConditionClassId = 11118, + AlarmConditionType_ConditionClassName = 11119, + AlarmConditionType_InputNode = 11120, + LimitAlarmType_ConditionClassId = 11121, + LimitAlarmType_ConditionClassName = 11122, + LimitAlarmType_InputNode = 11123, + LimitAlarmType_HighHighLimit = 11124, + LimitAlarmType_HighLimit = 11125, + LimitAlarmType_LowLimit = 11126, + LimitAlarmType_LowLowLimit = 11127, + ExclusiveLimitAlarmType_ConditionClassId = 11128, + ExclusiveLimitAlarmType_ConditionClassName = 11129, + ExclusiveLimitAlarmType_InputNode = 11130, + ExclusiveLevelAlarmType_ConditionClassId = 11131, + ExclusiveLevelAlarmType_ConditionClassName = 11132, + ExclusiveLevelAlarmType_InputNode = 11133, + ExclusiveRateOfChangeAlarmType_ConditionClassId = 11134, + ExclusiveRateOfChangeAlarmType_ConditionClassName = 11135, + ExclusiveRateOfChangeAlarmType_InputNode = 11136, + ExclusiveDeviationAlarmType_ConditionClassId = 11137, + ExclusiveDeviationAlarmType_ConditionClassName = 11138, + ExclusiveDeviationAlarmType_InputNode = 11139, + NonExclusiveLimitAlarmType_ConditionClassId = 11140, + NonExclusiveLimitAlarmType_ConditionClassName = 11141, + NonExclusiveLimitAlarmType_InputNode = 11142, + NonExclusiveLevelAlarmType_ConditionClassId = 11143, + NonExclusiveLevelAlarmType_ConditionClassName = 11144, + NonExclusiveLevelAlarmType_InputNode = 11145, + NonExclusiveRateOfChangeAlarmType_ConditionClassId = 11146, + NonExclusiveRateOfChangeAlarmType_ConditionClassName = 11147, + NonExclusiveRateOfChangeAlarmType_InputNode = 11148, + NonExclusiveDeviationAlarmType_ConditionClassId = 11149, + NonExclusiveDeviationAlarmType_ConditionClassName = 11150, + NonExclusiveDeviationAlarmType_InputNode = 11151, + DiscreteAlarmType_ConditionClassId = 11152, + DiscreteAlarmType_ConditionClassName = 11153, + DiscreteAlarmType_InputNode = 11154, + OffNormalAlarmType_ConditionClassId = 11155, + OffNormalAlarmType_ConditionClassName = 11156, + OffNormalAlarmType_InputNode = 11157, + OffNormalAlarmType_NormalState = 11158, + TripAlarmType_ConditionClassId = 11159, + TripAlarmType_ConditionClassName = 11160, + TripAlarmType_InputNode = 11161, + TripAlarmType_NormalState = 11162, + BaseConditionClassType = 11163, + ProcessConditionClassType = 11164, + MaintenanceConditionClassType = 11165, + SystemConditionClassType = 11166, + HistoricalDataConfigurationType_AggregateConfiguration_TreatUncertainAsBad = 11168, + HistoricalDataConfigurationType_AggregateConfiguration_PercentDataBad = 11169, + HistoricalDataConfigurationType_AggregateConfiguration_PercentDataGood = 11170, + HistoricalDataConfigurationType_AggregateConfiguration_UseSlopedExtrapolation = 11171, + HistoryServerCapabilitiesType_AggregateFunctions = 11172, + AggregateConfigurationType = 11187, + AggregateConfigurationType_TreatUncertainAsBad = 11188, + AggregateConfigurationType_PercentDataBad = 11189, + AggregateConfigurationType_PercentDataGood = 11190, + AggregateConfigurationType_UseSlopedExtrapolation = 11191, + HistoryServerCapabilities = 11192, + HistoryServerCapabilities_AccessHistoryDataCapability = 11193, + HistoryServerCapabilities_InsertDataCapability = 11196, + HistoryServerCapabilities_ReplaceDataCapability = 11197, + HistoryServerCapabilities_UpdateDataCapability = 11198, + HistoryServerCapabilities_DeleteRawCapability = 11199, + HistoryServerCapabilities_DeleteAtTimeCapability = 11200, + HistoryServerCapabilities_AggregateFunctions = 11201, + HAConfiguration = 11202, + HAConfiguration_AggregateConfiguration = 11203, + HAConfiguration_AggregateConfiguration_TreatUncertainAsBad = 11204, + HAConfiguration_AggregateConfiguration_PercentDataBad = 11205, + HAConfiguration_AggregateConfiguration_PercentDataGood = 11206, + HAConfiguration_AggregateConfiguration_UseSlopedExtrapolation = 11207, + HAConfiguration_Stepped = 11208, + HAConfiguration_Definition = 11209, + HAConfiguration_MaxTimeInterval = 11210, + HAConfiguration_MinTimeInterval = 11211, + HAConfiguration_ExceptionDeviation = 11212, + HAConfiguration_ExceptionDeviationFormat = 11213, + Annotations = 11214, + HistoricalEventFilter = 11215, + ModificationInfo = 11216, + HistoryModifiedData = 11217, + ModificationInfo_Encoding_DefaultXml = 11218, + HistoryModifiedData_Encoding_DefaultXml = 11219, + ModificationInfo_Encoding_DefaultBinary = 11226, + HistoryModifiedData_Encoding_DefaultBinary = 11227, + HistoryUpdateType = 11234, + MultiStateValueDiscreteType = 11238, + MultiStateValueDiscreteType_Definition = 11239, + MultiStateValueDiscreteType_ValuePrecision = 11240, + MultiStateValueDiscreteType_EnumValues = 11241, + HistoryServerCapabilities_AccessHistoryEventsCapability = 11242, + HistoryServerCapabilitiesType_MaxReturnDataValues = 11268, + HistoryServerCapabilitiesType_MaxReturnEventValues = 11269, + HistoryServerCapabilitiesType_InsertAnnotationCapability = 11270, + HistoryServerCapabilities_MaxReturnDataValues = 11273, + HistoryServerCapabilities_MaxReturnEventValues = 11274, + HistoryServerCapabilities_InsertAnnotationCapability = 11275, + HistoryServerCapabilitiesType_InsertEventCapability = 11278, + HistoryServerCapabilitiesType_ReplaceEventCapability = 11279, + HistoryServerCapabilitiesType_UpdateEventCapability = 11280, + HistoryServerCapabilities_InsertEventCapability = 11281, + HistoryServerCapabilities_ReplaceEventCapability = 11282, + HistoryServerCapabilities_UpdateEventCapability = 11283, + AggregateFunction_TimeAverage2 = 11285, + AggregateFunction_Minimum2 = 11286, + AggregateFunction_Maximum2 = 11287, + AggregateFunction_Range2 = 11288, + AggregateFunction_WorstQuality2 = 11292, + PerformUpdateType = 11293, + UpdateStructureDataDetails = 11295, + UpdateStructureDataDetails_Encoding_DefaultXml = 11296, + UpdateStructureDataDetails_Encoding_DefaultBinary = 11300, + AggregateFunction_Total2 = 11304, + AggregateFunction_MinimumActualTime2 = 11305, + AggregateFunction_MaximumActualTime2 = 11306, + AggregateFunction_DurationInStateZero = 11307, + AggregateFunction_DurationInStateNonZero = 11308, + Server_ServerRedundancy_CurrentServerId = 11312, + Server_ServerRedundancy_RedundantServerArray = 11313, + Server_ServerRedundancy_ServerUriArray = 11314, + ShelvedStateMachineType_UnshelvedToTimedShelved_TransitionNumber = 11322, + ShelvedStateMachineType_UnshelvedToOneShotShelved_TransitionNumber = 11323, + ShelvedStateMachineType_TimedShelvedToUnshelved_TransitionNumber = 11324, + ShelvedStateMachineType_TimedShelvedToOneShotShelved_TransitionNumber = 11325, + ShelvedStateMachineType_OneShotShelvedToUnshelved_TransitionNumber = 11326, + ShelvedStateMachineType_OneShotShelvedToTimedShelved_TransitionNumber = 11327, + ExclusiveLimitStateMachineType_LowLowToLow_TransitionNumber = 11340, + ExclusiveLimitStateMachineType_LowToLowLow_TransitionNumber = 11341, + ExclusiveLimitStateMachineType_HighHighToHigh_TransitionNumber = 11342, + ExclusiveLimitStateMachineType_HighToHighHigh_TransitionNumber = 11343, + AggregateFunction_StandardDeviationSample = 11426, + AggregateFunction_StandardDeviationPopulation = 11427, + AggregateFunction_VarianceSample = 11428, + AggregateFunction_VariancePopulation = 11429, + EnumStrings = 11432, + ValueAsText = 11433, + ProgressEventType = 11436, + ProgressEventType_EventId = 11437, + ProgressEventType_EventType = 11438, + ProgressEventType_SourceNode = 11439, + ProgressEventType_SourceName = 11440, + ProgressEventType_Time = 11441, + ProgressEventType_ReceiveTime = 11442, + ProgressEventType_LocalTime = 11443, + ProgressEventType_Message = 11444, + ProgressEventType_Severity = 11445, + SystemStatusChangeEventType = 11446, + SystemStatusChangeEventType_EventId = 11447, + SystemStatusChangeEventType_EventType = 11448, + SystemStatusChangeEventType_SourceNode = 11449, + SystemStatusChangeEventType_SourceName = 11450, + SystemStatusChangeEventType_Time = 11451, + SystemStatusChangeEventType_ReceiveTime = 11452, + SystemStatusChangeEventType_LocalTime = 11453, + SystemStatusChangeEventType_Message = 11454, + SystemStatusChangeEventType_Severity = 11455, + TransitionVariableType_EffectiveTransitionTime = 11456, + FiniteTransitionVariableType_EffectiveTransitionTime = 11457, + StateMachineType_LastTransition_EffectiveTransitionTime = 11458, + FiniteStateMachineType_LastTransition_EffectiveTransitionTime = 11459, + TransitionEventType_Transition_EffectiveTransitionTime = 11460, + MultiStateValueDiscreteType_ValueAsText = 11461, + ProgramTransitionEventType_Transition_EffectiveTransitionTime = 11462, + ProgramTransitionAuditEventType_Transition_EffectiveTransitionTime = 11463, + ProgramStateMachineType_LastTransition_EffectiveTransitionTime = 11464, + ShelvedStateMachineType_LastTransition_EffectiveTransitionTime = 11465, + AlarmConditionType_ShelvingState_LastTransition_EffectiveTransitionTime = 11466, + LimitAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11467, + ExclusiveLimitStateMachineType_LastTransition_EffectiveTransitionTime = 11468, + ExclusiveLimitAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11469, + ExclusiveLimitAlarmType_LimitState_LastTransition_EffectiveTransitionTime = 11470, + ExclusiveLevelAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11471, + ExclusiveLevelAlarmType_LimitState_LastTransition_EffectiveTransitionTime = 11472, + ExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11473, + ExclusiveRateOfChangeAlarmType_LimitState_LastTransition_EffectiveTransitionTime = 11474, + ExclusiveDeviationAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11475, + ExclusiveDeviationAlarmType_LimitState_LastTransition_EffectiveTransitionTime = 11476, + NonExclusiveLimitAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11477, + NonExclusiveLevelAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11478, + NonExclusiveRateOfChangeAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11479, + NonExclusiveDeviationAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11480, + DiscreteAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11481, + OffNormalAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11482, + TripAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11483, + AuditActivateSessionEventType_SecureChannelId = 11485, + OptionSetType = 11487, + OptionSetType_OptionSetValues = 11488, + ServerType_GetMonitoredItems = 11489, + ServerType_GetMonitoredItems_InputArguments = 11490, + ServerType_GetMonitoredItems_OutputArguments = 11491, + Server_GetMonitoredItems = 11492, + Server_GetMonitoredItems_InputArguments = 11493, + Server_GetMonitoredItems_OutputArguments = 11494, + GetMonitoredItemsMethodType = 11495, + GetMonitoredItemsMethodType_InputArguments = 11496, + GetMonitoredItemsMethodType_OutputArguments = 11497, + MaxStringLength = 11498, + HistoricalDataConfigurationType_StartOfArchive = 11499, + HistoricalDataConfigurationType_StartOfOnlineArchive = 11500, + HistoryServerCapabilitiesType_DeleteEventCapability = 11501, + HistoryServerCapabilities_DeleteEventCapability = 11502, + HAConfiguration_StartOfArchive = 11503, + HAConfiguration_StartOfOnlineArchive = 11504, + AggregateFunction_StartBound = 11505, + AggregateFunction_EndBound = 11506, + AggregateFunction_DeltaBounds = 11507, + ModellingRule_OptionalPlaceholder = 11508, + ModellingRule_OptionalPlaceholder_NamingRule = 11509, + ModellingRule_MandatoryPlaceholder = 11510, + ModellingRule_MandatoryPlaceholder_NamingRule = 11511, + MaxArrayLength = 11512, + EngineeringUnits = 11513, + ServerType_ServerCapabilities_MaxArrayLength = 11514, + ServerType_ServerCapabilities_MaxStringLength = 11515, + ServerType_ServerCapabilities_OperationLimits = 11516, + ServerType_ServerCapabilities_OperationLimits_MaxNodesPerRead = 11517, + ServerType_ServerCapabilities_OperationLimits_MaxNodesPerWrite = 11519, + ServerType_ServerCapabilities_OperationLimits_MaxNodesPerMethodCall = 11521, + ServerType_ServerCapabilities_OperationLimits_MaxNodesPerBrowse = 11522, + ServerType_ServerCapabilities_OperationLimits_MaxNodesPerRegisterNodes = 11523, + ServerType_ServerCapabilities_OperationLimits_MaxNodesPerTranslateBrowsePathsToNodeIds = 11524, + ServerType_ServerCapabilities_OperationLimits_MaxNodesPerNodeManagement = 11525, + ServerType_ServerCapabilities_OperationLimits_MaxMonitoredItemsPerCall = 11526, + ServerType_Namespaces = 11527, + ServerType_Namespaces_AddressSpaceFile = 11528, + ServerType_Namespaces_AddressSpaceFile_Size = 11529, + ServerType_Namespaces_AddressSpaceFile_Writeable = 11530, + ServerType_Namespaces_AddressSpaceFile_UserWriteable = 11531, + ServerType_Namespaces_AddressSpaceFile_OpenCount = 11532, + ServerType_Namespaces_AddressSpaceFile_Open = 11533, + ServerType_Namespaces_AddressSpaceFile_Open_InputArguments = 11534, + ServerType_Namespaces_AddressSpaceFile_Open_OutputArguments = 11535, + ServerType_Namespaces_AddressSpaceFile_Close = 11536, + ServerType_Namespaces_AddressSpaceFile_Close_InputArguments = 11537, + ServerType_Namespaces_AddressSpaceFile_Read = 11538, + ServerType_Namespaces_AddressSpaceFile_Read_InputArguments = 11539, + ServerType_Namespaces_AddressSpaceFile_Read_OutputArguments = 11540, + ServerType_Namespaces_AddressSpaceFile_Write = 11541, + ServerType_Namespaces_AddressSpaceFile_Write_InputArguments = 11542, + ServerType_Namespaces_AddressSpaceFile_GetPosition = 11543, + ServerType_Namespaces_AddressSpaceFile_GetPosition_InputArguments = 11544, + ServerType_Namespaces_AddressSpaceFile_GetPosition_OutputArguments = 11545, + ServerType_Namespaces_AddressSpaceFile_SetPosition = 11546, + ServerType_Namespaces_AddressSpaceFile_SetPosition_InputArguments = 11547, + ServerType_Namespaces_AddressSpaceFile_ExportNamespace = 11548, + ServerCapabilitiesType_MaxArrayLength = 11549, + ServerCapabilitiesType_MaxStringLength = 11550, + ServerCapabilitiesType_OperationLimits = 11551, + ServerCapabilitiesType_OperationLimits_MaxNodesPerRead = 11552, + ServerCapabilitiesType_OperationLimits_MaxNodesPerWrite = 11554, + ServerCapabilitiesType_OperationLimits_MaxNodesPerMethodCall = 11556, + ServerCapabilitiesType_OperationLimits_MaxNodesPerBrowse = 11557, + ServerCapabilitiesType_OperationLimits_MaxNodesPerRegisterNodes = 11558, + ServerCapabilitiesType_OperationLimits_MaxNodesPerTranslateBrowsePathsToNodeIds = 11559, + ServerCapabilitiesType_OperationLimits_MaxNodesPerNodeManagement = 11560, + ServerCapabilitiesType_OperationLimits_MaxMonitoredItemsPerCall = 11561, + ServerCapabilitiesType_VendorCapability = 11562, + OperationLimitsType = 11564, + OperationLimitsType_MaxNodesPerRead = 11565, + OperationLimitsType_MaxNodesPerWrite = 11567, + OperationLimitsType_MaxNodesPerMethodCall = 11569, + OperationLimitsType_MaxNodesPerBrowse = 11570, + OperationLimitsType_MaxNodesPerRegisterNodes = 11571, + OperationLimitsType_MaxNodesPerTranslateBrowsePathsToNodeIds = 11572, + OperationLimitsType_MaxNodesPerNodeManagement = 11573, + OperationLimitsType_MaxMonitoredItemsPerCall = 11574, + FileType = 11575, + FileType_Size = 11576, + FileType_Writeable = 11577, + FileType_UserWriteable = 11578, + FileType_OpenCount = 11579, + FileType_Open = 11580, + FileType_Open_InputArguments = 11581, + FileType_Open_OutputArguments = 11582, + FileType_Close = 11583, + FileType_Close_InputArguments = 11584, + FileType_Read = 11585, + FileType_Read_InputArguments = 11586, + FileType_Read_OutputArguments = 11587, + FileType_Write = 11588, + FileType_Write_InputArguments = 11589, + FileType_GetPosition = 11590, + FileType_GetPosition_InputArguments = 11591, + FileType_GetPosition_OutputArguments = 11592, + FileType_SetPosition = 11593, + FileType_SetPosition_InputArguments = 11594, + AddressSpaceFileType = 11595, + AddressSpaceFileType_Size = 11596, + AddressSpaceFileType_Writeable = 11597, + AddressSpaceFileType_UserWriteable = 11598, + AddressSpaceFileType_OpenCount = 11599, + AddressSpaceFileType_Open = 11600, + AddressSpaceFileType_Open_InputArguments = 11601, + AddressSpaceFileType_Open_OutputArguments = 11602, + AddressSpaceFileType_Close = 11603, + AddressSpaceFileType_Close_InputArguments = 11604, + AddressSpaceFileType_Read = 11605, + AddressSpaceFileType_Read_InputArguments = 11606, + AddressSpaceFileType_Read_OutputArguments = 11607, + AddressSpaceFileType_Write = 11608, + AddressSpaceFileType_Write_InputArguments = 11609, + AddressSpaceFileType_GetPosition = 11610, + AddressSpaceFileType_GetPosition_InputArguments = 11611, + AddressSpaceFileType_GetPosition_OutputArguments = 11612, + AddressSpaceFileType_SetPosition = 11613, + AddressSpaceFileType_SetPosition_InputArguments = 11614, + AddressSpaceFileType_ExportNamespace = 11615, + NamespaceMetadataType = 11616, + NamespaceMetadataType_NamespaceUri = 11617, + NamespaceMetadataType_NamespaceVersion = 11618, + NamespaceMetadataType_NamespacePublicationDate = 11619, + NamespaceMetadataType_IsNamespaceSubset = 11620, + NamespaceMetadataType_StaticNodeIdIdentifierTypes = 11621, + NamespaceMetadataType_StaticNumericNodeIdRange = 11622, + NamespaceMetadataType_StaticStringNodeIdPattern = 11623, + NamespaceMetadataType_NamespaceFile = 11624, + NamespaceMetadataType_NamespaceFile_Size = 11625, + NamespaceMetadataType_NamespaceFile_Writeable = 11626, + NamespaceMetadataType_NamespaceFile_UserWriteable = 11627, + NamespaceMetadataType_NamespaceFile_OpenCount = 11628, + NamespaceMetadataType_NamespaceFile_Open = 11629, + NamespaceMetadataType_NamespaceFile_Open_InputArguments = 11630, + NamespaceMetadataType_NamespaceFile_Open_OutputArguments = 11631, + NamespaceMetadataType_NamespaceFile_Close = 11632, + NamespaceMetadataType_NamespaceFile_Close_InputArguments = 11633, + NamespaceMetadataType_NamespaceFile_Read = 11634, + NamespaceMetadataType_NamespaceFile_Read_InputArguments = 11635, + NamespaceMetadataType_NamespaceFile_Read_OutputArguments = 11636, + NamespaceMetadataType_NamespaceFile_Write = 11637, + NamespaceMetadataType_NamespaceFile_Write_InputArguments = 11638, + NamespaceMetadataType_NamespaceFile_GetPosition = 11639, + NamespaceMetadataType_NamespaceFile_GetPosition_InputArguments = 11640, + NamespaceMetadataType_NamespaceFile_GetPosition_OutputArguments = 11641, + NamespaceMetadataType_NamespaceFile_SetPosition = 11642, + NamespaceMetadataType_NamespaceFile_SetPosition_InputArguments = 11643, + NamespaceMetadataType_NamespaceFile_ExportNamespace = 11644, + NamespacesType = 11645, + NamespacesType_NamespaceIdentifier = 11646, + NamespacesType_NamespaceIdentifier_NamespaceUri = 11647, + NamespacesType_NamespaceIdentifier_NamespaceVersion = 11648, + NamespacesType_NamespaceIdentifier_NamespacePublicationDate = 11649, + NamespacesType_NamespaceIdentifier_IsNamespaceSubset = 11650, + NamespacesType_NamespaceIdentifier_StaticNodeIdIdentifierTypes = 11651, + NamespacesType_NamespaceIdentifier_StaticNumericNodeIdRange = 11652, + NamespacesType_NamespaceIdentifier_StaticStringNodeIdPattern = 11653, + NamespacesType_NamespaceIdentifier_NamespaceFile = 11654, + NamespacesType_NamespaceIdentifier_NamespaceFile_Size = 11655, + NamespacesType_NamespaceIdentifier_NamespaceFile_Writeable = 11656, + NamespacesType_NamespaceIdentifier_NamespaceFile_UserWriteable = 11657, + NamespacesType_NamespaceIdentifier_NamespaceFile_OpenCount = 11658, + NamespacesType_NamespaceIdentifier_NamespaceFile_Open = 11659, + NamespacesType_NamespaceIdentifier_NamespaceFile_Open_InputArguments = 11660, + NamespacesType_NamespaceIdentifier_NamespaceFile_Open_OutputArguments = 11661, + NamespacesType_NamespaceIdentifier_NamespaceFile_Close = 11662, + NamespacesType_NamespaceIdentifier_NamespaceFile_Close_InputArguments = 11663, + NamespacesType_NamespaceIdentifier_NamespaceFile_Read = 11664, + NamespacesType_NamespaceIdentifier_NamespaceFile_Read_InputArguments = 11665, + NamespacesType_NamespaceIdentifier_NamespaceFile_Read_OutputArguments = 11666, + NamespacesType_NamespaceIdentifier_NamespaceFile_Write = 11667, + NamespacesType_NamespaceIdentifier_NamespaceFile_Write_InputArguments = 11668, + NamespacesType_NamespaceIdentifier_NamespaceFile_GetPosition = 11669, + NamespacesType_NamespaceIdentifier_NamespaceFile_GetPosition_InputArguments = 11670, + NamespacesType_NamespaceIdentifier_NamespaceFile_GetPosition_OutputArguments = 11671, + NamespacesType_NamespaceIdentifier_NamespaceFile_SetPosition = 11672, + NamespacesType_NamespaceIdentifier_NamespaceFile_SetPosition_InputArguments = 11673, + NamespacesType_NamespaceIdentifier_NamespaceFile_ExportNamespace = 11674, + NamespacesType_AddressSpaceFile = 11675, + NamespacesType_AddressSpaceFile_Size = 11676, + NamespacesType_AddressSpaceFile_Writeable = 11677, + NamespacesType_AddressSpaceFile_UserWriteable = 11678, + NamespacesType_AddressSpaceFile_OpenCount = 11679, + NamespacesType_AddressSpaceFile_Open = 11680, + NamespacesType_AddressSpaceFile_Open_InputArguments = 11681, + NamespacesType_AddressSpaceFile_Open_OutputArguments = 11682, + NamespacesType_AddressSpaceFile_Close = 11683, + NamespacesType_AddressSpaceFile_Close_InputArguments = 11684, + NamespacesType_AddressSpaceFile_Read = 11685, + NamespacesType_AddressSpaceFile_Read_InputArguments = 11686, + NamespacesType_AddressSpaceFile_Read_OutputArguments = 11687, + NamespacesType_AddressSpaceFile_Write = 11688, + NamespacesType_AddressSpaceFile_Write_InputArguments = 11689, + NamespacesType_AddressSpaceFile_GetPosition = 11690, + NamespacesType_AddressSpaceFile_GetPosition_InputArguments = 11691, + NamespacesType_AddressSpaceFile_GetPosition_OutputArguments = 11692, + NamespacesType_AddressSpaceFile_SetPosition = 11693, + NamespacesType_AddressSpaceFile_SetPosition_InputArguments = 11694, + NamespacesType_AddressSpaceFile_ExportNamespace = 11695, + SystemStatusChangeEventType_SystemState = 11696, + SamplingIntervalDiagnosticsType_SampledMonitoredItemsCount = 11697, + SamplingIntervalDiagnosticsType_MaxSampledMonitoredItemsCount = 11698, + SamplingIntervalDiagnosticsType_DisabledMonitoredItemsSamplingCount = 11699, + OptionSetType_BitMask = 11701, + Server_ServerCapabilities_MaxArrayLength = 11702, + Server_ServerCapabilities_MaxStringLength = 11703, + Server_ServerCapabilities_OperationLimits = 11704, + Server_ServerCapabilities_OperationLimits_MaxNodesPerRead = 11705, + Server_ServerCapabilities_OperationLimits_MaxNodesPerWrite = 11707, + Server_ServerCapabilities_OperationLimits_MaxNodesPerMethodCall = 11709, + Server_ServerCapabilities_OperationLimits_MaxNodesPerBrowse = 11710, + Server_ServerCapabilities_OperationLimits_MaxNodesPerRegisterNodes = 11711, + Server_ServerCapabilities_OperationLimits_MaxNodesPerTranslateBrowsePathsToNodeIds = 11712, + Server_ServerCapabilities_OperationLimits_MaxNodesPerNodeManagement = 11713, + Server_ServerCapabilities_OperationLimits_MaxMonitoredItemsPerCall = 11714, + Server_Namespaces = 11715, + Server_Namespaces_AddressSpaceFile = 11716, + Server_Namespaces_AddressSpaceFile_Size = 11717, + Server_Namespaces_AddressSpaceFile_Writeable = 11718, + Server_Namespaces_AddressSpaceFile_UserWriteable = 11719, + Server_Namespaces_AddressSpaceFile_OpenCount = 11720, + Server_Namespaces_AddressSpaceFile_Open = 11721, + Server_Namespaces_AddressSpaceFile_Open_InputArguments = 11722, + Server_Namespaces_AddressSpaceFile_Open_OutputArguments = 11723, + Server_Namespaces_AddressSpaceFile_Close = 11724, + Server_Namespaces_AddressSpaceFile_Close_InputArguments = 11725, + Server_Namespaces_AddressSpaceFile_Read = 11726, + Server_Namespaces_AddressSpaceFile_Read_InputArguments = 11727, + Server_Namespaces_AddressSpaceFile_Read_OutputArguments = 11728, + Server_Namespaces_AddressSpaceFile_Write = 11729, + Server_Namespaces_AddressSpaceFile_Write_InputArguments = 11730, + Server_Namespaces_AddressSpaceFile_GetPosition = 11731, + Server_Namespaces_AddressSpaceFile_GetPosition_InputArguments = 11732, + Server_Namespaces_AddressSpaceFile_GetPosition_OutputArguments = 11733, + Server_Namespaces_AddressSpaceFile_SetPosition = 11734, + Server_Namespaces_AddressSpaceFile_SetPosition_InputArguments = 11735, + Server_Namespaces_AddressSpaceFile_ExportNamespace = 11736, + BitFieldMaskDataType = 11737, + OpenMethodType = 11738, + OpenMethodType_InputArguments = 11739, + OpenMethodType_OutputArguments = 11740, + CloseMethodType = 11741, + CloseMethodType_InputArguments = 11742, + ReadMethodType = 11743, + ReadMethodType_InputArguments = 11744, + ReadMethodType_OutputArguments = 11745, + WriteMethodType = 11746, + WriteMethodType_InputArguments = 11747, + GetPositionMethodType = 11748, + GetPositionMethodType_InputArguments = 11749, + GetPositionMethodType_OutputArguments = 11750, + SetPositionMethodType = 11751, + SetPositionMethodType_InputArguments = 11752, + SystemOffNormalAlarmType = 11753, + SystemOffNormalAlarmType_EventId = 11754, + SystemOffNormalAlarmType_EventType = 11755, + SystemOffNormalAlarmType_SourceNode = 11756, + SystemOffNormalAlarmType_SourceName = 11757, + SystemOffNormalAlarmType_Time = 11758, + SystemOffNormalAlarmType_ReceiveTime = 11759, + SystemOffNormalAlarmType_LocalTime = 11760, + SystemOffNormalAlarmType_Message = 11761, + SystemOffNormalAlarmType_Severity = 11762, + SystemOffNormalAlarmType_ConditionClassId = 11763, + SystemOffNormalAlarmType_ConditionClassName = 11764, + SystemOffNormalAlarmType_ConditionName = 11765, + SystemOffNormalAlarmType_BranchId = 11766, + SystemOffNormalAlarmType_Retain = 11767, + SystemOffNormalAlarmType_EnabledState = 11768, + SystemOffNormalAlarmType_EnabledState_Id = 11769, + SystemOffNormalAlarmType_EnabledState_Name = 11770, + SystemOffNormalAlarmType_EnabledState_Number = 11771, + SystemOffNormalAlarmType_EnabledState_EffectiveDisplayName = 11772, + SystemOffNormalAlarmType_EnabledState_TransitionTime = 11773, + SystemOffNormalAlarmType_EnabledState_EffectiveTransitionTime = 11774, + SystemOffNormalAlarmType_EnabledState_TrueState = 11775, + SystemOffNormalAlarmType_EnabledState_FalseState = 11776, + SystemOffNormalAlarmType_Quality = 11777, + SystemOffNormalAlarmType_Quality_SourceTimestamp = 11778, + SystemOffNormalAlarmType_LastSeverity = 11779, + SystemOffNormalAlarmType_LastSeverity_SourceTimestamp = 11780, + SystemOffNormalAlarmType_Comment = 11781, + SystemOffNormalAlarmType_Comment_SourceTimestamp = 11782, + SystemOffNormalAlarmType_ClientUserId = 11783, + SystemOffNormalAlarmType_Disable = 11784, + SystemOffNormalAlarmType_Enable = 11785, + SystemOffNormalAlarmType_AddComment = 11786, + SystemOffNormalAlarmType_AddComment_InputArguments = 11787, + SystemOffNormalAlarmType_ConditionRefresh = 11788, + SystemOffNormalAlarmType_ConditionRefresh_InputArguments = 11789, + SystemOffNormalAlarmType_AckedState = 11790, + SystemOffNormalAlarmType_AckedState_Id = 11791, + SystemOffNormalAlarmType_AckedState_Name = 11792, + SystemOffNormalAlarmType_AckedState_Number = 11793, + SystemOffNormalAlarmType_AckedState_EffectiveDisplayName = 11794, + SystemOffNormalAlarmType_AckedState_TransitionTime = 11795, + SystemOffNormalAlarmType_AckedState_EffectiveTransitionTime = 11796, + SystemOffNormalAlarmType_AckedState_TrueState = 11797, + SystemOffNormalAlarmType_AckedState_FalseState = 11798, + SystemOffNormalAlarmType_ConfirmedState = 11799, + SystemOffNormalAlarmType_ConfirmedState_Id = 11800, + SystemOffNormalAlarmType_ConfirmedState_Name = 11801, + SystemOffNormalAlarmType_ConfirmedState_Number = 11802, + SystemOffNormalAlarmType_ConfirmedState_EffectiveDisplayName = 11803, + SystemOffNormalAlarmType_ConfirmedState_TransitionTime = 11804, + SystemOffNormalAlarmType_ConfirmedState_EffectiveTransitionTime = 11805, + SystemOffNormalAlarmType_ConfirmedState_TrueState = 11806, + SystemOffNormalAlarmType_ConfirmedState_FalseState = 11807, + SystemOffNormalAlarmType_Acknowledge = 11808, + SystemOffNormalAlarmType_Acknowledge_InputArguments = 11809, + SystemOffNormalAlarmType_Confirm = 11810, + SystemOffNormalAlarmType_Confirm_InputArguments = 11811, + SystemOffNormalAlarmType_ActiveState = 11812, + SystemOffNormalAlarmType_ActiveState_Id = 11813, + SystemOffNormalAlarmType_ActiveState_Name = 11814, + SystemOffNormalAlarmType_ActiveState_Number = 11815, + SystemOffNormalAlarmType_ActiveState_EffectiveDisplayName = 11816, + SystemOffNormalAlarmType_ActiveState_TransitionTime = 11817, + SystemOffNormalAlarmType_ActiveState_EffectiveTransitionTime = 11818, + SystemOffNormalAlarmType_ActiveState_TrueState = 11819, + SystemOffNormalAlarmType_ActiveState_FalseState = 11820, + SystemOffNormalAlarmType_InputNode = 11821, + SystemOffNormalAlarmType_SuppressedState = 11822, + SystemOffNormalAlarmType_SuppressedState_Id = 11823, + SystemOffNormalAlarmType_SuppressedState_Name = 11824, + SystemOffNormalAlarmType_SuppressedState_Number = 11825, + SystemOffNormalAlarmType_SuppressedState_EffectiveDisplayName = 11826, + SystemOffNormalAlarmType_SuppressedState_TransitionTime = 11827, + SystemOffNormalAlarmType_SuppressedState_EffectiveTransitionTime = 11828, + SystemOffNormalAlarmType_SuppressedState_TrueState = 11829, + SystemOffNormalAlarmType_SuppressedState_FalseState = 11830, + SystemOffNormalAlarmType_ShelvingState = 11831, + SystemOffNormalAlarmType_ShelvingState_CurrentState = 11832, + SystemOffNormalAlarmType_ShelvingState_CurrentState_Id = 11833, + SystemOffNormalAlarmType_ShelvingState_CurrentState_Name = 11834, + SystemOffNormalAlarmType_ShelvingState_CurrentState_Number = 11835, + SystemOffNormalAlarmType_ShelvingState_CurrentState_EffectiveDisplayName = 11836, + SystemOffNormalAlarmType_ShelvingState_LastTransition = 11837, + SystemOffNormalAlarmType_ShelvingState_LastTransition_Id = 11838, + SystemOffNormalAlarmType_ShelvingState_LastTransition_Name = 11839, + SystemOffNormalAlarmType_ShelvingState_LastTransition_Number = 11840, + SystemOffNormalAlarmType_ShelvingState_LastTransition_TransitionTime = 11841, + SystemOffNormalAlarmType_ShelvingState_LastTransition_EffectiveTransitionTime = 11842, + SystemOffNormalAlarmType_ShelvingState_UnshelveTime = 11843, + SystemOffNormalAlarmType_ShelvingState_Unshelve = 11844, + SystemOffNormalAlarmType_ShelvingState_OneShotShelve = 11845, + SystemOffNormalAlarmType_ShelvingState_TimedShelve = 11846, + SystemOffNormalAlarmType_ShelvingState_TimedShelve_InputArguments = 11847, + SystemOffNormalAlarmType_SuppressedOrShelved = 11848, + SystemOffNormalAlarmType_MaxTimeShelved = 11849, + SystemOffNormalAlarmType_NormalState = 11850, + AuditConditionCommentEventType_Comment = 11851, + AuditConditionRespondEventType_SelectedResponse = 11852, + AuditConditionAcknowledgeEventType_Comment = 11853, + AuditConditionConfirmEventType_Comment = 11854, + AuditConditionShelvingEventType_ShelvingTime = 11855, + AuditProgramTransitionEventType = 11856, + AuditProgramTransitionEventType_EventId = 11857, + AuditProgramTransitionEventType_EventType = 11858, + AuditProgramTransitionEventType_SourceNode = 11859, + AuditProgramTransitionEventType_SourceName = 11860, + AuditProgramTransitionEventType_Time = 11861, + AuditProgramTransitionEventType_ReceiveTime = 11862, + AuditProgramTransitionEventType_LocalTime = 11863, + AuditProgramTransitionEventType_Message = 11864, + AuditProgramTransitionEventType_Severity = 11865, + AuditProgramTransitionEventType_ActionTimeStamp = 11866, + AuditProgramTransitionEventType_Status = 11867, + AuditProgramTransitionEventType_ServerId = 11868, + AuditProgramTransitionEventType_ClientAuditEntryId = 11869, + AuditProgramTransitionEventType_ClientUserId = 11870, + AuditProgramTransitionEventType_MethodId = 11871, + AuditProgramTransitionEventType_InputArguments = 11872, + AuditProgramTransitionEventType_OldStateId = 11873, + AuditProgramTransitionEventType_NewStateId = 11874, + AuditProgramTransitionEventType_TransitionNumber = 11875, + HistoricalDataConfigurationType_AggregateFunctions = 11876, + HAConfiguration_AggregateFunctions = 11877, + NodeClass_EnumValues = 11878, + InstanceNode = 11879, + TypeNode = 11880, + NodeAttributesMask_EnumValues = 11881, + AttributeWriteMask_EnumValues = 11882, + BrowseResultMask_EnumValues = 11883, + HistoryUpdateType_EnumValues = 11884, + PerformUpdateType_EnumValues = 11885, + EnumeratedTestType_EnumValues = 11886, + InstanceNode_Encoding_DefaultXml = 11887, + TypeNode_Encoding_DefaultXml = 11888, + InstanceNode_Encoding_DefaultBinary = 11889, + TypeNode_Encoding_DefaultBinary = 11890, + SessionDiagnosticsObjectType_SessionDiagnostics_UnauthorizedRequestCount = 11891, + SessionDiagnosticsVariableType_UnauthorizedRequestCount = 11892, + OpenFileMode = 11939, + OpenFileMode_EnumValues = 11940, + ModelChangeStructureVerbMask = 11941, + ModelChangeStructureVerbMask_EnumValues = 11942, + EndpointUrlListDataType = 11943, + NetworkGroupDataType = 11944, + NonTransparentNetworkRedundancyType = 11945, + NonTransparentNetworkRedundancyType_RedundancySupport = 11946, + NonTransparentNetworkRedundancyType_ServerUriArray = 11947, + NonTransparentNetworkRedundancyType_ServerNetworkGroups = 11948, + EndpointUrlListDataType_Encoding_DefaultXml = 11949, + NetworkGroupDataType_Encoding_DefaultXml = 11950, + OpcUa_XmlSchema_EndpointUrlListDataType = 11951, + OpcUa_XmlSchema_EndpointUrlListDataType_DataTypeVersion = 11952, + OpcUa_XmlSchema_EndpointUrlListDataType_DictionaryFragment = 11953, + OpcUa_XmlSchema_NetworkGroupDataType = 11954, + OpcUa_XmlSchema_NetworkGroupDataType_DataTypeVersion = 11955, + OpcUa_XmlSchema_NetworkGroupDataType_DictionaryFragment = 11956, + EndpointUrlListDataType_Encoding_DefaultBinary = 11957, + NetworkGroupDataType_Encoding_DefaultBinary = 11958, + OpcUa_BinarySchema_EndpointUrlListDataType = 11959, + OpcUa_BinarySchema_EndpointUrlListDataType_DataTypeVersion = 11960, + OpcUa_BinarySchema_EndpointUrlListDataType_DictionaryFragment = 11961, + OpcUa_BinarySchema_NetworkGroupDataType = 11962, + OpcUa_BinarySchema_NetworkGroupDataType_DataTypeVersion = 11963, + OpcUa_BinarySchema_NetworkGroupDataType_DictionaryFragment = 11964, + ArrayItemType = 12021, + ArrayItemType_Definition = 12022, + ArrayItemType_ValuePrecision = 12023, + ArrayItemType_InstrumentRange = 12024, + ArrayItemType_EURange = 12025, + ArrayItemType_EngineeringUnits = 12026, + ArrayItemType_Title = 12027, + ArrayItemType_AxisScaleType = 12028, + YArrayItemType = 12029, + YArrayItemType_Definition = 12030, + YArrayItemType_ValuePrecision = 12031, + YArrayItemType_InstrumentRange = 12032, + YArrayItemType_EURange = 12033, + YArrayItemType_EngineeringUnits = 12034, + YArrayItemType_Title = 12035, + YArrayItemType_AxisScaleType = 12036, + YArrayItemType_XAxisDefinition = 12037, + XYArrayItemType = 12038, + XYArrayItemType_Definition = 12039, + XYArrayItemType_ValuePrecision = 12040, + XYArrayItemType_InstrumentRange = 12041, + XYArrayItemType_EURange = 12042, + XYArrayItemType_EngineeringUnits = 12043, + XYArrayItemType_Title = 12044, + XYArrayItemType_AxisScaleType = 12045, + XYArrayItemType_XAxisDefinition = 12046, + ImageItemType = 12047, + ImageItemType_Definition = 12048, + ImageItemType_ValuePrecision = 12049, + ImageItemType_InstrumentRange = 12050, + ImageItemType_EURange = 12051, + ImageItemType_EngineeringUnits = 12052, + ImageItemType_Title = 12053, + ImageItemType_AxisScaleType = 12054, + ImageItemType_XAxisDefinition = 12055, + ImageItemType_YAxisDefinition = 12056, + CubeItemType = 12057, + CubeItemType_Definition = 12058, + CubeItemType_ValuePrecision = 12059, + CubeItemType_InstrumentRange = 12060, + CubeItemType_EURange = 12061, + CubeItemType_EngineeringUnits = 12062, + CubeItemType_Title = 12063, + CubeItemType_AxisScaleType = 12064, + CubeItemType_XAxisDefinition = 12065, + CubeItemType_YAxisDefinition = 12066, + CubeItemType_ZAxisDefinition = 12067, + NDimensionArrayItemType = 12068, + NDimensionArrayItemType_Definition = 12069, + NDimensionArrayItemType_ValuePrecision = 12070, + NDimensionArrayItemType_InstrumentRange = 12071, + NDimensionArrayItemType_EURange = 12072, + NDimensionArrayItemType_EngineeringUnits = 12073, + NDimensionArrayItemType_Title = 12074, + NDimensionArrayItemType_AxisScaleType = 12075, + NDimensionArrayItemType_AxisDefinition = 12076, + AxisScaleEnumeration = 12077, + AxisScaleEnumeration_EnumStrings = 12078, + AxisInformation = 12079, + XVType = 12080, + AxisInformation_Encoding_DefaultXml = 12081, + XVType_Encoding_DefaultXml = 12082, + OpcUa_XmlSchema_AxisInformation = 12083, + OpcUa_XmlSchema_AxisInformation_DataTypeVersion = 12084, + OpcUa_XmlSchema_AxisInformation_DictionaryFragment = 12085, + OpcUa_XmlSchema_XVType = 12086, + OpcUa_XmlSchema_XVType_DataTypeVersion = 12087, + OpcUa_XmlSchema_XVType_DictionaryFragment = 12088, + AxisInformation_Encoding_DefaultBinary = 12089, + XVType_Encoding_DefaultBinary = 12090, + OpcUa_BinarySchema_AxisInformation = 12091, + OpcUa_BinarySchema_AxisInformation_DataTypeVersion = 12092, + OpcUa_BinarySchema_AxisInformation_DictionaryFragment = 12093, + OpcUa_BinarySchema_XVType = 12094, + OpcUa_BinarySchema_XVType_DataTypeVersion = 12095, + OpcUa_BinarySchema_XVType_DictionaryFragment = 12096, + SessionsDiagnosticsSummaryType_SessionPlaceholder = 12097, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics = 12098, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_SessionId = 12099, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_SessionName = 12100, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ClientDescription = 12101, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ServerUri = 12102, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_EndpointUrl = 12103, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_LocaleIds = 12104, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ActualSessionTimeout = 12105, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_MaxResponseMessageSize = 12106, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ClientConnectionTime = 12107, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ClientLastContactTime = 12108, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_CurrentSubscriptionsCount = 12109, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_CurrentMonitoredItemsCount = 12110, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_CurrentPublishRequestsInQueue = 12111, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_TotalRequestCount = 12112, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_UnauthorizedRequestCount = 12113, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ReadCount = 12114, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_HistoryReadCount = 12115, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_WriteCount = 12116, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_HistoryUpdateCount = 12117, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_CallCount = 12118, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_CreateMonitoredItemsCount = 12119, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ModifyMonitoredItemsCount = 12120, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_SetMonitoringModeCount = 12121, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_SetTriggeringCount = 12122, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_DeleteMonitoredItemsCount = 12123, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_CreateSubscriptionCount = 12124, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_ModifySubscriptionCount = 12125, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_SetPublishingModeCount = 12126, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_PublishCount = 12127, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_RepublishCount = 12128, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_TransferSubscriptionsCount = 12129, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_DeleteSubscriptionsCount = 12130, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_AddNodesCount = 12131, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_AddReferencesCount = 12132, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_DeleteNodesCount = 12133, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_DeleteReferencesCount = 12134, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_BrowseCount = 12135, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_BrowseNextCount = 12136, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_TranslateBrowsePathsToNodeIdsCount = 12137, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_QueryFirstCount = 12138, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_QueryNextCount = 12139, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_RegisterNodesCount = 12140, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionDiagnostics_UnregisterNodesCount = 12141, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics = 12142, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_SessionId = 12143, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_ClientUserIdOfSession = 12144, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_ClientUserIdHistory = 12145, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_AuthenticationMechanism = 12146, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_Encoding = 12147, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_TransportProtocol = 12148, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_SecurityMode = 12149, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_SecurityPolicyUri = 12150, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SessionSecurityDiagnostics_ClientCertificate = 12151, + SessionsDiagnosticsSummaryType_SessionPlaceholder_SubscriptionDiagnosticsArray = 12152, + ServerType_ServerCapabilities_OperationLimits_MaxNodesPerHistoryReadData = 12153, + ServerType_ServerCapabilities_OperationLimits_MaxNodesPerHistoryReadEvents = 12154, + ServerType_ServerCapabilities_OperationLimits_MaxNodesPerHistoryUpdateData = 12155, + ServerType_ServerCapabilities_OperationLimits_MaxNodesPerHistoryUpdateEvents = 12156, + ServerCapabilitiesType_OperationLimits_MaxNodesPerHistoryReadData = 12157, + ServerCapabilitiesType_OperationLimits_MaxNodesPerHistoryReadEvents = 12158, + ServerCapabilitiesType_OperationLimits_MaxNodesPerHistoryUpdateData = 12159, + ServerCapabilitiesType_OperationLimits_MaxNodesPerHistoryUpdateEvents = 12160, + OperationLimitsType_MaxNodesPerHistoryReadData = 12161, + OperationLimitsType_MaxNodesPerHistoryReadEvents = 12162, + OperationLimitsType_MaxNodesPerHistoryUpdateData = 12163, + OperationLimitsType_MaxNodesPerHistoryUpdateEvents = 12164, + Server_ServerCapabilities_OperationLimits_MaxNodesPerHistoryReadData = 12165, + Server_ServerCapabilities_OperationLimits_MaxNodesPerHistoryReadEvents = 12166, + Server_ServerCapabilities_OperationLimits_MaxNodesPerHistoryUpdateData = 12167, + Server_ServerCapabilities_OperationLimits_MaxNodesPerHistoryUpdateEvents = 12168, + NamingRuleType_EnumValues = 12169, + ViewVersion = 12170, + ComplexNumberType = 12171, + DoubleComplexNumberType = 12172, + ComplexNumberType_Encoding_DefaultXml = 12173, + DoubleComplexNumberType_Encoding_DefaultXml = 12174, + OpcUa_XmlSchema_ComplexNumberType = 12175, + OpcUa_XmlSchema_ComplexNumberType_DataTypeVersion = 12176, + OpcUa_XmlSchema_ComplexNumberType_DictionaryFragment = 12177, + OpcUa_XmlSchema_DoubleComplexNumberType = 12178, + OpcUa_XmlSchema_DoubleComplexNumberType_DataTypeVersion = 12179, + OpcUa_XmlSchema_DoubleComplexNumberType_DictionaryFragment = 12180, + ComplexNumberType_Encoding_DefaultBinary = 12181, + DoubleComplexNumberType_Encoding_DefaultBinary = 12182, + OpcUa_BinarySchema_ComplexNumberType = 12183, + OpcUa_BinarySchema_ComplexNumberType_DataTypeVersion = 12184, + OpcUa_BinarySchema_ComplexNumberType_DictionaryFragment = 12185, + OpcUa_BinarySchema_DoubleComplexNumberType = 12186, + OpcUa_BinarySchema_DoubleComplexNumberType_DataTypeVersion = 12187, + OpcUa_BinarySchema_DoubleComplexNumberType_DictionaryFragment = 12188, +}; } diff --git a/include/opc/ua/protocol/protocol.h b/include/opc/ua/protocol/protocol.h index e21c57ae..e20bfaf6 100644 --- a/include/opc/ua/protocol/protocol.h +++ b/include/opc/ua/protocol/protocol.h @@ -4,11 +4,11 @@ namespace OpcUa { - ReadValueId inline ToReadValueId(NodeId id, AttributeId attr) - { - ReadValueId rv; - rv.NodeId = id; - rv.AttributeId = attr; - return rv; - } +ReadValueId inline ToReadValueId(NodeId id, AttributeId attr) +{ + ReadValueId rv; + rv.NodeId = id; + rv.AttributeId = attr; + return rv; +} } diff --git a/include/opc/ua/protocol/protocol_auto.h b/include/opc/ua/protocol/protocol_auto.h index 10bbba54..9533fc33 100644 --- a/include/opc/ua/protocol/protocol_auto.h +++ b/include/opc/ua/protocol/protocol_auto.h @@ -24,16 +24,16 @@ namespace OpcUa { - // An XML element encoded as a UTF-8 string. - struct XmlElement - { - int32_t Length; - std::vector Value; - }; +// An XML element encoded as a UTF-8 string. +struct XmlElement +{ + int32_t Length; + std::vector Value; +}; /* DISABLED - struct TwoByteNodeId + struct TwoByteNodeId { uint8_t Identifier; }; @@ -41,7 +41,7 @@ namespace OpcUa /* DISABLED - struct FourByteNodeId + struct FourByteNodeId { uint8_t NamespaceIndex; uint16_t Identifier; @@ -50,7 +50,7 @@ namespace OpcUa /* DISABLED - struct NumericNodeId + struct NumericNodeId { uint16_t NamespaceIndex; uint32_t Identifier; @@ -59,7 +59,7 @@ namespace OpcUa /* DISABLED - struct StringNodeId + struct StringNodeId { uint16_t NamespaceIndex; std::string Identifier; @@ -68,7 +68,7 @@ namespace OpcUa /* DISABLED - struct GuidNodeId + struct GuidNodeId { uint16_t NamespaceIndex; OpcUa::Guid Identifier; @@ -77,7 +77,7 @@ namespace OpcUa /* DISABLED - struct ByteStringNodeId + struct ByteStringNodeId { uint16_t NamespaceIndex; OpcUa::ByteString Identifier; @@ -87,7 +87,7 @@ namespace OpcUa /* DISABLED // An identifier for a node in a UA server address space. - struct NodeId + struct NodeId { OpcUa::NodeIdType NodeIdType; OpcUa::TwoByteNodeId TwoByte; @@ -99,17 +99,17 @@ namespace OpcUa }; */ - struct ExtensionObject - { - OpcUa::NodeId TypeId; - uint8_t Encoding; - OpcUa::ByteString Body; - }; +struct ExtensionObject +{ + OpcUa::NodeId TypeId; + uint8_t Encoding; + OpcUa::ByteString Body; +}; /* DISABLED // An identifier for a node in a UA server address space qualified with a complete namespace string. - struct ExpandedNodeId + struct ExpandedNodeId { OpcUa::NodeIdType NodeIdType; OpcUa::TwoByteNodeId TwoByte; @@ -126,7 +126,7 @@ namespace OpcUa /* DISABLED // A recursive structure containing diagnostic information associated with a status code. - struct DiagnosticInfo + struct DiagnosticInfo { uint8_t Encoding; int32_t SymbolicId; @@ -141,7 +141,7 @@ namespace OpcUa /* DISABLED // A string qualified with a namespace index. - struct QualifiedName + struct QualifiedName { int32_t NamespaceIndex; std::string Name; @@ -151,7 +151,7 @@ namespace OpcUa /* DISABLED // A string qualified with a namespace index. - struct LocalizedText + struct LocalizedText { uint8_t Encoding; std::string Locale; @@ -162,7 +162,7 @@ namespace OpcUa /* DISABLED // A union of several types. - struct Variant + struct Variant { uint8_t Encoding; int32_t ArrayLength; @@ -197,7 +197,7 @@ namespace OpcUa /* DISABLED // A value with an associated timestamp, and quality. - struct DataValue + struct DataValue { uint8_t Encoding; OpcUa::Variant Value; @@ -212,7 +212,7 @@ namespace OpcUa /* DISABLED // Specifies a reference which belongs to a node. - struct ReferenceNode + struct ReferenceNode { OpcUa::NodeId ReferenceTypeId; bool IsInverse; @@ -223,7 +223,7 @@ namespace OpcUa /* DISABLED // Specifies the attributes which belong to all nodes. - struct Node + struct Node { OpcUa::NodeId NodeId; OpcUa::NodeClass NodeClass; @@ -238,7 +238,7 @@ namespace OpcUa /* DISABLED - struct InstanceNode + struct InstanceNode { OpcUa::NodeId NodeId; OpcUa::NodeClass NodeClass; @@ -253,7 +253,7 @@ namespace OpcUa /* DISABLED - struct TypeNode + struct TypeNode { OpcUa::NodeId NodeId; OpcUa::NodeClass NodeClass; @@ -269,7 +269,7 @@ namespace OpcUa /* DISABLED // Specifies the attributes which belong to object nodes. - struct ObjectNode + struct ObjectNode { OpcUa::NodeId NodeId; OpcUa::NodeClass NodeClass; @@ -286,7 +286,7 @@ namespace OpcUa /* DISABLED // Specifies the attributes which belong to object type nodes. - struct ObjectTypeNode + struct ObjectTypeNode { OpcUa::NodeId NodeId; OpcUa::NodeClass NodeClass; @@ -303,7 +303,7 @@ namespace OpcUa /* DISABLED // Specifies the attributes which belong to variable nodes. - struct VariableNode + struct VariableNode { OpcUa::NodeId NodeId; OpcUa::NodeClass NodeClass; @@ -327,7 +327,7 @@ namespace OpcUa /* DISABLED // Specifies the attributes which belong to variable type nodes. - struct VariableTypeNode + struct VariableTypeNode { OpcUa::NodeId NodeId; OpcUa::NodeClass NodeClass; @@ -348,7 +348,7 @@ namespace OpcUa /* DISABLED // Specifies the attributes which belong to reference type nodes. - struct ReferenceTypeNode + struct ReferenceTypeNode { OpcUa::NodeId NodeId; OpcUa::NodeClass NodeClass; @@ -367,7 +367,7 @@ namespace OpcUa /* DISABLED // Specifies the attributes which belong to method nodes. - struct MethodNode + struct MethodNode { OpcUa::NodeId NodeId; OpcUa::NodeClass NodeClass; @@ -384,7 +384,7 @@ namespace OpcUa /* DISABLED - struct ViewNode + struct ViewNode { OpcUa::NodeId NodeId; OpcUa::NodeClass NodeClass; @@ -401,7 +401,7 @@ namespace OpcUa /* DISABLED - struct DataTypeNode + struct DataTypeNode { OpcUa::NodeId NodeId; OpcUa::NodeClass NodeClass; @@ -418,7 +418,7 @@ namespace OpcUa /* DISABLED // An argument for a method. - struct Argument + struct Argument { std::string Name; OpcUa::NodeId DataType; @@ -431,7 +431,7 @@ namespace OpcUa /* DISABLED // A mapping between a value of an enumerated type and a name and description. - struct EnumValueType + struct EnumValueType { int64_t Value; OpcUa::LocalizedText DisplayName; @@ -441,29 +441,29 @@ namespace OpcUa /* DISABLED - struct TimeZoneDataType + struct TimeZoneDataType { int16_t Offset; bool DaylightSavingInOffset; }; */ - // Describes an application and how to find it. - struct ApplicationDescription - { - std::string ApplicationUri; - std::string ProductUri; - OpcUa::LocalizedText ApplicationName; - OpcUa::ApplicationType ApplicationType; - std::string GatewayServerUri; - std::string DiscoveryProfileUri; - std::vector DiscoveryUrls; - }; +// Describes an application and how to find it. +struct ApplicationDescription +{ + std::string ApplicationUri; + std::string ProductUri; + OpcUa::LocalizedText ApplicationName; + OpcUa::ApplicationType ApplicationType; + std::string GatewayServerUri; + std::string DiscoveryProfileUri; + std::vector DiscoveryUrls; +}; /* DISABLED // The header passed with every server request. - struct RequestHeader + struct RequestHeader { OpcUa::NodeId AuthenticationToken; OpcUa::DateTime Timestamp; @@ -480,7 +480,7 @@ namespace OpcUa /* DISABLED // The header passed with every server response. - struct ResponseHeader + struct ResponseHeader { OpcUa::DateTime Timestamp; uint32_t RequestHandle; @@ -496,7 +496,7 @@ namespace OpcUa /* DISABLED // The response returned by all services when there is a service level error. - struct ServiceFault + struct ServiceFault { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -507,7 +507,7 @@ namespace OpcUa /* DISABLED - struct FindServersParameters + struct FindServersParameters { std::string EndpointUrl; std::vector LocaleIds; @@ -518,7 +518,7 @@ namespace OpcUa /* DISABLED // Finds the servers known to the discovery server. - struct FindServersRequest + struct FindServersRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -530,7 +530,7 @@ namespace OpcUa /* DISABLED - struct FindServersResult + struct FindServersResult { std::vector Servers; }; @@ -539,7 +539,7 @@ namespace OpcUa /* DISABLED // Finds the servers known to the discovery server. - struct FindServersResponse + struct FindServersResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -549,60 +549,60 @@ namespace OpcUa }; */ - // Describes a user token that can be used with a server. - struct UserTokenPolicy - { - std::string PolicyId; - OpcUa::UserTokenType TokenType; - std::string IssuedTokenType; - std::string IssuerEndpointUrl; - std::string SecurityPolicyUri; - }; - - // The description of a endpoint that can be used to access a server. - struct EndpointDescription - { - std::string EndpointUrl; - OpcUa::ApplicationDescription Server; - OpcUa::ByteString ServerCertificate; - OpcUa::MessageSecurityMode SecurityMode; - std::string SecurityPolicyUri; - std::vector UserIdentityTokens; - std::string TransportProfileUri; - uint8_t SecurityLevel; - }; - - struct GetEndpointsParameters - { - std::string EndpointUrl; - std::vector LocaleIds; - std::vector ProfileUris; - }; +// Describes a user token that can be used with a server. +struct UserTokenPolicy +{ + std::string PolicyId; + OpcUa::UserTokenType TokenType; + std::string IssuedTokenType; + std::string IssuerEndpointUrl; + std::string SecurityPolicyUri; +}; + +// The description of a endpoint that can be used to access a server. +struct EndpointDescription +{ + std::string EndpointUrl; + OpcUa::ApplicationDescription Server; + OpcUa::ByteString ServerCertificate; + OpcUa::MessageSecurityMode SecurityMode; + std::string SecurityPolicyUri; + std::vector UserIdentityTokens; + std::string TransportProfileUri; + uint8_t SecurityLevel; +}; + +struct GetEndpointsParameters +{ + std::string EndpointUrl; + std::vector LocaleIds; + std::vector ProfileUris; +}; - // Gets the endpoints used by the server. - struct GetEndpointsRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - OpcUa::GetEndpointsParameters Parameters; +// Gets the endpoints used by the server. +struct GetEndpointsRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + OpcUa::GetEndpointsParameters Parameters; - GetEndpointsRequest(); - }; + GetEndpointsRequest(); +}; - // Gets the endpoints used by the server. - struct GetEndpointsResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - std::vector Endpoints; +// Gets the endpoints used by the server. +struct GetEndpointsResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + std::vector Endpoints; - GetEndpointsResponse(); - }; + GetEndpointsResponse(); +}; /* DISABLED // The information required to register a server with a discovery server. - struct RegisteredServer + struct RegisteredServer { std::string ServerUri; std::string ProductUri; @@ -617,7 +617,7 @@ namespace OpcUa /* DISABLED - struct RegisterServerParameters + struct RegisterServerParameters { OpcUa::RegisteredServer Server; }; @@ -626,7 +626,7 @@ namespace OpcUa /* DISABLED // Registers a server with the discovery server. - struct RegisterServerRequest + struct RegisterServerRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -639,7 +639,7 @@ namespace OpcUa /* DISABLED // Registers a server with the discovery server. - struct RegisterServerResponse + struct RegisterServerResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -651,7 +651,7 @@ namespace OpcUa /* DISABLED // The token that identifies a set of keys for an active secure channel. - struct ChannelSecurityToken + struct ChannelSecurityToken { uint32_t ChannelId; uint32_t TokenId; @@ -662,7 +662,7 @@ namespace OpcUa /* DISABLED - struct OpenSecureChannelParameters + struct OpenSecureChannelParameters { uint32_t ClientProtocolVersion; OpcUa::SecurityTokenRequestType RequestType; @@ -677,7 +677,7 @@ namespace OpcUa /* DISABLED // Creates a secure channel with a server. - struct OpenSecureChannelRequest + struct OpenSecureChannelRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -689,7 +689,7 @@ namespace OpcUa /* DISABLED - struct OpenSecureChannelResult + struct OpenSecureChannelResult { uint32_t ServerProtocolVersion; OpcUa::ChannelSecurityToken SecurityToken; @@ -700,7 +700,7 @@ namespace OpcUa /* DISABLED // Creates a secure channel with a server. - struct OpenSecureChannelResponse + struct OpenSecureChannelResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -713,7 +713,7 @@ namespace OpcUa /* DISABLED // Closes a secure channel. - struct CloseSecureChannelRequest + struct CloseSecureChannelRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -725,7 +725,7 @@ namespace OpcUa /* DISABLED // Closes a secure channel. - struct CloseSecureChannelResponse + struct CloseSecureChannelResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -734,69 +734,69 @@ namespace OpcUa }; */ - // A software certificate with a digital signature. - struct SignedSoftwareCertificate - { - OpcUa::ByteString CertificateData; - OpcUa::ByteString Signature; - }; - - // A digital signature. - struct SignatureData - { - std::string Algorithm; - OpcUa::ByteString Signature; - }; - - struct CreateSessionParameters - { - OpcUa::ApplicationDescription ClientDescription; - std::string ServerUri; - std::string EndpointUrl; - std::string SessionName; - OpcUa::ByteString ClientNonce; - OpcUa::ByteString ClientCertificate; - double RequestedSessionTimeout; - uint32_t MaxResponseMessageSize; - }; +// A software certificate with a digital signature. +struct SignedSoftwareCertificate +{ + OpcUa::ByteString CertificateData; + OpcUa::ByteString Signature; +}; - // Creates a new session with the server. - struct CreateSessionRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - OpcUa::CreateSessionParameters Parameters; +// A digital signature. +struct SignatureData +{ + std::string Algorithm; + OpcUa::ByteString Signature; +}; - CreateSessionRequest(); - }; +struct CreateSessionParameters +{ + OpcUa::ApplicationDescription ClientDescription; + std::string ServerUri; + std::string EndpointUrl; + std::string SessionName; + OpcUa::ByteString ClientNonce; + OpcUa::ByteString ClientCertificate; + double RequestedSessionTimeout; + uint32_t MaxResponseMessageSize; +}; + +// Creates a new session with the server. +struct CreateSessionRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + OpcUa::CreateSessionParameters Parameters; - struct CreateSessionResult - { - OpcUa::NodeId SessionId; - OpcUa::NodeId AuthenticationToken; - double RevisedSessionTimeout; - OpcUa::ByteString ServerNonce; - OpcUa::ByteString ServerCertificate; - std::vector ServerEndpoints; - std::vector ServerSoftwareCertificates; - OpcUa::SignatureData ServerSignature; - uint32_t MaxRequestMessageSize; - }; + CreateSessionRequest(); +}; - // Creates a new session with the server. - struct CreateSessionResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - OpcUa::CreateSessionResult Parameters; +struct CreateSessionResult +{ + OpcUa::NodeId SessionId; + OpcUa::NodeId AuthenticationToken; + double RevisedSessionTimeout; + OpcUa::ByteString ServerNonce; + OpcUa::ByteString ServerCertificate; + std::vector ServerEndpoints; + std::vector ServerSoftwareCertificates; + OpcUa::SignatureData ServerSignature; + uint32_t MaxRequestMessageSize; +}; + +// Creates a new session with the server. +struct CreateSessionResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + OpcUa::CreateSessionResult Parameters; - CreateSessionResponse(); - }; + CreateSessionResponse(); +}; /* DISABLED // A base type for a user identity token. - struct UserIdentityToken + struct UserIdentityToken { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -810,7 +810,7 @@ namespace OpcUa /* DISABLED // A token representing an anonymous user. - struct AnonymousIdentityToken + struct AnonymousIdentityToken { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -822,7 +822,7 @@ namespace OpcUa /* DISABLED // A token representing a user identified by a user name and password. - struct UserNameIdentityToken + struct UserNameIdentityToken { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -837,7 +837,7 @@ namespace OpcUa /* DISABLED // A token representing a user identified by an X509 certificate. - struct X509IdentityToken + struct X509IdentityToken { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -850,7 +850,7 @@ namespace OpcUa /* DISABLED // A token representing a user identified by a WS-Security XML token. - struct IssuedIdentityToken + struct IssuedIdentityToken { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -861,46 +861,46 @@ namespace OpcUa }; */ - struct ActivateSessionParameters - { - OpcUa::SignatureData ClientSignature; - std::vector ClientSoftwareCertificates; - std::vector LocaleIds; - OpcUa::UserIdentifyToken UserIdentityToken; - OpcUa::SignatureData UserTokenSignature; - }; - - // Activates a session with the server. - struct ActivateSessionRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - OpcUa::ActivateSessionParameters Parameters; +struct ActivateSessionParameters +{ + OpcUa::SignatureData ClientSignature; + std::vector ClientSoftwareCertificates; + std::vector LocaleIds; + OpcUa::UserIdentifyToken UserIdentityToken; + OpcUa::SignatureData UserTokenSignature; +}; + +// Activates a session with the server. +struct ActivateSessionRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + OpcUa::ActivateSessionParameters Parameters; - ActivateSessionRequest(); - }; + ActivateSessionRequest(); +}; - struct ActivateSessionResult - { - OpcUa::ByteString ServerNonce; - std::vector Results; - std::vector DiagnosticInfos; - }; +struct ActivateSessionResult +{ + OpcUa::ByteString ServerNonce; + std::vector Results; + std::vector DiagnosticInfos; +}; - // Activates a session with the server. - struct ActivateSessionResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - OpcUa::ActivateSessionResult Parameters; +// Activates a session with the server. +struct ActivateSessionResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + OpcUa::ActivateSessionResult Parameters; - ActivateSessionResponse(); - }; + ActivateSessionResponse(); +}; /* DISABLED // Closes a session with the server. - struct CloseSessionRequest + struct CloseSessionRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -913,7 +913,7 @@ namespace OpcUa /* DISABLED // Closes a session with the server. - struct CloseSessionResponse + struct CloseSessionResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -924,7 +924,7 @@ namespace OpcUa /* DISABLED - struct CancelParameters + struct CancelParameters { uint32_t RequestHandle; }; @@ -933,7 +933,7 @@ namespace OpcUa /* DISABLED // Cancels an outstanding request. - struct CancelRequest + struct CancelRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -945,7 +945,7 @@ namespace OpcUa /* DISABLED - struct CancelResult + struct CancelResult { uint32_t CancelCount; }; @@ -954,7 +954,7 @@ namespace OpcUa /* DISABLED // Cancels an outstanding request. - struct CancelResponse + struct CancelResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -967,7 +967,7 @@ namespace OpcUa /* DISABLED // The base attributes for all nodes. - struct NodeAttributes + struct NodeAttributes { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -983,7 +983,7 @@ namespace OpcUa /* DISABLED // The attributes for an object node. - struct ObjectAttributes + struct ObjectAttributes { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1000,7 +1000,7 @@ namespace OpcUa /* DISABLED // The attributes for a variable node. - struct VariableAttributes + struct VariableAttributes { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1024,7 +1024,7 @@ namespace OpcUa /* DISABLED // The attributes for a method node. - struct MethodAttributes + struct MethodAttributes { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1042,7 +1042,7 @@ namespace OpcUa /* DISABLED // The attributes for an object type node. - struct ObjectTypeAttributes + struct ObjectTypeAttributes { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1059,7 +1059,7 @@ namespace OpcUa /* DISABLED // The attributes for a variable type node. - struct VariableTypeAttributes + struct VariableTypeAttributes { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1080,7 +1080,7 @@ namespace OpcUa /* DISABLED // The attributes for a reference type node. - struct ReferenceTypeAttributes + struct ReferenceTypeAttributes { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1099,7 +1099,7 @@ namespace OpcUa /* DISABLED // The attributes for a data type node. - struct DataTypeAttributes + struct DataTypeAttributes { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1116,7 +1116,7 @@ namespace OpcUa /* DISABLED // The attributes for a view node. - struct ViewAttributes + struct ViewAttributes { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1134,7 +1134,7 @@ namespace OpcUa /* DISABLED // A request to add a node to the server address space. - struct AddNodesItem + struct AddNodesItem { OpcUa::ExpandedNodeId ParentNodeId; OpcUa::NodeId ReferenceTypeId; @@ -1149,7 +1149,7 @@ namespace OpcUa /* DISABLED // A result of an add node operation. - struct AddNodesResult + struct AddNodesResult { OpcUa::StatusCode Status; OpcUa::NodeId AddedNodeId; @@ -1158,7 +1158,7 @@ namespace OpcUa /* DISABLED - struct AddNodesParameters + struct AddNodesParameters { std::vector NodesToAdd; }; @@ -1167,7 +1167,7 @@ namespace OpcUa /* DISABLED // Adds one or more nodes to the server address space. - struct AddNodesRequest + struct AddNodesRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -1180,7 +1180,7 @@ namespace OpcUa /* DISABLED // Adds one or more nodes to the server address space. - struct AddNodesResponse + struct AddNodesResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -1194,7 +1194,7 @@ namespace OpcUa /* DISABLED // A request to add a reference to the server address space. - struct AddReferencesItem + struct AddReferencesItem { OpcUa::NodeId SourceNodeId; OpcUa::NodeId ReferenceTypeId; @@ -1208,7 +1208,7 @@ namespace OpcUa /* DISABLED // Adds one or more references to the server address space. - struct AddReferencesRequest + struct AddReferencesRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -1221,7 +1221,7 @@ namespace OpcUa /* DISABLED // Adds one or more references to the server address space. - struct AddReferencesResponse + struct AddReferencesResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -1232,38 +1232,38 @@ namespace OpcUa }; */ - // A request to delete a node to the server address space. - struct DeleteNodesItem - { - OpcUa::NodeId NodeId; - bool DeleteTargetReferences; - }; +// A request to delete a node to the server address space. +struct DeleteNodesItem +{ + OpcUa::NodeId NodeId; + bool DeleteTargetReferences; +}; - // Delete one or more nodes from the server address space. - struct DeleteNodesRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - std::vector NodesToDelete; +// Delete one or more nodes from the server address space. +struct DeleteNodesRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + std::vector NodesToDelete; - DeleteNodesRequest(); - }; + DeleteNodesRequest(); +}; - // Delete one or more nodes from the server address space. - struct DeleteNodesResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - std::vector Results; - std::vector DiagnosticInfos; +// Delete one or more nodes from the server address space. +struct DeleteNodesResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + std::vector Results; + std::vector DiagnosticInfos; - DeleteNodesResponse(); - }; + DeleteNodesResponse(); +}; /* DISABLED // A request to delete a node from the server address space. - struct DeleteReferencesItem + struct DeleteReferencesItem { OpcUa::NodeId SourceNodeId; OpcUa::NodeId ReferenceTypeId; @@ -1275,7 +1275,7 @@ namespace OpcUa /* DISABLED - struct DeleteReferencesParameters + struct DeleteReferencesParameters { std::vector ReferencesToDelete; }; @@ -1284,7 +1284,7 @@ namespace OpcUa /* DISABLED // Delete one or more references from the server address space. - struct DeleteReferencesRequest + struct DeleteReferencesRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -1296,7 +1296,7 @@ namespace OpcUa /* DISABLED - struct DeleteReferencesResult + struct DeleteReferencesResult { std::vector Results; std::vector DiagnosticInfos; @@ -1306,7 +1306,7 @@ namespace OpcUa /* DISABLED // Delete one or more references from the server address space. - struct DeleteReferencesResponse + struct DeleteReferencesResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -1319,7 +1319,7 @@ namespace OpcUa /* DISABLED // The view to browse. - struct ViewDescription + struct ViewDescription { OpcUa::NodeId ViewId; OpcUa::DateTime Timestamp; @@ -1330,7 +1330,7 @@ namespace OpcUa /* DISABLED // A request to browse the the references from a node. - struct BrowseDescription + struct BrowseDescription { OpcUa::NodeId NodeId; OpcUa::BrowseDirection BrowseDirection; @@ -1346,7 +1346,7 @@ namespace OpcUa /* DISABLED // The description of a reference. - struct ReferenceDescription + struct ReferenceDescription { OpcUa::NodeId ReferenceTypeId; bool IsForward; @@ -1363,7 +1363,7 @@ namespace OpcUa /* DISABLED // The result of a browse operation. - struct BrowseResult + struct BrowseResult { OpcUa::StatusCode Status; OpcUa::ByteString ContinuationPoint; @@ -1373,7 +1373,7 @@ namespace OpcUa /* DISABLED - struct BrowseParameters + struct BrowseParameters { OpcUa::ViewDescription View; uint32_t RequestedMaxReferencesPerNode; @@ -1384,7 +1384,7 @@ namespace OpcUa /* DISABLED // Browse the references for one or more nodes from the server address space. - struct BrowseRequest + struct BrowseRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -1397,7 +1397,7 @@ namespace OpcUa /* DISABLED // Browse the references for one or more nodes from the server address space. - struct BrowseResponse + struct BrowseResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -1410,7 +1410,7 @@ namespace OpcUa /* DISABLED - struct BrowseNextParameters + struct BrowseNextParameters { bool ReleaseContinuationPoints; std::vector ContinuationPoints; @@ -1420,7 +1420,7 @@ namespace OpcUa /* DISABLED // Continues one or more browse operations. - struct BrowseNextRequest + struct BrowseNextRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -1432,7 +1432,7 @@ namespace OpcUa /* DISABLED - struct BrowseNextResult + struct BrowseNextResult { std::vector Results; std::vector DiagnosticInfos; @@ -1442,7 +1442,7 @@ namespace OpcUa /* DISABLED // Continues one or more browse operations. - struct BrowseNextResponse + struct BrowseNextResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -1455,7 +1455,7 @@ namespace OpcUa /* DISABLED // An element in a relative path. - struct RelativePathElement + struct RelativePathElement { OpcUa::NodeId ReferenceTypeId; bool IsInverse; @@ -1469,7 +1469,7 @@ namespace OpcUa /* DISABLED // A relative path constructed from reference types and browse names. - struct RelativePath + struct RelativePath { std::vector Elements; }; @@ -1478,7 +1478,7 @@ namespace OpcUa /* DISABLED // A request to translate a path into a node id. - struct BrowsePath + struct BrowsePath { OpcUa::NodeId StartingNode; OpcUa::RelativePath RelativePath; @@ -1488,7 +1488,7 @@ namespace OpcUa /* DISABLED // The target of the translated path. - struct BrowsePathTarget + struct BrowsePathTarget { OpcUa::ExpandedNodeId TargetId; uint32_t RemainingPathIndex; @@ -1498,7 +1498,7 @@ namespace OpcUa /* DISABLED // The result of a translate opearation. - struct BrowsePathResult + struct BrowsePathResult { OpcUa::StatusCode Status; std::vector Targets; @@ -1507,7 +1507,7 @@ namespace OpcUa /* DISABLED - struct TranslateBrowsePathsToNodeIdsParameters + struct TranslateBrowsePathsToNodeIdsParameters { std::vector BrowsePaths; }; @@ -1516,7 +1516,7 @@ namespace OpcUa /* DISABLED // Translates one or more paths in the server address space. - struct TranslateBrowsePathsToNodeIdsRequest + struct TranslateBrowsePathsToNodeIdsRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -1529,7 +1529,7 @@ namespace OpcUa /* DISABLED // Translates one or more paths in the server address space. - struct TranslateBrowsePathsToNodeIdsResponse + struct TranslateBrowsePathsToNodeIdsResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -1542,7 +1542,7 @@ namespace OpcUa /* DISABLED - struct RegisterNodesParameters + struct RegisterNodesParameters { std::vector NodesToRegister; }; @@ -1551,7 +1551,7 @@ namespace OpcUa /* DISABLED // Registers one or more nodes for repeated use within a session. - struct RegisterNodesRequest + struct RegisterNodesRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -1563,7 +1563,7 @@ namespace OpcUa /* DISABLED - struct RegisterNodesResult + struct RegisterNodesResult { std::vector RegisteredNodeIds; }; @@ -1572,7 +1572,7 @@ namespace OpcUa /* DISABLED // Registers one or more nodes for repeated use within a session. - struct RegisterNodesResponse + struct RegisterNodesResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -1584,7 +1584,7 @@ namespace OpcUa /* DISABLED - struct UnregisterNodesParameters + struct UnregisterNodesParameters { std::vector NodesToUnregister; }; @@ -1593,7 +1593,7 @@ namespace OpcUa /* DISABLED // Unregisters one or more previously registered nodes. - struct UnregisterNodesRequest + struct UnregisterNodesRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -1606,7 +1606,7 @@ namespace OpcUa /* DISABLED // Unregisters one or more previously registered nodes. - struct UnregisterNodesResponse + struct UnregisterNodesResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -1617,7 +1617,7 @@ namespace OpcUa /* DISABLED - struct EndpointConfiguration + struct EndpointConfiguration { int32_t OperationTimeout; bool UseBinaryEncoding; @@ -1633,7 +1633,7 @@ namespace OpcUa /* DISABLED - struct SupportedProfile + struct SupportedProfile { std::string OrganizationUri; std::string ProfileId; @@ -1646,7 +1646,7 @@ namespace OpcUa /* DISABLED - struct SoftwareCertificate + struct SoftwareCertificate { std::string ProductName; std::string ProductUri; @@ -1663,7 +1663,7 @@ namespace OpcUa /* DISABLED - struct QueryDataDescription + struct QueryDataDescription { OpcUa::RelativePath RelativePath; OpcUa::AttributeId AttributeId; @@ -1673,7 +1673,7 @@ namespace OpcUa /* DISABLED - struct NodeTypeDescription + struct NodeTypeDescription { OpcUa::ExpandedNodeId TypeDefinitionNode; bool IncludeSubTypes; @@ -1683,7 +1683,7 @@ namespace OpcUa /* DISABLED - struct QueryDataSet + struct QueryDataSet { OpcUa::ExpandedNodeId NodeId; OpcUa::ExpandedNodeId TypeDefinitionNode; @@ -1693,7 +1693,7 @@ namespace OpcUa /* DISABLED - struct NodeReference + struct NodeReference { OpcUa::NodeId NodeId; OpcUa::NodeId ReferenceTypeId; @@ -1704,7 +1704,7 @@ namespace OpcUa /* DISABLED - struct ContentFilterElement + struct ContentFilterElement { OpcUa::FilterOperator FilterOperator; std::vector FilterOperands; @@ -1713,7 +1713,7 @@ namespace OpcUa /* DISABLED - struct ContentFilter + struct ContentFilter { std::vector Elements; }; @@ -1721,7 +1721,7 @@ namespace OpcUa /* DISABLED - struct FilterOperand + struct FilterOperand { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1731,7 +1731,7 @@ namespace OpcUa /* DISABLED - struct ElementOperand + struct ElementOperand { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1742,7 +1742,7 @@ namespace OpcUa /* DISABLED - struct LiteralOperand + struct LiteralOperand { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1753,7 +1753,7 @@ namespace OpcUa /* DISABLED - struct AttributeOperand + struct AttributeOperand { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1768,7 +1768,7 @@ namespace OpcUa /* DISABLED - struct SimpleAttributeOperand + struct SimpleAttributeOperand { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1782,7 +1782,7 @@ namespace OpcUa /* DISABLED - struct ContentFilterElementResult + struct ContentFilterElementResult { OpcUa::StatusCode Status; std::vector OperandStatusCodes; @@ -1792,7 +1792,7 @@ namespace OpcUa /* DISABLED - struct ContentFilterResult + struct ContentFilterResult { std::vector ElementResults; std::vector ElementDiagnosticInfos; @@ -1801,7 +1801,7 @@ namespace OpcUa /* DISABLED - struct ParsingResult + struct ParsingResult { OpcUa::StatusCode Status; std::vector DataStatusCodes; @@ -1811,7 +1811,7 @@ namespace OpcUa /* DISABLED - struct QueryFirstParameters + struct QueryFirstParameters { OpcUa::ViewDescription View; std::vector NodeTypes; @@ -1823,7 +1823,7 @@ namespace OpcUa /* DISABLED - struct QueryFirstRequest + struct QueryFirstRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -1835,7 +1835,7 @@ namespace OpcUa /* DISABLED - struct QueryFirstResult + struct QueryFirstResult { std::vector QueryDataSets; OpcUa::ByteString ContinuationPoint; @@ -1847,7 +1847,7 @@ namespace OpcUa /* DISABLED - struct QueryFirstResponse + struct QueryFirstResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -1859,7 +1859,7 @@ namespace OpcUa /* DISABLED - struct QueryNextParameters + struct QueryNextParameters { bool ReleaseContinuationPoint; OpcUa::ByteString ContinuationPoint; @@ -1868,7 +1868,7 @@ namespace OpcUa /* DISABLED - struct QueryNextRequest + struct QueryNextRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -1880,7 +1880,7 @@ namespace OpcUa /* DISABLED - struct QueryNextResult + struct QueryNextResult { std::vector QueryDataSets; OpcUa::ByteString RevisedContinuationPoint; @@ -1889,7 +1889,7 @@ namespace OpcUa /* DISABLED - struct QueryNextResponse + struct QueryNextResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -1899,45 +1899,45 @@ namespace OpcUa }; */ - struct ReadValueId - { - OpcUa::NodeId NodeId; - OpcUa::AttributeId AttributeId; - std::string IndexRange; - OpcUa::QualifiedName DataEncoding; - }; +struct ReadValueId +{ + OpcUa::NodeId NodeId; + OpcUa::AttributeId AttributeId; + std::string IndexRange; + OpcUa::QualifiedName DataEncoding; +}; - struct ReadParameters - { - double MaxAge; - OpcUa::TimestampsToReturn TimestampsToReturn; - std::vector AttributesToRead; +struct ReadParameters +{ + double MaxAge; + OpcUa::TimestampsToReturn TimestampsToReturn; + std::vector AttributesToRead; - ReadParameters(); - }; + ReadParameters(); +}; - struct ReadRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - OpcUa::ReadParameters Parameters; +struct ReadRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + OpcUa::ReadParameters Parameters; - ReadRequest(); - }; + ReadRequest(); +}; - struct ReadResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - std::vector Results; - std::vector DiagnosticInfos; +struct ReadResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + std::vector Results; + std::vector DiagnosticInfos; - ReadResponse(); - }; + ReadResponse(); +}; /* DISABLED - struct HistoryReadValueId + struct HistoryReadValueId { OpcUa::NodeId NodeId; std::string IndexRange; @@ -1948,7 +1948,7 @@ namespace OpcUa /* DISABLED - struct HistoryReadResult + struct HistoryReadResult { OpcUa::StatusCode Status; OpcUa::ByteString ContinuationPoint; @@ -1958,7 +1958,7 @@ namespace OpcUa /* DISABLED - struct HistoryReadDetails + struct HistoryReadDetails { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1968,7 +1968,7 @@ namespace OpcUa /* DISABLED - struct ReadRawModifiedDetails + struct ReadRawModifiedDetails { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1983,7 +1983,7 @@ namespace OpcUa /* DISABLED - struct ReadAtTimeDetails + struct ReadAtTimeDetails { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -1995,7 +1995,7 @@ namespace OpcUa /* DISABLED - struct HistoryData + struct HistoryData { std::vector DataValues; }; @@ -2003,7 +2003,7 @@ namespace OpcUa /* DISABLED - struct ModificationInfo + struct ModificationInfo { OpcUa::DateTime ModificationTime; OpcUa::HistoryUpdateType UpdateType; @@ -2013,7 +2013,7 @@ namespace OpcUa /* DISABLED - struct HistoryModifiedData + struct HistoryModifiedData { std::vector DataValues; std::vector ModificationInfos; @@ -2022,7 +2022,7 @@ namespace OpcUa /* DISABLED - struct HistoryReadParameters + struct HistoryReadParameters { OpcUa::ExtensionObject HistoryReadDetails; OpcUa::TimestampsToReturn TimestampsToReturn; @@ -2033,7 +2033,7 @@ namespace OpcUa /* DISABLED - struct HistoryReadRequest + struct HistoryReadRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -2045,7 +2045,7 @@ namespace OpcUa /* DISABLED - struct HistoryReadResponse + struct HistoryReadResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -2056,41 +2056,41 @@ namespace OpcUa }; */ - struct WriteValue - { - OpcUa::NodeId NodeId; - OpcUa::AttributeId AttributeId; - std::string IndexRange; - OpcUa::DataValue Value; - }; +struct WriteValue +{ + OpcUa::NodeId NodeId; + OpcUa::AttributeId AttributeId; + std::string IndexRange; + OpcUa::DataValue Value; +}; - struct WriteParameters - { - std::vector NodesToWrite; - }; +struct WriteParameters +{ + std::vector NodesToWrite; +}; - struct WriteRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - OpcUa::WriteParameters Parameters; +struct WriteRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + OpcUa::WriteParameters Parameters; - WriteRequest(); - }; + WriteRequest(); +}; - struct WriteResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - std::vector Results; - std::vector DiagnosticInfos; +struct WriteResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + std::vector Results; + std::vector DiagnosticInfos; - WriteResponse(); - }; + WriteResponse(); +}; /* DISABLED - struct HistoryUpdateDetails + struct HistoryUpdateDetails { OpcUa::NodeId NodeId; }; @@ -2098,7 +2098,7 @@ namespace OpcUa /* DISABLED - struct UpdateDataDetails + struct UpdateDataDetails { OpcUa::NodeId NodeId; OpcUa::PerformUpdateType PerformInsertReplace; @@ -2108,7 +2108,7 @@ namespace OpcUa /* DISABLED - struct UpdateStructureDataDetails + struct UpdateStructureDataDetails { OpcUa::NodeId NodeId; OpcUa::PerformUpdateType PerformInsertReplace; @@ -2118,7 +2118,7 @@ namespace OpcUa /* DISABLED - struct DeleteRawModifiedDetails + struct DeleteRawModifiedDetails { OpcUa::NodeId NodeId; bool IsDeleteModified; @@ -2129,7 +2129,7 @@ namespace OpcUa /* DISABLED - struct DeleteAtTimeDetails + struct DeleteAtTimeDetails { OpcUa::NodeId NodeId; std::vector ReqTimes; @@ -2138,7 +2138,7 @@ namespace OpcUa /* DISABLED - struct DeleteEventDetails + struct DeleteEventDetails { OpcUa::NodeId NodeId; std::vector EventIds; @@ -2147,7 +2147,7 @@ namespace OpcUa /* DISABLED - struct HistoryUpdateResult + struct HistoryUpdateResult { OpcUa::StatusCode Status; std::vector OperationResults; @@ -2157,7 +2157,7 @@ namespace OpcUa /* DISABLED - struct HistoryUpdateParameters + struct HistoryUpdateParameters { std::vector HistoryUpdateDetails; }; @@ -2165,7 +2165,7 @@ namespace OpcUa /* DISABLED - struct HistoryUpdateRequest + struct HistoryUpdateRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -2177,7 +2177,7 @@ namespace OpcUa /* DISABLED - struct HistoryUpdateResponse + struct HistoryUpdateResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -2188,48 +2188,48 @@ namespace OpcUa }; */ - struct CallMethodRequest - { - OpcUa::NodeId ObjectId; - OpcUa::NodeId MethodId; - std::vector InputArguments; - }; +struct CallMethodRequest +{ + OpcUa::NodeId ObjectId; + OpcUa::NodeId MethodId; + std::vector InputArguments; +}; - struct CallMethodResult - { - OpcUa::StatusCode Status; - std::vector InputArgumentResults; - std::vector InputArgumentDiagnosticInfos; - std::vector OutputArguments; - }; +struct CallMethodResult +{ + OpcUa::StatusCode Status; + std::vector InputArgumentResults; + std::vector InputArgumentDiagnosticInfos; + std::vector OutputArguments; +}; - struct CallParameters - { - std::vector MethodsToCall; - }; +struct CallParameters +{ + std::vector MethodsToCall; +}; - struct CallRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - OpcUa::CallParameters Parameters; +struct CallRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + OpcUa::CallParameters Parameters; - CallRequest(); - }; + CallRequest(); +}; - struct CallResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - std::vector Results; - std::vector DiagnosticInfos; +struct CallResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + std::vector Results; + std::vector DiagnosticInfos; - CallResponse(); - }; + CallResponse(); +}; /* DISABLED - struct MonitoringFilter + struct MonitoringFilter { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -2239,7 +2239,7 @@ namespace OpcUa /* DISABLED - struct DataChangeFilter + struct DataChangeFilter { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -2252,7 +2252,7 @@ namespace OpcUa /* DISABLED - struct EventFilter + struct EventFilter { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -2264,7 +2264,7 @@ namespace OpcUa /* DISABLED - struct ReadEventDetails + struct ReadEventDetails { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -2278,7 +2278,7 @@ namespace OpcUa /* DISABLED - struct AggregateConfiguration + struct AggregateConfiguration { bool UseServerCapabilitiesDefaults; bool TreatUncertainAsBad; @@ -2290,7 +2290,7 @@ namespace OpcUa /* DISABLED - struct ReadProcessedDetails + struct ReadProcessedDetails { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -2305,7 +2305,7 @@ namespace OpcUa /* DISABLED - struct AggregateFilter + struct AggregateFilter { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -2319,7 +2319,7 @@ namespace OpcUa /* DISABLED - struct MonitoringFilterResult + struct MonitoringFilterResult { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -2329,7 +2329,7 @@ namespace OpcUa /* DISABLED - struct EventFilterResult + struct EventFilterResult { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -2342,7 +2342,7 @@ namespace OpcUa /* DISABLED - struct HistoryUpdateEventResult + struct HistoryUpdateEventResult { OpcUa::StatusCode Status; OpcUa::EventFilterResult EventFilterResult; @@ -2351,7 +2351,7 @@ namespace OpcUa /* DISABLED - struct AggregateFilterResult + struct AggregateFilterResult { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -2362,60 +2362,60 @@ namespace OpcUa }; */ - struct MonitoringParameters - { - uint32_t ClientHandle; - double SamplingInterval; - OpcUa::MonitoringFilter Filter; - uint32_t QueueSize; - bool DiscardOldest; - }; - - struct MonitoredItemCreateRequest - { - OpcUa::ReadValueId ItemToMonitor; - OpcUa::MonitoringMode MonitoringMode; - OpcUa::MonitoringParameters RequestedParameters; - }; - - struct MonitoredItemCreateResult - { - OpcUa::StatusCode Status; - uint32_t MonitoredItemId; - double RevisedSamplingInterval; - uint32_t RevisedQueueSize; - OpcUa::MonitoringFilter FilterResult; - }; +struct MonitoringParameters +{ + uint32_t ClientHandle; + double SamplingInterval; + OpcUa::MonitoringFilter Filter; + uint32_t QueueSize; + bool DiscardOldest; +}; + +struct MonitoredItemCreateRequest +{ + OpcUa::ReadValueId ItemToMonitor; + OpcUa::MonitoringMode MonitoringMode; + OpcUa::MonitoringParameters RequestedParameters; +}; - struct MonitoredItemsParameters - { - uint32_t SubscriptionId; - OpcUa::TimestampsToReturn TimestampsToReturn; - std::vector ItemsToCreate; - }; +struct MonitoredItemCreateResult +{ + OpcUa::StatusCode Status; + uint32_t MonitoredItemId; + double RevisedSamplingInterval; + uint32_t RevisedQueueSize; + OpcUa::MonitoringFilter FilterResult; +}; + +struct MonitoredItemsParameters +{ + uint32_t SubscriptionId; + OpcUa::TimestampsToReturn TimestampsToReturn; + std::vector ItemsToCreate; +}; - struct CreateMonitoredItemsRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - OpcUa::MonitoredItemsParameters Parameters; +struct CreateMonitoredItemsRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + OpcUa::MonitoredItemsParameters Parameters; - CreateMonitoredItemsRequest(); - }; + CreateMonitoredItemsRequest(); +}; - struct CreateMonitoredItemsResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - std::vector Results; - std::vector DiagnosticInfos; +struct CreateMonitoredItemsResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + std::vector Results; + std::vector DiagnosticInfos; - CreateMonitoredItemsResponse(); - }; + CreateMonitoredItemsResponse(); +}; /* DISABLED - struct MonitoredItemModifyRequest + struct MonitoredItemModifyRequest { uint32_t MonitoredItemId; OpcUa::MonitoringParameters RequestedParameters; @@ -2424,7 +2424,7 @@ namespace OpcUa /* DISABLED - struct MonitoredItemModifyResult + struct MonitoredItemModifyResult { OpcUa::StatusCode Status; double RevisedSamplingInterval; @@ -2435,7 +2435,7 @@ namespace OpcUa /* DISABLED - struct ModifyMonitoredItemsParameters + struct ModifyMonitoredItemsParameters { uint32_t SubscriptionId; OpcUa::TimestampsToReturn TimestampsToReturn; @@ -2445,7 +2445,7 @@ namespace OpcUa /* DISABLED - struct ModifyMonitoredItemsRequest + struct ModifyMonitoredItemsRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -2457,7 +2457,7 @@ namespace OpcUa /* DISABLED - struct ModifyMonitoredItemsResponse + struct ModifyMonitoredItemsResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -2470,7 +2470,7 @@ namespace OpcUa /* DISABLED - struct SetMonitoringModeParameters + struct SetMonitoringModeParameters { uint32_t SubscriptionId; OpcUa::MonitoringMode MonitoringMode; @@ -2480,7 +2480,7 @@ namespace OpcUa /* DISABLED - struct SetMonitoringModeRequest + struct SetMonitoringModeRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -2492,7 +2492,7 @@ namespace OpcUa /* DISABLED - struct SetMonitoringModeResult + struct SetMonitoringModeResult { std::vector Results; std::vector DiagnosticInfos; @@ -2501,7 +2501,7 @@ namespace OpcUa /* DISABLED - struct SetMonitoringModeResponse + struct SetMonitoringModeResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -2513,7 +2513,7 @@ namespace OpcUa /* DISABLED - struct SetTriggeringParameters + struct SetTriggeringParameters { uint32_t SubscriptionId; uint32_t TriggeringItemId; @@ -2524,7 +2524,7 @@ namespace OpcUa /* DISABLED - struct SetTriggeringRequest + struct SetTriggeringRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -2536,7 +2536,7 @@ namespace OpcUa /* DISABLED - struct SetTriggeringResult + struct SetTriggeringResult { std::vector AddResults; std::vector AddDiagnosticInfos; @@ -2547,7 +2547,7 @@ namespace OpcUa /* DISABLED - struct SetTriggeringResponse + struct SetTriggeringResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -2557,148 +2557,148 @@ namespace OpcUa }; */ - struct DeleteMonitoredItemsParameters - { - uint32_t SubscriptionId; - std::vector MonitoredItemIds; - }; +struct DeleteMonitoredItemsParameters +{ + uint32_t SubscriptionId; + std::vector MonitoredItemIds; +}; - struct DeleteMonitoredItemsRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - OpcUa::DeleteMonitoredItemsParameters Parameters; +struct DeleteMonitoredItemsRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + OpcUa::DeleteMonitoredItemsParameters Parameters; - DeleteMonitoredItemsRequest(); - }; + DeleteMonitoredItemsRequest(); +}; - struct DeleteMonitoredItemsResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - std::vector Results; - std::vector DiagnosticInfos; +struct DeleteMonitoredItemsResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + std::vector Results; + std::vector DiagnosticInfos; - DeleteMonitoredItemsResponse(); - }; + DeleteMonitoredItemsResponse(); +}; - struct CreateSubscriptionParameters - { - double RequestedPublishingInterval; - uint32_t RequestedLifetimeCount; - uint32_t RequestedMaxKeepAliveCount; - uint32_t MaxNotificationsPerPublish; - bool PublishingEnabled; - uint8_t Priority; +struct CreateSubscriptionParameters +{ + double RequestedPublishingInterval; + uint32_t RequestedLifetimeCount; + uint32_t RequestedMaxKeepAliveCount; + uint32_t MaxNotificationsPerPublish; + bool PublishingEnabled; + uint8_t Priority; - CreateSubscriptionParameters(); - }; + CreateSubscriptionParameters(); +}; - struct CreateSubscriptionRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - OpcUa::CreateSubscriptionParameters Parameters; - - CreateSubscriptionRequest(); - }; +struct CreateSubscriptionRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + OpcUa::CreateSubscriptionParameters Parameters; - struct SubscriptionData - { - uint32_t SubscriptionId; - double RevisedPublishingInterval; - uint32_t RevisedLifetimeCount; - uint32_t RevisedMaxKeepAliveCount; + CreateSubscriptionRequest(); +}; - SubscriptionData(); - }; +struct SubscriptionData +{ + uint32_t SubscriptionId; + double RevisedPublishingInterval; + uint32_t RevisedLifetimeCount; + uint32_t RevisedMaxKeepAliveCount; - struct CreateSubscriptionResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - OpcUa::SubscriptionData Data; + SubscriptionData(); +}; - CreateSubscriptionResponse(); - }; +struct CreateSubscriptionResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + OpcUa::SubscriptionData Data; - struct ModifySubscriptionParameters - { - uint32_t SubscriptionId; - double RequestedPublishingInterval; - uint32_t RequestedLifetimeCount; - uint32_t RequestedMaxKeepAliveCount; - uint32_t MaxNotificationsPerPublish; - uint8_t Priority; - }; + CreateSubscriptionResponse(); +}; - struct ModifySubscriptionRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - OpcUa::ModifySubscriptionParameters Parameters; +struct ModifySubscriptionParameters +{ + uint32_t SubscriptionId; + double RequestedPublishingInterval; + uint32_t RequestedLifetimeCount; + uint32_t RequestedMaxKeepAliveCount; + uint32_t MaxNotificationsPerPublish; + uint8_t Priority; +}; + +struct ModifySubscriptionRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + OpcUa::ModifySubscriptionParameters Parameters; - ModifySubscriptionRequest(); - }; + ModifySubscriptionRequest(); +}; - struct ModifySubscriptionResult - { - double RevisedPublishingInterval; - uint32_t RevisedLifetimeCount; - uint32_t RevisedMaxKeepAliveCount; - }; +struct ModifySubscriptionResult +{ + double RevisedPublishingInterval; + uint32_t RevisedLifetimeCount; + uint32_t RevisedMaxKeepAliveCount; +}; - struct ModifySubscriptionResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - OpcUa::ModifySubscriptionResult Parameters; +struct ModifySubscriptionResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + OpcUa::ModifySubscriptionResult Parameters; - ModifySubscriptionResponse(); - }; + ModifySubscriptionResponse(); +}; - struct PublishingModeParameters - { - bool PublishingEnabled; - std::vector SubscriptionIds; - }; +struct PublishingModeParameters +{ + bool PublishingEnabled; + std::vector SubscriptionIds; +}; - struct SetPublishingModeRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - OpcUa::PublishingModeParameters Parameters; +struct SetPublishingModeRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + OpcUa::PublishingModeParameters Parameters; - SetPublishingModeRequest(); - }; + SetPublishingModeRequest(); +}; - struct PublishingModeResult - { - std::vector Results; - std::vector DiagnosticInfos; - }; +struct PublishingModeResult +{ + std::vector Results; + std::vector DiagnosticInfos; +}; - struct SetPublishingModeResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - OpcUa::PublishingModeResult Result; +struct SetPublishingModeResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + OpcUa::PublishingModeResult Result; - SetPublishingModeResponse(); - }; + SetPublishingModeResponse(); +}; - struct NotificationMessage - { - uint32_t SequenceNumber; - OpcUa::DateTime PublishTime; - std::vector NotificationData; +struct NotificationMessage +{ + uint32_t SequenceNumber; + OpcUa::DateTime PublishTime; + std::vector NotificationData; - NotificationMessage(); - }; + NotificationMessage(); +}; /* DISABLED - struct NotificationData + struct NotificationData { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -2708,7 +2708,7 @@ namespace OpcUa /* DISABLED - struct MonitoredItemNotification + struct MonitoredItemNotification { uint32_t ClientHandle; OpcUa::DataValue Value; @@ -2717,7 +2717,7 @@ namespace OpcUa /* DISABLED - struct DataChangeNotification + struct DataChangeNotification { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -2729,7 +2729,7 @@ namespace OpcUa /* DISABLED - struct EventFieldList + struct EventFieldList { uint32_t ClientHandle; std::vector EventFields; @@ -2738,7 +2738,7 @@ namespace OpcUa /* DISABLED - struct EventNotificationList + struct EventNotificationList { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -2749,7 +2749,7 @@ namespace OpcUa /* DISABLED - struct HistoryEventFieldList + struct HistoryEventFieldList { std::vector EventFields; }; @@ -2757,7 +2757,7 @@ namespace OpcUa /* DISABLED - struct HistoryEvent + struct HistoryEvent { std::vector Events; }; @@ -2765,7 +2765,7 @@ namespace OpcUa /* DISABLED - struct UpdateEventDetails + struct UpdateEventDetails { OpcUa::NodeId NodeId; OpcUa::PerformUpdateType PerformInsertReplace; @@ -2776,7 +2776,7 @@ namespace OpcUa /* DISABLED - struct StatusChangeNotification + struct StatusChangeNotification { OpcUa::NodeId TypeId; uint8_t Encoding; @@ -2786,69 +2786,69 @@ namespace OpcUa }; */ - struct SubscriptionAcknowledgement - { - uint32_t SubscriptionId; - uint32_t SequenceNumber; - }; +struct SubscriptionAcknowledgement +{ + uint32_t SubscriptionId; + uint32_t SequenceNumber; +}; - struct PublishRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - std::vector SubscriptionAcknowledgements; +struct PublishRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + std::vector SubscriptionAcknowledgements; - PublishRequest(); - }; + PublishRequest(); +}; - struct PublishResult - { - uint32_t SubscriptionId; - std::vector AvailableSequenceNumbers; - bool MoreNotifications; - OpcUa::NotificationMessage NotificationMessage; - std::vector Results; - std::vector DiagnosticInfos; +struct PublishResult +{ + uint32_t SubscriptionId; + std::vector AvailableSequenceNumbers; + bool MoreNotifications; + OpcUa::NotificationMessage NotificationMessage; + std::vector Results; + std::vector DiagnosticInfos; - PublishResult(); - }; + PublishResult(); +}; - struct PublishResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - OpcUa::PublishResult Parameters; +struct PublishResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + OpcUa::PublishResult Parameters; - PublishResponse(); - }; + PublishResponse(); +}; - struct RepublishParameters - { - uint32_t SubscriptionId; - uint32_t RetransmitSequenceNumber; - }; +struct RepublishParameters +{ + uint32_t SubscriptionId; + uint32_t RetransmitSequenceNumber; +}; - struct RepublishRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - OpcUa::RepublishParameters Parameters; +struct RepublishRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + OpcUa::RepublishParameters Parameters; - RepublishRequest(); - }; + RepublishRequest(); +}; - struct RepublishResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - OpcUa::NotificationMessage NotificationMessage; +struct RepublishResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + OpcUa::NotificationMessage NotificationMessage; - RepublishResponse(); - }; + RepublishResponse(); +}; /* DISABLED - struct TransferResult + struct TransferResult { OpcUa::StatusCode Status; std::vector AvailableSequenceNumbers; @@ -2857,7 +2857,7 @@ namespace OpcUa /* DISABLED - struct TransferSubscriptionsParameters + struct TransferSubscriptionsParameters { std::vector SubscriptionIds; bool SendInitialValues; @@ -2866,7 +2866,7 @@ namespace OpcUa /* DISABLED - struct TransferSubscriptionsRequest + struct TransferSubscriptionsRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -2878,7 +2878,7 @@ namespace OpcUa /* DISABLED - struct TransferSubscriptionsResult + struct TransferSubscriptionsResult { std::vector Results; std::vector DiagnosticInfos; @@ -2887,7 +2887,7 @@ namespace OpcUa /* DISABLED - struct TransferSubscriptionsResponse + struct TransferSubscriptionsResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -2897,29 +2897,29 @@ namespace OpcUa }; */ - struct DeleteSubscriptionsRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - std::vector SubscriptionIds; +struct DeleteSubscriptionsRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + std::vector SubscriptionIds; - DeleteSubscriptionsRequest(); - }; + DeleteSubscriptionsRequest(); +}; - struct DeleteSubscriptionsResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - std::vector Results; - std::vector DiagnosticInfos; +struct DeleteSubscriptionsResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + std::vector Results; + std::vector DiagnosticInfos; - DeleteSubscriptionsResponse(); - }; + DeleteSubscriptionsResponse(); +}; /* DISABLED // A complex type containing all possible scalar types used for testing. - struct ScalarTestType + struct ScalarTestType { bool Boolean; uint8_t SByte; @@ -2952,7 +2952,7 @@ namespace OpcUa /* DISABLED // A complex type containing all possible array types used for testing. - struct ArrayTestType + struct ArrayTestType { std::vector Booleans; std::vector SBytes; @@ -2984,7 +2984,7 @@ namespace OpcUa /* DISABLED - struct CompositeTestType + struct CompositeTestType { OpcUa::ScalarTestType Field1; OpcUa::ArrayTestType Field2; @@ -2993,7 +2993,7 @@ namespace OpcUa /* DISABLED - struct TestStackParameters + struct TestStackParameters { uint32_t TestId; int32_t Iteration; @@ -3003,7 +3003,7 @@ namespace OpcUa /* DISABLED - struct TestStackRequest + struct TestStackRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -3015,7 +3015,7 @@ namespace OpcUa /* DISABLED - struct TestStackResult + struct TestStackResult { OpcUa::Variant Output; }; @@ -3023,7 +3023,7 @@ namespace OpcUa /* DISABLED - struct TestStackResponse + struct TestStackResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -3035,7 +3035,7 @@ namespace OpcUa /* DISABLED - struct TestStackExParameters + struct TestStackExParameters { uint32_t TestId; int32_t Iteration; @@ -3045,7 +3045,7 @@ namespace OpcUa /* DISABLED - struct TestStackExRequest + struct TestStackExRequest { OpcUa::NodeId TypeId; OpcUa::RequestHeader Header; @@ -3057,7 +3057,7 @@ namespace OpcUa /* DISABLED - struct TestStackExResult + struct TestStackExResult { OpcUa::CompositeTestType Output; }; @@ -3065,7 +3065,7 @@ namespace OpcUa /* DISABLED - struct TestStackExResponse + struct TestStackExResponse { OpcUa::NodeId TypeId; OpcUa::ResponseHeader Header; @@ -3077,7 +3077,7 @@ namespace OpcUa /* DISABLED - struct BuildInfo + struct BuildInfo { std::string ProductUri; std::string ManufacturerName; @@ -3090,7 +3090,7 @@ namespace OpcUa /* DISABLED - struct RedundantServerDataType + struct RedundantServerDataType { std::string ServerId; uint8_t ServiceLevel; @@ -3100,7 +3100,7 @@ namespace OpcUa /* DISABLED - struct EndpointUrlListDataType + struct EndpointUrlListDataType { std::vector EndpointUrlList; }; @@ -3108,7 +3108,7 @@ namespace OpcUa /* DISABLED - struct NetworkGroupDataType + struct NetworkGroupDataType { std::string ServerUri; std::vector NetworkPaths; @@ -3117,7 +3117,7 @@ namespace OpcUa /* DISABLED - struct SamplingIntervalDiagnosticsDataType + struct SamplingIntervalDiagnosticsDataType { double SamplingInterval; uint32_t MonitoredItemCount; @@ -3128,7 +3128,7 @@ namespace OpcUa /* DISABLED - struct ServerDiagnosticsSummaryDataType + struct ServerDiagnosticsSummaryDataType { uint32_t ServerViewCount; uint32_t CurrentSessionCount; @@ -3147,7 +3147,7 @@ namespace OpcUa /* DISABLED - struct ServerStatusDataType + struct ServerStatusDataType { OpcUa::DateTime StartTime; OpcUa::DateTime CurrentTime; @@ -3160,7 +3160,7 @@ namespace OpcUa /* DISABLED - struct SessionSecurityDiagnosticsDataType + struct SessionSecurityDiagnosticsDataType { OpcUa::NodeId SessionId; std::string ClientUserIdOfSession; @@ -3176,7 +3176,7 @@ namespace OpcUa /* DISABLED - struct ServiceCounterDataType + struct ServiceCounterDataType { uint32_t TotalCount; uint32_t ErrorCount; @@ -3185,7 +3185,7 @@ namespace OpcUa /* DISABLED - struct SessionDiagnosticsDataType + struct SessionDiagnosticsDataType { OpcUa::NodeId SessionId; std::string SessionName; @@ -3235,7 +3235,7 @@ namespace OpcUa /* DISABLED - struct StatusResult + struct StatusResult { OpcUa::StatusCode Status; OpcUa::DiagnosticInfo DiagnosticInfo; @@ -3244,7 +3244,7 @@ namespace OpcUa /* DISABLED - struct SubscriptionDiagnosticsDataType + struct SubscriptionDiagnosticsDataType { OpcUa::NodeId SessionId; uint32_t SubscriptionId; @@ -3282,7 +3282,7 @@ namespace OpcUa /* DISABLED - struct ModelChangeStructureDataType + struct ModelChangeStructureDataType { OpcUa::NodeId Affected; OpcUa::NodeId AffectedType; @@ -3292,7 +3292,7 @@ namespace OpcUa /* DISABLED - struct SemanticChangeStructureDataType + struct SemanticChangeStructureDataType { OpcUa::NodeId Affected; OpcUa::NodeId AffectedType; @@ -3301,7 +3301,7 @@ namespace OpcUa /* DISABLED - struct Range + struct Range { double Low; double High; @@ -3310,7 +3310,7 @@ namespace OpcUa /* DISABLED - struct EUInformation + struct EUInformation { std::string NamespaceUri; int32_t UnitId; @@ -3321,7 +3321,7 @@ namespace OpcUa /* DISABLED - struct ComplexNumberType + struct ComplexNumberType { float Real; float Imaginary; @@ -3330,7 +3330,7 @@ namespace OpcUa /* DISABLED - struct DoubleComplexNumberType + struct DoubleComplexNumberType { double Real; double Imaginary; @@ -3339,7 +3339,7 @@ namespace OpcUa /* DISABLED - struct AxisInformation + struct AxisInformation { OpcUa::EUInformation EngineeringUnits; OpcUa::Range EURange; @@ -3351,7 +3351,7 @@ namespace OpcUa /* DISABLED - struct XVType + struct XVType { double X; float Value; @@ -3360,7 +3360,7 @@ namespace OpcUa /* DISABLED - struct ProgramDiagnosticDataType + struct ProgramDiagnosticDataType { OpcUa::NodeId CreateSessionId; std::string CreateClientName; @@ -3375,12 +3375,12 @@ namespace OpcUa }; */ - struct Annotation - { - std::string Message; - std::string UserName; - OpcUa::DateTime AnnotationTime; - }; +struct Annotation +{ + std::string Message; + std::string UserName; + OpcUa::DateTime AnnotationTime; +}; } // namespace - + diff --git a/include/opc/ua/protocol/reference_ids.h b/include/opc/ua/protocol/reference_ids.h index f99c4475..d9d66b8b 100644 --- a/include/opc/ua/protocol/reference_ids.h +++ b/include/opc/ua/protocol/reference_ids.h @@ -16,41 +16,41 @@ namespace OpcUa { - enum class ReferenceId : uint32_t - { - References = 31, - NonHierarchicalReferences = 32, - HierarchicalReferences = 33, - HasChild = 34, - Organizes = 35, - HasEventSource = 36, - HasModellingRule = 37, - HasEncoding = 38, - HasDescription = 39, - HasTypeDefinition = 40, - GeneratesEvent = 41, - Aggregates = 44, - HasSubtype = 45, - HasProperty = 46, - HasComponent = 47, - HasNotifier = 48, - HasOrderedComponent = 49, - HasModelParent = 50, - FromState = 51, - ToState = 52, - HasCause = 53, - HasEffect = 54, - HasHistoricalConfiguration = 56, - HasHistoricalEventConfiguration = 57, - HasSubStateMachine = 117, - HasEventHistory = 118, - AlwaysGeneratesEvent = 3065, - HasTrueSubState = 9004, - HasFalseSubState = 9005, - HasCondition = 9006, +enum class ReferenceId : uint32_t +{ + References = 31, + NonHierarchicalReferences = 32, + HierarchicalReferences = 33, + HasChild = 34, + Organizes = 35, + HasEventSource = 36, + HasModellingRule = 37, + HasEncoding = 38, + HasDescription = 39, + HasTypeDefinition = 40, + GeneratesEvent = 41, + Aggregates = 44, + HasSubtype = 45, + HasProperty = 46, + HasComponent = 47, + HasNotifier = 48, + HasOrderedComponent = 49, + HasModelParent = 50, + FromState = 51, + ToState = 52, + HasCause = 53, + HasEffect = 54, + HasHistoricalConfiguration = 56, + HasHistoricalEventConfiguration = 57, + HasSubStateMachine = 117, + HasEventHistory = 118, + AlwaysGeneratesEvent = 3065, + HasTrueSubState = 9004, + HasFalseSubState = 9005, + HasCondition = 9006, - Unknown = ~uint32_t() - }; + Unknown = ~uint32_t() +}; } // namespace OpcUa #endif // opc_ua_referencie_ids_h diff --git a/include/opc/ua/protocol/secure_channel.h b/include/opc/ua/protocol/secure_channel.h index c391aea3..fae5cec6 100644 --- a/include/opc/ua/protocol/secure_channel.h +++ b/include/opc/ua/protocol/secure_channel.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -15,77 +15,77 @@ namespace OpcUa { - // OpenSecureChannel - // os << SecureHeader - // << AssymmetricAlgoripthmHeader - // << SequenceHeader - // << NodeId << ExpandedNodeId // if present - // << RequestHeader - // << OpenSecureChannel - - struct OpenSecureChannelParameters - { - uint32_t ClientProtocolVersion; - SecurityTokenRequestType RequestType; - MessageSecurityMode SecurityMode; - std::vector ClientNonce; - uint32_t RequestLifeTime; +// OpenSecureChannel +// os << SecureHeader +// << AssymmetricAlgoripthmHeader +// << SequenceHeader +// << NodeId << ExpandedNodeId // if present +// << RequestHeader +// << OpenSecureChannel + +struct OpenSecureChannelParameters +{ + uint32_t ClientProtocolVersion; + SecurityTokenRequestType RequestType; + MessageSecurityMode SecurityMode; + std::vector ClientNonce; + uint32_t RequestLifeTime; - OpenSecureChannelParameters(); - }; + OpenSecureChannelParameters(); +}; - struct OpenSecureChannelRequest - { - ExpandedNodeId TypeId; - RequestHeader Header; - OpenSecureChannelParameters Parameters; - - OpenSecureChannelRequest(); - }; - - - // OpenSecureChannelResponse - // is >> SecureHeader - // >> AsymmetricAlgorithmHeader - // >> SequenceHeader - // >> ResponseHeader - // >> GetEndpointsResponse - - struct SecurityToken - { - uint32_t SecureChannelId; - uint32_t TokenId; - DateTime CreatedAt; - int32_t RevisedLifetime; - - SecurityToken() - : SecureChannelId(0) - , TokenId(0) - , CreatedAt(0) - , RevisedLifetime(0) - { - } - }; - - struct OpenSecureChannelResponse - { - NodeId TypeId; - ResponseHeader Header; +struct OpenSecureChannelRequest +{ + ExpandedNodeId TypeId; + RequestHeader Header; + OpenSecureChannelParameters Parameters; + + OpenSecureChannelRequest(); +}; - uint32_t ServerProtocolVersion; - SecurityToken ChannelSecurityToken; - std::vector ServerNonce; - OpenSecureChannelResponse(); - }; +// OpenSecureChannelResponse +// is >> SecureHeader +// >> AsymmetricAlgorithmHeader +// >> SequenceHeader +// >> ResponseHeader +// >> GetEndpointsResponse - struct CloseSecureChannelRequest +struct SecurityToken +{ + uint32_t SecureChannelId; + uint32_t TokenId; + DateTime CreatedAt; + int32_t RevisedLifetime; + + SecurityToken() + : SecureChannelId(0) + , TokenId(0) + , CreatedAt(0) + , RevisedLifetime(0) { - NodeId TypeId; - RequestHeader Header; + } +}; + +struct OpenSecureChannelResponse +{ + NodeId TypeId; + ResponseHeader Header; + + uint32_t ServerProtocolVersion; + SecurityToken ChannelSecurityToken; + std::vector ServerNonce; + + OpenSecureChannelResponse(); +}; + +struct CloseSecureChannelRequest +{ + NodeId TypeId; + RequestHeader Header; - CloseSecureChannelRequest(); - }; + CloseSecureChannelRequest(); +}; } // namespace OpcUa diff --git a/include/opc/ua/protocol/session.h b/include/opc/ua/protocol/session.h index dbd5662f..53f863b5 100644 --- a/include/opc/ua/protocol/session.h +++ b/include/opc/ua/protocol/session.h @@ -16,38 +16,38 @@ namespace OpcUa { - //------------------------------------------------- - // CloseSessionRequest - //------------------------------------------------- +//------------------------------------------------- +// CloseSessionRequest +//------------------------------------------------- - struct CloseSessionRequest - { - NodeId TypeId; - RequestHeader Header; +struct CloseSessionRequest +{ + NodeId TypeId; + RequestHeader Header; + + bool DeleteSubscriptions; - bool DeleteSubscriptions; + CloseSessionRequest(); +}; - CloseSessionRequest(); - }; +struct CloseSessionResponse +{ + NodeId TypeId; + ResponseHeader Header; - struct CloseSessionResponse - { - NodeId TypeId; - ResponseHeader Header; + CloseSessionResponse(); +}; - CloseSessionResponse(); - }; +ExpandedNodeId GenerateSessionId(); - ExpandedNodeId GenerateSessionId(); +struct ServiceFaultResponse +{ + NodeId TypeId; + ResponseHeader Header; - struct ServiceFaultResponse - { - NodeId TypeId; - ResponseHeader Header; + ServiceFaultResponse(); +}; - ServiceFaultResponse(); - }; - } // namespace OpcUa diff --git a/include/opc/ua/protocol/status_codes.h b/include/opc/ua/protocol/status_codes.h index 20d42bbc..88c23d4a 100644 --- a/include/opc/ua/protocol/status_codes.h +++ b/include/opc/ua/protocol/status_codes.h @@ -9,229 +9,229 @@ namespace OpcUa { - enum class StatusCode : uint32_t - { - Good = 0, - BadUnexpectedError = 0x80010000, - BadInternalError = 0x80020000, - BadOutOfMemory = 0x80030000, - BadResourceUnavailable = 0x80040000, - BadCommunicationError = 0x80050000, - BadEncodingError = 0x80060000, - BadDecodingError = 0x80070000, - BadEncodingLimitsExceeded = 0x80080000, - BadRequestTooLarge = 0x80B80000, - BadResponseTooLarge = 0x80B90000, - BadUnknownResponse = 0x80090000, - BadTimeout = 0x800A0000, - BadServiceUnsupported = 0x800B0000, - BadShutdown = 0x800C0000, - BadServerNotConnected = 0x800D0000, - BadServerHalted = 0x800E0000, - BadNothingToDo = 0x800F0000, - BadTooManyOperations = 0x80100000, - BadTooManyMonitoredItems = 0x80DB0000, - BadDataTypeIdUnknown = 0x80110000, - BadCertificateInvalid = 0x80120000, - BadSecurityChecksFailed = 0x80130000, - BadCertificateTimeInvalid = 0x80140000, - BadCertificateIssuerTimeInvalid = 0x80150000, - BadCertificateHostNameInvalid = 0x80160000, - BadCertificateUriInvalid = 0x80170000, - BadCertificateUseNotAllowed = 0x80180000, - BadCertificateIssuerUseNotAllowed = 0x80190000, - BadCertificateUntrusted = 0x801A0000, - BadCertificateRevocationUnknown = 0x801B0000, - BadCertificateIssuerRevocationUnknown = 0x801C0000, - BadCertificateRevoked = 0x801D0000, - BadCertificateIssuerRevoked = 0x801E0000, - BadUserAccessDenied = 0x801F0000, - BadIdentityTokenInvalid = 0x80200000, - BadIdentityTokenRejected = 0x80210000, - BadSecureChannelIdInvalid = 0x80220000, - BadInvalidTimestamp = 0x80230000, - BadNonceInvalid = 0x80240000, - BadSessionIdInvalid = 0x80250000, - BadSessionClosed = 0x80260000, - BadSessionNotActivated = 0x80270000, - BadSubscriptionIdInvalid = 0x80280000, - BadRequestHeaderInvalid = 0x802A0000, - BadTimestampsToReturnInvalid = 0x802B0000, - BadRequestCancelledByClient = 0x802C0000, - GoodSubscriptionTransferred = 0x002D0000, - GoodCompletesAsynchronously = 0x002E0000, - GoodOverload = 0x002F0000, - GoodClamped = 0x00300000, - BadNoCommunication = 0x80310000, - BadWaitingForInitialData = 0x80320000, - BadNodeIdInvalid = 0x80330000, - BadNodeIdUnknown = 0x80340000, - BadAttributeIdInvalid = 0x80350000, - BadIndexRangeInvalid = 0x80360000, - BadIndexRangeNoData = 0x80370000, - BadDataEncodingInvalid = 0x80380000, - BadDataEncodingUnsupported = 0x80390000, - BadNotReadable = 0x803A0000, - BadNotWritable = 0x803B0000, - BadOutOfRange = 0x803C0000, - BadNotSupported = 0x803D0000, - BadNotFound = 0x803E0000, - BadObjectDeleted = 0x803F0000, - BadNotImplemented = 0x80400000, - BadMonitoringModeInvalid = 0x80410000, - BadMonitoredItemIdInvalid = 0x80420000, - BadMonitoredItemFilterInvalid = 0x80430000, - BadMonitoredItemFilterUnsupported = 0x80440000, - BadFilterNotAllowed = 0x80450000, - BadStructureMissing = 0x80460000, - BadEventFilterInvalid = 0x80470000, - BadContentFilterInvalid = 0x80480000, - BadFilterOperatorInvalid = 0x80C10000, - BadFilterOperatorUnsupported = 0x80C20000, - BadFilterOperandCountMismatch = 0x80C30000, - BadFilterOperandInvalid = 0x80490000, - BadFilterElementInvalid = 0x80C40000, - BadFilterLiteralInvalid = 0x80C50000, - BadContinuationPointInvalid = 0x804A0000, - BadNoContinuationPoints = 0x804B0000, - BadReferenceTypeIdInvalid = 0x804C0000, - BadBrowseDirectionInvalid = 0x804D0000, - BadNodeNotInView = 0x804E0000, - BadServerUriInvalid = 0x804F0000, - BadServerNameMissing = 0x80500000, - BadDiscoveryUrlMissing = 0x80510000, - BadSempahoreFileMissing = 0x80520000, - BadRequestTypeInvalid = 0x80530000, - BadSecurityModeRejected = 0x80540000, - BadSecurityPolicyRejected = 0x80550000, - BadTooManySessions = 0x80560000, - BadUserSignatureInvalid = 0x80570000, - BadApplicationSignatureInvalid = 0x80580000, - BadNoValidCertificates = 0x80590000, - BadIdentityChangeNotSupported = 0x80C60000, - BadRequestCancelledByRequest = 0x805A0000, - BadParentNodeIdInvalid = 0x805B0000, - BadReferenceNotAllowed = 0x805C0000, - BadNodeIdRejected = 0x805D0000, - BadNodeIdExists = 0x805E0000, - BadNodeClassInvalid = 0x805F0000, - BadBrowseNameInvalid = 0x80600000, - BadBrowseNameDuplicated = 0x80610000, - BadNodeAttributesInvalid = 0x80620000, - BadTypeDefinitionInvalid = 0x80630000, - BadSourceNodeIdInvalid = 0x80640000, - BadTargetNodeIdInvalid = 0x80650000, - BadDuplicateReferenceNotAllowed = 0x80660000, - BadInvalidSelfReference = 0x80670000, - BadReferenceLocalOnly = 0x80680000, - BadNoDeleteRights = 0x80690000, - UncertainReferenceNotDeleted = 0x40BC0000, - BadServerIndexInvalid = 0x806A0000, - BadViewIdUnknown = 0x806B0000, - BadViewTimestampInvalid = 0x80C90000, - BadViewParameterMismatch = 0x80CA0000, - BadViewVersionInvalid = 0x80CB0000, - UncertainNotAllNodesAvailable = 0x40C00000, - GoodResultsMayBeIncomplete = 0x00BA0000, - BadNotTypeDefinition = 0x80C80000, - UncertainReferenceOutOfServer = 0x406C0000, - BadTooManyMatches = 0x806D0000, - BadQueryTooComplex = 0x806E0000, - BadNoMatch = 0x806F0000, - BadMaxAgeInvalid = 0x80700000, - BadHistoryOperationInvalid = 0x80710000, - BadHistoryOperationUnsupported = 0x80720000, - BadInvalidTimestampArgument = 0x80BD0000, - BadWriteNotSupported = 0x80730000, - BadTypeMismatch = 0x80740000, - BadMethodInvalid = 0x80750000, - BadArgumentsMissing = 0x80760000, - BadTooManySubscriptions = 0x80770000, - BadTooManyPublishRequests = 0x80780000, - BadNoSubscription = 0x80790000, - BadSequenceNumberUnknown = 0x807A0000, - BadMessageNotAvailable = 0x807B0000, - BadInsufficientClientProfile = 0x807C0000, - BadStateNotActive = 0x80BF0000, - BadTcpServerTooBusy = 0x807D0000, - BadTcpMessageTypeInvalid = 0x807E0000, - BadTcpSecureChannelUnknown = 0x807F0000, - BadTcpMessageTooLarge = 0x80800000, - BadTcpNotEnoughResources = 0x80810000, - BadTcpInternalError = 0x80820000, - BadTcpEndpointUrlInvalid = 0x80830000, - BadRequestInterrupted = 0x80840000, - BadRequestTimeout = 0x80850000, - BadSecureChannelClosed = 0x80860000, - BadSecureChannelTokenUnknown = 0x80870000, - BadSequenceNumberInvalid = 0x80880000, - BadProtocolVersionUnsupported = 0x80BE0000, - BadConfigurationError = 0x80890000, - BadNotConnected = 0x808A0000, - BadDeviceFailure = 0x808B0000, - BadSensorFailure = 0x808C0000, - BadOutOfService = 0x808D0000, - BadDeadbandFilterInvalid = 0x808E0000, - UncertainNoCommunicationLastUsableValue = 0x408F0000, - UncertainLastUsableValue = 0x40900000, - UncertainSubstituteValue = 0x40910000, - UncertainInitialValue = 0x40920000, - UncertainSensorNotAccurate = 0x40930000, - UncertainEngineeringUnitsExceeded = 0x40940000, - UncertainSubNormal = 0x40950000, - GoodLocalOverride = 0x00960000, - BadRefreshInProgress = 0x80970000, - BadConditionAlreadyDisabled = 0x80980000, - BadConditionAlreadyEnabled = 0x80CC0000, - BadConditionDisabled = 0x80990000, - BadEventIdUnknown = 0x809A0000, - BadEventNotAcknowledgeable = 0x80BB0000, - BadDialogNotActive = 0x80CD0000, - BadDialogResponseInvalid = 0x80CE0000, - BadConditionBranchAlreadyAcked = 0x80CF0000, - BadConditionBranchAlreadyConfirmed = 0x80D00000, - BadConditionAlreadyShelved = 0x80D10000, - BadConditionNotShelved = 0x80D20000, - BadShelvingTimeOutOfRange = 0x80D30000, - BadNoData = 0x809B0000, - BadBoundNotFound = 0x80D70000, - BadBoundNotSupported = 0x80D80000, - BadDataLost = 0x809D0000, - BadDataUnavailable = 0x809E0000, - BadEntryExists = 0x809F0000, - BadNoEntryExists = 0x80A00000, - BadTimestampNotSupported = 0x80A10000, - GoodEntryInserted = 0x00A20000, - GoodEntryReplaced = 0x00A30000, - UncertainDataSubNormal = 0x40A40000, - GoodNoData = 0x00A50000, - GoodMoreData = 0x00A60000, - BadAggregateListMismatch = 0x80D40000, - BadAggregateNotSupported = 0x80D50000, - BadAggregateInvalidInputs = 0x80D60000, - BadAggregateConfigurationRejected = 0x80DA0000, - GoodDataIgnored = 0x00D90000, - GoodCommunicationEvent = 0x00A70000, - GoodShutdownEvent = 0x00A80000, - GoodCallAgain = 0x00A90000, - GoodNonCriticalTimeout = 0x00AA0000, - BadInvalidArgument = 0x80AB0000, - BadConnectionRejected = 0x80AC0000, - BadDisconnect = 0x80AD0000, - BadConnectionClosed = 0x80AE0000, - BadInvalidState = 0x80AF0000, - BadEndOfStream = 0x80B00000, - BadNoDataAvailable = 0x80B10000, - BadWaitingForResponse = 0x80B20000, - BadOperationAbandoned = 0x80B30000, - BadExpectedStreamToBlock = 0x80B40000, - BadWouldBlock = 0x80B50000, - BadSyntaxError = 0x80B60000, - BadMaxConnectionsReached = 0x80B70000, - }; +enum class StatusCode : uint32_t +{ + Good = 0, + BadUnexpectedError = 0x80010000, + BadInternalError = 0x80020000, + BadOutOfMemory = 0x80030000, + BadResourceUnavailable = 0x80040000, + BadCommunicationError = 0x80050000, + BadEncodingError = 0x80060000, + BadDecodingError = 0x80070000, + BadEncodingLimitsExceeded = 0x80080000, + BadRequestTooLarge = 0x80B80000, + BadResponseTooLarge = 0x80B90000, + BadUnknownResponse = 0x80090000, + BadTimeout = 0x800A0000, + BadServiceUnsupported = 0x800B0000, + BadShutdown = 0x800C0000, + BadServerNotConnected = 0x800D0000, + BadServerHalted = 0x800E0000, + BadNothingToDo = 0x800F0000, + BadTooManyOperations = 0x80100000, + BadTooManyMonitoredItems = 0x80DB0000, + BadDataTypeIdUnknown = 0x80110000, + BadCertificateInvalid = 0x80120000, + BadSecurityChecksFailed = 0x80130000, + BadCertificateTimeInvalid = 0x80140000, + BadCertificateIssuerTimeInvalid = 0x80150000, + BadCertificateHostNameInvalid = 0x80160000, + BadCertificateUriInvalid = 0x80170000, + BadCertificateUseNotAllowed = 0x80180000, + BadCertificateIssuerUseNotAllowed = 0x80190000, + BadCertificateUntrusted = 0x801A0000, + BadCertificateRevocationUnknown = 0x801B0000, + BadCertificateIssuerRevocationUnknown = 0x801C0000, + BadCertificateRevoked = 0x801D0000, + BadCertificateIssuerRevoked = 0x801E0000, + BadUserAccessDenied = 0x801F0000, + BadIdentityTokenInvalid = 0x80200000, + BadIdentityTokenRejected = 0x80210000, + BadSecureChannelIdInvalid = 0x80220000, + BadInvalidTimestamp = 0x80230000, + BadNonceInvalid = 0x80240000, + BadSessionIdInvalid = 0x80250000, + BadSessionClosed = 0x80260000, + BadSessionNotActivated = 0x80270000, + BadSubscriptionIdInvalid = 0x80280000, + BadRequestHeaderInvalid = 0x802A0000, + BadTimestampsToReturnInvalid = 0x802B0000, + BadRequestCancelledByClient = 0x802C0000, + GoodSubscriptionTransferred = 0x002D0000, + GoodCompletesAsynchronously = 0x002E0000, + GoodOverload = 0x002F0000, + GoodClamped = 0x00300000, + BadNoCommunication = 0x80310000, + BadWaitingForInitialData = 0x80320000, + BadNodeIdInvalid = 0x80330000, + BadNodeIdUnknown = 0x80340000, + BadAttributeIdInvalid = 0x80350000, + BadIndexRangeInvalid = 0x80360000, + BadIndexRangeNoData = 0x80370000, + BadDataEncodingInvalid = 0x80380000, + BadDataEncodingUnsupported = 0x80390000, + BadNotReadable = 0x803A0000, + BadNotWritable = 0x803B0000, + BadOutOfRange = 0x803C0000, + BadNotSupported = 0x803D0000, + BadNotFound = 0x803E0000, + BadObjectDeleted = 0x803F0000, + BadNotImplemented = 0x80400000, + BadMonitoringModeInvalid = 0x80410000, + BadMonitoredItemIdInvalid = 0x80420000, + BadMonitoredItemFilterInvalid = 0x80430000, + BadMonitoredItemFilterUnsupported = 0x80440000, + BadFilterNotAllowed = 0x80450000, + BadStructureMissing = 0x80460000, + BadEventFilterInvalid = 0x80470000, + BadContentFilterInvalid = 0x80480000, + BadFilterOperatorInvalid = 0x80C10000, + BadFilterOperatorUnsupported = 0x80C20000, + BadFilterOperandCountMismatch = 0x80C30000, + BadFilterOperandInvalid = 0x80490000, + BadFilterElementInvalid = 0x80C40000, + BadFilterLiteralInvalid = 0x80C50000, + BadContinuationPointInvalid = 0x804A0000, + BadNoContinuationPoints = 0x804B0000, + BadReferenceTypeIdInvalid = 0x804C0000, + BadBrowseDirectionInvalid = 0x804D0000, + BadNodeNotInView = 0x804E0000, + BadServerUriInvalid = 0x804F0000, + BadServerNameMissing = 0x80500000, + BadDiscoveryUrlMissing = 0x80510000, + BadSempahoreFileMissing = 0x80520000, + BadRequestTypeInvalid = 0x80530000, + BadSecurityModeRejected = 0x80540000, + BadSecurityPolicyRejected = 0x80550000, + BadTooManySessions = 0x80560000, + BadUserSignatureInvalid = 0x80570000, + BadApplicationSignatureInvalid = 0x80580000, + BadNoValidCertificates = 0x80590000, + BadIdentityChangeNotSupported = 0x80C60000, + BadRequestCancelledByRequest = 0x805A0000, + BadParentNodeIdInvalid = 0x805B0000, + BadReferenceNotAllowed = 0x805C0000, + BadNodeIdRejected = 0x805D0000, + BadNodeIdExists = 0x805E0000, + BadNodeClassInvalid = 0x805F0000, + BadBrowseNameInvalid = 0x80600000, + BadBrowseNameDuplicated = 0x80610000, + BadNodeAttributesInvalid = 0x80620000, + BadTypeDefinitionInvalid = 0x80630000, + BadSourceNodeIdInvalid = 0x80640000, + BadTargetNodeIdInvalid = 0x80650000, + BadDuplicateReferenceNotAllowed = 0x80660000, + BadInvalidSelfReference = 0x80670000, + BadReferenceLocalOnly = 0x80680000, + BadNoDeleteRights = 0x80690000, + UncertainReferenceNotDeleted = 0x40BC0000, + BadServerIndexInvalid = 0x806A0000, + BadViewIdUnknown = 0x806B0000, + BadViewTimestampInvalid = 0x80C90000, + BadViewParameterMismatch = 0x80CA0000, + BadViewVersionInvalid = 0x80CB0000, + UncertainNotAllNodesAvailable = 0x40C00000, + GoodResultsMayBeIncomplete = 0x00BA0000, + BadNotTypeDefinition = 0x80C80000, + UncertainReferenceOutOfServer = 0x406C0000, + BadTooManyMatches = 0x806D0000, + BadQueryTooComplex = 0x806E0000, + BadNoMatch = 0x806F0000, + BadMaxAgeInvalid = 0x80700000, + BadHistoryOperationInvalid = 0x80710000, + BadHistoryOperationUnsupported = 0x80720000, + BadInvalidTimestampArgument = 0x80BD0000, + BadWriteNotSupported = 0x80730000, + BadTypeMismatch = 0x80740000, + BadMethodInvalid = 0x80750000, + BadArgumentsMissing = 0x80760000, + BadTooManySubscriptions = 0x80770000, + BadTooManyPublishRequests = 0x80780000, + BadNoSubscription = 0x80790000, + BadSequenceNumberUnknown = 0x807A0000, + BadMessageNotAvailable = 0x807B0000, + BadInsufficientClientProfile = 0x807C0000, + BadStateNotActive = 0x80BF0000, + BadTcpServerTooBusy = 0x807D0000, + BadTcpMessageTypeInvalid = 0x807E0000, + BadTcpSecureChannelUnknown = 0x807F0000, + BadTcpMessageTooLarge = 0x80800000, + BadTcpNotEnoughResources = 0x80810000, + BadTcpInternalError = 0x80820000, + BadTcpEndpointUrlInvalid = 0x80830000, + BadRequestInterrupted = 0x80840000, + BadRequestTimeout = 0x80850000, + BadSecureChannelClosed = 0x80860000, + BadSecureChannelTokenUnknown = 0x80870000, + BadSequenceNumberInvalid = 0x80880000, + BadProtocolVersionUnsupported = 0x80BE0000, + BadConfigurationError = 0x80890000, + BadNotConnected = 0x808A0000, + BadDeviceFailure = 0x808B0000, + BadSensorFailure = 0x808C0000, + BadOutOfService = 0x808D0000, + BadDeadbandFilterInvalid = 0x808E0000, + UncertainNoCommunicationLastUsableValue = 0x408F0000, + UncertainLastUsableValue = 0x40900000, + UncertainSubstituteValue = 0x40910000, + UncertainInitialValue = 0x40920000, + UncertainSensorNotAccurate = 0x40930000, + UncertainEngineeringUnitsExceeded = 0x40940000, + UncertainSubNormal = 0x40950000, + GoodLocalOverride = 0x00960000, + BadRefreshInProgress = 0x80970000, + BadConditionAlreadyDisabled = 0x80980000, + BadConditionAlreadyEnabled = 0x80CC0000, + BadConditionDisabled = 0x80990000, + BadEventIdUnknown = 0x809A0000, + BadEventNotAcknowledgeable = 0x80BB0000, + BadDialogNotActive = 0x80CD0000, + BadDialogResponseInvalid = 0x80CE0000, + BadConditionBranchAlreadyAcked = 0x80CF0000, + BadConditionBranchAlreadyConfirmed = 0x80D00000, + BadConditionAlreadyShelved = 0x80D10000, + BadConditionNotShelved = 0x80D20000, + BadShelvingTimeOutOfRange = 0x80D30000, + BadNoData = 0x809B0000, + BadBoundNotFound = 0x80D70000, + BadBoundNotSupported = 0x80D80000, + BadDataLost = 0x809D0000, + BadDataUnavailable = 0x809E0000, + BadEntryExists = 0x809F0000, + BadNoEntryExists = 0x80A00000, + BadTimestampNotSupported = 0x80A10000, + GoodEntryInserted = 0x00A20000, + GoodEntryReplaced = 0x00A30000, + UncertainDataSubNormal = 0x40A40000, + GoodNoData = 0x00A50000, + GoodMoreData = 0x00A60000, + BadAggregateListMismatch = 0x80D40000, + BadAggregateNotSupported = 0x80D50000, + BadAggregateInvalidInputs = 0x80D60000, + BadAggregateConfigurationRejected = 0x80DA0000, + GoodDataIgnored = 0x00D90000, + GoodCommunicationEvent = 0x00A70000, + GoodShutdownEvent = 0x00A80000, + GoodCallAgain = 0x00A90000, + GoodNonCriticalTimeout = 0x00AA0000, + BadInvalidArgument = 0x80AB0000, + BadConnectionRejected = 0x80AC0000, + BadDisconnect = 0x80AD0000, + BadConnectionClosed = 0x80AE0000, + BadInvalidState = 0x80AF0000, + BadEndOfStream = 0x80B00000, + BadNoDataAvailable = 0x80B10000, + BadWaitingForResponse = 0x80B20000, + BadOperationAbandoned = 0x80B30000, + BadExpectedStreamToBlock = 0x80B40000, + BadWouldBlock = 0x80B50000, + BadSyntaxError = 0x80B60000, + BadMaxConnectionsReached = 0x80B70000, +}; - //raise appropriate exception if StatusCode is not Good - void CheckStatusCode(StatusCode code); +//raise appropriate exception if StatusCode is not Good +void CheckStatusCode(StatusCode code); } diff --git a/include/opc/ua/protocol/string_utils.h b/include/opc/ua/protocol/string_utils.h index 1435c09d..0b49c216 100644 --- a/include/opc/ua/protocol/string_utils.h +++ b/include/opc/ua/protocol/string_utils.h @@ -27,70 +27,72 @@ namespace OpcUa { - std::string ToString(const NodeId& id); - std::string ToString(const Guid& guid); - std::string ToString(const DateTime& t); - std::string ToString(const BrowseDirection& direction); - std::string ToString(const StatusCode& code); - std::string ToString(const LocalizedText& code); - - Guid ToGuid(const std::string& str); - NodeId ToNodeId(const std::string& str, uint32_t defaultNamespace=0); - QualifiedName ToQualifiedName(const std::string& str, uint32_t default_ns=0); - - inline std::ostream& operator<<(std::ostream& os, const OpcUa::NodeId& nodeid) - { - os << OpcUa::ToString(nodeid).c_str(); - return os; - } - - inline std::ostream& operator<<(std::ostream& os, const OpcUa::LocalizedText& t) - { - os << OpcUa::ToString(t).c_str(); - return os; - } - - inline std::ostream& operator<<(std::ostream& os, const OpcUa::QualifiedName& qn) - { - os << "QualifiedName(" << qn.NamespaceIndex << ":" << qn.Name.c_str() << ")"; - return os; - } - - inline std::ostream& operator<<(std::ostream& os, const OpcUa::BrowseDirection& direction) - { - os << OpcUa::ToString(direction); - return os; - } - - inline std::ostream& operator<<(std::ostream& os, const OpcUa::Guid& guid) - { - os << "{" << ToString(guid) << "}"; - return os; - } - - inline std::ostream& operator<<(std::ostream& os, const OpcUa::ByteString& buf) - { - const std::size_t size = buf.Data.size(); - unsigned pos = 0; - os << "Data size: " << size << std::endl; - while (pos < size) +std::string ToString(const NodeId & id); +std::string ToString(const Guid & guid); +std::string ToString(const DateTime & t); +std::string ToString(const BrowseDirection & direction); +std::string ToString(const StatusCode & code); +std::string ToString(const LocalizedText & code); + +Guid ToGuid(const std::string & str); +NodeId ToNodeId(const std::string & str, uint32_t defaultNamespace = 0); +QualifiedName ToQualifiedName(const std::string & str, uint32_t default_ns = 0); + +inline std::ostream & operator<<(std::ostream & os, const OpcUa::NodeId & nodeid) +{ + os << OpcUa::ToString(nodeid).c_str(); + return os; +} + +inline std::ostream & operator<<(std::ostream & os, const OpcUa::LocalizedText & t) +{ + os << OpcUa::ToString(t).c_str(); + return os; +} + +inline std::ostream & operator<<(std::ostream & os, const OpcUa::QualifiedName & qn) +{ + os << "QualifiedName(" << qn.NamespaceIndex << ":" << qn.Name.c_str() << ")"; + return os; +} + +inline std::ostream & operator<<(std::ostream & os, const OpcUa::BrowseDirection & direction) +{ + os << OpcUa::ToString(direction); + return os; +} + +inline std::ostream & operator<<(std::ostream & os, const OpcUa::Guid & guid) +{ + os << "{" << ToString(guid) << "}"; + return os; +} + +inline std::ostream & operator<<(std::ostream & os, const OpcUa::ByteString & buf) +{ + const std::size_t size = buf.Data.size(); + unsigned pos = 0; + os << "Data size: " << size << std::endl; + + while (pos < size) { if (pos) - printf((pos % 16 == 0) ? "\n" : " "); + { printf((pos % 16 == 0) ? "\n" : " "); } const char letter = buf.Data[pos]; printf("%02x", (unsigned)letter & 0x000000FF); if (letter > ' ') - os << "(" << letter << ")"; + { os << "(" << letter << ")"; } + else - os << " "; + { os << " "; } ++pos; } - os << std::endl; - return os; - } + os << std::endl; + return os; +} } diff --git a/include/opc/ua/protocol/strings.h b/include/opc/ua/protocol/strings.h index f6b25b70..8cdd1785 100644 --- a/include/opc/ua/protocol/strings.h +++ b/include/opc/ua/protocol/strings.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -13,203 +13,203 @@ namespace OpcUa { - namespace Names - { - const char AddNodesItem[] = "AddNodesItem"; - const char AddReferencesItem[] = "AddReferencesItem"; - const char Aggregates[] = "Aggregates"; - const char AggregateFunctions[] = "AggregateFunctions"; - const char AnonymousIdentifyToken[] = "AnonymousIdentifyToken"; - const char ApplicationDescription[] = "ApplicationDescription"; - const char Argument[] = "Argument"; - const char Auditing[] = "Auditing"; - const char BaseDataType[] = "BaseDataType"; - const char BaseDataVariableType[] = "BaseDataVariableType"; - const char BaseEventType[] = "BaseEventType"; - const char BaseModelChangeEventType[] = "BaseModelChangeEventType"; - const char BaseObjectType[] = "BaseObjectType"; - const char BaseVariableType[] = "BaseVariableType"; - const char Boolean[] = "Boolean"; - const char BuildDate[] = "BuildDate"; - const char BuildInfo[] = "BuildInfo"; - const char BuildInfoType[] = "BuildInfoType"; - const char BuildNumber[] = "BuildNumber"; - const char Byte[] = "Byte"; - const char ByteString[] = "ByteString"; - const char CurrentTime[] = "CurrentTime"; - const char DataTypeDescriptionType[] = "DataTypeDescriptionType"; - const char DataTypeDictionaryType[] = "DataTypeDictionaryType"; - const char DataTypeEncodingType[] = "DataTypeEncodingType"; - const char DataTypes[] = "DataTypes"; - const char DataTypeSystemType[] = "DataTypeSystemType"; - const char DataValue[] = "DataValue"; - const char DateTime[] = "DateTime"; - const char DeleteNodesItem[] = "DeleteNodesItem"; - const char DeleteReferencesItem[] = "DeleteReferencesItem"; - const char DeviceFailureEventType[] = "DeviceFailureEventType"; - const char DiagnosticInfo[] = "DiagnosticInfo"; - const char Double[] = "Double"; - const char Duration[] = "Duration"; - const char Enumeration[] = "Enumeration"; - const char EnumStrings[] = "EnumStrings"; - const char EnableFlag[] = "EnableFlag"; - const char EUInformation[] = "EUInformation"; - const char EventId[] = "EventId"; - const char EventType[] = "EventType"; - const char EventTypes[] = "EventTypes"; - const char ExpandedNodeId[] = "ExpandedNodeId"; - const char Float[] = "Float"; - const char FolderType[] = "FolderType"; - const char FromState[] = "FromState"; - const char GeneratesEvent[] = "GeneratesEvent"; - const char Guid[] = "Guid"; - const char HasCause[] = "HasCause"; - const char HasCondition[] = "HasCondition"; - const char HasChild[] = "HasChild"; - const char HasComponent[] = "HasComponent"; - const char HasDescription[] = "HasDescription"; - const char HasEffect[] = "HasEffect"; - const char HasEncoding[] = "HasEncoding"; - const char HasEventSource[] = "HasEventSource"; - const char HasHistoricalConfiguration[] = "HasHistoricalConfiguration"; - const char HasModellingRule[] = "HasModellingRule"; - const char HasModelParent[] = "HasModelParent"; - const char HasNotifier[] = "HasNotifier"; - const char HasOrderedComponent[] = "HasOrderedComponent"; - const char HasProperty[] = "HasProperty"; - const char HasSubtype[] = "HasSubtype"; - const char HasTypeDefinition[] = "HasTypeDefinition"; - const char HierarchicalReferences[] = "HierarchicalReferences"; - const char HistoricalEventConfigurationType[] = "HistoricalEventConfigurationType"; - const char IdType[] = "IdType"; - const char Image[] = "Image"; - const char ImageBmp[] = "ImageBmp"; - const char ImageGif[] = "ImageGif"; - const char ImageJpg[] = "ImageJpg"; - const char ImagePng[] = "ImagePng"; - const char Int16[] = "Int16"; - const char Int32[] = "Int32"; - const char Int64[] = "Int64"; - const char Integer[] = "Integer"; - const char LocaleId[] = "LocaleId"; - const char LocaleIdArray[] = "LocaleIdArray"; - const char LocalizedText[] = "LocalizedText"; - const char LocalTime[] = "LocalTime"; - const char ManufacturerName[] = "ManufacturerName"; - const char MaxBrowseContinuationPoints[] = "MaxBrowseContinuationPoints"; - const char MaxHistoryContinuationPoints[] = "MaxHistoryContinuationPoints"; - const char MaxQueryContinuationPoints[] = "MaxQueryContinuationPoints"; - const char Message[] = "Message"; - const char MessageSecurityMode[] = "MessageSecurityMode"; - const char ModelChangeStructureDataType[] = "ModelChangeStructureDataType"; - const char MinSupportedSampleRate[] = "MinSupportedSampleRate"; - const char ModellingRules[] = "ModelingRules"; - const char ModellingRule_CardinalityRestriction[] = "CardinalityRestriction"; - const char ModellingRule_ExposesItsArray[] = "ExposesItsArray"; - const char ModellingRule_Mandatory[] = "Mandatory"; - const char ModellingRule_MandatoryShared[] = "MandatoryShared"; - const char ModellingRule_Optional[] = "Optional"; - const char ModellingRuleType[] = "ModellingRuleType"; - const char NamespaceArray[] = "NamespaceArray"; - const char NamingRule[] = "NamingRule"; - const char NodeClass[] = "NodeClass"; - const char NodeId[] = "NodeId"; - const char NumericRange[] = "NumericRange"; - const char NonHierarchicalReferences[] = "NonHierarchicalReferences"; - const char Number[] = "Number"; - const char Objects[] = "Objects"; - const char Server[] = "Server"; - const char ObjectTypes[] = "ObjectTypes"; - const char Organizes[] = "Organizes"; - const char ProductName[] = "ProductName"; - const char ProductURI[] = "ProductURI"; - const char PropertyType[] = "PropertyType"; - const char QualifiedName[] = "QualifiedName"; - const char UtcTime[] = "UtcTime"; - const char Range[] = "Range"; - const char ReceiveTime[] = "ReceiveTime"; - const char RedundancySupport[] = "RedundancySupport"; - const char References[] = "References"; - const char ReferenceTypes[] = "ReferenceTypes"; - const char RefreshEndEventType[] = "RefreshEndEventType"; - const char RefreshRequiredEventType[] = "RefreshEndEventType"; - const char RefreshStartEventType[] = "RefreshStartEventType"; - const char Root[] = "Root"; - const char SamplingIntervalDiagnosticsArray[] = "SamplingIntervalDiagnosticsArray"; - const char SamplingIntervalDiagnosticsArrayType[] = "SamplingIntervalDiagnosticsArrayType"; - const char SamplingIntervalDiagnosticsType[] = "SamplingIntervalDiagnosticsType"; - const char SamplingIntervalDiagnosticsDataType[] = "SamplingIntervalDiagnosticsDataType"; - const char SByte[] = "SByte"; - const char SecondsTillShutdown[] = "SecondsTillShutdown"; - const char SecurityTokenRequestType[] = "SecurityTokenRequestType"; - const char SemanticChangeStructureDataType[] = "SemanticChangeStructureDataType"; - const char SemanticChangeEventType[] = "SemanticChangeEventType"; - const char ServerArray[] = "ServerArray"; - const char ServerCapabilities[] = "ServerCapabilities"; - const char ServerCapabilitiesType[] = "ServerCapabilitiesType"; - const char ServerDiagnostics[] = "ServerDiagnostics"; - const char SessionsDiagnosticsArrayType[] = "SessionsDiagnosticsArrayType"; - const char ServerDiagnosticsDataType[] = "ServerDiagnosticsDataType"; - const char ServerDiagnosticsType[] = "ServerDiagnosticsType"; - const char ServerDiagnosticsSummaryType[] = "ServerDiagnosticsSummaryType"; - const char ServerDiagnosticsSummary[] = "ServerDiagnosticsSummary"; - const char ServerDiagnosticsVariableType[] = "ServerDiagnosticsVariableType"; - const char ServerProfileArray[] = "ServerProfileArray"; - const char ServerRedundancy[] = "ServerRedundancy"; - const char ServerRedundancyType[] = "ServerRedundancyType"; - const char ServerState[] = "ServerState"; - const char ServerStatusDataType[] = "ServerStatusDataType"; - const char ServerStatus[] = "ServerStatus"; - const char ServerStatusType[] = "ServerStatusType"; - const char ServerType[] = "ServerType"; - const char ServerVendorCapabilityType[] = "ServerVendorCapabilityType"; - const char ServiceCounterDataType[] = "ServiceCounterDataType"; - const char ServiceLevel[] = "ServiceLevel"; - const char SessionSecurityDiagnosticsArrayType[] = "SessionSecurityDiagnosticsArrayType"; - const char SessionSecurityDiagnosticsType[] = "SessionSecurityDiagnosticsType"; - const char SessionSecurityDiagnosticsDataType[] = "SessionSecurityDiagnosticsDataType"; - const char SessionDiagnosticsDataType[] = "SessionDiagnosticsDataType"; - const char SessionDiagnosticsObjectType[] = "SessionDiagnosticsObjectType"; - const char SessionDiagnosticsSummary[] = "SessionDiagnosticsSummary"; - const char SessionDiagnosticsSummaryType[] = "SessionDiagnosticsSummaryType"; - const char Severity[] = "Severity"; - const char ShutdownReason[] = "ShutdownReason"; - const char SignedSoftwareCertificate[] = "SignedSoftwareCertificate"; - const char SoftwareCertificates[] = "SoftwareSertificates"; - const char SoftwareVersion[] = "SoftwareVersion"; - const char SourceName[] = "SourceName"; - const char SourceNode[] = "SourceNode"; - const char SubscriptionDiagnosticsArray[] = "SubscriptionDiagnosticsArray"; - const char SubscriptionDiagnosticsArrayType[] = "SubscriptionDiagnosticsArrayType"; - const char SubscriptionDiagnosticsType[] = "SubscriptionDiagnosticsType"; - const char SubscriptionDiagnosticsDataType[] = "SubscriptionDiagnosticsDataType"; - const char StartTime[] = "StartTime"; - const char State[] = "State"; - const char StateNumber[] = "StateNumber"; - const char StateType[] = "StateType"; - const char StatusCode[] = "StatusCode"; - const char StatusResult[] = "StatusResult"; - const char String[] = "String"; - const char Structure[] = "Structure"; - const char SystemEventType[] = "SystemEventType"; - const char Time[] = "Time"; - const char ToState[] = "ToState"; - const char TransitionType[] = "TransitionType"; - const char Types[] = "Types"; - const char UserNameIdentifyToken[] = "UserNameIdentifyToken"; - const char UInteger[] = "UInteger"; - const char UserIdentifyToken[] = "UserIdentifyToken"; - const char UInt16[] = "UInt16"; - const char UInt32[] = "UInt32"; - const char UInt64[] = "UInt64"; - const char VariableTypes[] = "VariableTypes"; - const char VendorServerInfo[] = "VendorServerInfo"; - const char VendorServerInfoType[] = "VendorServerInfoType"; - const char Views[] = "Views"; - const char X509IdentifyToken[] = "X509IdentifyToken"; - const char XmlElement[] = "XmlElement"; +namespace Names +{ +const char AddNodesItem[] = "AddNodesItem"; +const char AddReferencesItem[] = "AddReferencesItem"; +const char Aggregates[] = "Aggregates"; +const char AggregateFunctions[] = "AggregateFunctions"; +const char AnonymousIdentifyToken[] = "AnonymousIdentifyToken"; +const char ApplicationDescription[] = "ApplicationDescription"; +const char Argument[] = "Argument"; +const char Auditing[] = "Auditing"; +const char BaseDataType[] = "BaseDataType"; +const char BaseDataVariableType[] = "BaseDataVariableType"; +const char BaseEventType[] = "BaseEventType"; +const char BaseModelChangeEventType[] = "BaseModelChangeEventType"; +const char BaseObjectType[] = "BaseObjectType"; +const char BaseVariableType[] = "BaseVariableType"; +const char Boolean[] = "Boolean"; +const char BuildDate[] = "BuildDate"; +const char BuildInfo[] = "BuildInfo"; +const char BuildInfoType[] = "BuildInfoType"; +const char BuildNumber[] = "BuildNumber"; +const char Byte[] = "Byte"; +const char ByteString[] = "ByteString"; +const char CurrentTime[] = "CurrentTime"; +const char DataTypeDescriptionType[] = "DataTypeDescriptionType"; +const char DataTypeDictionaryType[] = "DataTypeDictionaryType"; +const char DataTypeEncodingType[] = "DataTypeEncodingType"; +const char DataTypes[] = "DataTypes"; +const char DataTypeSystemType[] = "DataTypeSystemType"; +const char DataValue[] = "DataValue"; +const char DateTime[] = "DateTime"; +const char DeleteNodesItem[] = "DeleteNodesItem"; +const char DeleteReferencesItem[] = "DeleteReferencesItem"; +const char DeviceFailureEventType[] = "DeviceFailureEventType"; +const char DiagnosticInfo[] = "DiagnosticInfo"; +const char Double[] = "Double"; +const char Duration[] = "Duration"; +const char Enumeration[] = "Enumeration"; +const char EnumStrings[] = "EnumStrings"; +const char EnableFlag[] = "EnableFlag"; +const char EUInformation[] = "EUInformation"; +const char EventId[] = "EventId"; +const char EventType[] = "EventType"; +const char EventTypes[] = "EventTypes"; +const char ExpandedNodeId[] = "ExpandedNodeId"; +const char Float[] = "Float"; +const char FolderType[] = "FolderType"; +const char FromState[] = "FromState"; +const char GeneratesEvent[] = "GeneratesEvent"; +const char Guid[] = "Guid"; +const char HasCause[] = "HasCause"; +const char HasCondition[] = "HasCondition"; +const char HasChild[] = "HasChild"; +const char HasComponent[] = "HasComponent"; +const char HasDescription[] = "HasDescription"; +const char HasEffect[] = "HasEffect"; +const char HasEncoding[] = "HasEncoding"; +const char HasEventSource[] = "HasEventSource"; +const char HasHistoricalConfiguration[] = "HasHistoricalConfiguration"; +const char HasModellingRule[] = "HasModellingRule"; +const char HasModelParent[] = "HasModelParent"; +const char HasNotifier[] = "HasNotifier"; +const char HasOrderedComponent[] = "HasOrderedComponent"; +const char HasProperty[] = "HasProperty"; +const char HasSubtype[] = "HasSubtype"; +const char HasTypeDefinition[] = "HasTypeDefinition"; +const char HierarchicalReferences[] = "HierarchicalReferences"; +const char HistoricalEventConfigurationType[] = "HistoricalEventConfigurationType"; +const char IdType[] = "IdType"; +const char Image[] = "Image"; +const char ImageBmp[] = "ImageBmp"; +const char ImageGif[] = "ImageGif"; +const char ImageJpg[] = "ImageJpg"; +const char ImagePng[] = "ImagePng"; +const char Int16[] = "Int16"; +const char Int32[] = "Int32"; +const char Int64[] = "Int64"; +const char Integer[] = "Integer"; +const char LocaleId[] = "LocaleId"; +const char LocaleIdArray[] = "LocaleIdArray"; +const char LocalizedText[] = "LocalizedText"; +const char LocalTime[] = "LocalTime"; +const char ManufacturerName[] = "ManufacturerName"; +const char MaxBrowseContinuationPoints[] = "MaxBrowseContinuationPoints"; +const char MaxHistoryContinuationPoints[] = "MaxHistoryContinuationPoints"; +const char MaxQueryContinuationPoints[] = "MaxQueryContinuationPoints"; +const char Message[] = "Message"; +const char MessageSecurityMode[] = "MessageSecurityMode"; +const char ModelChangeStructureDataType[] = "ModelChangeStructureDataType"; +const char MinSupportedSampleRate[] = "MinSupportedSampleRate"; +const char ModellingRules[] = "ModelingRules"; +const char ModellingRule_CardinalityRestriction[] = "CardinalityRestriction"; +const char ModellingRule_ExposesItsArray[] = "ExposesItsArray"; +const char ModellingRule_Mandatory[] = "Mandatory"; +const char ModellingRule_MandatoryShared[] = "MandatoryShared"; +const char ModellingRule_Optional[] = "Optional"; +const char ModellingRuleType[] = "ModellingRuleType"; +const char NamespaceArray[] = "NamespaceArray"; +const char NamingRule[] = "NamingRule"; +const char NodeClass[] = "NodeClass"; +const char NodeId[] = "NodeId"; +const char NumericRange[] = "NumericRange"; +const char NonHierarchicalReferences[] = "NonHierarchicalReferences"; +const char Number[] = "Number"; +const char Objects[] = "Objects"; +const char Server[] = "Server"; +const char ObjectTypes[] = "ObjectTypes"; +const char Organizes[] = "Organizes"; +const char ProductName[] = "ProductName"; +const char ProductURI[] = "ProductURI"; +const char PropertyType[] = "PropertyType"; +const char QualifiedName[] = "QualifiedName"; +const char UtcTime[] = "UtcTime"; +const char Range[] = "Range"; +const char ReceiveTime[] = "ReceiveTime"; +const char RedundancySupport[] = "RedundancySupport"; +const char References[] = "References"; +const char ReferenceTypes[] = "ReferenceTypes"; +const char RefreshEndEventType[] = "RefreshEndEventType"; +const char RefreshRequiredEventType[] = "RefreshEndEventType"; +const char RefreshStartEventType[] = "RefreshStartEventType"; +const char Root[] = "Root"; +const char SamplingIntervalDiagnosticsArray[] = "SamplingIntervalDiagnosticsArray"; +const char SamplingIntervalDiagnosticsArrayType[] = "SamplingIntervalDiagnosticsArrayType"; +const char SamplingIntervalDiagnosticsType[] = "SamplingIntervalDiagnosticsType"; +const char SamplingIntervalDiagnosticsDataType[] = "SamplingIntervalDiagnosticsDataType"; +const char SByte[] = "SByte"; +const char SecondsTillShutdown[] = "SecondsTillShutdown"; +const char SecurityTokenRequestType[] = "SecurityTokenRequestType"; +const char SemanticChangeStructureDataType[] = "SemanticChangeStructureDataType"; +const char SemanticChangeEventType[] = "SemanticChangeEventType"; +const char ServerArray[] = "ServerArray"; +const char ServerCapabilities[] = "ServerCapabilities"; +const char ServerCapabilitiesType[] = "ServerCapabilitiesType"; +const char ServerDiagnostics[] = "ServerDiagnostics"; +const char SessionsDiagnosticsArrayType[] = "SessionsDiagnosticsArrayType"; +const char ServerDiagnosticsDataType[] = "ServerDiagnosticsDataType"; +const char ServerDiagnosticsType[] = "ServerDiagnosticsType"; +const char ServerDiagnosticsSummaryType[] = "ServerDiagnosticsSummaryType"; +const char ServerDiagnosticsSummary[] = "ServerDiagnosticsSummary"; +const char ServerDiagnosticsVariableType[] = "ServerDiagnosticsVariableType"; +const char ServerProfileArray[] = "ServerProfileArray"; +const char ServerRedundancy[] = "ServerRedundancy"; +const char ServerRedundancyType[] = "ServerRedundancyType"; +const char ServerState[] = "ServerState"; +const char ServerStatusDataType[] = "ServerStatusDataType"; +const char ServerStatus[] = "ServerStatus"; +const char ServerStatusType[] = "ServerStatusType"; +const char ServerType[] = "ServerType"; +const char ServerVendorCapabilityType[] = "ServerVendorCapabilityType"; +const char ServiceCounterDataType[] = "ServiceCounterDataType"; +const char ServiceLevel[] = "ServiceLevel"; +const char SessionSecurityDiagnosticsArrayType[] = "SessionSecurityDiagnosticsArrayType"; +const char SessionSecurityDiagnosticsType[] = "SessionSecurityDiagnosticsType"; +const char SessionSecurityDiagnosticsDataType[] = "SessionSecurityDiagnosticsDataType"; +const char SessionDiagnosticsDataType[] = "SessionDiagnosticsDataType"; +const char SessionDiagnosticsObjectType[] = "SessionDiagnosticsObjectType"; +const char SessionDiagnosticsSummary[] = "SessionDiagnosticsSummary"; +const char SessionDiagnosticsSummaryType[] = "SessionDiagnosticsSummaryType"; +const char Severity[] = "Severity"; +const char ShutdownReason[] = "ShutdownReason"; +const char SignedSoftwareCertificate[] = "SignedSoftwareCertificate"; +const char SoftwareCertificates[] = "SoftwareSertificates"; +const char SoftwareVersion[] = "SoftwareVersion"; +const char SourceName[] = "SourceName"; +const char SourceNode[] = "SourceNode"; +const char SubscriptionDiagnosticsArray[] = "SubscriptionDiagnosticsArray"; +const char SubscriptionDiagnosticsArrayType[] = "SubscriptionDiagnosticsArrayType"; +const char SubscriptionDiagnosticsType[] = "SubscriptionDiagnosticsType"; +const char SubscriptionDiagnosticsDataType[] = "SubscriptionDiagnosticsDataType"; +const char StartTime[] = "StartTime"; +const char State[] = "State"; +const char StateNumber[] = "StateNumber"; +const char StateType[] = "StateType"; +const char StatusCode[] = "StatusCode"; +const char StatusResult[] = "StatusResult"; +const char String[] = "String"; +const char Structure[] = "Structure"; +const char SystemEventType[] = "SystemEventType"; +const char Time[] = "Time"; +const char ToState[] = "ToState"; +const char TransitionType[] = "TransitionType"; +const char Types[] = "Types"; +const char UserNameIdentifyToken[] = "UserNameIdentifyToken"; +const char UInteger[] = "UInteger"; +const char UserIdentifyToken[] = "UserIdentifyToken"; +const char UInt16[] = "UInt16"; +const char UInt32[] = "UInt32"; +const char UInt64[] = "UInt64"; +const char VariableTypes[] = "VariableTypes"; +const char VendorServerInfo[] = "VendorServerInfo"; +const char VendorServerInfoType[] = "VendorServerInfoType"; +const char Views[] = "Views"; +const char X509IdentifyToken[] = "X509IdentifyToken"; +const char XmlElement[] = "XmlElement"; - } +} } #endif // OPC_UA_STRINGS_H diff --git a/include/opc/ua/protocol/types.h b/include/opc/ua/protocol/types.h index 6e724560..c2e230e0 100644 --- a/include/opc/ua/protocol/types.h +++ b/include/opc/ua/protocol/types.h @@ -30,239 +30,241 @@ namespace OpcUa { - typedef std::string LocaleId; +typedef std::string LocaleId; - struct ByteString +struct ByteString +{ + std::vector Data; + + ByteString() + { + } + + explicit ByteString(const std::vector & val) + : Data(val) + { + } + + bool operator== (const ByteString & str) const { - std::vector Data; + return Data == str.Data; + } + + // For tests + +}; - ByteString() - { - } +class IntegerId +{ +public: + IntegerId(); + IntegerId(const IntegerId & id); + explicit IntegerId(uint32_t num); + IntegerId & operator= (const IntegerId & id); + IntegerId & operator= (uint32_t value); + operator uint32_t() const; + +private: + uint32_t Value; +}; + +struct QualifiedName +{ + uint16_t NamespaceIndex; + std::string Name; // TODO rename to Text - explicit ByteString(const std::vector& val) - : Data(val) - { - } + QualifiedName() + : NamespaceIndex(0) + { + } - bool operator== (const ByteString& str) const - { - return Data == str.Data; - } + QualifiedName(uint16_t nameSpace, const std::string & name) + : NamespaceIndex(nameSpace) + , Name(name) + { + } - // For tests + QualifiedName(const std::string & name, uint16_t nameSpace) + : NamespaceIndex(nameSpace) + , Name(name) + { + } - }; + explicit QualifiedName(const std::string & name) + : NamespaceIndex(0) + , Name(name) + { + } - class IntegerId + bool operator== (const QualifiedName & name) const { - public: - IntegerId(); - IntegerId(const IntegerId& id); - explicit IntegerId(uint32_t num); - IntegerId& operator= (const IntegerId& id); - IntegerId& operator= (uint32_t value); - operator uint32_t() const; - - private: - uint32_t Value; - }; - - struct QualifiedName + return NamespaceIndex == name.NamespaceIndex && Name == name.Name; + } + + bool operator < (const QualifiedName & name) const { - uint16_t NamespaceIndex; - std::string Name; // TODO rename to Text - - QualifiedName() - : NamespaceIndex(0) - { - } - - QualifiedName(uint16_t nameSpace, const std::string& name) - : NamespaceIndex(nameSpace) - , Name(name) - { - } - - QualifiedName(const std::string& name, uint16_t nameSpace) - : NamespaceIndex(nameSpace) - , Name(name) - { - } - - explicit QualifiedName(const std::string& name) - : NamespaceIndex(0) - , Name(name) - { - } - - bool operator== (const QualifiedName& name) const - { - return NamespaceIndex == name.NamespaceIndex && Name == name.Name; - } - - bool operator < (const QualifiedName& name) const - { - if (NamespaceIndex != name.NamespaceIndex) + if (NamespaceIndex != name.NamespaceIndex) { return NamespaceIndex < name.NamespaceIndex; } - return Name < name.Name; - } - }; - struct RelativePathElement + return Name < name.Name; + } +}; + +struct RelativePathElement +{ + NodeId ReferenceTypeId; + bool IsInverse = false; + bool IncludeSubtypes = false; + QualifiedName TargetName; +}; + +struct RelativePath +{ + std::vector Elements; +}; + +// LocalizedText encoding mask +const uint8_t HAS_LOCALE = 1; +const uint8_t HAS_TEXT = 2; + +struct LocalizedText +{ + uint8_t Encoding; + std::string Locale; + std::string Text; // TODO rename to Data + + LocalizedText() + : Encoding(0) + { + } + + explicit LocalizedText(const std::string & text) + : Encoding(HAS_TEXT) + , Text(text) { - NodeId ReferenceTypeId; - bool IsInverse = false; - bool IncludeSubtypes = false; - QualifiedName TargetName; - }; + } - struct RelativePath + explicit LocalizedText(const char * text) + : Encoding(HAS_TEXT) + , Text(text) { - std::vector Elements; - }; + } - // LocalizedText encoding mask - const uint8_t HAS_LOCALE = 1; - const uint8_t HAS_TEXT = 2; + LocalizedText(const std::string & text, const std::string & locale) + : Encoding(HAS_TEXT | HAS_LOCALE) + , Locale(locale) + , Text(text) + { + } - struct LocalizedText + LocalizedText(const char * text, char * locale) + : Encoding(HAS_TEXT | HAS_LOCALE) + , Locale(locale) + , Text(text) { - uint8_t Encoding; - std::string Locale; - std::string Text; // TODO rename to Data - - LocalizedText() - : Encoding(0) - { - } - - explicit LocalizedText(const std::string& text) - : Encoding(HAS_TEXT) - , Text(text) - { - } - - explicit LocalizedText(const char* text) - : Encoding(HAS_TEXT) - , Text(text) - { - } - - LocalizedText(const std::string& text, const std::string& locale) - : Encoding(HAS_TEXT | HAS_LOCALE) - , Locale(locale) - , Text(text) - { - } - - LocalizedText(const char* text, char* locale) - : Encoding(HAS_TEXT | HAS_LOCALE) - , Locale(locale) - , Text(text) - { - } - - bool operator== (const LocalizedText& text) const - { - return Encoding == text.Encoding && Locale == text.Locale && Text == text.Text; - } - }; - - struct AdditionalHeader + } + + bool operator== (const LocalizedText & text) const { - ExpandedNodeId TypeId; - uint8_t Encoding; + return Encoding == text.Encoding && Locale == text.Locale && Text == text.Text; + } +}; - AdditionalHeader() - : Encoding(0) - { - } - }; +struct AdditionalHeader +{ + ExpandedNodeId TypeId; + uint8_t Encoding; - struct RequestHeader + AdditionalHeader() + : Encoding(0) { - ExpandedNodeId SessionAuthenticationToken; - DateTime UtcTime; - uint32_t RequestHandle = 0; - uint32_t ReturnDiagnostics = 0; - std::string AuditEntryId; - uint32_t Timeout = 0; // in miliseconds - AdditionalHeader Additional; + } +}; + +struct RequestHeader +{ + ExpandedNodeId SessionAuthenticationToken; + DateTime UtcTime; + uint32_t RequestHandle = 0; + uint32_t ReturnDiagnostics = 0; + std::string AuditEntryId; + uint32_t Timeout = 0; // in miliseconds + AdditionalHeader Additional; - RequestHeader(); - }; + RequestHeader(); +}; - enum DiagnosticInfoMask : uint8_t +enum DiagnosticInfoMask : uint8_t +{ + DIM_NONE = 0, + DIM_SYMBOLIC_Id = 0x1, + DIM_NAMESPACE = 0x2, + DIM_LOCALIZED_TEXT = 0x4, + DIM_LOCALE = 0x8, + DIM_ADDITIONAL_INFO = 0x10, + DIM_INNER_STATUS_CODE = 0x20, + DIM_INNER_DIAGNOSTIC_INFO = 0x40 +}; + +struct DiagnosticInfo +{ + DiagnosticInfoMask EncodingMask; + int32_t SymbolicId; + int32_t NamespaceURI; + int32_t LocalizedText; + int32_t Locale; + std::string AdditionalInfo; + StatusCode InnerStatusCode; + std::shared_ptr InnerDiagnostics; + + DiagnosticInfo() + : EncodingMask(DiagnosticInfoMask::DIM_NONE) + , SymbolicId(0) + , NamespaceURI(0) + , LocalizedText(0) + , Locale(0) + , InnerStatusCode(StatusCode::Good) { - DIM_NONE = 0, - DIM_SYMBOLIC_Id = 0x1, - DIM_NAMESPACE = 0x2, - DIM_LOCALIZED_TEXT = 0x4, - DIM_LOCALE = 0x8, - DIM_ADDITIONAL_INFO = 0x10, - DIM_INNER_STATUS_CODE = 0x20, - DIM_INNER_DIAGNOSTIC_INFO = 0x40 - }; - - struct DiagnosticInfo + } + + bool operator== (const DiagnosticInfo & info) const { - DiagnosticInfoMask EncodingMask; - int32_t SymbolicId; - int32_t NamespaceURI; - int32_t LocalizedText; - int32_t Locale; - std::string AdditionalInfo; - StatusCode InnerStatusCode; - std::shared_ptr InnerDiagnostics; - - DiagnosticInfo() - : EncodingMask(DiagnosticInfoMask::DIM_NONE) - , SymbolicId(0) - , NamespaceURI(0) - , LocalizedText(0) - , Locale(0) - , InnerStatusCode(StatusCode::Good) - { - } - - bool operator== (const DiagnosticInfo& info) const - { - if ( - EncodingMask == info.EncodingMask && - SymbolicId == info.SymbolicId && - NamespaceURI == info.NamespaceURI && - LocalizedText == info.LocalizedText && - Locale == info.Locale && - InnerStatusCode == info.InnerStatusCode) + if ( + EncodingMask == info.EncodingMask && + SymbolicId == info.SymbolicId && + NamespaceURI == info.NamespaceURI && + LocalizedText == info.LocalizedText && + Locale == info.Locale && + InnerStatusCode == info.InnerStatusCode) { if (InnerDiagnostics && info.InnerDiagnostics) - return *InnerDiagnostics == *info.InnerDiagnostics; + { return *InnerDiagnostics == *info.InnerDiagnostics; } return !InnerDiagnostics && !info.InnerDiagnostics; } - return false; - } - }; - typedef std::vector DiagnosticInfoList; + return false; + } +}; - struct ResponseHeader - { - DateTime Timestamp; - uint32_t RequestHandle = 0; - StatusCode ServiceResult = StatusCode::Good; - DiagnosticInfo InnerDiagnostics; - std::vector StringTable; - AdditionalHeader Additional; +typedef std::vector DiagnosticInfoList; + +struct ResponseHeader +{ + DateTime Timestamp; + uint32_t RequestHandle = 0; + StatusCode ServiceResult = StatusCode::Good; + DiagnosticInfo InnerDiagnostics; + std::vector StringTable; + AdditionalHeader Additional; - ResponseHeader(); - }; + ResponseHeader(); +}; - typedef std::vector CertificateData; +typedef std::vector CertificateData; // // TODO Serialization, RawSize // struct SignatureData @@ -271,22 +273,22 @@ namespace OpcUa // std::string Algorithm; // }; - enum ExtensionObjectEncoding : uint8_t - { - NONE = 0, - HAS_BINARY_BODY = 1, - HAS_XML_BODY = 2, - }; +enum ExtensionObjectEncoding : uint8_t +{ + NONE = 0, + HAS_BINARY_BODY = 1, + HAS_XML_BODY = 2, +}; - //TODO serialization tests - struct ExtensionObjectHeader - { - ExpandedNodeId TypeId; - ExtensionObjectEncoding Encoding; +//TODO serialization tests +struct ExtensionObjectHeader +{ + ExpandedNodeId TypeId; + ExtensionObjectEncoding Encoding; - ExtensionObjectHeader(); - ExtensionObjectHeader(ExtensionObjectId objectId, ExtensionObjectEncoding encoding); - }; + ExtensionObjectHeader(); + ExtensionObjectHeader(ExtensionObjectId objectId, ExtensionObjectEncoding encoding); +}; } // namespace OpcUa diff --git a/include/opc/ua/protocol/types_manual.h b/include/opc/ua/protocol/types_manual.h index cc845583..99cf75a3 100644 --- a/include/opc/ua/protocol/types_manual.h +++ b/include/opc/ua/protocol/types_manual.h @@ -15,152 +15,152 @@ namespace OpcUa { - /// Moved from session.h - struct UserIdentifyToken - { - ExtensionObjectHeader Header; - std::vector PolicyId; +/// Moved from session.h +struct UserIdentifyToken +{ + ExtensionObjectHeader Header; + std::vector PolicyId; - struct UserNameStruct - { - std::string UserName; - std::string Password; - std::string EncryptionAlgorithm; - } UserName; + struct UserNameStruct + { + std::string UserName; + std::string Password; + std::string EncryptionAlgorithm; + } UserName; - UserIdentifyToken(); + UserIdentifyToken(); - UserTokenType type() const; - void setUser(const std::string &user, const std::string &password); - void setPolicyId(const std::string &id); - }; + UserTokenType type() const; + void setUser(const std::string & user, const std::string & password); + void setPolicyId(const std::string & id); +}; - // Moved from subscriptions.h - struct StatusChangeNotification - { - StatusCode Status; - DiagnosticInfo Diagnostic; - }; +// Moved from subscriptions.h +struct StatusChangeNotification +{ + StatusCode Status; + DiagnosticInfo Diagnostic; +}; - struct EventFieldList - { - IntegerId ClientHandle; - std::vector EventFields; - }; +struct EventFieldList +{ + IntegerId ClientHandle; + std::vector EventFields; +}; - struct MonitoredItems - { - IntegerId ClientHandle; - DataValue Value; - }; +struct MonitoredItems +{ + IntegerId ClientHandle; + DataValue Value; +}; - struct EventNotificationList - { - std::vector Events; - }; +struct EventNotificationList +{ + std::vector Events; +}; - struct DataChangeNotification - { - std::vector Notification; - DiagnosticInfoList Diagnostic; - }; +struct DataChangeNotification +{ + std::vector Notification; + DiagnosticInfoList Diagnostic; +}; - struct NotificationData - { - ExtensionObjectHeader Header; - DataChangeNotification DataChange; - EventNotificationList Events; - StatusChangeNotification StatusChange; +struct NotificationData +{ + ExtensionObjectHeader Header; + DataChangeNotification DataChange; + EventNotificationList Events; + StatusChangeNotification StatusChange; - NotificationData(){} - NotificationData(DataChangeNotification notification); - NotificationData(EventNotificationList notification); - NotificationData(StatusChangeNotification notification); - }; + NotificationData() {} + NotificationData(DataChangeNotification notification); + NotificationData(EventNotificationList notification); + NotificationData(StatusChangeNotification notification); +}; - // moved from monitored_items.h +// moved from monitored_items.h - struct DataChangeFilter - { - DataChangeTrigger Trigger; - DeadbandType Deadband; - double DeadbandValue; - }; +struct DataChangeFilter +{ + DataChangeTrigger Trigger; + DeadbandType Deadband; + double DeadbandValue; +}; - struct SimpleAttributeOperand - { - NodeId TypeId; - std::vector BrowsePath; - AttributeId Attribute; - std::vector IndexRange; - }; +struct SimpleAttributeOperand +{ + NodeId TypeId; + std::vector BrowsePath; + AttributeId Attribute; + std::vector IndexRange; +}; - struct ElementOperand - { - uint32_t Index; - }; +struct ElementOperand +{ + uint32_t Index; +}; - struct LiteralOperand - { - // BaseDataType Value; // TODO - Variant Value; - }; +struct LiteralOperand +{ + // BaseDataType Value; // TODO + Variant Value; +}; - struct AttributeOperand - { - NodeId Node; - std::string Alias; - RelativePath Path; - IntegerId AttributeId; - std::vector IndexRange; - }; - - struct FilterOperand - { - ExtensionObjectHeader Header; - ElementOperand Element; - LiteralOperand Literal; - AttributeOperand Attribute; - SimpleAttributeOperand SimpleAttribute; - }; - - struct ContentFilterElement - { - FilterOperator Operator; - std::vector FilterOperands; - }; +struct AttributeOperand +{ + NodeId Node; + std::string Alias; + RelativePath Path; + IntegerId AttributeId; + std::vector IndexRange; +}; + +struct FilterOperand +{ + ExtensionObjectHeader Header; + ElementOperand Element; + LiteralOperand Literal; + AttributeOperand Attribute; + SimpleAttributeOperand SimpleAttribute; +}; + +struct ContentFilterElement +{ + FilterOperator Operator; + std::vector FilterOperands; +}; - struct EventFilter - { - std::vector SelectClauses; - std::vector WhereClause; - }; +struct EventFilter +{ + std::vector SelectClauses; + std::vector WhereClause; +}; - struct AggregateFilter - { - DateTime StartTime; - NodeId AggregateType; - Duration ProcessingInterval; - //AggregateConfiguration Configuration; //aggregate conf is in fact the following parameters - bool UseServerCapabilitiesDefaults; - bool TreatUncertainAsBad; - uint8_t PercentDataBad; - uint8_t PercentDataGood; - bool SteppedSlopedExtrapolation; - }; - - struct MonitoringFilter - { - ExtensionObjectHeader Header; - DataChangeFilter DataChange; - EventFilter Event; - AggregateFilter Aggregate; - MonitoringFilter() {} - MonitoringFilter(DataChangeFilter filter); - MonitoringFilter(EventFilter filter); - MonitoringFilter(AggregateFilter filter); - }; +struct AggregateFilter +{ + DateTime StartTime; + NodeId AggregateType; + Duration ProcessingInterval; + //AggregateConfiguration Configuration; //aggregate conf is in fact the following parameters + bool UseServerCapabilitiesDefaults; + bool TreatUncertainAsBad; + uint8_t PercentDataBad; + uint8_t PercentDataGood; + bool SteppedSlopedExtrapolation; +}; + +struct MonitoringFilter +{ + ExtensionObjectHeader Header; + DataChangeFilter DataChange; + EventFilter Event; + AggregateFilter Aggregate; + MonitoringFilter() {} + MonitoringFilter(DataChangeFilter filter); + MonitoringFilter(EventFilter filter); + MonitoringFilter(AggregateFilter filter); +}; } // namespace OpcUa diff --git a/include/opc/ua/protocol/utils.h b/include/opc/ua/protocol/utils.h index 61fca49e..47d4cfef 100644 --- a/include/opc/ua/protocol/utils.h +++ b/include/opc/ua/protocol/utils.h @@ -27,34 +27,36 @@ namespace OpcUa { - inline void PrintBlob(const std::vector& buf, std::size_t size) - { - size = std::min(size, buf.size()); - unsigned pos = 0; - std::cout << "Data size: " << size << std::endl; - while (pos < size) +inline void PrintBlob(const std::vector & buf, std::size_t size) +{ + size = std::min(size, buf.size()); + unsigned pos = 0; + std::cout << "Data size: " << size << std::endl; + + while (pos < size) { if (pos) - printf((pos % 16 == 0) ? "\n" : " "); + { printf((pos % 16 == 0) ? "\n" : " "); } const char letter = buf[pos]; printf("%02x", (unsigned)letter & 0x000000FF); if (letter > ' ') - std::cout << "(" << letter << ")"; + { std::cout << "(" << letter << ")"; } + else - std::cout << " "; + { std::cout << " "; } ++pos; } - std::cout << std::endl << std::flush; - } + std::cout << std::endl << std::flush; +} - inline void PrintBlob(const std::vector& buf) - { - PrintBlob(buf, buf.size()); - } +inline void PrintBlob(const std::vector & buf) +{ + PrintBlob(buf, buf.size()); +} } diff --git a/include/opc/ua/protocol/variable_access_level.h b/include/opc/ua/protocol/variable_access_level.h index 6985fa32..b8156ac4 100644 --- a/include/opc/ua/protocol/variable_access_level.h +++ b/include/opc/ua/protocol/variable_access_level.h @@ -15,14 +15,14 @@ namespace OpcUa { - enum class VariableAccessLevel : uint8_t - { - CurrentRead = 1, - CurrentWrite = 2, - HistoryRead = 4, - HistoryWrite = 8, - SemanticChange = 16, - }; +enum class VariableAccessLevel : uint8_t +{ + CurrentRead = 1, + CurrentWrite = 2, + HistoryRead = 4, + HistoryWrite = 8, + SemanticChange = 16, +}; } #endif /* OPC_UA_VARIABLE_ACCESS_LEVEL_H_ */ diff --git a/include/opc/ua/protocol/variant.h b/include/opc/ua/protocol/variant.h index 6061578c..940ca68d 100644 --- a/include/opc/ua/protocol/variant.h +++ b/include/opc/ua/protocol/variant.h @@ -24,254 +24,254 @@ namespace OpcUa { - enum class VariantType : uint8_t - { - NUL = 0, - BOOLEAN = 1, - SBYTE = 2, - BYTE = 3, - INT16 = 4, - UINT16 = 5, - INT32 = 6, - UINT32 = 7, - INT64 = 8, - UINT64 = 9, - FLOAT = 10, - DOUBLE = 11, - STRING = 12, - DATE_TIME = 13, - GUId = 14, - BYTE_STRING = 15, - XML_ELEMENT = 16, - NODE_Id = 17, - EXPANDED_NODE_Id = 18, - STATUS_CODE = 19, - QUALIFIED_NAME = 20, - LOCALIZED_TEXT = 21, - EXTENSION_OBJECT = 22, - DATA_VALUE = 23, - VARIANT = 24, - DIAGNOSTIC_INFO = 25, - }; - - const uint8_t VALUE_TYPE_MASK = 0x3F; - const uint8_t HAS_DIMENSIONS_MASK = 0x40; - const uint8_t HAS_ARRAY_MASK = 0x80; - - - template - struct has_const_iterator +enum class VariantType : uint8_t +{ + NUL = 0, + BOOLEAN = 1, + SBYTE = 2, + BYTE = 3, + INT16 = 4, + UINT16 = 5, + INT32 = 6, + UINT32 = 7, + INT64 = 8, + UINT64 = 9, + FLOAT = 10, + DOUBLE = 11, + STRING = 12, + DATE_TIME = 13, + GUId = 14, + BYTE_STRING = 15, + XML_ELEMENT = 16, + NODE_Id = 17, + EXPANDED_NODE_Id = 18, + STATUS_CODE = 19, + QUALIFIED_NAME = 20, + LOCALIZED_TEXT = 21, + EXTENSION_OBJECT = 22, + DATA_VALUE = 23, + VARIANT = 24, + DIAGNOSTIC_INFO = 25, +}; + +const uint8_t VALUE_TYPE_MASK = 0x3F; +const uint8_t HAS_DIMENSIONS_MASK = 0x40; +const uint8_t HAS_ARRAY_MASK = 0x80; + + +template +struct has_const_iterator +{ +private: + typedef char yes; + typedef struct { char array[2]; } no; + + template static yes test(typename C::const_iterator *); + template static no test(...); +public: + static const bool value = sizeof(test(0)) == sizeof(yes); + typedef T type; +}; + +template +struct has_begin_end +{ + template static char (&f(typename std::enable_if < + std::is_same(&C::begin)), + typename C::const_iterator(C::*)() const>::value, void >::type *))[1]; + + template static char (&f(...))[2]; + + template static char (&g(typename std::enable_if < + std::is_same(&C::end)), + typename C::const_iterator(C::*)() const>::value, void >::type *))[1]; + + template static char (&g(...))[2]; + + static bool const beg_value = sizeof(f(0)) == 1; + static bool const end_value = sizeof(g(0)) == 1; +}; + +template +struct is_container_not_string : std::integral_constant < bool, has_const_iterator::value && has_begin_end::beg_value && has_begin_end::end_value > +{ }; + +template<> +struct is_container_not_string : std::integral_constant {}; + + +class Variant; + + +// Such monster due to msvs. +class VariantVisitor +{ +public: + typedef void result_type; + +public: + virtual void Visit(bool val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(int8_t val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(uint8_t val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(int16_t val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(uint16_t val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(int32_t val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(uint32_t val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(int64_t val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(uint64_t val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(float val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(double val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(const std::string & val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(const DateTime & val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(const Guid & val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(const ByteString & val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(const NodeId & val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(const StatusCode & val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(const LocalizedText & val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(const QualifiedName & val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(const Variant & val) = 0; + virtual void Visit(const std::vector & val) = 0; + virtual void Visit(const DiagnosticInfo & val) = 0; + virtual void Visit(const std::vector & val) = 0; +}; + + +class Variant +{ + boost::any Value; + +public: + std::vector Dimensions; + + Variant() {} + Variant(const Variant & var) + : Value(var.Value) { - private: - typedef char yes; - typedef struct { char array[2]; } no; + } - template static yes test(typename C::const_iterator*); - template static no test(...); - public: - static const bool value = sizeof(test(0)) == sizeof(yes); - typedef T type; - }; + template + Variant(const T & value) : Value(value) {} + Variant(MessageId id) : Variant(NodeId(id)) {} + Variant(ReferenceId id) : Variant(NodeId(id)) {} + Variant(ObjectId id) : Variant(NodeId(id)) {} + Variant(ExpandedObjectId id) : Variant(NodeId(id)) {} + explicit Variant(VariantType); + + Variant & operator= (const Variant & variant) + { + this->Value = variant.Value; + return *this; + } template - struct has_begin_end + Variant & operator=(const T & value) + { + Value = value; + return *this; + } + + Variant & operator=(MessageId value) { - template static char (&f(typename std::enable_if< - std::is_same(&C::begin)), - typename C::const_iterator(C::*)() const>::value, void>::type*))[1]; + Value = NodeId(value); + return *this; + } - template static char (&f(...))[2]; + Variant & operator=(ReferenceId value) + { + Value = NodeId(value); + return *this; + } - template static char (&g(typename std::enable_if< - std::is_same(&C::end)), - typename C::const_iterator(C::*)() const>::value, void>::type*))[1]; + Variant & operator=(ObjectId value) + { + Value = NodeId(value); + return *this; + } - template static char (&g(...))[2]; + Variant & operator=(ExpandedObjectId value) + { + Value = NodeId(value); + return *this; + } - static bool const beg_value = sizeof(f(0)) == 1; - static bool const end_value = sizeof(g(0)) == 1; - }; - template - struct is_container_not_string : std::integral_constant::value && has_begin_end::beg_value && has_begin_end::end_value> - { }; + bool operator== (const Variant & var) const; - template<> - struct is_container_not_string : std::integral_constant {}; + template + bool operator==(const T & value) const + { + return boost::any_cast(Value) == value; + } + bool operator==(MessageId id) const + { + return *this == NodeId(id); + } - class Variant; + bool operator==(ReferenceId id) const + { + return *this == NodeId(id); + } + bool operator==(ObjectId id) const + { + return *this == NodeId(id); + } - // Such monster due to msvs. - class VariantVisitor + bool operator==(ExpandedObjectId id) const { - public: - typedef void result_type; - - public: - virtual void Visit(bool val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(int8_t val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(uint8_t val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(int16_t val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(uint16_t val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(int32_t val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(uint32_t val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(int64_t val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(uint64_t val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(float val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(double val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(const std::string& val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(const DateTime& val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(const Guid& val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(const ByteString& val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(const NodeId& val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(const StatusCode& val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(const LocalizedText& val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(const QualifiedName& val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(const Variant& val) = 0; - virtual void Visit(const std::vector& val) = 0; - virtual void Visit(const DiagnosticInfo& val) = 0; - virtual void Visit(const std::vector& val) = 0; - }; - - - class Variant + return *this == NodeId(id); + } + + + template + bool operator!= (const T & t) const + { + return !(*this == t); + } + + bool IsArray() const; + bool IsScalar() const; + bool IsNul() const; + + template + T As() const { - boost::any Value; - - public: - std::vector Dimensions; - - Variant(){} - Variant(const Variant& var) - : Value(var.Value) - { - } - - template - Variant(const T& value) : Value(value){} - Variant(MessageId id) : Variant(NodeId(id)){} - Variant(ReferenceId id) : Variant(NodeId(id)){} - Variant(ObjectId id) : Variant(NodeId(id)){} - Variant(ExpandedObjectId id) : Variant(NodeId(id)){} - explicit Variant(VariantType); - - Variant& operator= (const Variant& variant) - { - this->Value = variant.Value; - return *this; - } - - template - Variant& operator=(const T& value) - { - Value = value; - return *this; - } - - Variant& operator=(MessageId value) - { - Value = NodeId(value); - return *this; - } - - Variant& operator=(ReferenceId value) - { - Value = NodeId(value); - return *this; - } - - Variant& operator=(ObjectId value) - { - Value = NodeId(value); - return *this; - } - - Variant& operator=(ExpandedObjectId value) - { - Value = NodeId(value); - return *this; - } - - - bool operator== (const Variant& var) const; - - template - bool operator==(const T& value) const - { - return boost::any_cast(Value) == value; - } - - bool operator==(MessageId id) const - { - return *this == NodeId(id); - } - - bool operator==(ReferenceId id) const - { - return *this == NodeId(id); - } - - bool operator==(ObjectId id) const - { - return *this == NodeId(id); - } - - bool operator==(ExpandedObjectId id) const - { - return *this == NodeId(id); - } - - - template - bool operator!= (const T& t) const - { - return !(*this == t); - } - - bool IsArray() const; - bool IsScalar() const; - bool IsNul() const; - - template - T As() const - { - return boost::any_cast(Value); - } - - template - explicit operator T() const - { - return As(); - } - - VariantType Type() const; - void Visit(VariantVisitor& visitor) const; - std::string ToString() const; - }; - - ObjectId VariantTypeToDataType(VariantType vt); - VariantType DataTypeToVariantType(const NodeId& dataType); + return boost::any_cast(Value); + } + + template + explicit operator T() const + { + return As(); + } + + VariantType Type() const; + void Visit(VariantVisitor & visitor) const; + std::string ToString() const; +}; + +ObjectId VariantTypeToDataType(VariantType vt); +VariantType DataTypeToVariantType(const NodeId & dataType); } // namespace OpcUa diff --git a/include/opc/ua/protocol/variant_visitor.h b/include/opc/ua/protocol/variant_visitor.h index 5c95c72a..af68e375 100644 --- a/include/opc/ua/protocol/variant_visitor.h +++ b/include/opc/ua/protocol/variant_visitor.h @@ -17,65 +17,65 @@ namespace OpcUa { - template - class TypedVisitor : public VariantVisitor - { - public: - typedef void result_type; +template +class TypedVisitor : public VariantVisitor +{ +public: + typedef void result_type; - public: - TypedVisitor(Delegate& impl) - : Impl(impl) - { - } +public: + TypedVisitor(Delegate & impl) + : Impl(impl) + { + } - public: - virtual void Visit(bool val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(int8_t val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(uint8_t val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(int16_t val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(uint16_t val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(int32_t val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(uint32_t val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(int64_t val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(uint64_t val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(float val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(double val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(const std::string& val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(const DateTime& val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(const Guid& val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(const ByteString& val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(const NodeId& val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(const StatusCode& val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(const LocalizedText& val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(const QualifiedName& val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(const Variant& val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } - virtual void Visit(const DiagnosticInfo& val) { Impl.OnScalar(val); } - virtual void Visit(const std::vector& val) { Impl.OnContainer(val); } +public: + virtual void Visit(bool val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(int8_t val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(uint8_t val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(int16_t val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(uint16_t val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(int32_t val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(uint32_t val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(int64_t val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(uint64_t val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(float val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(double val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(const std::string & val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(const DateTime & val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(const Guid & val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(const ByteString & val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(const NodeId & val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(const StatusCode & val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(const LocalizedText & val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(const QualifiedName & val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(const Variant & val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } + virtual void Visit(const DiagnosticInfo & val) { Impl.OnScalar(val); } + virtual void Visit(const std::vector & val) { Impl.OnContainer(val); } - private: - Delegate& Impl; - }; +private: + Delegate & Impl; +}; } diff --git a/include/opc/ua/protocol/view.h b/include/opc/ua/protocol/view.h index 54374b56..4bc8b937 100644 --- a/include/opc/ua/protocol/view.h +++ b/include/opc/ua/protocol/view.h @@ -16,204 +16,204 @@ namespace OpcUa { - //--------------------------------------------------- - // Browse - //--------------------------------------------------- - +//--------------------------------------------------- +// Browse +//--------------------------------------------------- - struct ViewDescription - { - NodeId Id; - DateTime Timestamp; - uint32_t Version; - - ViewDescription(); - }; - struct BrowseDescription - { - NodeId NodeToBrowse; - BrowseDirection Direction; - NodeId ReferenceTypeId; - bool IncludeSubtypes; // If false will follow strctly ReferenceTypeId. if true will follow subtypes of ReferenceTypeId. - NodeClass NodeClasses; - BrowseResultMask ResultMask; - - BrowseDescription(); - }; - - struct NodesQuery - { - ViewDescription View; - uint32_t MaxReferenciesPerNode; - std::vector NodesToBrowse; - - NodesQuery(); - }; - - struct BrowseRequest - { - NodeId TypeId; - RequestHeader Header; - NodesQuery Query; - - BrowseRequest(); - }; - - - struct ReferenceDescription - { - NodeId ReferenceTypeId; - bool IsForward = true; - NodeId TargetNodeId; - QualifiedName BrowseName; - LocalizedText DisplayName; - NodeClass TargetNodeClass; - NodeId TargetNodeTypeDefinition; - - ReferenceDescription(); - }; - - struct BrowseResult - { - StatusCode Status; - std::vector ContinuationPoint; - std::vector Referencies; - - BrowseResult(); - }; - - struct BrowseResponse - { - NodeId TypeId; - ResponseHeader Header; - - std::vector Results; - DiagnosticInfoList Diagnostics; - - BrowseResponse(); - }; - - //--------------------------------------------------- - // BrowseNext - //--------------------------------------------------- - - struct BrowseNextRequest - { - NodeId TypeId; - RequestHeader Header; - - bool ReleaseContinuationPoints; - std::vector> ContinuationPoints; - - BrowseNextRequest(); - }; - - struct BrowseNextResponse - { - NodeId TypeId; - ResponseHeader Header; - - std::vector Results; - DiagnosticInfoList Diagnostics; - - BrowseNextResponse(); - }; - - //--------------------------------------------------- - // TranslateBrowsePathsToNodeIds - //--------------------------------------------------- - - struct BrowsePath - { - NodeId StartingNode; - RelativePath Path; - }; - - struct TranslateBrowsePathsParameters - { - std::vector BrowsePaths; - }; - - struct TranslateBrowsePathsToNodeIdsRequest - { - NodeId TypeId; - RequestHeader Header; - TranslateBrowsePathsParameters Parameters; - - TranslateBrowsePathsToNodeIdsRequest(); - }; - - //--------------------------------------------------- - // TranslateBrowsePathsToNodeIds - //--------------------------------------------------- - - struct BrowsePathTarget - { - NodeId Node; - uint32_t RemainingPathIndex; - - BrowsePathTarget(); - }; - - struct BrowsePathResult - { - StatusCode Status; - std::vector Targets; - - BrowsePathResult(); - }; - - struct TranslateBrowsePathsResult - { - std::vector Paths; - DiagnosticInfoList Diagnostics; - }; - - struct TranslateBrowsePathsToNodeIdsResponse - { - NodeId TypeId; - ResponseHeader Header; - TranslateBrowsePathsResult Result; - - TranslateBrowsePathsToNodeIdsResponse(); - }; - - struct RegisterNodesRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - std::vector NodesToRegister; - - RegisterNodesRequest(); - }; - - struct RegisterNodesResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - std::vector Result; - - RegisterNodesResponse(); - }; - - struct UnregisterNodesRequest - { - OpcUa::NodeId TypeId; - OpcUa::RequestHeader Header; - std::vector NodesToUnregister; - - UnregisterNodesRequest(); - }; - - struct UnregisterNodesResponse - { - OpcUa::NodeId TypeId; - OpcUa::ResponseHeader Header; - - UnregisterNodesResponse(); - }; +struct ViewDescription +{ + NodeId Id; + DateTime Timestamp; + uint32_t Version; + + ViewDescription(); +}; + +struct BrowseDescription +{ + NodeId NodeToBrowse; + BrowseDirection Direction; + NodeId ReferenceTypeId; + bool IncludeSubtypes; // If false will follow strctly ReferenceTypeId. if true will follow subtypes of ReferenceTypeId. + NodeClass NodeClasses; + BrowseResultMask ResultMask; + + BrowseDescription(); +}; + +struct NodesQuery +{ + ViewDescription View; + uint32_t MaxReferenciesPerNode; + std::vector NodesToBrowse; + + NodesQuery(); +}; + +struct BrowseRequest +{ + NodeId TypeId; + RequestHeader Header; + NodesQuery Query; + + BrowseRequest(); +}; + + +struct ReferenceDescription +{ + NodeId ReferenceTypeId; + bool IsForward = true; + NodeId TargetNodeId; + QualifiedName BrowseName; + LocalizedText DisplayName; + NodeClass TargetNodeClass; + NodeId TargetNodeTypeDefinition; + + ReferenceDescription(); +}; + +struct BrowseResult +{ + StatusCode Status; + std::vector ContinuationPoint; + std::vector Referencies; + + BrowseResult(); +}; + +struct BrowseResponse +{ + NodeId TypeId; + ResponseHeader Header; + + std::vector Results; + DiagnosticInfoList Diagnostics; + + BrowseResponse(); +}; + +//--------------------------------------------------- +// BrowseNext +//--------------------------------------------------- + +struct BrowseNextRequest +{ + NodeId TypeId; + RequestHeader Header; + + bool ReleaseContinuationPoints; + std::vector> ContinuationPoints; + + BrowseNextRequest(); +}; + +struct BrowseNextResponse +{ + NodeId TypeId; + ResponseHeader Header; + + std::vector Results; + DiagnosticInfoList Diagnostics; + + BrowseNextResponse(); +}; + +//--------------------------------------------------- +// TranslateBrowsePathsToNodeIds +//--------------------------------------------------- + +struct BrowsePath +{ + NodeId StartingNode; + RelativePath Path; +}; + +struct TranslateBrowsePathsParameters +{ + std::vector BrowsePaths; +}; + +struct TranslateBrowsePathsToNodeIdsRequest +{ + NodeId TypeId; + RequestHeader Header; + TranslateBrowsePathsParameters Parameters; + + TranslateBrowsePathsToNodeIdsRequest(); +}; + +//--------------------------------------------------- +// TranslateBrowsePathsToNodeIds +//--------------------------------------------------- + +struct BrowsePathTarget +{ + NodeId Node; + uint32_t RemainingPathIndex; + + BrowsePathTarget(); +}; + +struct BrowsePathResult +{ + StatusCode Status; + std::vector Targets; + + BrowsePathResult(); +}; + +struct TranslateBrowsePathsResult +{ + std::vector Paths; + DiagnosticInfoList Diagnostics; +}; + +struct TranslateBrowsePathsToNodeIdsResponse +{ + NodeId TypeId; + ResponseHeader Header; + TranslateBrowsePathsResult Result; + + TranslateBrowsePathsToNodeIdsResponse(); +}; + +struct RegisterNodesRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + std::vector NodesToRegister; + + RegisterNodesRequest(); +}; + +struct RegisterNodesResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + std::vector Result; + + RegisterNodesResponse(); +}; + +struct UnregisterNodesRequest +{ + OpcUa::NodeId TypeId; + OpcUa::RequestHeader Header; + std::vector NodesToUnregister; + + UnregisterNodesRequest(); +}; + +struct UnregisterNodesResponse +{ + OpcUa::NodeId TypeId; + OpcUa::ResponseHeader Header; + + UnregisterNodesResponse(); +}; } // namespace OpcUa diff --git a/include/opc/ua/server/addons/address_space.h b/include/opc/ua/server/addons/address_space.h index 7f6c93e6..059c4ee0 100644 --- a/include/opc/ua/server/addons/address_space.h +++ b/include/opc/ua/server/addons/address_space.h @@ -15,19 +15,19 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - const char AddressSpaceRegistryAddonId[] = "address_space_registry"; +const char AddressSpaceRegistryAddonId[] = "address_space_registry"; - class AddressSpaceAddonFactory : public Common::AddonFactory - { - public: - DEFINE_CLASS_POINTERS(AddressSpaceAddonFactory) +class AddressSpaceAddonFactory : public Common::AddonFactory +{ +public: + DEFINE_CLASS_POINTERS(AddressSpaceAddonFactory) - public: - virtual Common::Addon::UniquePtr CreateAddon(); - }; +public: + virtual Common::Addon::UniquePtr CreateAddon(); +}; - } // namespace UaServer +} // namespace UaServer } // namespace OpcUa diff --git a/include/opc/ua/server/addons/asio_addon.h b/include/opc/ua/server/addons/asio_addon.h index ae368bd9..8fed93e3 100644 --- a/include/opc/ua/server/addons/asio_addon.h +++ b/include/opc/ua/server/addons/asio_addon.h @@ -25,37 +25,37 @@ namespace boost { - namespace asio - { +namespace asio +{ - class io_service; +class io_service; - } +} } namespace OpcUa { - namespace Server - { +namespace Server +{ - const char AsioAddonId[] = "async"; +const char AsioAddonId[] = "async"; - class AsioAddon : public Common::Addon - { - public: - DEFINE_CLASS_POINTERS(AsioAddon) +class AsioAddon : public Common::Addon +{ +public: + DEFINE_CLASS_POINTERS(AsioAddon) - public: - virtual boost::asio::io_service& GetIoService() = 0; - }; +public: + virtual boost::asio::io_service & GetIoService() = 0; +}; - class AsioAddonFactory : public Common::AddonFactory - { - public: - Common::Addon::UniquePtr CreateAddon() override; - }; +class AsioAddonFactory : public Common::AddonFactory +{ +public: + Common::Addon::UniquePtr CreateAddon() override; +}; - } +} } diff --git a/include/opc/ua/server/addons/common_addons.h b/include/opc/ua/server/addons/common_addons.h index 135a7f94..4dcd2701 100644 --- a/include/opc/ua/server/addons/common_addons.h +++ b/include/opc/ua/server/addons/common_addons.h @@ -25,41 +25,41 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - struct Parameters - { - /// @Endpoint configuration. - /// listen parameters will be taked from EndpointUrl. - /// Example: - /// opc.tcp://localhost:4841 - /// opc.tcp://10.250.1.1:4841 - /// opc.tcp://opcua.server.com:4841 - EndpointDescription Endpoint; - unsigned ThreadsCount = 1; - bool Debug = false; - }; +struct Parameters +{ + /// @Endpoint configuration. + /// listen parameters will be taked from EndpointUrl. + /// Example: + /// opc.tcp://localhost:4841 + /// opc.tcp://10.250.1.1:4841 + /// opc.tcp://opcua.server.com:4841 + EndpointDescription Endpoint; + unsigned ThreadsCount = 1; + bool Debug = false; +}; - /// @brief parameters of server. - /// can be used at embedded. - void RegisterCommonAddons(const Parameters& params, Common::AddonsManager& addons); +/// @brief parameters of server. +/// can be used at embedded. +void RegisterCommonAddons(const Parameters & params, Common::AddonsManager & addons); - /// @brief Load parameters from configuration files. - /// This function will enumerate '*.config' files in the directory. - /// configuration file can load third party dynamic addons. - void LoadConfiguration(const std::string& configDirectoryPath, Common::AddonsManager& addons); +/// @brief Load parameters from configuration files. +/// This function will enumerate '*.config' files in the directory. +/// configuration file can load third party dynamic addons. +void LoadConfiguration(const std::string & configDirectoryPath, Common::AddonsManager & addons); - Common::AddonInformation CreateServicesRegistryAddon(); - Common::AddonInformation CreateAddressSpaceAddon(); - Common::AddonInformation CreateStandardNamespaceAddon(); - Common::AddonInformation CreateEndpointsRegistryAddon(); - Common::AddonInformation CreateBinaryServerAddon(); - Common::AddonInformation CreateOpcTcpAsyncAddon(); - Common::AddonInformation CreateServerObjectAddon(); - Common::AddonInformation CreateAsioAddon(); - Common::AddonInformation CreateSubscriptionServiceAddon(); +Common::AddonInformation CreateServicesRegistryAddon(); +Common::AddonInformation CreateAddressSpaceAddon(); +Common::AddonInformation CreateStandardNamespaceAddon(); +Common::AddonInformation CreateEndpointsRegistryAddon(); +Common::AddonInformation CreateBinaryServerAddon(); +Common::AddonInformation CreateOpcTcpAsyncAddon(); +Common::AddonInformation CreateServerObjectAddon(); +Common::AddonInformation CreateAsioAddon(); +Common::AddonInformation CreateSubscriptionServiceAddon(); - } +} } diff --git a/include/opc/ua/server/addons/endpoints_services.h b/include/opc/ua/server/addons/endpoints_services.h index e66c49a5..83d1a54c 100644 --- a/include/opc/ua/server/addons/endpoints_services.h +++ b/include/opc/ua/server/addons/endpoints_services.h @@ -16,21 +16,21 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - const char EndpointsRegistryAddonId[] = "endpoints_services"; +const char EndpointsRegistryAddonId[] = "endpoints_services"; - class EndpointsRegistryAddonFactory : public Common::AddonFactory - { - public: - DEFINE_CLASS_POINTERS(EndpointsRegistryAddonFactory) +class EndpointsRegistryAddonFactory : public Common::AddonFactory +{ +public: + DEFINE_CLASS_POINTERS(EndpointsRegistryAddonFactory) - public: - virtual Common::Addon::UniquePtr CreateAddon() override; - }; +public: + virtual Common::Addon::UniquePtr CreateAddon() override; +}; - } // namespace UaServer +} // namespace UaServer } // nmespace OpcUa diff --git a/include/opc/ua/server/addons/opc_tcp_async.h b/include/opc/ua/server/addons/opc_tcp_async.h index 047dafe0..f8d02362 100644 --- a/include/opc/ua/server/addons/opc_tcp_async.h +++ b/include/opc/ua/server/addons/opc_tcp_async.h @@ -25,20 +25,20 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - const char AsyncOpcTcpAddonId[] = "opc_tcp_async"; +const char AsyncOpcTcpAddonId[] = "opc_tcp_async"; - class AsyncOpcTcpAddonFactory : public Common::AddonFactory - { - public: - DEFINE_CLASS_POINTERS(AsyncOpcTcpAddonFactory) +class AsyncOpcTcpAddonFactory : public Common::AddonFactory +{ +public: + DEFINE_CLASS_POINTERS(AsyncOpcTcpAddonFactory) - public: - virtual Common::Addon::UniquePtr CreateAddon() override; - }; +public: + virtual Common::Addon::UniquePtr CreateAddon() override; +}; - } +} } diff --git a/include/opc/ua/server/addons/opcua_protocol.h b/include/opc/ua/server/addons/opcua_protocol.h index 63915362..4c9bbdd8 100644 --- a/include/opc/ua/server/addons/opcua_protocol.h +++ b/include/opc/ua/server/addons/opcua_protocol.h @@ -17,19 +17,19 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - const char OpcUaProtocolAddonId[] = "opcua_protocol"; +const char OpcUaProtocolAddonId[] = "opcua_protocol"; - class OpcUaProtocolAddonFactory : public Common::AddonFactory - { - public: - DEFINE_CLASS_POINTERS(OpcUaProtocolAddonFactory) +class OpcUaProtocolAddonFactory : public Common::AddonFactory +{ +public: + DEFINE_CLASS_POINTERS(OpcUaProtocolAddonFactory) - public: - virtual Common::Addon::UniquePtr CreateAddon() override; - }; +public: + virtual Common::Addon::UniquePtr CreateAddon() override; +}; - } // namespace UaServer +} // namespace UaServer } // nmespace OpcUa diff --git a/include/opc/ua/server/addons/services_registry.h b/include/opc/ua/server/addons/services_registry.h index 2e52c40d..4e6151ae 100644 --- a/include/opc/ua/server/addons/services_registry.h +++ b/include/opc/ua/server/addons/services_registry.h @@ -15,19 +15,19 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - const char ServicesRegistryAddonId[] = "services_registry"; +const char ServicesRegistryAddonId[] = "services_registry"; - class ServicesRegistryFactory : public Common::AddonFactory - { - public: - DEFINE_CLASS_POINTERS(ServicesRegistryFactory) +class ServicesRegistryFactory : public Common::AddonFactory +{ +public: + DEFINE_CLASS_POINTERS(ServicesRegistryFactory) - public: - virtual Common::Addon::UniquePtr CreateAddon(); - }; +public: + virtual Common::Addon::UniquePtr CreateAddon(); +}; - } // namespace UaServer +} // namespace UaServer } // namespace OpcUa diff --git a/include/opc/ua/server/addons/standard_address_space.h b/include/opc/ua/server/addons/standard_address_space.h index 89718897..1cc8023f 100644 --- a/include/opc/ua/server/addons/standard_address_space.h +++ b/include/opc/ua/server/addons/standard_address_space.h @@ -15,17 +15,17 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - class StandardNamespaceAddonFactory : public Common::AddonFactory - { - public: - virtual Common::Addon::UniquePtr CreateAddon(); - }; +class StandardNamespaceAddonFactory : public Common::AddonFactory +{ +public: + virtual Common::Addon::UniquePtr CreateAddon(); +}; - const char StandardNamespaceAddonId[] = "standard_namespace"; +const char StandardNamespaceAddonId[] = "standard_namespace"; - } // namespace UaServer +} // namespace UaServer } // namespace OpcUa diff --git a/include/opc/ua/server/addons/subscription_service.h b/include/opc/ua/server/addons/subscription_service.h index 4dc87709..bb1c4621 100644 --- a/include/opc/ua/server/addons/subscription_service.h +++ b/include/opc/ua/server/addons/subscription_service.h @@ -14,16 +14,16 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - const char SubscriptionServiceAddonId[] = "subscriptions"; +const char SubscriptionServiceAddonId[] = "subscriptions"; - class SubscriptionServiceAddonFactory : public Common::AddonFactory - { - public: - virtual Common::Addon::UniquePtr CreateAddon(); - }; +class SubscriptionServiceAddonFactory : public Common::AddonFactory +{ +public: + virtual Common::Addon::UniquePtr CreateAddon(); +}; - } +} } diff --git a/include/opc/ua/server/addons/xml_ns.h b/include/opc/ua/server/addons/xml_ns.h index b5af4fc2..2b497ef9 100644 --- a/include/opc/ua/server/addons/xml_ns.h +++ b/include/opc/ua/server/addons/xml_ns.h @@ -15,17 +15,17 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - const char XmlAddressSpaceAddonId[] = "xml_address_space"; +const char XmlAddressSpaceAddonId[] = "xml_address_space"; - class XmlAddressSpace : public Common::Addon - { - public: - virtual void Load(const char* path) = 0; - }; +class XmlAddressSpace : public Common::Addon +{ +public: + virtual void Load(const char * path) = 0; +}; - } +} } diff --git a/include/opc/ua/server/address_space.h b/include/opc/ua/server/address_space.h index 6f93ca11..0c9846ce 100644 --- a/include/opc/ua/server/address_space.h +++ b/include/opc/ua/server/address_space.h @@ -19,29 +19,29 @@ namespace OpcUa { - namespace Server - { - - typedef void DataChangeCallback(const NodeId& node, AttributeId attribute, DataValue); - - class AddressSpace - : public ViewServices - , public AttributeServices - , public NodeManagementServices - , public MethodServices - { - public: - DEFINE_CLASS_POINTERS(AddressSpace) - - //Server side methods - virtual uint32_t AddDataChangeCallback(const NodeId& node, AttributeId attribute, std::function callback) = 0; - virtual void DeleteDataChangeCallback(uint32_t clienthandle) = 0; - virtual StatusCode SetValueCallback(const NodeId& node, AttributeId attribute, std::function callback) = 0; - virtual void SetMethod(const NodeId& node, std::function (NodeId context, std::vector arguments)> callback) = 0; - //FIXME : SHould we also expose SetValue and GetValue on server side? then we need to lock them ... - }; - - AddressSpace::UniquePtr CreateAddressSpace(bool debug); - - } // namespace UaServer +namespace Server +{ + +typedef void DataChangeCallback(const NodeId & node, AttributeId attribute, DataValue); + +class AddressSpace + : public ViewServices + , public AttributeServices + , public NodeManagementServices + , public MethodServices +{ +public: + DEFINE_CLASS_POINTERS(AddressSpace) + + //Server side methods + virtual uint32_t AddDataChangeCallback(const NodeId & node, AttributeId attribute, std::function callback) = 0; + virtual void DeleteDataChangeCallback(uint32_t clienthandle) = 0; + virtual StatusCode SetValueCallback(const NodeId & node, AttributeId attribute, std::function callback) = 0; + virtual void SetMethod(const NodeId & node, std::function (NodeId context, std::vector arguments)> callback) = 0; + //FIXME : SHould we also expose SetValue and GetValue on server side? then we need to lock them ... +}; + +AddressSpace::UniquePtr CreateAddressSpace(bool debug); + +} // namespace UaServer } // nmespace OpcUa diff --git a/include/opc/ua/server/endpoints_services.h b/include/opc/ua/server/endpoints_services.h index 99ff1ef7..f6651056 100644 --- a/include/opc/ua/server/endpoints_services.h +++ b/include/opc/ua/server/endpoints_services.h @@ -15,26 +15,26 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - struct ApplicationData - { - ApplicationDescription Application; - std::vector Endpoints; - }; +struct ApplicationData +{ + ApplicationDescription Application; + std::vector Endpoints; +}; - class EndpointsRegistry : public OpcUa::EndpointServices - { - public: - DEFINE_CLASS_POINTERS(EndpointsRegistry) +class EndpointsRegistry : public OpcUa::EndpointServices +{ +public: + DEFINE_CLASS_POINTERS(EndpointsRegistry) - public: - virtual void AddEndpoints(const std::vector& endpoints) = 0; - virtual void AddApplications(const std::vector& application) = 0; - }; +public: + virtual void AddEndpoints(const std::vector & endpoints) = 0; + virtual void AddApplications(const std::vector & application) = 0; +}; - EndpointsRegistry::UniquePtr CreateEndpointsRegistry(); +EndpointsRegistry::UniquePtr CreateEndpointsRegistry(); - } // namespace UaServer +} // namespace UaServer } // namespace OpcUa diff --git a/include/opc/ua/server/opc_tcp_async.h b/include/opc/ua/server/opc_tcp_async.h index 07f9b8c7..68b9a897 100644 --- a/include/opc/ua/server/opc_tcp_async.h +++ b/include/opc/ua/server/opc_tcp_async.h @@ -24,36 +24,36 @@ namespace boost { - namespace asio - { - class io_service; - } +namespace asio +{ +class io_service; +} } namespace OpcUa { - namespace Server - { +namespace Server +{ - class AsyncOpcTcp : private Common::Interface - { - public: - DEFINE_CLASS_POINTERS(AsyncOpcTcp) +class AsyncOpcTcp : private Common::Interface +{ +public: + DEFINE_CLASS_POINTERS(AsyncOpcTcp) - public: - struct Parameters - { - std::string Host; - unsigned Port = 4840; - bool DebugMode = false; - }; +public: + struct Parameters + { + std::string Host; + unsigned Port = 4840; + bool DebugMode = false; + }; - public: - virtual void Listen() = 0; - virtual void Shutdown() = 0; - }; +public: + virtual void Listen() = 0; + virtual void Shutdown() = 0; +}; - AsyncOpcTcp::UniquePtr CreateAsyncOpcTcp(const AsyncOpcTcp::Parameters& params, Services::SharedPtr server, boost::asio::io_service& io); +AsyncOpcTcp::UniquePtr CreateAsyncOpcTcp(const AsyncOpcTcp::Parameters & params, Services::SharedPtr server, boost::asio::io_service & io); - } +} } diff --git a/include/opc/ua/server/server.h b/include/opc/ua/server/server.h index 2880dee9..cf809378 100644 --- a/include/opc/ua/server/server.h +++ b/include/opc/ua/server/server.h @@ -12,96 +12,96 @@ namespace OpcUa { - class UaServer - { - public: - /// @brief create high level server - // this class is meant to be used to quickly/easily add OPCUA interface to an application - // it may not offer absolutely all features available in protocol - // you may want to look at code and implement your own server if you need - // debug argument will make freeopcua write A LOT to stdout - UaServer(); - explicit UaServer(bool debug); - - /// @brief set endpoint uri on wich server will listen. - /// opc.tcp://localhost:4841/opcua/server - /// opc.tcp://192.168.1.1:4840/opcua/server - /// opc.tcp://server.freeopca.org:4841/opcua/server - void SetEndpoint(const std::string& endpoint); - - /// @brief setup server description - void SetProductURI(const std::string& uri); - void SetServerURI(const std::string& uri); - void SetServerName(const std::string& name); - - /// @brief load xml addressspace. This is not implemented yet!!! - void AddAddressSpace(const std::string& path); - - /// @brief Enable event notification on Server node - /// this is necessary if you want to be able to send custom events - // (Not for datachange events!) - void EnableEventNotification(); - - /// @brief Register your application namespace - // Every application will probably have its own namespace - // example: urn:mydomain:myfancyapplication - // the returned index will then be used - uint32_t RegisterNamespace(std::string uri); - uint32_t GetNamespaceIndex(std::string uri); - - /// @brief Start and Stop server - // if you do not stop server you may get into trouble! - // we have several threads running - void Start(); - void Stop(); - - /// @brief Get a specific node by nodeid - // you can also access a standard node from addressspace using - // ObjectId, for example: - // Node mynode = GetNode(ObjectId::Server); - // using a string is also possible: - // Node mynode = GetNode("ns=3;i=55"); - Node GetNode(const NodeId& nodeid) const; - Node GetNode(const std::string& nodeid) const; - - /// @brief helper methods for node you will probably want to access - Node GetRootNode() const; - Node GetObjectsNode() const; - Node GetServerNode() const; - - /// @brief Get a node using its browsepath - Node GetNodeFromPath(const std::vector& path) const; - Node GetNodeFromPath(const std::vector& path) const; - - /// @brief Trigger and event - // Event will be send from Server node. - // It is possible to send events from arbitrarily nodes but it looks like - // most servers only send events from Server node - void TriggerEvent(Event event); - - /// @brief Create a subscription objects - // returned object can then be used to subscribe to - // datachange or custom events on server side - std::unique_ptr CreateSubscription(unsigned int period, SubscriptionHandler& callback); - - /// @brief Create a server operations object - ServerOperations CreateServerOperations(); - - protected: - std::vector XmlAddressSpaces; - // defined some sensible defaults that should let most clients connects - std::string Endpoint; - std::string ServerUri = "urn:freeopcua:server"; - std::string ProductUri = "urn:freeopcua.github.no:server"; - std::string Name = "FreeOpcUa Server"; - bool Debug = false; - bool LoadCppAddressSpace = true; - OpcUa::MessageSecurityMode SecurityMode = OpcUa::MessageSecurityMode::None; - void CheckStarted() const; - - Common::AddonsManager::SharedPtr Addons; - Server::ServicesRegistry::SharedPtr Registry; - Server::SubscriptionService::SharedPtr SubscriptionService; - }; +class UaServer +{ +public: + /// @brief create high level server + // this class is meant to be used to quickly/easily add OPCUA interface to an application + // it may not offer absolutely all features available in protocol + // you may want to look at code and implement your own server if you need + // debug argument will make freeopcua write A LOT to stdout + UaServer(); + explicit UaServer(bool debug); + + /// @brief set endpoint uri on wich server will listen. + /// opc.tcp://localhost:4841/opcua/server + /// opc.tcp://192.168.1.1:4840/opcua/server + /// opc.tcp://server.freeopca.org:4841/opcua/server + void SetEndpoint(const std::string & endpoint); + + /// @brief setup server description + void SetProductURI(const std::string & uri); + void SetServerURI(const std::string & uri); + void SetServerName(const std::string & name); + + /// @brief load xml addressspace. This is not implemented yet!!! + void AddAddressSpace(const std::string & path); + + /// @brief Enable event notification on Server node + /// this is necessary if you want to be able to send custom events + // (Not for datachange events!) + void EnableEventNotification(); + + /// @brief Register your application namespace + // Every application will probably have its own namespace + // example: urn:mydomain:myfancyapplication + // the returned index will then be used + uint32_t RegisterNamespace(std::string uri); + uint32_t GetNamespaceIndex(std::string uri); + + /// @brief Start and Stop server + // if you do not stop server you may get into trouble! + // we have several threads running + void Start(); + void Stop(); + + /// @brief Get a specific node by nodeid + // you can also access a standard node from addressspace using + // ObjectId, for example: + // Node mynode = GetNode(ObjectId::Server); + // using a string is also possible: + // Node mynode = GetNode("ns=3;i=55"); + Node GetNode(const NodeId & nodeid) const; + Node GetNode(const std::string & nodeid) const; + + /// @brief helper methods for node you will probably want to access + Node GetRootNode() const; + Node GetObjectsNode() const; + Node GetServerNode() const; + + /// @brief Get a node using its browsepath + Node GetNodeFromPath(const std::vector & path) const; + Node GetNodeFromPath(const std::vector & path) const; + + /// @brief Trigger and event + // Event will be send from Server node. + // It is possible to send events from arbitrarily nodes but it looks like + // most servers only send events from Server node + void TriggerEvent(Event event); + + /// @brief Create a subscription objects + // returned object can then be used to subscribe to + // datachange or custom events on server side + std::unique_ptr CreateSubscription(unsigned int period, SubscriptionHandler & callback); + + /// @brief Create a server operations object + ServerOperations CreateServerOperations(); + +protected: + std::vector XmlAddressSpaces; + // defined some sensible defaults that should let most clients connects + std::string Endpoint; + std::string ServerUri = "urn:freeopcua:server"; + std::string ProductUri = "urn:freeopcua.github.no:server"; + std::string Name = "FreeOpcUa Server"; + bool Debug = false; + bool LoadCppAddressSpace = true; + OpcUa::MessageSecurityMode SecurityMode = OpcUa::MessageSecurityMode::None; + void CheckStarted() const; + + Common::AddonsManager::SharedPtr Addons; + Server::ServicesRegistry::SharedPtr Registry; + Server::SubscriptionService::SharedPtr SubscriptionService; +}; } diff --git a/include/opc/ua/server/services_registry.h b/include/opc/ua/server/services_registry.h index bd10582d..3f734b3a 100644 --- a/include/opc/ua/server/services_registry.h +++ b/include/opc/ua/server/services_registry.h @@ -14,38 +14,38 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - class ServicesRegistry : private Common::Interface - { - public: - DEFINE_CLASS_POINTERS(ServicesRegistry) +class ServicesRegistry : private Common::Interface +{ +public: + DEFINE_CLASS_POINTERS(ServicesRegistry) - public: - virtual std::shared_ptr GetServer() const = 0; +public: + virtual std::shared_ptr GetServer() const = 0; - virtual void RegisterEndpointsServices(OpcUa::EndpointServices::SharedPtr endpoints) = 0; - virtual void UnregisterEndpointsServices() = 0; + virtual void RegisterEndpointsServices(OpcUa::EndpointServices::SharedPtr endpoints) = 0; + virtual void UnregisterEndpointsServices() = 0; - virtual void RegisterViewServices(OpcUa::ViewServices::SharedPtr views) = 0; - virtual void UnregisterViewServices() = 0; + virtual void RegisterViewServices(OpcUa::ViewServices::SharedPtr views) = 0; + virtual void UnregisterViewServices() = 0; - virtual void RegisterAttributeServices(OpcUa::AttributeServices::SharedPtr attributes) = 0; - virtual void UnregisterAttributeServices() = 0; + virtual void RegisterAttributeServices(OpcUa::AttributeServices::SharedPtr attributes) = 0; + virtual void UnregisterAttributeServices() = 0; - virtual void RegisterMethodServices(MethodServices::SharedPtr method) = 0; - virtual void UnregisterMethodServices() = 0; + virtual void RegisterMethodServices(MethodServices::SharedPtr method) = 0; + virtual void UnregisterMethodServices() = 0; - virtual void RegisterNodeManagementServices(OpcUa::NodeManagementServices::SharedPtr attributes) = 0; - virtual void UnregisterNodeManagementServices() = 0; + virtual void RegisterNodeManagementServices(OpcUa::NodeManagementServices::SharedPtr attributes) = 0; + virtual void UnregisterNodeManagementServices() = 0; - virtual void RegisterSubscriptionServices(OpcUa::SubscriptionServices::SharedPtr attributes) = 0; - virtual void UnregisterSubscriptionServices() = 0; - }; + virtual void RegisterSubscriptionServices(OpcUa::SubscriptionServices::SharedPtr attributes) = 0; + virtual void UnregisterSubscriptionServices() = 0; +}; - ServicesRegistry::UniquePtr CreateServicesRegistry(); +ServicesRegistry::UniquePtr CreateServicesRegistry(); - } +} } // namespace OpcUa diff --git a/include/opc/ua/server/standard_address_space.h b/include/opc/ua/server/standard_address_space.h index 6572ebb3..c66d6534 100644 --- a/include/opc/ua/server/standard_address_space.h +++ b/include/opc/ua/server/standard_address_space.h @@ -14,11 +14,11 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - void FillStandardNamespace(OpcUa::NodeManagementServices& registry, bool debug); +void FillStandardNamespace(OpcUa::NodeManagementServices & registry, bool debug); - } // namespace UaServer +} // namespace UaServer } // namespace OpcUa diff --git a/include/opc/ua/server/subscription_service.h b/include/opc/ua/server/subscription_service.h index caa65e65..9893e7fe 100644 --- a/include/opc/ua/server/subscription_service.h +++ b/include/opc/ua/server/subscription_service.h @@ -17,26 +17,26 @@ namespace boost { - namespace asio - { - class io_service; - } +namespace asio +{ +class io_service; +} } namespace OpcUa { - namespace Server - { +namespace Server +{ - class SubscriptionService : public SubscriptionServices - { - public: - DEFINE_CLASS_POINTERS(SubscriptionService) +class SubscriptionService : public SubscriptionServices +{ +public: + DEFINE_CLASS_POINTERS(SubscriptionService) - virtual void TriggerEvent(NodeId node, Event event) = 0; - }; + virtual void TriggerEvent(NodeId node, Event event) = 0; +}; - SubscriptionService::UniquePtr CreateSubscriptionService(std::shared_ptr addressspace, boost::asio::io_service& io, bool debug); +SubscriptionService::UniquePtr CreateSubscriptionService(std::shared_ptr addressspace, boost::asio::io_service & io, bool debug); - } // namespace UaServer +} // namespace UaServer } // nmespace OpcUa diff --git a/include/opc/ua/server_operations.h b/include/opc/ua/server_operations.h index 586bb192..26df59b8 100644 --- a/include/opc/ua/server_operations.h +++ b/include/opc/ua/server_operations.h @@ -5,24 +5,26 @@ #include -namespace OpcUa{ - class UaClient; - class UaServer; +namespace OpcUa +{ +class UaClient; +class UaServer; - class ServerOperations { - friend UaClient; - friend UaServer; +class ServerOperations +{ + friend UaClient; + friend UaServer; - Services::SharedPtr Server; - protected: - ServerOperations(Services::SharedPtr Server); + Services::SharedPtr Server; +protected: + ServerOperations(Services::SharedPtr Server); - public: - void WriteAttributes(std::vector&); - std::vector ReadAttributes(std::vector& attributes); - std::vector ReadAttributes(std::vector& nodes, AttributeId attr); - std::vector RegisterNodes(std::vector&); - //NB This makes the given nodes invalid - void UnregisterNodes(std::vector&); - }; +public: + void WriteAttributes(std::vector &); + std::vector ReadAttributes(std::vector & attributes); + std::vector ReadAttributes(std::vector & nodes, AttributeId attr); + std::vector RegisterNodes(std::vector &); + //NB This makes the given nodes invalid + void UnregisterNodes(std::vector &); +}; } \ No newline at end of file diff --git a/include/opc/ua/services/attributes.h b/include/opc/ua/services/attributes.h index e25030da..f61a834a 100644 --- a/include/opc/ua/services/attributes.h +++ b/include/opc/ua/services/attributes.h @@ -22,15 +22,15 @@ namespace OpcUa { - class AttributeServices : private Common::Interface - { - public: - DEFINE_CLASS_POINTERS(AttributeServices) - - public: - virtual std::vector Read(const OpcUa::ReadParameters& filter) const = 0; - virtual std::vector Write(const std::vector& filter) = 0; - }; +class AttributeServices : private Common::Interface +{ +public: + DEFINE_CLASS_POINTERS(AttributeServices) + +public: + virtual std::vector Read(const OpcUa::ReadParameters & filter) const = 0; + virtual std::vector Write(const std::vector & filter) = 0; +}; } // namespace OpcUa diff --git a/include/opc/ua/services/endpoints.h b/include/opc/ua/services/endpoints.h index 7d23fa9a..066a2235 100644 --- a/include/opc/ua/services/endpoints.h +++ b/include/opc/ua/services/endpoints.h @@ -20,24 +20,24 @@ namespace OpcUa { - struct ApplicationFilter - { - }; - struct ServerParameters - { - }; - - class EndpointServices : private Common::Interface - { - public: - DEFINE_CLASS_POINTERS(EndpointServices) - - public: - virtual std::vector FindServers(const FindServersParameters& params) const = 0; - // TODO Here all structuresmust be in one namespace. - virtual std::vector GetEndpoints(const GetEndpointsParameters& filter) const = 0; - virtual void RegisterServer(const ServerParameters& parameters) = 0; - }; +struct ApplicationFilter +{ +}; +struct ServerParameters +{ +}; + +class EndpointServices : private Common::Interface +{ +public: + DEFINE_CLASS_POINTERS(EndpointServices) + +public: + virtual std::vector FindServers(const FindServersParameters & params) const = 0; + // TODO Here all structuresmust be in one namespace. + virtual std::vector GetEndpoints(const GetEndpointsParameters & filter) const = 0; + virtual void RegisterServer(const ServerParameters & parameters) = 0; +}; } // namespace OpcUa diff --git a/include/opc/ua/services/method.h b/include/opc/ua/services/method.h index ca6e5d94..28240e1e 100644 --- a/include/opc/ua/services/method.h +++ b/include/opc/ua/services/method.h @@ -20,15 +20,15 @@ namespace OpcUa { - class MethodServices : private Common::Interface - { - public: - DEFINE_CLASS_POINTERS(MethodServices) - - public: - virtual std::vector Call(const std::vector& methodsToCall) = 0; - virtual void SetMethod(const NodeId& node, std::function (NodeId context, std::vector arguments)> callback) = 0; - }; +class MethodServices : private Common::Interface +{ +public: + DEFINE_CLASS_POINTERS(MethodServices) + +public: + virtual std::vector Call(const std::vector & methodsToCall) = 0; + virtual void SetMethod(const NodeId & node, std::function (NodeId context, std::vector arguments)> callback) = 0; +}; } // namespace OpcUa diff --git a/include/opc/ua/services/node_management.h b/include/opc/ua/services/node_management.h index 1007f6ad..9efd2d7e 100644 --- a/include/opc/ua/services/node_management.h +++ b/include/opc/ua/services/node_management.h @@ -22,15 +22,15 @@ namespace OpcUa { - class NodeManagementServices : private Common::Interface - { - public: - DEFINE_CLASS_POINTERS(NodeManagementServices) - - public: - virtual std::vector AddNodes(const std::vector& items) = 0; - virtual std::vector AddReferences(const std::vector& items) = 0; - }; +class NodeManagementServices : private Common::Interface +{ +public: + DEFINE_CLASS_POINTERS(NodeManagementServices) + +public: + virtual std::vector AddNodes(const std::vector & items) = 0; + virtual std::vector AddReferences(const std::vector & items) = 0; +}; } // namespace OpcUa diff --git a/include/opc/ua/services/services.h b/include/opc/ua/services/services.h index 48fd696f..8d0437c0 100644 --- a/include/opc/ua/services/services.h +++ b/include/opc/ua/services/services.h @@ -28,36 +28,36 @@ namespace OpcUa { - struct RemoteSessionParameters - { - ApplicationDescription ClientDescription; - std::vector ClientCertificate; - std::string SessionName; - std::string ServerURI; - std::string EndpointUrl; - Duration Timeout; - }; - - class Services : private Common::Interface - { - public: - DEFINE_CLASS_POINTERS(Services) - - public: - virtual OpenSecureChannelResponse OpenSecureChannel(const OpenSecureChannelParameters& parameters) = 0; - virtual void CloseSecureChannel(uint32_t channelId) = 0; - virtual CreateSessionResponse CreateSession(const RemoteSessionParameters& parameters) = 0; - virtual ActivateSessionResponse ActivateSession(const ActivateSessionParameters &session_parameters) = 0; - virtual CloseSessionResponse CloseSession() = 0; - virtual void AbortSession() = 0; - virtual DeleteNodesResponse DeleteNodes(const std::vector &nodesToDelete) = 0; - - virtual AttributeServices::SharedPtr Attributes() = 0; - virtual EndpointServices::SharedPtr Endpoints() = 0; - virtual MethodServices::SharedPtr Method() = 0; - virtual NodeManagementServices::SharedPtr NodeManagement() = 0; - virtual SubscriptionServices::SharedPtr Subscriptions() = 0; - virtual ViewServices::SharedPtr Views() = 0; - }; +struct RemoteSessionParameters +{ + ApplicationDescription ClientDescription; + std::vector ClientCertificate; + std::string SessionName; + std::string ServerURI; + std::string EndpointUrl; + Duration Timeout; +}; + +class Services : private Common::Interface +{ +public: + DEFINE_CLASS_POINTERS(Services) + +public: + virtual OpenSecureChannelResponse OpenSecureChannel(const OpenSecureChannelParameters & parameters) = 0; + virtual void CloseSecureChannel(uint32_t channelId) = 0; + virtual CreateSessionResponse CreateSession(const RemoteSessionParameters & parameters) = 0; + virtual ActivateSessionResponse ActivateSession(const ActivateSessionParameters & session_parameters) = 0; + virtual CloseSessionResponse CloseSession() = 0; + virtual void AbortSession() = 0; + virtual DeleteNodesResponse DeleteNodes(const std::vector & nodesToDelete) = 0; + + virtual AttributeServices::SharedPtr Attributes() = 0; + virtual EndpointServices::SharedPtr Endpoints() = 0; + virtual MethodServices::SharedPtr Method() = 0; + virtual NodeManagementServices::SharedPtr NodeManagement() = 0; + virtual SubscriptionServices::SharedPtr Subscriptions() = 0; + virtual ViewServices::SharedPtr Views() = 0; +}; } diff --git a/include/opc/ua/services/subscriptions.h b/include/opc/ua/services/subscriptions.h index cbea8986..a6864bb6 100644 --- a/include/opc/ua/services/subscriptions.h +++ b/include/opc/ua/services/subscriptions.h @@ -20,22 +20,22 @@ namespace OpcUa { - class SubscriptionServices : private Common::Interface - { - public: - DEFINE_CLASS_POINTERS(SubscriptionServices) - - public: - virtual SubscriptionData CreateSubscription(const CreateSubscriptionRequest&, std::function callbackPublish) = 0; - virtual ModifySubscriptionResponse ModifySubscription(const ModifySubscriptionParameters& parameters) = 0; - virtual std::vector DeleteSubscriptions(const std::vector& subscriptions) = 0; - virtual void Publish(const PublishRequest& request) = 0; - virtual RepublishResponse Republish(const RepublishParameters& params) = 0; - - //FIXME: Spec says MonitoredItems methods should be in their own service - virtual std::vector CreateMonitoredItems(const MonitoredItemsParameters& parameters) = 0; - virtual std::vector DeleteMonitoredItems(const DeleteMonitoredItemsParameters& params) = 0; - }; +class SubscriptionServices : private Common::Interface +{ +public: + DEFINE_CLASS_POINTERS(SubscriptionServices) + +public: + virtual SubscriptionData CreateSubscription(const CreateSubscriptionRequest &, std::function callbackPublish) = 0; + virtual ModifySubscriptionResponse ModifySubscription(const ModifySubscriptionParameters & parameters) = 0; + virtual std::vector DeleteSubscriptions(const std::vector & subscriptions) = 0; + virtual void Publish(const PublishRequest & request) = 0; + virtual RepublishResponse Republish(const RepublishParameters & params) = 0; + + //FIXME: Spec says MonitoredItems methods should be in their own service + virtual std::vector CreateMonitoredItems(const MonitoredItemsParameters & parameters) = 0; + virtual std::vector DeleteMonitoredItems(const DeleteMonitoredItemsParameters & params) = 0; +}; } diff --git a/include/opc/ua/services/view.h b/include/opc/ua/services/view.h index 24878a37..9cf41a2f 100644 --- a/include/opc/ua/services/view.h +++ b/include/opc/ua/services/view.h @@ -21,18 +21,18 @@ namespace OpcUa { - class ViewServices : private Common::Interface - { - public: - DEFINE_CLASS_POINTERS(ViewServices) - - public: - virtual std::vector Browse(const OpcUa::NodesQuery& query) const = 0; - virtual std::vector BrowseNext() const = 0; - virtual std::vector TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters& params) const = 0; - virtual std::vector RegisterNodes(const std::vector& params) const = 0; - virtual void UnregisterNodes(const std::vector& params) const = 0; - }; +class ViewServices : private Common::Interface +{ +public: + DEFINE_CLASS_POINTERS(ViewServices) + +public: + virtual std::vector Browse(const OpcUa::NodesQuery & query) const = 0; + virtual std::vector BrowseNext() const = 0; + virtual std::vector TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters & params) const = 0; + virtual std::vector RegisterNodes(const std::vector & params) const = 0; + virtual void UnregisterNodes(const std::vector & params) const = 0; +}; } // namespace OpcUa diff --git a/include/opc/ua/socket_channel.h b/include/opc/ua/socket_channel.h index 5437400c..9fb55521 100644 --- a/include/opc/ua/socket_channel.h +++ b/include/opc/ua/socket_channel.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -16,20 +16,20 @@ namespace OpcUa { - class SocketChannel : public OpcUa::IOChannel - { - public: - SocketChannel(int sock); - virtual ~SocketChannel(); +class SocketChannel : public OpcUa::IOChannel +{ +public: + SocketChannel(int sock); + virtual ~SocketChannel(); - virtual std::size_t Receive(char* data, std::size_t size); - virtual void Send(const char* message, std::size_t size); + virtual std::size_t Receive(char * data, std::size_t size); + virtual void Send(const char * message, std::size_t size); - virtual void Stop(); + virtual void Stop(); - private: - int Socket; - }; +private: + int Socket; +}; } diff --git a/include/opc/ua/subscription.h b/include/opc/ua/subscription.h index 57be7810..53fdca54 100644 --- a/include/opc/ua/subscription.h +++ b/include/opc/ua/subscription.h @@ -32,127 +32,127 @@ namespace OpcUa { - // the better void pointer - struct UserData - { - }; - - struct MonitoredItemData - { - IntegerId MonitoredItemId; - Node TargetNode; - AttributeId Attribute; - MonitoringFilter Filter; - UserData *usrVar; - }; +// the better void pointer +struct UserData +{ +}; - typedef std::map AttValMap; - typedef std::map SimpleAttOpMap; +struct MonitoredItemData +{ + IntegerId MonitoredItemId; + Node TargetNode; + AttributeId Attribute; + MonitoringFilter Filter; + UserData * usrVar; +}; + +typedef std::map AttValMap; +typedef std::map SimpleAttOpMap; - class SubscriptionHandler +class SubscriptionHandler +{ +public: + virtual ~SubscriptionHandler() {} + //Called for each datachange events + virtual void DataChange(uint32_t handle, const Node & node, const Variant & val, AttributeId attribute) { - public: - virtual ~SubscriptionHandler() {} - //Called for each datachange events - virtual void DataChange(uint32_t handle, const Node& node, const Variant& val, AttributeId attribute) - { - OPCUA_UNUSED(handle); - OPCUA_UNUSED(node); - OPCUA_UNUSED(val); - OPCUA_UNUSED(attribute); - std::cout << "default dc" << std::endl; - } - //Called for each datachange events - // Same as DataChange(), but it provides whole DataValue type with aditional fields like time stamps - virtual void DataValueChange(uint32_t handle, const Node& node, const DataValue& val, AttributeId attribute) - { - OPCUA_UNUSED(handle); - OPCUA_UNUSED(node); - OPCUA_UNUSED(val); - OPCUA_UNUSED(attribute); - } - //Called for every events receive from server - virtual void Event(uint32_t handle, const Event& event) - { - OPCUA_UNUSED(handle); - OPCUA_UNUSED(event); - std::cout << "default c++ event callback has been called" << std::endl; - } - //Called at server state changed - virtual void StatusChange(StatusCode status) - { - OPCUA_UNUSED(status); - } - }; - - - class Subscription + OPCUA_UNUSED(handle); + OPCUA_UNUSED(node); + OPCUA_UNUSED(val); + OPCUA_UNUSED(attribute); + std::cout << "default dc" << std::endl; + } + //Called for each datachange events + // Same as DataChange(), but it provides whole DataValue type with aditional fields like time stamps + virtual void DataValueChange(uint32_t handle, const Node & node, const DataValue & val, AttributeId attribute) { - public: - //Create a new subscription on server - //methods of callback object will be called everytime an event is received from the server - //FIXME: should we use interface or std::function for callback???? std::function syntax is ugly but is more flexible - //Alternative could be - //AddDataChangeCallback(std::function callback); - //AddEventCallback(std::function> callback); - Subscription(Services::SharedPtr server, const CreateSubscriptionParameters& params, SubscriptionHandler& callback, bool debug=false); - virtual ~Subscription() {} - - //Delete the subscription from server - void Delete(); - - //Get information about the subscription - SubscriptionData GetData() {return Data; } - uint32_t GetId() const { return Data.SubscriptionId; } - double GetPeriode() const { return Data.RevisedPublishingInterval; } - - //Subscribe to a Node attribute for its value to change - // Subscribe to nodes for specified attribute change - uint32_t SubscribeDataChange(const Node& node, AttributeId attr=AttributeId::Value); - std::vector SubscribeDataChange(const std::vector& attributes); - - // UserData pointer to have acces to user data in callback functions DataChange(),DataValueChange() - void setUsrPtr(uint32_t handle,UserData *usr); - UserData* getUsrPtr(uint32_t handle); - - //Unsubscribe to datachange or events - void UnSubscribe(uint32_t handle); - void UnSubscribe(std::vector handles); - - //Subscribe to Events for given node - //As far as I remember the only allowed node is Server in most SDKs - uint32_t SubscribeEvents(const Node& node, const EventFilter& eventfilter); - uint32_t SubscribeEvents(const Node& node, const Node& eventType); //subscribe to all variables og given event type - uint32_t SubscribeEvents(); //subscribe to variables of baseEventTypes and ServerNode - - // Subscribe using a MonitoredItemCreateRequest - // This method allow to fully customize the subscription - std::vector Subscribe(std::vector request); - - // Override this method if you want raw publish results from server - // for example if you want to make sure you do not miss any packets, etc, ... - virtual void PublishCallback( Services::SharedPtr serverLocalPtr, const PublishResult result); - - //Request republish of a notification from server - //SequenceNumber are send by server in PublishResult struct - RepublishResponse Republish(uint32_t sequenceNumber); - - - - private: - void CallDataChangeCallback(const NotificationData& data); - void CallEventCallback(const NotificationData& data); - void CallStatusChangeCallback(const NotificationData& data); - - Services::SharedPtr Server; - SubscriptionData Data; - SubscriptionHandler& Client; - uint32_t LastMonitoredItemHandle = 1; - AttValMap AttributeValueMap; - SimpleAttOpMap SimpleAttributeOperandMap; //Not used currently - std::mutex Mutex; - bool Debug; - }; + OPCUA_UNUSED(handle); + OPCUA_UNUSED(node); + OPCUA_UNUSED(val); + OPCUA_UNUSED(attribute); + } + //Called for every events receive from server + virtual void Event(uint32_t handle, const Event & event) + { + OPCUA_UNUSED(handle); + OPCUA_UNUSED(event); + std::cout << "default c++ event callback has been called" << std::endl; + } + //Called at server state changed + virtual void StatusChange(StatusCode status) + { + OPCUA_UNUSED(status); + } +}; + + +class Subscription +{ +public: + //Create a new subscription on server + //methods of callback object will be called everytime an event is received from the server + //FIXME: should we use interface or std::function for callback???? std::function syntax is ugly but is more flexible + //Alternative could be + //AddDataChangeCallback(std::function callback); + //AddEventCallback(std::function> callback); + Subscription(Services::SharedPtr server, const CreateSubscriptionParameters & params, SubscriptionHandler & callback, bool debug = false); + virtual ~Subscription() {} + + //Delete the subscription from server + void Delete(); + + //Get information about the subscription + SubscriptionData GetData() {return Data; } + uint32_t GetId() const { return Data.SubscriptionId; } + double GetPeriode() const { return Data.RevisedPublishingInterval; } + + //Subscribe to a Node attribute for its value to change + // Subscribe to nodes for specified attribute change + uint32_t SubscribeDataChange(const Node & node, AttributeId attr = AttributeId::Value); + std::vector SubscribeDataChange(const std::vector & attributes); + + // UserData pointer to have acces to user data in callback functions DataChange(),DataValueChange() + void setUsrPtr(uint32_t handle, UserData * usr); + UserData * getUsrPtr(uint32_t handle); + + //Unsubscribe to datachange or events + void UnSubscribe(uint32_t handle); + void UnSubscribe(std::vector handles); + + //Subscribe to Events for given node + //As far as I remember the only allowed node is Server in most SDKs + uint32_t SubscribeEvents(const Node & node, const EventFilter & eventfilter); + uint32_t SubscribeEvents(const Node & node, const Node & eventType); //subscribe to all variables og given event type + uint32_t SubscribeEvents(); //subscribe to variables of baseEventTypes and ServerNode + + // Subscribe using a MonitoredItemCreateRequest + // This method allow to fully customize the subscription + std::vector Subscribe(std::vector request); + + // Override this method if you want raw publish results from server + // for example if you want to make sure you do not miss any packets, etc, ... + virtual void PublishCallback(Services::SharedPtr serverLocalPtr, const PublishResult result); + + //Request republish of a notification from server + //SequenceNumber are send by server in PublishResult struct + RepublishResponse Republish(uint32_t sequenceNumber); + + + +private: + void CallDataChangeCallback(const NotificationData & data); + void CallEventCallback(const NotificationData & data); + void CallStatusChangeCallback(const NotificationData & data); + + Services::SharedPtr Server; + SubscriptionData Data; + SubscriptionHandler & Client; + uint32_t LastMonitoredItemHandle = 1; + AttValMap AttributeValueMap; + SimpleAttOpMap SimpleAttributeOperandMap; //Not used currently + std::mutex Mutex; + bool Debug; +}; } diff --git a/python/examples/nodeopcuaclient.cpp b/python/examples/nodeopcuaclient.py similarity index 100% rename from python/examples/nodeopcuaclient.cpp rename to python/examples/nodeopcuaclient.py diff --git a/python/src/py_opcua_module.cpp b/python/src/py_opcua_module.cpp index c09e0ac8..cbc29c1b 100644 --- a/python/src/py_opcua_module.cpp +++ b/python/src/py_opcua_module.cpp @@ -31,8 +31,8 @@ #include "py_opcua_variant.h" #if PY_MAJOR_VERSION >= 3 - #define PyString_Check PyUnicode_Check - #define PyString_AsString(S) PyBytes_AsString(PyUnicode_AsUTF8String(S)) +#define PyString_Check PyUnicode_Check +#define PyString_AsString(S) PyBytes_AsString(PyUnicode_AsUTF8String(S)) #endif using namespace boost::python; @@ -51,51 +51,52 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(SubscriptionSubscribeDataChange_stubs, Su // DateTime helpers //-------------------------------------------------------------------------- -static boost::python::object ToPyDateTime(const DateTime& self ) +static boost::python::object ToPyDateTime(const DateTime & self) { - boost::posix_time::ptime ref(boost::gregorian::date(1601,1,1)); - boost::posix_time::ptime dt = ref + boost::posix_time::microseconds(self.Value/10); + boost::posix_time::ptime ref(boost::gregorian::date(1601, 1, 1)); + boost::posix_time::ptime dt = ref + boost::posix_time::microseconds(self.Value / 10); // The constructor of the python datetime objects creates a datetime object using the locale timezone // but returns a naive timezone objects...this sounds a bit crazy... // we may want to add timezone... I do not know how uint32_t precision = dt.time_of_day().num_fractional_digits(); - PyObject* obj = PyDateTime_FromDateAndTime((int)dt.date().year(), - (int)dt.date().month(), - (int)dt.date().day(), - dt.time_of_day().hours(), - dt.time_of_day().minutes(), - dt.time_of_day().seconds(), - dt.time_of_day().fractional_seconds() / pow(10, precision-6)); + PyObject * obj = PyDateTime_FromDateAndTime((int)dt.date().year(), + (int)dt.date().month(), + (int)dt.date().day(), + dt.time_of_day().hours(), + dt.time_of_day().minutes(), + dt.time_of_day().seconds(), + dt.time_of_day().fractional_seconds() / pow(10, precision - 6)); return boost::python::object(boost::python::handle<>(obj)); } -static uint64_t ToWinEpoch(PyObject* pydate) +static uint64_t ToWinEpoch(PyObject * pydate) { boost::gregorian::date _date(PyDateTime_GET_YEAR(pydate), PyDateTime_GET_MONTH(pydate), PyDateTime_GET_DAY(pydate)); boost::posix_time::time_duration _duration(PyDateTime_DATE_GET_HOUR(pydate), PyDateTime_DATE_GET_MINUTE(pydate), PyDateTime_DATE_GET_SECOND(pydate), 0); _duration += boost::posix_time::microseconds(PyDateTime_DATE_GET_MICROSECOND(pydate)); - boost::posix_time::ptime myptime(_date, _duration); - boost::posix_time::ptime ref(boost::gregorian::date(1601,1,1)); + boost::posix_time::ptime myptime(_date, _duration); + boost::posix_time::ptime ref(boost::gregorian::date(1601, 1, 1)); return (myptime - ref).total_microseconds() * 10; } -static boost::shared_ptr makeOpcUaDateTime(const boost::python::object& bobj) +static boost::shared_ptr makeOpcUaDateTime(const boost::python::object & bobj) { - PyObject* pydate = bobj.ptr(); - if ( ! PyDateTime_Check(pydate) ) - { - throw std::runtime_error("method take a python datetime as argument"); - } + PyObject * pydate = bobj.ptr(); + + if (! PyDateTime_Check(pydate)) + { + throw std::runtime_error("method take a python datetime as argument"); + } return boost::shared_ptr(new DateTime(ToWinEpoch(pydate))); } struct DateTimeOpcUaToPythonConverter { - static PyObject* convert(const DateTime& dt) + static PyObject * convert(const DateTime & dt) { - return boost::python::incref( ToPyDateTime(dt).ptr()); + return boost::python::incref(ToPyDateTime(dt).ptr()); } }; @@ -107,21 +108,20 @@ struct DateTimePythonToOpcUaConverter boost::python::converter::registry::push_back(&convertible, &construct, boost::python::type_id()); } - static void* convertible(PyObject* obj_ptr) + static void * convertible(PyObject * obj_ptr) { - if (!PyDateTime_Check(obj_ptr)) return 0; + if (!PyDateTime_Check(obj_ptr)) { return 0; } + return obj_ptr; } - static void construct( PyObject* obj_ptr, boost::python::converter::rvalue_from_python_stage1_data* data) + static void construct(PyObject * obj_ptr, boost::python::converter::rvalue_from_python_stage1_data * data) { - void* storage = ( - (boost::python::converter::rvalue_from_python_storage*) - data)->storage.bytes; - - new (storage) DateTime(ToWinEpoch(obj_ptr)); - - data->convertible = storage; + void * storage = ((boost::python::converter::rvalue_from_python_storage *)data)->storage.bytes; + + new(storage) DateTime(ToWinEpoch(obj_ptr)); + + data->convertible = storage; } }; @@ -131,7 +131,7 @@ struct DateTimePythonToOpcUaConverter struct LocalizedTextToPythonConverter { - static PyObject* convert(const LocalizedText& text) + static PyObject * convert(const LocalizedText & text) { return boost::python::incref(boost::python::object(text.Text.c_str()).ptr()); } @@ -145,18 +145,19 @@ struct PythonStringToLocalizedTextConverter boost::python::converter::registry::push_back(&convertible, &construct, boost::python::type_id()); } - static void* convertible(PyObject* obj_ptr) + static void * convertible(PyObject * obj_ptr) { - if (!PyString_Check(obj_ptr)) return 0; + if (!PyString_Check(obj_ptr)) { return 0; } + return obj_ptr; } - static void construct( PyObject* obj_ptr, boost::python::converter::rvalue_from_python_stage1_data* data) + static void construct(PyObject * obj_ptr, boost::python::converter::rvalue_from_python_stage1_data * data) { - void* storage = ( (boost::python::converter::rvalue_from_python_storage*)data)->storage.bytes; - const char* value = PyString_AsString(obj_ptr); - new (storage) LocalizedText(std::string(value)); - data->convertible = storage; + void * storage = ((boost::python::converter::rvalue_from_python_storage *)data)->storage.bytes; + const char * value = PyString_AsString(obj_ptr); + new(storage) LocalizedText(std::string(value)); + data->convertible = storage; } }; @@ -274,7 +275,7 @@ static Node UaServer_GetNode(UaServer & self, ObjectId objectid) BOOST_PYTHON_MODULE(opcua) { - PyDateTime_IMPORT; + PyDateTime_IMPORT; using self_ns::str; // hack to enable __str__ in python classes with str(self) @@ -282,11 +283,11 @@ BOOST_PYTHON_MODULE(opcua) py_opcua_enums(); - DateTimePythonToOpcUaConverter(); - PythonStringToLocalizedTextConverter(); - to_python_converter(); + DateTimePythonToOpcUaConverter(); + PythonStringToLocalizedTextConverter(); + to_python_converter(); // Enable next line to return PyDateTime instead og DateTime in python - //to_python_converter(); + //to_python_converter(); @@ -300,7 +301,7 @@ BOOST_PYTHON_MODULE(opcua) .def(init()) .def("now", &DateTime::DateTime::Current) .def("__init__", make_constructor(makeOpcUaDateTime)) - .def("from_time_t", &DateTime::FromTimeT, DateTimeFromTimeT_stub((arg("sec"), arg("usec")=0))) + .def("from_time_t", &DateTime::FromTimeT, DateTimeFromTimeT_stub((arg("sec"), arg("usec") = 0))) .staticmethod("from_time_t") .def("to_datetime", &ToPyDateTime) .def("to_time_t", &DateTime::ToTimeT) @@ -313,23 +314,23 @@ BOOST_PYTHON_MODULE(opcua) //.def_readwrite("Text", &LocalizedText::Text) //; - + class_>("NodeId") - .def(init()) - .def(init()) - .def("__init__", make_constructor(NodeId_constructor)) // XXX add this constructor to freeopcua - .add_property("namespace_index", &NodeId::GetNamespaceIndex) - .add_property("identifier", &NodeId_GetIdentifier) - .add_property("encoding", &NodeId::GetEncodingValue) - .add_property("is_integer", &NodeId::IsInteger) - .add_property("is_binary", &NodeId::IsBinary) - .add_property("is_guid", &NodeId::IsGuid) - .add_property("is_string", &NodeId::IsString) - .def_readonly("namespace_uri", &NodeId::NamespaceURI) - .def(str(self)) - .def(repr(self)) - .def(self == self) - ; + .def(init()) + .def(init()) + .def("__init__", make_constructor(NodeId_constructor)) // XXX add this constructor to freeopcua + .add_property("namespace_index", &NodeId::GetNamespaceIndex) + .add_property("identifier", &NodeId_GetIdentifier) + .add_property("encoding", &NodeId::GetEncodingValue) + .add_property("is_integer", &NodeId::IsInteger) + .add_property("is_binary", &NodeId::IsBinary) + .add_property("is_guid", &NodeId::IsGuid) + .add_property("is_string", &NodeId::IsString) + .def_readonly("namespace_uri", &NodeId::NamespaceURI) + .def(str(self)) + .def(repr(self)) + .def(self == self) + ; to_python_converter, vector_to_python_converter>(); to_python_converter>, vector_to_python_converter>>(); @@ -345,17 +346,17 @@ BOOST_PYTHON_MODULE(opcua) ; class_>("DataValue") - .def(init()) - .def("__init__", make_constructor(DataValue_constructor1)) // Variant, VariantType + .def(init()) + .def("__init__", make_constructor(DataValue_constructor1)) // Variant, VariantType #define _property(X) add_property( #X, &DataValue_get_ ## X, &DataValue_set_ ## X) - ._property(value) - ._property(status) - ._property(source_timestamp) - ._property(source_picoseconds) - ._property(server_timestamp) - ._property(server_picoseconds) + ._property(value) + ._property(status) + ._property(source_timestamp) + ._property(source_picoseconds) + ._property(server_timestamp) + ._property(server_picoseconds) #undef _property - ; + ; to_python_converter, vector_to_python_converter>(); @@ -468,7 +469,7 @@ BOOST_PYTHON_MODULE(opcua) to_python_converter, vector_to_python_converter>(); vector_from_python_converter(); - + class_("SubscriptionHandler", init<>()) .def("data_change", &PySubscriptionHandler::DefaultDataChange) .staticmethod("data_change") @@ -508,18 +509,18 @@ BOOST_PYTHON_MODULE(opcua) class_("Client", init<>()) .def(init()) - .def("connect", (void (UaClient::*)(const std::string&)) &UaClient::Connect) - .def("connect", (void (UaClient::*)(const EndpointDescription&)) &UaClient::Connect) + .def("connect", (void (UaClient::*)(const std::string &)) &UaClient::Connect) + .def("connect", (void (UaClient::*)(const EndpointDescription &)) &UaClient::Connect) .def("disconnect", &UaClient::Disconnect) .def("get_namespace_index", &UaClient::GetNamespaceIndex) .def("get_root_node", &UaClient::GetRootNode) .def("get_objects_node", &UaClient::GetObjectsNode) .def("get_server_node", &UaClient::GetServerNode) - .def("get_node", (Node(UaClient::*)(const std::string&) const) &UaClient::GetNode) - .def("get_node", (Node(UaClient::*)(const NodeId&) const) &UaClient::GetNode) + .def("get_node", (Node(UaClient::*)(const std::string &) const) &UaClient::GetNode) + .def("get_node", (Node(UaClient::*)(const NodeId &) const) &UaClient::GetNode) .def("get_node", &UaClient_GetNode) .def("get_endpoint", &UaClient::GetEndpoint) - .def("get_server_endpoints", (std::vector (UaClient::*)(const std::string&)) &UaClient::GetServerEndpoints) + .def("get_server_endpoints", (std::vector (UaClient::*)(const std::string &)) &UaClient::GetServerEndpoints) .def("get_server_endpoints", (std::vector (UaClient::*)()) &UaClient::GetServerEndpoints) .def("set_session_name", &UaClient::SetSessionName) .def("get_session_name", &UaClient::GetSessionName) @@ -541,8 +542,8 @@ BOOST_PYTHON_MODULE(opcua) .def("get_root_node", &UaServer::GetRootNode) .def("get_objects_node", &UaServer::GetObjectsNode) .def("get_server_node", &UaServer::GetServerNode) - .def("get_node", (Node(UaServer::*)(const std::string&) const) &UaServer::GetNode) - .def("get_node", (Node(UaServer::*)(const NodeId&) const) &UaServer::GetNode) + .def("get_node", (Node(UaServer::*)(const std::string &) const) &UaServer::GetNode) + .def("get_node", (Node(UaServer::*)(const NodeId &) const) &UaServer::GetNode) .def("get_node", &UaServer_GetNode) .def("set_uri", &UaServer::SetServerURI) .def("add_xml_address_space", &UaServer::AddAddressSpace) diff --git a/python/src/py_opcua_subscriptionclient.cpp b/python/src/py_opcua_subscriptionclient.cpp index b17c358b..c9e3df95 100644 --- a/python/src/py_opcua_subscriptionclient.cpp +++ b/python/src/py_opcua_subscriptionclient.cpp @@ -103,6 +103,7 @@ void PySubscriptionHandler::Event(uint32_t handle, const OpcUa::Event & event) { call_method(self, "event", handle, event); } + catch (const error_already_set & ex) { std::string perror_str = parse_python_exception(); diff --git a/python/src/py_opcua_variant.h b/python/src/py_opcua_variant.h index 23de1df2..0b8b4b51 100644 --- a/python/src/py_opcua_variant.h +++ b/python/src/py_opcua_variant.h @@ -126,6 +126,7 @@ Variant ToVariant(const object & obj) { var = extract>(obj)(); } + else { throw std::logic_error("Cannot create variant from python list. Unsupported type."); @@ -147,10 +148,12 @@ Variant ToVariant(const object & obj) { var = extract(obj)(); } + else if (extract(obj).check()) { var = extract(obj)(); } + else { throw std::logic_error("Cannot create variant from python object. Unsupported type."); diff --git a/python/tests/test_computer.cpp b/python/tests/test_computer.cpp index 47007fdc..88bbd50e 100644 --- a/python/tests/test_computer.cpp +++ b/python/tests/test_computer.cpp @@ -14,251 +14,251 @@ namespace { - using namespace OpcUa; +using namespace OpcUa; - class TestEndpoints : public EndpointServices +class TestEndpoints : public EndpointServices +{ +public: + TestEndpoints(const std::string & url) + : Applications(GetApplications(url)) + , Endpoints(GetEndpoints(url)) { - public: - TestEndpoints(const std::string& url) - : Applications(GetApplications(url)) - , Endpoints(GetEndpoints(url)) - { - } + } - virtual std::vector FindServers(const FindServersParameters& params) const - { - return Applications; - } + virtual std::vector FindServers(const FindServersParameters & params) const + { + return Applications; + } - virtual std::vector GetEndpoints(const EndpointsFilter& filter) const - { - return Endpoints; - } + virtual std::vector GetEndpoints(const EndpointsFilter & filter) const + { + return Endpoints; + } - virtual void RegisterServer(const ServerParameters& parameters) - { - throw std::logic_error("not implemented."); - } + virtual void RegisterServer(const ServerParameters & parameters) + { + throw std::logic_error("not implemented."); + } - private: - std::vector GetApplications(const std::string& url) const - { - ApplicationDescription app; - app.URI = "URI"; - app.Type = ApplicationType::Client; - app.ProductURI = "ProductURI"; - app.Name.Text = "Name"; - app.GatewayServerURI = "GatewayServerURI"; - app.DiscoveryProfileURI = "DiscoveryProfileURI"; - app.DiscoveryURLs.push_back(url); - return std::vector(1, app); - } +private: + std::vector GetApplications(const std::string & url) const + { + ApplicationDescription app; + app.URI = "URI"; + app.Type = ApplicationType::Client; + app.ProductURI = "ProductURI"; + app.Name.Text = "Name"; + app.GatewayServerURI = "GatewayServerURI"; + app.DiscoveryProfileURI = "DiscoveryProfileURI"; + app.DiscoveryURLs.push_back(url); + return std::vector(1, app); + } - std::vector GetEndpoints(const std::string& url) const - { - EndpointDescription endpoint; - endpoint.EndpointUrl = url; - endpoint.SecurityLevel = 1; - endpoint.SecurityMode = OpcUa::MessageSecurityMode::None; - endpoint.SecurityPolicyUri = "SecurityPolicyUri"; - endpoint.ServerCertificate.push_back(1); - endpoint.Server = GetApplications(url).front(); - endpoint.TransportProfileUri = "TransportProfileURI"; - endpoint.UserIdentityTokens = GetUserTokens(); - return std::vector(1, endpoint); - } + std::vector GetEndpoints(const std::string & url) const + { + EndpointDescription endpoint; + endpoint.EndpointUrl = url; + endpoint.SecurityLevel = 1; + endpoint.SecurityMode = OpcUa::MessageSecurityMode::None; + endpoint.SecurityPolicyUri = "SecurityPolicyUri"; + endpoint.ServerCertificate.push_back(1); + endpoint.Server = GetApplications(url).front(); + endpoint.TransportProfileUri = "TransportProfileURI"; + endpoint.UserIdentityTokens = GetUserTokens(); + return std::vector(1, endpoint); + } - std::vector GetUserTokens() const - { - OpcUa::UserTokenPolicy policy; - policy.IssuedTokenType = "IssuedTokenType"; - policy.IssuerEndpointUrl = "IssuerEndpointUrl"; - policy.PolicyId = "PolicyId"; - policy.SecurityPolicyUri = "SecurityPolicyUri"; - policy.TokenType = UserTokenType::UserName; - return std::vector(1, policy); - } + std::vector GetUserTokens() const + { + OpcUa::UserTokenPolicy policy; + policy.IssuedTokenType = "IssuedTokenType"; + policy.IssuerEndpointUrl = "IssuerEndpointUrl"; + policy.PolicyId = "PolicyId"; + policy.SecurityPolicyUri = "SecurityPolicyUri"; + policy.TokenType = UserTokenType::UserName; + return std::vector(1, policy); + } - private: - std::vector Applications; - std::vector Endpoints; - }; +private: + std::vector Applications; + std::vector Endpoints; +}; - void Assert(bool isTrue, const char* msg) - { - if (!isTrue) +void Assert(bool isTrue, const char * msg) +{ + if (!isTrue) { throw std::logic_error(msg); } - } +} - class TestAttributes : public AttributeServices +class TestAttributes : public AttributeServices +{ +public: + virtual std::vector Read(const OpcUa::ReadParameters & params) const { - public: - virtual std::vector Read(const OpcUa::ReadParameters& params) const - { - Assert(params.MaxAge == 1, "Invalid MaxAgeValue"); - Assert(params.TimestampsType == TimestampsToReturn::BOTH, "Invalid value of TimestampsToReturn."); - Assert(params.AttributesToRead.size() == 1, "Invalid size of AttributesToRead."); - - OpcUa::ReadValueId id = params.AttributesToRead[0]; - Assert(id.Attribute == AttributeId::Value, "Invalid value of Attribute Id."); - Assert(id.DataEncoding.NamespaceIndex == 3, "Invalid namespace index in DataEncoding."); - Assert(id.DataEncoding.Name == "binary", "Invalid name in DataEncoding."); - Assert(id.IndexRange == "1:2", "Invalid value of IndexRange."); - Assert(id.Node.IsInteger(), "Node id is not integer."); - Assert(id.Node.GetIntegerIdentifier() == 2, "Node id is not equal to 2."); - Assert(id.Node.GetNamespaceIndex() == 1, "NodeId's namespace index is not equal to 1."); - - DataValue data; - data.Encoding = - DATA_VALUE | - DATA_VALUE_STATUS_CODE | - DATA_VALUE_SOURCE_TIMESTAMP | - DATA_VALUE_Server_TIMESTAMP | - DATA_VALUE_SOURCE_PICOSECONDS | - DATA_VALUE_Server_PICOSECONDS; - data.ServerPicoseconds = 1; - data.ServerTimestamp.Value = 2; - data.SourcePicoseconds = 3; - data.SourceTimestamp.Value = 4; - data.Status = StatusCode::BadNotReadable; - data.Value = std::string("value"); - - return std::vector(1, data); - } + Assert(params.MaxAge == 1, "Invalid MaxAgeValue"); + Assert(params.TimestampsType == TimestampsToReturn::BOTH, "Invalid value of TimestampsToReturn."); + Assert(params.AttributesToRead.size() == 1, "Invalid size of AttributesToRead."); + + OpcUa::ReadValueId id = params.AttributesToRead[0]; + Assert(id.Attribute == AttributeId::Value, "Invalid value of Attribute Id."); + Assert(id.DataEncoding.NamespaceIndex == 3, "Invalid namespace index in DataEncoding."); + Assert(id.DataEncoding.Name == "binary", "Invalid name in DataEncoding."); + Assert(id.IndexRange == "1:2", "Invalid value of IndexRange."); + Assert(id.Node.IsInteger(), "Node id is not integer."); + Assert(id.Node.GetIntegerIdentifier() == 2, "Node id is not equal to 2."); + Assert(id.Node.GetNamespaceIndex() == 1, "NodeId's namespace index is not equal to 1."); + + DataValue data; + data.Encoding = + DATA_VALUE | + DATA_VALUE_STATUS_CODE | + DATA_VALUE_SOURCE_TIMESTAMP | + DATA_VALUE_Server_TIMESTAMP | + DATA_VALUE_SOURCE_PICOSECONDS | + DATA_VALUE_Server_PICOSECONDS; + data.ServerPicoseconds = 1; + data.ServerTimestamp.Value = 2; + data.SourcePicoseconds = 3; + data.SourceTimestamp.Value = 4; + data.Status = StatusCode::BadNotReadable; + data.Value = std::string("value"); + + return std::vector(1, data); + } - virtual std::vector Write(const std::vector& data) - { - Assert(data.size() == 1, "Invalid number od data for write."); - const OpcUa::WriteValue& value = data[0]; - Assert(value.Attribute == OpcUa::AttributeId::Value, "Invalid id of attribute."); - Assert(value.Node.Encoding == NodeIdEncoding::EV_STRING, "Invalid encoding of node."); - Assert(value.Node.StringData.NamespaceIndex == 1, "Invalid namespace of node."); - Assert(value.Node.StringData.Identifier == "node", "Invalid identifier of node."); - Assert(value.NumericRange == "1:2", "Invalid numeric range."); - Assert(value.Data.ServerPicoseconds == 1, "Invalid ServerPicoseconds."); - Assert(value.Data.ServerTimestamp.Value == 2, "Invalid ServerTimeStamp."); - Assert(value.Data.SourcePicoseconds == 3, "Invalid SourcePicoseconds."); - Assert(value.Data.SourceTimestamp.Value == 4, "Invalid SourceTimeStamp."); - Assert(value.Data.Status == StatusCode::BadNotReadable, "Invalid data status."); - Assert(value.Data.Value.Type() == VariantType::STRING, "Invalid data type."); - Assert(value.Data.Value.As().size() == 1, "Invalid number of strings in variant."); - Assert(value.Data.Value == std::vector(1, "value"), "Invalid data value."); - - const uint8_t encoding = - DATA_VALUE | - DATA_VALUE_STATUS_CODE | - DATA_VALUE_SOURCE_TIMESTAMP | - DATA_VALUE_Server_TIMESTAMP | - DATA_VALUE_SOURCE_PICOSECONDS | - DATA_VALUE_Server_PICOSECONDS; - - Assert(value.Data.Encoding == encoding, "Invalid encoding mask."); - - return std::vector(1, StatusCode::BadNotReadable); - } - }; + virtual std::vector Write(const std::vector & data) + { + Assert(data.size() == 1, "Invalid number od data for write."); + const OpcUa::WriteValue & value = data[0]; + Assert(value.Attribute == OpcUa::AttributeId::Value, "Invalid id of attribute."); + Assert(value.Node.Encoding == NodeIdEncoding::EV_STRING, "Invalid encoding of node."); + Assert(value.Node.StringData.NamespaceIndex == 1, "Invalid namespace of node."); + Assert(value.Node.StringData.Identifier == "node", "Invalid identifier of node."); + Assert(value.NumericRange == "1:2", "Invalid numeric range."); + Assert(value.Data.ServerPicoseconds == 1, "Invalid ServerPicoseconds."); + Assert(value.Data.ServerTimestamp.Value == 2, "Invalid ServerTimeStamp."); + Assert(value.Data.SourcePicoseconds == 3, "Invalid SourcePicoseconds."); + Assert(value.Data.SourceTimestamp.Value == 4, "Invalid SourceTimeStamp."); + Assert(value.Data.Status == StatusCode::BadNotReadable, "Invalid data status."); + Assert(value.Data.Value.Type() == VariantType::STRING, "Invalid data type."); + Assert(value.Data.Value.As().size() == 1, "Invalid number of strings in variant."); + Assert(value.Data.Value == std::vector(1, "value"), "Invalid data value."); + + const uint8_t encoding = + DATA_VALUE | + DATA_VALUE_STATUS_CODE | + DATA_VALUE_SOURCE_TIMESTAMP | + DATA_VALUE_Server_TIMESTAMP | + DATA_VALUE_SOURCE_PICOSECONDS | + DATA_VALUE_Server_PICOSECONDS; + + Assert(value.Data.Encoding == encoding, "Invalid encoding mask."); + + return std::vector(1, StatusCode::BadNotReadable); + } +}; - class TestViewServices : public ViewServices +class TestViewServices : public ViewServices +{ +public: + virtual std::vector Browse(const OpcUa::NodesQuery & query) const { - public: - virtual std::vector Browse(const OpcUa::NodesQuery& query) const - { - ReferenceDescription ref; - ref.BrowseName.Name = "Name"; - ref.BrowseName.NamespaceIndex = 1; - ref.DisplayName.Text = "Text"; - ref.IsForward = true; - ref.ReferenceTypeId.Encoding = OpcUa::NodeIdEncoding::EV_STRING; - ref.ReferenceTypeId.StringData.NamespaceIndex = 2; - ref.ReferenceTypeId.StringData.Identifier = "Identifier"; - ref.TargetNodeClass = OpcUa::NodeClass::Variable; - ref.TargetNodeId.Encoding = OpcUa::NodeIdEncoding::EV_FOUR_BYTE; - ref.TargetNodeId.FourByteData.NamespaceIndex = 3; - ref.TargetNodeId.FourByteData.Identifier = 4; - ref.TargetNodeTypeDefinition.Encoding = OpcUa::NodeIdEncoding::EV_NUMERIC; - ref.TargetNodeTypeDefinition.NumericData.NamespaceIndex = 5; - ref.TargetNodeTypeDefinition.NumericData.Identifier = 6; - return std::vector(1, ref); - } + ReferenceDescription ref; + ref.BrowseName.Name = "Name"; + ref.BrowseName.NamespaceIndex = 1; + ref.DisplayName.Text = "Text"; + ref.IsForward = true; + ref.ReferenceTypeId.Encoding = OpcUa::NodeIdEncoding::EV_STRING; + ref.ReferenceTypeId.StringData.NamespaceIndex = 2; + ref.ReferenceTypeId.StringData.Identifier = "Identifier"; + ref.TargetNodeClass = OpcUa::NodeClass::Variable; + ref.TargetNodeId.Encoding = OpcUa::NodeIdEncoding::EV_FOUR_BYTE; + ref.TargetNodeId.FourByteData.NamespaceIndex = 3; + ref.TargetNodeId.FourByteData.Identifier = 4; + ref.TargetNodeTypeDefinition.Encoding = OpcUa::NodeIdEncoding::EV_NUMERIC; + ref.TargetNodeTypeDefinition.NumericData.NamespaceIndex = 5; + ref.TargetNodeTypeDefinition.NumericData.Identifier = 6; + return std::vector(1, ref); + } - virtual std::vector BrowseNext() const - { - return std::vector(); - } + virtual std::vector BrowseNext() const + { + return std::vector(); + } - virtual std::vector TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters& params) const - { - throw std::logic_error("not implemented."); - } - }; + virtual std::vector TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters & params) const + { + throw std::logic_error("not implemented."); + } +}; - class TestComputer : public Services +class TestComputer : public Services +{ +public: + TestComputer(const std::string & url) + : EndpointsImpl(new TestEndpoints(url)) + , ViewsImpl(new TestViewServices()) + , AttributesImpl(new TestAttributes) { - public: - TestComputer(const std::string& url) - : EndpointsImpl(new TestEndpoints(url)) - , ViewsImpl(new TestViewServices()) - , AttributesImpl(new TestAttributes) - { - } + } - virtual void CreateSession(const RemoteSessionParameters& parameters) - { - throw std::logic_error("not implemented."); - } + virtual void CreateSession(const RemoteSessionParameters & parameters) + { + throw std::logic_error("not implemented."); + } - virtual void ActivateSession() - { - throw std::logic_error("not implemented."); - } + virtual void ActivateSession() + { + throw std::logic_error("not implemented."); + } - virtual void CloseSession() - { - throw std::logic_error("not implemented."); - } + virtual void CloseSession() + { + throw std::logic_error("not implemented."); + } - virtual std::shared_ptr Endpoints() - { - return EndpointsImpl; - } + virtual std::shared_ptr Endpoints() + { + return EndpointsImpl; + } - virtual std::shared_ptr Views() - { - return ViewsImpl; - } + virtual std::shared_ptr Views() + { + return ViewsImpl; + } - virtual std::shared_ptr Attributes() - { - return AttributesImpl; - } + virtual std::shared_ptr Attributes() + { + return AttributesImpl; + } - virtual std::shared_ptr Subscriptions() - { - throw std::logic_error("not implemented."); - } + virtual std::shared_ptr Subscriptions() + { + throw std::logic_error("not implemented."); + } - virtual std::shared_ptr NodeManagement() - { - throw std::logic_error("not implemented."); - } + virtual std::shared_ptr NodeManagement() + { + throw std::logic_error("not implemented."); + } - private: - EndpointServices::SharedPtr EndpointsImpl; - ViewServices::SharedPtr ViewsImpl; - AttributeServices::SharedPtr AttributesImpl; - }; +private: + EndpointServices::SharedPtr EndpointsImpl; + ViewServices::SharedPtr ViewsImpl; + AttributeServices::SharedPtr AttributesImpl; +}; } namespace OpcUa { - std::unique_ptr Connect(const std::string& url) - { - return std::unique_ptr(new TestComputer(url)); - } +std::unique_ptr Connect(const std::string & url) +{ + return std::unique_ptr(new TestComputer(url)); +} } diff --git a/restyle b/restyle new file mode 100755 index 00000000..b08cfa26 --- /dev/null +++ b/restyle @@ -0,0 +1,4 @@ +#! /bin/bash + +astyle --options=astylerc `find . -regextype posix-extended -regex ".*\.(c|cpp|h|hpp)"` + diff --git a/src/client/binary_client.cpp b/src/client/binary_client.cpp index d415fc47..f39a8574 100644 --- a/src/client/binary_client.cpp +++ b/src/client/binary_client.cpp @@ -32,692 +32,818 @@ namespace { - using namespace OpcUa; - using namespace OpcUa::Binary; - - typedef std::map> SubscriptionCallbackMap; - - class BufferInputChannel : public OpcUa::InputChannel - { - public: - BufferInputChannel(const std::vector& buffer) - : Buffer(buffer) - , Pos(0) - { - Reset(); - } - - virtual std::size_t Receive(char* data, std::size_t size) - { - if (Pos >= Buffer.size()) - { - return 0; - } - - size = std::min(size, Buffer.size() - Pos); - std::vector::const_iterator begin = Buffer.begin() + Pos; - std::vector::const_iterator end = begin + size; - std::copy(begin, end, data); - Pos += size; - return size; - } - - void Reset() - { - Pos = 0; - } - - virtual void Stop() - { - } - - private: - const std::vector& Buffer; - std::size_t Pos; - }; - - - template - class RequestCallback - { - public: - RequestCallback() - : lock(m) - { - } +using namespace OpcUa; +using namespace OpcUa::Binary; - void OnData(std::vector data, ResponseHeader h) - { - //PrintBlob(data); - Data = std::move(data); - this->header = std::move(h); - doneEvent.notify_all(); - } +typedef std::map> SubscriptionCallbackMap; - T WaitForData(std::chrono::milliseconds msec) - { - if (doneEvent.wait_for(lock, msec) == std::cv_status::timeout) - throw std::runtime_error("Response timed out"); +class BufferInputChannel : public OpcUa::InputChannel +{ +public: + BufferInputChannel(const std::vector & buffer) + : Buffer(buffer) + , Pos(0) + { + Reset(); + } - T result; - result.Header = std::move(this->header); - if ( Data.empty() ) + virtual std::size_t Receive(char * data, std::size_t size) + { + if (Pos >= Buffer.size()) + { + return 0; + } + + size = std::min(size, Buffer.size() - Pos); + std::vector::const_iterator begin = Buffer.begin() + Pos; + std::vector::const_iterator end = begin + size; + std::copy(begin, end, data); + Pos += size; + return size; + } + + void Reset() + { + Pos = 0; + } + + virtual void Stop() + { + } + +private: + const std::vector & Buffer; + std::size_t Pos; +}; + + +template +class RequestCallback +{ +public: + RequestCallback() + : lock(m) + { + } + + void OnData(std::vector data, ResponseHeader h) + { + //PrintBlob(data); + Data = std::move(data); + this->header = std::move(h); + doneEvent.notify_all(); + } + + T WaitForData(std::chrono::milliseconds msec) + { + if (doneEvent.wait_for(lock, msec) == std::cv_status::timeout) + { throw std::runtime_error("Response timed out"); } + + T result; + result.Header = std::move(this->header); + + if (Data.empty()) { std::cout << "Error: received empty packet from server" << std::endl; } - else + + else { BufferInputChannel bufferInput(Data); IStreamBinary in(bufferInput); in >> result; } - return result; - } - private: - std::vector Data; - ResponseHeader header; - std::mutex m; - std::unique_lock lock; - std::condition_variable doneEvent; - }; + return result; + } - class CallbackThread +private: + std::vector Data; + ResponseHeader header; + std::mutex m; + std::unique_lock lock; + std::condition_variable doneEvent; +}; + +class CallbackThread +{ +public: + CallbackThread(bool debug = false) : Debug(debug), StopRequest(false) { - public: - CallbackThread(bool debug=false) : Debug(debug), StopRequest(false) - { - } + } - void post(std::function callback) + void post(std::function callback) + { + if (Debug) { std::cout << "binary_client| CallbackThread : start post" << std::endl; } + + std::unique_lock lock(Mutex); + Queue.push(callback); + Condition.notify_one(); + + if (Debug) { std::cout << "binary_client| CallbackThread : end post" << std::endl; } + } + + void Run() + { + while (true) { - if (Debug) { std::cout << "binary_client| CallbackThread : start post" << std::endl; } + if (Debug) { std::cout << "binary_client| CallbackThread : waiting for next post" << std::endl; } + std::unique_lock lock(Mutex); - Queue.push(callback); - Condition.notify_one(); - if (Debug) { std::cout << "binary_client| CallbackThread : end post" << std::endl; } - } + Condition.wait(lock, [&]() { return (StopRequest == true) || (! Queue.empty()) ;}); - void Run() - { - while (true) - { - if (Debug) { std::cout << "binary_client| CallbackThread : waiting for next post" << std::endl; } - std::unique_lock lock(Mutex); - Condition.wait(lock, [&]() { return (StopRequest == true) || ( ! Queue.empty() ) ;} ); - if (StopRequest) + if (StopRequest) { if (Debug) { std::cout << "binary_client| CallbackThread : exited." << std::endl; } + return; } - while ( ! Queue.empty() ) //to avoid crashing on spurious events + + while (! Queue.empty()) //to avoid crashing on spurious events { if (Debug) { std::cout << "binary_client| CallbackThread : condition has triggered copying callback and poping. queue size is " << Queue.size() << std::endl; } + std::function callbackcopy = Queue.front(); Queue.pop(); lock.unlock(); + if (Debug) { std::cout << "binary_client| CallbackThread : now calling callback." << std::endl; } + callbackcopy(); + if (Debug) { std::cout << "binary_client| CallbackThread : callback called." << std::endl; } + lock.lock(); } - } } + } - void Stop() - { - if (Debug) { std::cout << "binary_client| CallbackThread : stopping." << std::endl; } - StopRequest = true; - Condition.notify_all(); - } + void Stop() + { + if (Debug) { std::cout << "binary_client| CallbackThread : stopping." << std::endl; } - private: - bool Debug = false; - std::mutex Mutex; - std::condition_variable Condition; - std::atomic StopRequest; - std::queue> Queue; - }; - - class BinaryClient - : public Services - , public AttributeServices - , public EndpointServices - , public MethodServices - , public NodeManagementServices - , public SubscriptionServices - , public ViewServices - , public std::enable_shared_from_this - { - private: - typedef std::function, ResponseHeader)> ResponseCallback; - typedef std::map CallbackMap; - std::vector messageBuffer; - - public: - BinaryClient(std::shared_ptr channel, const SecureConnectionParams& params, bool debug) - : Channel(channel) - , Stream(channel) - , Params(params) - , SequenceNumber(1) - , RequestNumber(1) - , RequestHandle(0) - , Debug(debug) - , CallbackService(debug) + StopRequest = true; + Condition.notify_all(); + } - { - //Initialize the worker thread for subscriptions - callback_thread = std::thread([&](){ CallbackService.Run(); }); +private: + bool Debug = false; + std::mutex Mutex; + std::condition_variable Condition; + std::atomic StopRequest; + std::queue> Queue; +}; + +class BinaryClient + : public Services + , public AttributeServices + , public EndpointServices + , public MethodServices + , public NodeManagementServices + , public SubscriptionServices + , public ViewServices + , public std::enable_shared_from_this +{ +private: + typedef std::function, ResponseHeader)> ResponseCallback; + typedef std::map CallbackMap; + std::vector messageBuffer; + +public: + BinaryClient(std::shared_ptr channel, const SecureConnectionParams & params, bool debug) + : Channel(channel) + , Stream(channel) + , Params(params) + , SequenceNumber(1) + , RequestNumber(1) + , RequestHandle(0) + , Debug(debug) + , CallbackService(debug) - HelloServer(params); + { + //Initialize the worker thread for subscriptions + callback_thread = std::thread([&]() { CallbackService.Run(); }); - ReceiveThread = std::move(std::thread([this](){ - try + HelloServer(params); + + ReceiveThread = std::move(std::thread([this]() + { + try { - while(!Finished) - Receive(); + while (!Finished) + { Receive(); } } - catch (const std::exception& exc) + + catch (const std::exception & exc) { - if (Finished) return; + if (Finished) { return; } + if (Debug) { std::cerr << "binary_client| ReceiveThread : Error receiving data: "; } + std::cerr << exc.what() << std::endl; } - })); - } + })); + } - ~BinaryClient() - { - Finished = true; + ~BinaryClient() + { + Finished = true; - if (Debug) std::cout << "binary_client| Stopping callback thread." << std::endl; - CallbackService.Stop(); - if (Debug) std::cout << "binary_client| Joining service thread." << std::endl; - callback_thread.join(); //Not sure it is necessary + if (Debug) { std::cout << "binary_client| Stopping callback thread." << std::endl; } - Channel->Stop(); - if (Debug) std::cout << "binary_client| Joining receive thread." << std::endl; - ReceiveThread.join(); - if (Debug) std::cout << "binary_client| Receive thread stopped." << std::endl; + CallbackService.Stop(); - if (Debug) std::cout << "binary_client| Destroyed." << std::endl; - } + if (Debug) { std::cout << "binary_client| Joining service thread." << std::endl; } - //////////////////////////////////////////////////////////////// - /// Session Services - //////////////////////////////////////////////////////////////// - virtual CreateSessionResponse CreateSession(const RemoteSessionParameters& parameters) override - { - if (Debug) { std::cout << "binary_client| CreateSession -->" << std::endl; } - CreateSessionRequest request; - request.Header = CreateRequestHeader(); - - request.Parameters.ClientDescription.ApplicationUri = parameters.ClientDescription.ApplicationUri; - request.Parameters.ClientDescription.ProductUri = parameters.ClientDescription.ProductUri; - request.Parameters.ClientDescription.ApplicationName = parameters.ClientDescription.ApplicationName; - request.Parameters.ClientDescription.ApplicationType = parameters.ClientDescription.ApplicationType; - request.Parameters.ClientDescription.GatewayServerUri = parameters.ClientDescription.GatewayServerUri; - request.Parameters.ClientDescription.DiscoveryProfileUri = parameters.ClientDescription.DiscoveryProfileUri; - request.Parameters.ClientDescription.DiscoveryUrls = parameters.ClientDescription.DiscoveryUrls; - - request.Parameters.ServerUri = parameters.ServerURI; - request.Parameters.EndpointUrl = parameters.EndpointUrl; // TODO make just endpoint.URL; - request.Parameters.SessionName = parameters.SessionName; - request.Parameters.ClientNonce = ByteString(std::vector(32,0)); - request.Parameters.ClientCertificate = ByteString(parameters.ClientCertificate); - request.Parameters.RequestedSessionTimeout = parameters.Timeout; - request.Parameters.MaxResponseMessageSize = 65536; - CreateSessionResponse response = Send(request); - AuthenticationToken = response.Parameters.AuthenticationToken; - if (Debug) { std::cout << "binary_client| CreateSession <--" << std::endl; } - return response; - } - - ActivateSessionResponse ActivateSession(const ActivateSessionParameters &session_parameters) override - { - if (Debug) { std::cout << "binary_client| ActivateSession -->" << std::endl; } - ActivateSessionRequest request; - request.Parameters = session_parameters; - request.Parameters.LocaleIds.push_back("en"); - ActivateSessionResponse response = Send(request); - if (Debug) { std::cout << "binary_client| ActivateSession <--" << std::endl; } - return response; - } - - virtual CloseSessionResponse CloseSession() override - { - if (Debug) { std::cout << "binary_client| CloseSession -->" << std::endl; } - CloseSessionRequest request; - CloseSessionResponse response = Send(request); - RemoveSelfReferences(); - if (Debug) { std::cout << "binary_client| CloseSession <--" << std::endl; } - return response; - } - - virtual void AbortSession() override - { - if (Debug) { std::cout << "binary_client| AbortSession -->" << std::endl; } - RemoveSelfReferences(); - if (Debug) { std::cout << "binary_client| AbortSession <--" << std::endl; } - } + callback_thread.join(); //Not sure it is necessary - DeleteNodesResponse DeleteNodes(const std::vector &nodesToDelete) override - { - if (Debug) { std::cout << "binary_client| DeleteNodes -->" << std::endl; } - DeleteNodesRequest request; - request.NodesToDelete = nodesToDelete; - DeleteNodesResponse response = Send(request); - if (Debug) { std::cout << "binary_client| DeleteNodes <--" << std::endl; } - return response; - } - - //////////////////////////////////////////////////////////////// - /// Attribute Services - //////////////////////////////////////////////////////////////// - virtual std::shared_ptr Attributes() override - { - return shared_from_this(); - } + Channel->Stop(); - public: - virtual std::vector Read(const ReadParameters& params) const override - { - if (Debug) { + if (Debug) { std::cout << "binary_client| Joining receive thread." << std::endl; } + + ReceiveThread.join(); + + if (Debug) { std::cout << "binary_client| Receive thread stopped." << std::endl; } + + if (Debug) { std::cout << "binary_client| Destroyed." << std::endl; } + } + + //////////////////////////////////////////////////////////////// + /// Session Services + //////////////////////////////////////////////////////////////// + virtual CreateSessionResponse CreateSession(const RemoteSessionParameters & parameters) override + { + if (Debug) { std::cout << "binary_client| CreateSession -->" << std::endl; } + + CreateSessionRequest request; + request.Header = CreateRequestHeader(); + + request.Parameters.ClientDescription.ApplicationUri = parameters.ClientDescription.ApplicationUri; + request.Parameters.ClientDescription.ProductUri = parameters.ClientDescription.ProductUri; + request.Parameters.ClientDescription.ApplicationName = parameters.ClientDescription.ApplicationName; + request.Parameters.ClientDescription.ApplicationType = parameters.ClientDescription.ApplicationType; + request.Parameters.ClientDescription.GatewayServerUri = parameters.ClientDescription.GatewayServerUri; + request.Parameters.ClientDescription.DiscoveryProfileUri = parameters.ClientDescription.DiscoveryProfileUri; + request.Parameters.ClientDescription.DiscoveryUrls = parameters.ClientDescription.DiscoveryUrls; + + request.Parameters.ServerUri = parameters.ServerURI; + request.Parameters.EndpointUrl = parameters.EndpointUrl; // TODO make just endpoint.URL; + request.Parameters.SessionName = parameters.SessionName; + request.Parameters.ClientNonce = ByteString(std::vector(32, 0)); + request.Parameters.ClientCertificate = ByteString(parameters.ClientCertificate); + request.Parameters.RequestedSessionTimeout = parameters.Timeout; + request.Parameters.MaxResponseMessageSize = 65536; + CreateSessionResponse response = Send(request); + AuthenticationToken = response.Parameters.AuthenticationToken; + + if (Debug) { std::cout << "binary_client| CreateSession <--" << std::endl; } + + return response; + } + + ActivateSessionResponse ActivateSession(const ActivateSessionParameters & session_parameters) override + { + if (Debug) { std::cout << "binary_client| ActivateSession -->" << std::endl; } + + ActivateSessionRequest request; + request.Parameters = session_parameters; + request.Parameters.LocaleIds.push_back("en"); + ActivateSessionResponse response = Send(request); + + if (Debug) { std::cout << "binary_client| ActivateSession <--" << std::endl; } + + return response; + } + + virtual CloseSessionResponse CloseSession() override + { + if (Debug) { std::cout << "binary_client| CloseSession -->" << std::endl; } + + CloseSessionRequest request; + CloseSessionResponse response = Send(request); + RemoveSelfReferences(); + + if (Debug) { std::cout << "binary_client| CloseSession <--" << std::endl; } + + return response; + } + + virtual void AbortSession() override + { + if (Debug) { std::cout << "binary_client| AbortSession -->" << std::endl; } + + RemoveSelfReferences(); + + if (Debug) { std::cout << "binary_client| AbortSession <--" << std::endl; } + } + + DeleteNodesResponse DeleteNodes(const std::vector & nodesToDelete) override + { + if (Debug) { std::cout << "binary_client| DeleteNodes -->" << std::endl; } + + DeleteNodesRequest request; + request.NodesToDelete = nodesToDelete; + DeleteNodesResponse response = Send(request); + + if (Debug) { std::cout << "binary_client| DeleteNodes <--" << std::endl; } + + return response; + } + + //////////////////////////////////////////////////////////////// + /// Attribute Services + //////////////////////////////////////////////////////////////// + virtual std::shared_ptr Attributes() override + { + return shared_from_this(); + } + +public: + virtual std::vector Read(const ReadParameters & params) const override + { + if (Debug) + { std::cout << "binary_client| Read -->" << std::endl; - for ( ReadValueId attr : params.AttributesToRead ) - { - std::cout << attr.NodeId << " " << (uint32_t)attr.AttributeId; - } + + for (ReadValueId attr : params.AttributesToRead) + { + std::cout << attr.NodeId << " " << (uint32_t)attr.AttributeId; + } + std::cout << std::endl; } - ReadRequest request; - request.Parameters = params; - const ReadResponse response = Send(request); - if (Debug) { std::cout << "binary_client| Read <--" << std::endl; } - return response.Results; - } - - virtual std::vector Write(const std::vector& values) override - { - if (Debug) { std::cout << "binary_client| Write -->" << std::endl; } - WriteRequest request; - request.Parameters.NodesToWrite = values; - const WriteResponse response = Send(request); - if (Debug) { std::cout << "binary_client| Write <--" << std::endl; } - return response.Results; - } - - //////////////////////////////////////////////////////////////// - /// Endpoint Services - //////////////////////////////////////////////////////////////// - virtual std::shared_ptr Endpoints() override - { - return shared_from_this(); - } - virtual std::vector FindServers(const FindServersParameters& params) const override - { - if (Debug) { std::cout << "binary_client| FindServers -->" << std::endl; } - OpcUa::FindServersRequest request; - request.Parameters = params; - FindServersResponse response = Send(request); - if (Debug) { std::cout << "binary_client| FindServers <--" << std::endl; } - return response.Data.Descriptions; - } - - virtual std::vector GetEndpoints(const GetEndpointsParameters& filter) const override - { - if (Debug) { std::cout << "binary_client| GetEndpoints -->" << std::endl; } - OpcUa::GetEndpointsRequest request; - request.Header = CreateRequestHeader(); - request.Parameters.EndpointUrl = filter.EndpointUrl; - request.Parameters.LocaleIds = filter.LocaleIds; - request.Parameters.ProfileUris = filter.ProfileUris; - const GetEndpointsResponse response = Send(request); - if (Debug) { std::cout << "binary_client| GetEndpoints <--" << std::endl; } - return response.Endpoints; - } - - virtual void RegisterServer(const ServerParameters& parameters) override - { - } + ReadRequest request; + request.Parameters = params; + const ReadResponse response = Send(request); - //////////////////////////////////////////////////////////////// - /// Method Services - //////////////////////////////////////////////////////////////// - virtual std::shared_ptr Method() override - { - return shared_from_this(); - } + if (Debug) { std::cout << "binary_client| Read <--" << std::endl; } - virtual std::vector Call(const std::vector& methodsToCall) override - { - if (Debug) {std::cout << "binary_clinent | Call -->" << std::endl;} - CallRequest request; - request.Parameters.MethodsToCall = methodsToCall; - const CallResponse response = Send(request); - if (Debug) {std::cout << "binary_clinent | Call <--" << std::endl;} - // Manage errors + return response.Results; + } + + virtual std::vector Write(const std::vector & values) override + { + if (Debug) { std::cout << "binary_client| Write -->" << std::endl; } + + WriteRequest request; + request.Parameters.NodesToWrite = values; + const WriteResponse response = Send(request); + + if (Debug) { std::cout << "binary_client| Write <--" << std::endl; } + + return response.Results; + } + + //////////////////////////////////////////////////////////////// + /// Endpoint Services + //////////////////////////////////////////////////////////////// + virtual std::shared_ptr Endpoints() override + { + return shared_from_this(); + } + + virtual std::vector FindServers(const FindServersParameters & params) const override + { + if (Debug) { std::cout << "binary_client| FindServers -->" << std::endl; } + + OpcUa::FindServersRequest request; + request.Parameters = params; + FindServersResponse response = Send(request); + + if (Debug) { std::cout << "binary_client| FindServers <--" << std::endl; } + + return response.Data.Descriptions; + } + + virtual std::vector GetEndpoints(const GetEndpointsParameters & filter) const override + { + if (Debug) { std::cout << "binary_client| GetEndpoints -->" << std::endl; } + + OpcUa::GetEndpointsRequest request; + request.Header = CreateRequestHeader(); + request.Parameters.EndpointUrl = filter.EndpointUrl; + request.Parameters.LocaleIds = filter.LocaleIds; + request.Parameters.ProfileUris = filter.ProfileUris; + const GetEndpointsResponse response = Send(request); + + if (Debug) { std::cout << "binary_client| GetEndpoints <--" << std::endl; } + + return response.Endpoints; + } + + virtual void RegisterServer(const ServerParameters & parameters) override + { + } + + //////////////////////////////////////////////////////////////// + /// Method Services + //////////////////////////////////////////////////////////////// + virtual std::shared_ptr Method() override + { + return shared_from_this(); + } + + virtual std::vector Call(const std::vector & methodsToCall) override + { + if (Debug) {std::cout << "binary_clinent | Call -->" << std::endl;} + + CallRequest request; + request.Parameters.MethodsToCall = methodsToCall; + const CallResponse response = Send(request); + + if (Debug) {std::cout << "binary_clinent | Call <--" << std::endl;} + + // Manage errors // if (!response.DiagnosticInfos.empty()) // { // For now commented out, handling of diagnostic should be probably added for all communication // } - return response.Results; - } + return response.Results; + } - //////////////////////////////////////////////////////////////// - /// Node management Services - //////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////// + /// Node management Services + //////////////////////////////////////////////////////////////// - virtual std::shared_ptr NodeManagement() override - { - return shared_from_this(); - } + virtual std::shared_ptr NodeManagement() override + { + return shared_from_this(); + } - virtual std::vector AddNodes(const std::vector& items) override - { - if (Debug) { std::cout << "binary_client| AddNodes -->" << std::endl; } - AddNodesRequest request; - request.Parameters.NodesToAdd = items; - const AddNodesResponse response = Send(request); - if (Debug) { std::cout << "binary_client| AddNodes <--" << std::endl; } - return response.results; - } - - virtual std::vector AddReferences(const std::vector& items) override - { - if (Debug) { std::cout << "binary_client| AddReferences -->" << std::endl; } - AddReferencesRequest request; - request.Parameters.ReferencesToAdd = items; - const AddReferencesResponse response = Send(request); - if (Debug) { std::cout << "binary_client| AddReferences <--" << std::endl; } - return response.Results; - } - - virtual void SetMethod(const NodeId& node, std::function (NodeId context, std::vector arguments)> callback) override - { - if (Debug) { std::cout << "binary_client| SetMethod has no effect on client!" << std::endl; } - return; - } - - //////////////////////////////////////////////////////////////// - /// Subscriptions Services - //////////////////////////////////////////////////////////////// - virtual std::shared_ptr Subscriptions() override - { - return shared_from_this(); - } + virtual std::vector AddNodes(const std::vector & items) override + { + if (Debug) { std::cout << "binary_client| AddNodes -->" << std::endl; } - virtual SubscriptionData CreateSubscription(const CreateSubscriptionRequest& request, std::function callback) override - { - if (Debug) { std::cout << "binary_client| CreateSubscription -->" << std::endl; } - const CreateSubscriptionResponse response = Send(request); - if (Debug) std::cout << "BinaryClient | got CreateSubscriptionResponse" << std::endl; - PublishCallbacks[response.Data.SubscriptionId] = callback;// TODO Pass calback to the Publish method. - if (Debug) { std::cout << "binary_client| CreateSubscription <--" << std::endl; } - return response.Data; - } - - virtual ModifySubscriptionResponse ModifySubscription(const ModifySubscriptionParameters& parameters) override - { - if (Debug) { std::cout << "binary_client| ModifySubscription -->" << std::endl; } - ModifySubscriptionRequest request; - request.Parameters = parameters; - const ModifySubscriptionResponse response = Send(request); - if (Debug) { std::cout << "binary_client| ModifySubscription <--" << std::endl; } - return response; - } - - virtual std::vector DeleteSubscriptions(const std::vector& subscriptions) override - { - if (Debug) { std::cout << "binary_client| DeleteSubscriptions -->" << std::endl; } - DeleteSubscriptionsRequest request; - request.SubscriptionIds = subscriptions; - const DeleteSubscriptionsResponse response = Send(request); - if (Debug) { std::cout << "binary_client| DeleteSubscriptions <--" << std::endl; } - return response.Results; - } - - virtual std::vector CreateMonitoredItems(const MonitoredItemsParameters& parameters) override - { - if (Debug) { std::cout << "binary_client| CreateMonitoredItems -->" << std::endl; } - CreateMonitoredItemsRequest request; - request.Parameters = parameters; - const CreateMonitoredItemsResponse response = Send(request); - if (Debug) { std::cout << "binary_client| CreateMonitoredItems <--" << std::endl; } - return response.Results; - } - - virtual std::vector DeleteMonitoredItems(const DeleteMonitoredItemsParameters& params) override - { - if (Debug) { std::cout << "binary_client| DeleteMonitoredItems -->" << std::endl; } - DeleteMonitoredItemsRequest request; - request.Parameters = params; - const DeleteMonitoredItemsResponse response = Send(request); - if (Debug) { std::cout << "binary_client| DeleteMonitoredItems <--" << std::endl; } - return response.Results; - } - - virtual void Publish(const PublishRequest& originalrequest) override + AddNodesRequest request; + request.Parameters.NodesToAdd = items; + const AddNodesResponse response = Send(request); + + if (Debug) { std::cout << "binary_client| AddNodes <--" << std::endl; } + + return response.results; + } + + virtual std::vector AddReferences(const std::vector & items) override + { + if (Debug) { std::cout << "binary_client| AddReferences -->" << std::endl; } + + AddReferencesRequest request; + request.Parameters.ReferencesToAdd = items; + const AddReferencesResponse response = Send(request); + + if (Debug) { std::cout << "binary_client| AddReferences <--" << std::endl; } + + return response.Results; + } + + virtual void SetMethod(const NodeId & node, std::function (NodeId context, std::vector arguments)> callback) override + { + if (Debug) { std::cout << "binary_client| SetMethod has no effect on client!" << std::endl; } + + return; + } + + //////////////////////////////////////////////////////////////// + /// Subscriptions Services + //////////////////////////////////////////////////////////////// + virtual std::shared_ptr Subscriptions() override + { + return shared_from_this(); + } + + virtual SubscriptionData CreateSubscription(const CreateSubscriptionRequest & request, std::function callback) override + { + if (Debug) { std::cout << "binary_client| CreateSubscription -->" << std::endl; } + + const CreateSubscriptionResponse response = Send(request); + + if (Debug) { std::cout << "BinaryClient | got CreateSubscriptionResponse" << std::endl; } + + PublishCallbacks[response.Data.SubscriptionId] = callback;// TODO Pass calback to the Publish method. + + if (Debug) { std::cout << "binary_client| CreateSubscription <--" << std::endl; } + + return response.Data; + } + + virtual ModifySubscriptionResponse ModifySubscription(const ModifySubscriptionParameters & parameters) override + { + if (Debug) { std::cout << "binary_client| ModifySubscription -->" << std::endl; } + + ModifySubscriptionRequest request; + request.Parameters = parameters; + const ModifySubscriptionResponse response = Send(request); + + if (Debug) { std::cout << "binary_client| ModifySubscription <--" << std::endl; } + + return response; + } + + virtual std::vector DeleteSubscriptions(const std::vector & subscriptions) override + { + if (Debug) { std::cout << "binary_client| DeleteSubscriptions -->" << std::endl; } + + DeleteSubscriptionsRequest request; + request.SubscriptionIds = subscriptions; + const DeleteSubscriptionsResponse response = Send(request); + + if (Debug) { std::cout << "binary_client| DeleteSubscriptions <--" << std::endl; } + + return response.Results; + } + + virtual std::vector CreateMonitoredItems(const MonitoredItemsParameters & parameters) override + { + if (Debug) { std::cout << "binary_client| CreateMonitoredItems -->" << std::endl; } + + CreateMonitoredItemsRequest request; + request.Parameters = parameters; + const CreateMonitoredItemsResponse response = Send(request); + + if (Debug) { std::cout << "binary_client| CreateMonitoredItems <--" << std::endl; } + + return response.Results; + } + + virtual std::vector DeleteMonitoredItems(const DeleteMonitoredItemsParameters & params) override + { + if (Debug) { std::cout << "binary_client| DeleteMonitoredItems -->" << std::endl; } + + DeleteMonitoredItemsRequest request; + request.Parameters = params; + const DeleteMonitoredItemsResponse response = Send(request); + + if (Debug) { std::cout << "binary_client| DeleteMonitoredItems <--" << std::endl; } + + return response.Results; + } + + virtual void Publish(const PublishRequest & originalrequest) override + { + if (Debug) { std::cout << "binary_client| Publish -->" << "request with " << originalrequest.SubscriptionAcknowledgements.size() << " acks" << std::endl;} + + PublishRequest request(originalrequest); + request.Header = CreateRequestHeader(); + request.Header.Timeout = 0; //We do not want the request to timeout! + + ResponseCallback responseCallback = [this](std::vector buffer, ResponseHeader h) { - if (Debug) { std::cout << "binary_client| Publish -->" << "request with " << originalrequest.SubscriptionAcknowledgements.size() << " acks" << std::endl;} - PublishRequest request(originalrequest); - request.Header = CreateRequestHeader(); - request.Header.Timeout = 0; //We do not want the request to timeout! - - ResponseCallback responseCallback = [this](std::vector buffer, ResponseHeader h) { - if (Debug) { std::cout << "BinaryClient | Got Publish Response, from server " << std::endl;} - PublishResponse response; - if (h.ServiceResult != OpcUa::StatusCode::Good) + if (Debug) { std::cout << "BinaryClient | Got Publish Response, from server " << std::endl;} + + PublishResponse response; + + if (h.ServiceResult != OpcUa::StatusCode::Good) { response.Header = std::move(h); } - else + + else { BufferInputChannel bufferInput(buffer); IStreamBinary in(bufferInput); in >> response; } - CallbackService.post([this, response]() { - if (response.Header.ServiceResult == OpcUa::StatusCode::Good) + CallbackService.post([this, response]() + { + if (response.Header.ServiceResult == OpcUa::StatusCode::Good) { if (Debug) { std::cout << "BinaryClient | Calling callback for Subscription " << response.Parameters.SubscriptionId << std::endl; } + SubscriptionCallbackMap::const_iterator callbackIt = this->PublishCallbacks.find(response.Parameters.SubscriptionId); + if (callbackIt == this->PublishCallbacks.end()) - { - std::cout << "BinaryClient | Error Unknown SubscriptionId " << response.Parameters.SubscriptionId << std::endl; - } - else - { - try { //calling client code, better put it under try/catch otherwise we crash entire client - callbackIt->second(response.Parameters); + { + std::cout << "BinaryClient | Error Unknown SubscriptionId " << response.Parameters.SubscriptionId << std::endl; } - catch (const std::exception& ex) + + else { - std::cout << "Error calling application callback " << ex.what() << std::endl; + try //calling client code, better put it under try/catch otherwise we crash entire client + { + callbackIt->second(response.Parameters); + } + + catch (const std::exception & ex) + { + std::cout << "Error calling application callback " << ex.what() << std::endl; + } } - } } - else if (response.Header.ServiceResult == OpcUa::StatusCode::BadSessionClosed) + + else if (response.Header.ServiceResult == OpcUa::StatusCode::BadSessionClosed) { if (Debug) - { - std::cout << "BinaryClient | Session is closed"; - } + { + std::cout << "BinaryClient | Session is closed"; + } } - else + + else { // TODO } - }); - }; - std::unique_lock lock(Mutex); - Callbacks.insert(std::make_pair(request.Header.RequestHandle, responseCallback)); - lock.unlock(); - Send(request); - if (Debug) { std::cout << "binary_client| Publish <--" << std::endl; } - } - - virtual RepublishResponse Republish(const RepublishParameters& params) override - { - if (Debug) { std::cout << "binary_client| Republish -->" << std::endl; } - RepublishRequest request; - request.Header = CreateRequestHeader(); - request.Parameters = params; - - RepublishResponse response = Send(request); - if (Debug) { std::cout << "binary_client| Republish <--" << std::endl; } - return response; - } - - //////////////////////////////////////////////////////////////// - /// View Services - //////////////////////////////////////////////////////////////// - virtual std::shared_ptr Views() override - { - return shared_from_this(); - } + }); + }; + std::unique_lock lock(Mutex); + Callbacks.insert(std::make_pair(request.Header.RequestHandle, responseCallback)); + lock.unlock(); + Send(request); + + if (Debug) { std::cout << "binary_client| Publish <--" << std::endl; } + } - virtual std::vector TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters& params) const override - { - if (Debug) { std::cout << "binary_client| TranslateBrowsePathsToNodeIds -->" << std::endl; } - TranslateBrowsePathsToNodeIdsRequest request; - request.Header = CreateRequestHeader(); - request.Parameters = params; - const TranslateBrowsePathsToNodeIdsResponse response = Send(request); - if (Debug) { std::cout << "binary_client| TranslateBrowsePathsToNodeIds <--" << std::endl; } - return response.Result.Paths; - } + virtual RepublishResponse Republish(const RepublishParameters & params) override + { + if (Debug) { std::cout << "binary_client| Republish -->" << std::endl; } + RepublishRequest request; + request.Header = CreateRequestHeader(); + request.Parameters = params; - virtual std::vector Browse(const OpcUa::NodesQuery& query) const override - { - if (Debug) { + RepublishResponse response = Send(request); + + if (Debug) { std::cout << "binary_client| Republish <--" << std::endl; } + + return response; + } + + //////////////////////////////////////////////////////////////// + /// View Services + //////////////////////////////////////////////////////////////// + virtual std::shared_ptr Views() override + { + return shared_from_this(); + } + + virtual std::vector TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters & params) const override + { + if (Debug) { std::cout << "binary_client| TranslateBrowsePathsToNodeIds -->" << std::endl; } + + TranslateBrowsePathsToNodeIdsRequest request; + request.Header = CreateRequestHeader(); + request.Parameters = params; + const TranslateBrowsePathsToNodeIdsResponse response = Send(request); + + if (Debug) { std::cout << "binary_client| TranslateBrowsePathsToNodeIds <--" << std::endl; } + + return response.Result.Paths; + } + + + virtual std::vector Browse(const OpcUa::NodesQuery & query) const override + { + if (Debug) + { std::cout << "binary_client| Browse -->"; + for (BrowseDescription desc : query.NodesToBrowse) - { - std::cout << desc.NodeToBrowse << " "; - } + { + std::cout << desc.NodeToBrowse << " "; + } + std::cout << std::endl; } - BrowseRequest request; - request.Header = CreateRequestHeader(); - request.Query = query; - const BrowseResponse response = Send(request); - ContinuationPoints.clear(); - for (BrowseResult result : response.Results) + + BrowseRequest request; + request.Header = CreateRequestHeader(); + request.Query = query; + const BrowseResponse response = Send(request); + ContinuationPoints.clear(); + + for (BrowseResult result : response.Results) { if (!result.ContinuationPoint.empty()) - { - ContinuationPoints.push_back(result.ContinuationPoint); - } + { + ContinuationPoints.push_back(result.ContinuationPoint); + } } - if (Debug) { std::cout << "binary_client| Browse <--" << std::endl; } - return response.Results; - } - virtual std::vector BrowseNext() const override - { - //FIXME: fix method interface so we do not need to decice arbitriraly if we need to send BrowseNext or not... - if (ContinuationPoints.empty()) + if (Debug) { std::cout << "binary_client| Browse <--" << std::endl; } + + return response.Results; + } + + virtual std::vector BrowseNext() const override + { + //FIXME: fix method interface so we do not need to decice arbitriraly if we need to send BrowseNext or not... + if (ContinuationPoints.empty()) { if (Debug) { std::cout << "No Continuation point, no need to send browse next request" << std::endl; } + return std::vector(); } - if (Debug) { std::cout << "binary_client| BrowseNext -->" << std::endl; } - BrowseNextRequest request; - request.ReleaseContinuationPoints = ContinuationPoints.empty() ? true : false; - request.ContinuationPoints = ContinuationPoints; - const BrowseNextResponse response = Send(request); - ContinuationPoints.clear(); - for (auto result : response.Results) + + if (Debug) { std::cout << "binary_client| BrowseNext -->" << std::endl; } + + BrowseNextRequest request; + request.ReleaseContinuationPoints = ContinuationPoints.empty() ? true : false; + request.ContinuationPoints = ContinuationPoints; + const BrowseNextResponse response = Send(request); + ContinuationPoints.clear(); + + for (auto result : response.Results) { if (!result.ContinuationPoint.empty()) - { - ContinuationPoints.push_back(result.ContinuationPoint); - } + { + ContinuationPoints.push_back(result.ContinuationPoint); + } } - if (Debug) { std::cout << "binary_client| BrowseNext <--" << std::endl; } - return response.Results; - } - std::vector RegisterNodes(const std::vector& params) const override - { - if (Debug) + if (Debug) { std::cout << "binary_client| BrowseNext <--" << std::endl; } + + return response.Results; + } + + std::vector RegisterNodes(const std::vector & params) const override + { + if (Debug) { std::cout << "binary_clinet| RegisterNodes -->\n\tNodes to register:" << std::endl; - for (auto& param : params) { - std::cout << "\t\t" << param << std::endl; - } + + for (auto & param : params) + { + std::cout << "\t\t" << param << std::endl; + } } - RegisterNodesRequest request; + RegisterNodesRequest request; + + request.NodesToRegister = params; + RegisterNodesResponse response = Send(request); - request.NodesToRegister = params; - RegisterNodesResponse response = Send(request); - if (Debug) + if (Debug) { std::cout << "binary_client| RegisterNodes <--\n\tRegistered NodeIds:" << std::endl; - for (auto&id : response.Result) { - std::cout << "\t\t" << id << std::endl; - } + + for (auto & id : response.Result) + { + std::cout << "\t\t" << id << std::endl; + } } - return response.Result; - } - void UnregisterNodes(const std::vector& params) const override - { - if (Debug) { + return response.Result; + } + + void UnregisterNodes(const std::vector & params) const override + { + if (Debug) + { std::cout << "binary_client| UnregisterNodes -->\n\tUnregistering nodes:" << std::endl; - for (auto& id : params) { - std::cout << "\t\t" << id << std::endl; - } + + for (auto & id : params) + { + std::cout << "\t\t" << id << std::endl; + } } - UnregisterNodesRequest request; - request.NodesToUnregister = params; - UnregisterNodesResponse response = Send(request); + UnregisterNodesRequest request; + request.NodesToUnregister = params; + UnregisterNodesResponse response = Send(request); - if (Debug) { + if (Debug) + { std::cout << "binary_client| UnregisterNodes <--" << std::endl; } - } + } - private: - //FIXME: this method should be removed, better add realease option to BrowseNext - void Release() const - { - ContinuationPoints.clear(); - BrowseNext(); - } +private: + //FIXME: this method should be removed, better add realease option to BrowseNext + void Release() const + { + ContinuationPoints.clear(); + BrowseNext(); + } - public: +public: - //////////////////////////////////////////////////////////////// - /// SecureChannel Services - //////////////////////////////////////////////////////////////// - virtual OpcUa::OpenSecureChannelResponse OpenSecureChannel(const OpenSecureChannelParameters& params) override - { - if (Debug) {std::cout << "binary_client| OpenChannel -->" << std::endl;} + //////////////////////////////////////////////////////////////// + /// SecureChannel Services + //////////////////////////////////////////////////////////////// + virtual OpcUa::OpenSecureChannelResponse OpenSecureChannel(const OpenSecureChannelParameters & params) override + { + if (Debug) {std::cout << "binary_client| OpenChannel -->" << std::endl;} - OpenSecureChannelRequest request; - request.Parameters = params; + OpenSecureChannelRequest request; + request.Parameters = params; - OpenSecureChannelResponse response = Send(request); + OpenSecureChannelResponse response = Send(request); - ChannelSecurityToken = response.ChannelSecurityToken; //Save security token, we need it + ChannelSecurityToken = response.ChannelSecurityToken; //Save security token, we need it - if (Debug) {std::cout << "binary_client| OpenChannel <--" << std::endl;} - return response; - } + if (Debug) {std::cout << "binary_client| OpenChannel <--" << std::endl;} - virtual void CloseSecureChannel(uint32_t channelId) override - { - try + return response; + } + + virtual void CloseSecureChannel(uint32_t channelId) override + { + try { if (Debug) {std::cout << "binary_client| CloseSecureChannel -->" << std::endl;} + SecureHeader hdr(MT_SECURE_CLOSE, CHT_SINGLE, ChannelSecurityToken.SecureChannelId); const SymmetricAlgorithmHeader algorithmHeader = CreateAlgorithmHeader(); @@ -731,36 +857,43 @@ namespace hdr.AddSize(RawSize(request)); Stream << hdr << algorithmHeader << sequence << request << flush; + if (Debug) {std::cout << "binary_client| Secure channel closed." << std::endl;} } - catch (const std::exception& exc) + + catch (const std::exception & exc) { std::cerr << "Closing secure channel failed with error: " << exc.what() << std::endl; } - if (Debug) {std::cout << "binary_client| CloseSecureChannel <--" << std::endl;} - } - private: - template - Response Send(Request request) const + if (Debug) {std::cout << "binary_client| CloseSecureChannel <--" << std::endl;} + } + +private: + template + Response Send(Request request) const + { + request.Header = CreateRequestHeader(); + + RequestCallback requestCallback; + ResponseCallback responseCallback = [&requestCallback](std::vector buffer, ResponseHeader h) { - request.Header = CreateRequestHeader(); + requestCallback.OnData(std::move(buffer), std::move(h)); + }; + std::unique_lock lock(Mutex); + Callbacks.insert(std::make_pair(request.Header.RequestHandle, responseCallback)); + lock.unlock(); - RequestCallback requestCallback; - ResponseCallback responseCallback = [&requestCallback](std::vector buffer, ResponseHeader h){ - requestCallback.OnData(std::move(buffer), std::move(h)); - }; - std::unique_lock lock(Mutex); - Callbacks.insert(std::make_pair(request.Header.RequestHandle, responseCallback)); - lock.unlock(); + Send(request); - Send(request); + Response res; - Response res; - try { + try + { res = requestCallback.WaitForData(std::chrono::milliseconds(request.Header.Timeout)); } - catch (std::exception &ex) + + catch (std::exception & ex) { //Remove the callback on timeout std::unique_lock lock(Mutex); @@ -769,43 +902,45 @@ namespace throw; } - return res; - } + return res; + } - // Prevent multiple threads from sending parts of different packets at the same time. - mutable std::mutex send_mutex; + // Prevent multiple threads from sending parts of different packets at the same time. + mutable std::mutex send_mutex; - template - void Send(Request request) const - { - // TODO add support for breaking message into multiple chunks - SecureHeader hdr(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelSecurityToken.SecureChannelId); - const SymmetricAlgorithmHeader algorithmHeader = CreateAlgorithmHeader(); - hdr.AddSize(RawSize(algorithmHeader)); + template + void Send(Request request) const + { + // TODO add support for breaking message into multiple chunks + SecureHeader hdr(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelSecurityToken.SecureChannelId); + const SymmetricAlgorithmHeader algorithmHeader = CreateAlgorithmHeader(); + hdr.AddSize(RawSize(algorithmHeader)); - const SequenceHeader sequence = CreateSequenceHeader(); - hdr.AddSize(RawSize(sequence)); - hdr.AddSize(RawSize(request)); + const SequenceHeader sequence = CreateSequenceHeader(); + hdr.AddSize(RawSize(sequence)); + hdr.AddSize(RawSize(request)); - std::unique_lock send_lock(send_mutex); - Stream << hdr << algorithmHeader << sequence << request << flush; - } + std::unique_lock send_lock(send_mutex); + Stream << hdr << algorithmHeader << sequence << request << flush; + } - void Receive() - { - Binary::SecureHeader responseHeader; - Stream >> responseHeader; + void Receive() + { + Binary::SecureHeader responseHeader; + Stream >> responseHeader; + + size_t algo_size; - size_t algo_size; - if (responseHeader.Type == MessageType::MT_SECURE_OPEN ) + if (responseHeader.Type == MessageType::MT_SECURE_OPEN) { AsymmetricAlgorithmHeader responseAlgo; Stream >> responseAlgo; algo_size = RawSize(responseAlgo); } - else if (responseHeader.Type == MessageType::MT_ERROR ) + + else if (responseHeader.Type == MessageType::MT_ERROR) { StatusCode error; std::string msg; @@ -815,197 +950,209 @@ namespace stream << "Received error message from server: " << ToString(error) << ", " << msg ; throw std::runtime_error(stream.str()); } - else //(responseHeader.Type == MessageType::MT_SECURE_MESSAGE ) + + else //(responseHeader.Type == MessageType::MT_SECURE_MESSAGE ) { Binary::SymmetricAlgorithmHeader responseAlgo; Stream >> responseAlgo; algo_size = RawSize(responseAlgo); } - NodeId id; - Binary::SequenceHeader responseSequence; - Stream >> responseSequence; // TODO Check for request Number + NodeId id; + Binary::SequenceHeader responseSequence; + Stream >> responseSequence; // TODO Check for request Number + + const std::size_t expectedHeaderSize = RawSize(responseHeader) + algo_size + RawSize(responseSequence); - const std::size_t expectedHeaderSize = RawSize(responseHeader) + algo_size + RawSize(responseSequence); - if (expectedHeaderSize >= responseHeader.Size) + if (expectedHeaderSize >= responseHeader.Size) { std::stringstream stream; stream << "Size of received message " << responseHeader.Size << " bytes is invalid. Expected size " << expectedHeaderSize << " bytes"; throw std::runtime_error(stream.str()); } - std::size_t dataSize = responseHeader.Size - expectedHeaderSize; - if(responseHeader.Chunk == CHT_SINGLE) + std::size_t dataSize = responseHeader.Size - expectedHeaderSize; + + if (responseHeader.Chunk == CHT_SINGLE) { parseMessage(dataSize, id); firstMsgParsed = false; std::unique_lock lock(Mutex); CallbackMap::const_iterator callbackIt = Callbacks.find(header.RequestHandle); + if (callbackIt == Callbacks.end()) - { - std::cout << "binary_client| No callback found for message with id: " << id << " and handle " << header.RequestHandle << std::endl; - return; - } + { + std::cout << "binary_client| No callback found for message with id: " << id << " and handle " << header.RequestHandle << std::endl; + return; + } + callbackIt->second(std::move(messageBuffer), std::move(header)); messageBuffer.clear(); Callbacks.erase(callbackIt); } - else if(responseHeader.Chunk == CHT_INTERMEDIATE) + + else if (responseHeader.Chunk == CHT_INTERMEDIATE) { parseMessage(dataSize, id); firstMsgParsed = true; } - } + } - void parseMessage(std::size_t &dataSize, NodeId &id) - { - std::vector buffer(dataSize); - BufferInputChannel bufferInput(buffer); - Binary::RawBuffer raw(&buffer[0], dataSize); + void parseMessage(std::size_t & dataSize, NodeId & id) + { + std::vector buffer(dataSize); + BufferInputChannel bufferInput(buffer); + Binary::RawBuffer raw(&buffer[0], dataSize); - Stream >> raw; + Stream >> raw; - if(!firstMsgParsed) + if (!firstMsgParsed) { IStreamBinary in(bufferInput); in >> id; in >> header; - if ( Debug )std::cout << "binary_client| Got response id: " << id << " and handle " << header.RequestHandle<< std::endl; + if (Debug) { std::cout << "binary_client| Got response id: " << id << " and handle " << header.RequestHandle << std::endl; } - if (header.ServiceResult != StatusCode::Good) { - std::cout << "binary_client| Received a response from server with error status: " << OpcUa::ToString(header.ServiceResult) << std::endl; - } + if (header.ServiceResult != StatusCode::Good) + { + std::cout << "binary_client| Received a response from server with error status: " << OpcUa::ToString(header.ServiceResult) << std::endl; + } if (id == SERVICE_FAULT) - { - std::cerr << std::endl; - std::cerr << "Receive ServiceFault from Server with StatusCode " << OpcUa::ToString(header.ServiceResult) << std::endl; - std::cerr << std::endl; - } + { + std::cerr << std::endl; + std::cerr << "Receive ServiceFault from Server with StatusCode " << OpcUa::ToString(header.ServiceResult) << std::endl; + std::cerr << std::endl; + } messageBuffer.insert(messageBuffer.end(), buffer.begin(), buffer.end()); } - else + + else { messageBuffer.insert(messageBuffer.end(), buffer.begin(), buffer.end()); } - } + } - Binary::Acknowledge HelloServer(const SecureConnectionParams& params) - { - if (Debug) {std::cout << "binary_client| HelloServer -->" << std::endl;} - Binary::Hello hello; - hello.ProtocolVersion = 0; - hello.ReceiveBufferSize = 65536; - hello.SendBufferSize = 65536; - hello.MaxMessageSize = 65536; - hello.MaxChunkCount = 256; - hello.EndpointUrl = params.EndpointUrl; + Binary::Acknowledge HelloServer(const SecureConnectionParams & params) + { + if (Debug) {std::cout << "binary_client| HelloServer -->" << std::endl;} - Binary::Header hdr(Binary::MT_HELLO, Binary::CHT_SINGLE); - hdr.AddSize(RawSize(hello)); + Binary::Hello hello; + hello.ProtocolVersion = 0; + hello.ReceiveBufferSize = 65536; + hello.SendBufferSize = 65536; + hello.MaxMessageSize = 65536; + hello.MaxChunkCount = 256; + hello.EndpointUrl = params.EndpointUrl; - Stream << hdr << hello << flush; + Binary::Header hdr(Binary::MT_HELLO, Binary::CHT_SINGLE); + hdr.AddSize(RawSize(hello)); - Header respHeader; - Stream >> respHeader; // TODO add check for acknowledge header + Stream << hdr << hello << flush; - Acknowledge ack; - Stream >> ack; // TODO check for connection parameters - if (Debug) {std::cout << "binary_client| HelloServer <--" << std::endl;} - return ack; - } + Header respHeader; + Stream >> respHeader; // TODO add check for acknowledge header + Acknowledge ack; + Stream >> ack; // TODO check for connection parameters - SymmetricAlgorithmHeader CreateAlgorithmHeader() const - { - SymmetricAlgorithmHeader algorithmHeader; - algorithmHeader.TokenId = ChannelSecurityToken.TokenId; - return algorithmHeader; - } + if (Debug) {std::cout << "binary_client| HelloServer <--" << std::endl;} - SequenceHeader CreateSequenceHeader() const - { - SequenceHeader sequence; - sequence.SequenceNumber = ++SequenceNumber; - sequence.RequestId = ++RequestNumber; - return sequence; - } + return ack; + } - RequestHeader CreateRequestHeader() const - { - RequestHeader header; - header.SessionAuthenticationToken = AuthenticationToken; - header.RequestHandle = GetRequestHandle(); - header.Timeout = 10000; - return header; - } - - unsigned GetRequestHandle() const - { - return ++RequestHandle; - } - // Binary client is self-referenced from captures of subscription callbacks - // Remove this references to make ~BinaryClient() run possible - void RemoveSelfReferences() - { - if (Debug) { std::cout << "binary_client| Clearing cached references to server" << std::endl; } - PublishCallbacks.clear(); - } - - private: - std::shared_ptr Channel; - mutable IOStreamBinary Stream; - SecureConnectionParams Params; - std::thread ReceiveThread; - - SubscriptionCallbackMap PublishCallbacks; - SecurityToken ChannelSecurityToken; - mutable std::atomic SequenceNumber; - mutable std::atomic RequestNumber; - ExpandedNodeId AuthenticationToken; - mutable std::atomic RequestHandle; - mutable std::vector> ContinuationPoints; - mutable CallbackMap Callbacks; - const bool Debug = true; - bool Finished = false; - - std::thread callback_thread; - CallbackThread CallbackService; - mutable std::mutex Mutex; - - bool firstMsgParsed = false; - ResponseHeader header; - }; - - template <> - void BinaryClient::Send(OpenSecureChannelRequest request) const - { - SecureHeader hdr(MT_SECURE_OPEN, CHT_SINGLE, ChannelSecurityToken.SecureChannelId); - AsymmetricAlgorithmHeader algorithmHeader; - algorithmHeader.SecurityPolicyUri = Params.SecurePolicy; - algorithmHeader.SenderCertificate = Params.SenderCertificate; - algorithmHeader.ReceiverCertificateThumbPrint = Params.ReceiverCertificateThumbPrint; - hdr.AddSize(RawSize(algorithmHeader)); - hdr.AddSize(RawSize(request)); + SymmetricAlgorithmHeader CreateAlgorithmHeader() const + { + SymmetricAlgorithmHeader algorithmHeader; + algorithmHeader.TokenId = ChannelSecurityToken.TokenId; + return algorithmHeader; + } - const SequenceHeader sequence = CreateSequenceHeader(); - hdr.AddSize(RawSize(sequence)); - Stream << hdr << algorithmHeader << sequence << request << flush; + SequenceHeader CreateSequenceHeader() const + { + SequenceHeader sequence; + sequence.SequenceNumber = ++SequenceNumber; + sequence.RequestId = ++RequestNumber; + return sequence; } + RequestHeader CreateRequestHeader() const + { + RequestHeader header; + header.SessionAuthenticationToken = AuthenticationToken; + header.RequestHandle = GetRequestHandle(); + header.Timeout = 10000; + return header; + } + + unsigned GetRequestHandle() const + { + return ++RequestHandle; + } + + // Binary client is self-referenced from captures of subscription callbacks + // Remove this references to make ~BinaryClient() run possible + void RemoveSelfReferences() + { + if (Debug) { std::cout << "binary_client| Clearing cached references to server" << std::endl; } + + PublishCallbacks.clear(); + } + +private: + std::shared_ptr Channel; + mutable IOStreamBinary Stream; + SecureConnectionParams Params; + std::thread ReceiveThread; + + SubscriptionCallbackMap PublishCallbacks; + SecurityToken ChannelSecurityToken; + mutable std::atomic SequenceNumber; + mutable std::atomic RequestNumber; + ExpandedNodeId AuthenticationToken; + mutable std::atomic RequestHandle; + mutable std::vector> ContinuationPoints; + mutable CallbackMap Callbacks; + const bool Debug = true; + bool Finished = false; + + std::thread callback_thread; + CallbackThread CallbackService; + mutable std::mutex Mutex; + + bool firstMsgParsed = false; + ResponseHeader header; +}; + +template <> +void BinaryClient::Send(OpenSecureChannelRequest request) const +{ + SecureHeader hdr(MT_SECURE_OPEN, CHT_SINGLE, ChannelSecurityToken.SecureChannelId); + AsymmetricAlgorithmHeader algorithmHeader; + algorithmHeader.SecurityPolicyUri = Params.SecurePolicy; + algorithmHeader.SenderCertificate = Params.SenderCertificate; + algorithmHeader.ReceiverCertificateThumbPrint = Params.ReceiverCertificateThumbPrint; + hdr.AddSize(RawSize(algorithmHeader)); + hdr.AddSize(RawSize(request)); + + const SequenceHeader sequence = CreateSequenceHeader(); + hdr.AddSize(RawSize(sequence)); + Stream << hdr << algorithmHeader << sequence << request << flush; +} + } // namespace -OpcUa::Services::SharedPtr OpcUa::CreateBinaryClient(OpcUa::IOChannel::SharedPtr channel, const OpcUa::SecureConnectionParams& params, bool debug) +OpcUa::Services::SharedPtr OpcUa::CreateBinaryClient(OpcUa::IOChannel::SharedPtr channel, const OpcUa::SecureConnectionParams & params, bool debug) { return std::make_shared(channel, params, debug); } -OpcUa::Services::SharedPtr OpcUa::CreateBinaryClient(const std::string& endpointUrl, bool debug) +OpcUa::Services::SharedPtr OpcUa::CreateBinaryClient(const std::string & endpointUrl, bool debug) { const Common::Uri serverUri(endpointUrl); OpcUa::IOChannel::SharedPtr channel = OpcUa::Connect(serverUri.Host(), serverUri.Port()); diff --git a/src/client/binary_client_addon.cpp b/src/client/binary_client_addon.cpp index bfa6f9ad..314dc4dc 100644 --- a/src/client/binary_client_addon.cpp +++ b/src/client/binary_client_addon.cpp @@ -21,41 +21,41 @@ namespace { - class BinaryClientAddon : public OpcUa::Client::Addon +class BinaryClientAddon : public OpcUa::Client::Addon +{ +public: + virtual void Initialize(Common::AddonsManager & manager, const Common::AddonParameters & parameters) { - public: - virtual void Initialize(Common::AddonsManager& manager, const Common::AddonParameters& parameters) - { - for (auto param = parameters.Parameters.begin(); param != parameters.Parameters.begin(); ++param) + for (auto param = parameters.Parameters.begin(); param != parameters.Parameters.begin(); ++param) { if (param->Name == "debug" && param->Value != "false" && param->Value != "0") - { - Debug = true; - } + { + Debug = true; + } } - } - - virtual void Stop() - { - } - - public: - virtual std::string GetProtocol() const - { - return "opc.tcp"; - } - - virtual OpcUa::Services::SharedPtr Connect(const std::string& url) - { - return OpcUa::CreateBinaryClient(url, Debug); - } - - private: - bool Debug = false; - }; + } + + virtual void Stop() + { + } + +public: + virtual std::string GetProtocol() const + { + return "opc.tcp"; + } + + virtual OpcUa::Services::SharedPtr Connect(const std::string & url) + { + return OpcUa::CreateBinaryClient(url, Debug); + } + +private: + bool Debug = false; +}; } -extern "C" Common::Addon* CreateAddon() +extern "C" Common::Addon * CreateAddon() { return new BinaryClientAddon(); } diff --git a/src/client/binary_connection.cpp b/src/client/binary_connection.cpp index 923944bf..f9fe5840 100644 --- a/src/client/binary_connection.cpp +++ b/src/client/binary_connection.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -20,103 +20,108 @@ #include #ifdef _WIN32 - #include +#include #else - #include - #include - #include - #include +#include +#include +#include +#include #endif namespace { - unsigned long GetIPAddress(const std::string& hostName) - { - // TODO Use getaddrinfo - hostent* host = gethostbyname(hostName.c_str()); - if (!host) +unsigned long GetIPAddress(const std::string & hostName) +{ + // TODO Use getaddrinfo + hostent * host = gethostbyname(hostName.c_str()); + + if (!host) { THROW_OS_ERROR("Unable to to resolve host '" + hostName + "'."); } - return *(unsigned long*)host->h_addr_list[0]; - } - int ConnectToRemoteHost(const std::string& host, unsigned short port) - { - int sock = socket(AF_INET, SOCK_STREAM, 0); - if (sock < 0) + return *(unsigned long *)host->h_addr_list[0]; +} + +int ConnectToRemoteHost(const std::string & host, unsigned short port) +{ + int sock = socket(AF_INET, SOCK_STREAM, 0); + + if (sock < 0) { THROW_OS_ERROR("Unable to create socket for connecting to the host '" + host + "."); } - sockaddr_in addr = {0}; - addr.sin_family = AF_INET; - addr.sin_port = htons(port); - addr.sin_addr.s_addr = GetIPAddress(host); - - int error = connect(sock, (sockaddr*)& addr, sizeof(addr)); - if (error < 0) + sockaddr_in addr = {0}; + addr.sin_family = AF_INET; + addr.sin_port = htons(port); + addr.sin_addr.s_addr = GetIPAddress(host); + + int error = connect(sock, (sockaddr *)& addr, sizeof(addr)); + + if (error < 0) { #ifdef _WIN32 - closesocket(sock); + closesocket(sock); #else - close(sock); + close(sock); #endif THROW_OS_ERROR(std::string("Unable connect to host '") + host + std::string("'. ")); } - return sock; - } - class BinaryConnection : public OpcUa::RemoteConnection + return sock; +} + +class BinaryConnection : public OpcUa::RemoteConnection +{ +public: + BinaryConnection(int sock, const std::string & host, unsigned short port) + : HostName(host) + , Port(port) + , Channel(sock) { - public: - BinaryConnection(int sock, const std::string& host, unsigned short port) - : HostName(host) - , Port(port) - , Channel(sock) - { - } + } - virtual ~BinaryConnection() - { - } + virtual ~BinaryConnection() + { + } - virtual std::size_t Receive(char* data, std::size_t size) - { - return Channel.Receive(data, size); - } + virtual std::size_t Receive(char * data, std::size_t size) + { + return Channel.Receive(data, size); + } - virtual void Send(const char* message, std::size_t size) - { - return Channel.Send(message, size); - } + virtual void Send(const char * message, std::size_t size) + { + return Channel.Send(message, size); + } - virtual void Stop() - { - Channel.Stop(); - } + virtual void Stop() + { + Channel.Stop(); + } - virtual std::string GetHost() const - { - return HostName; - } + virtual std::string GetHost() const + { + return HostName; + } - virtual unsigned GetPort() const - { - return Port; - } + virtual unsigned GetPort() const + { + return Port; + } - private: - const std::string HostName; - const unsigned Port; - OpcUa::SocketChannel Channel; - }; +private: + const std::string HostName; + const unsigned Port; + OpcUa::SocketChannel Channel; +}; } -std::unique_ptr OpcUa::Connect(const std::string& host, unsigned port) +std::unique_ptr OpcUa::Connect(const std::string & host, unsigned port) { const int sock = ConnectToRemoteHost(host, port); return std::unique_ptr(new BinaryConnection(sock, host, port)); diff --git a/src/client/client.cpp b/src/client/client.cpp index 11a97cc6..ce550e47 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -29,30 +29,35 @@ namespace OpcUa { - void KeepAliveThread::Start(Services::SharedPtr server, Node node, Duration period) - { - Server = server; - NodeToRead = node; - Period = period; - Running = true; - StopRequest = false; - Thread = std::thread([this] { this->Run(); }); - } +void KeepAliveThread::Start(Services::SharedPtr server, Node node, Duration period) +{ + Server = server; + NodeToRead = node; + Period = period; + Running = true; + StopRequest = false; + Thread = std::thread([this] { this->Run(); }); +} - void KeepAliveThread::Run() - { - if (Debug) { std::cout << "KeepAliveThread | Starting." << std::endl; } - while ( ! StopRequest ) +void KeepAliveThread::Run() +{ + if (Debug) { std::cout << "KeepAliveThread | Starting." << std::endl; } + + while (! StopRequest) { - if (Debug) { std::cout << "KeepAliveThread | Sleeping for: " << (int64_t) ( Period * 0.7 )<< std::endl; } + if (Debug) { std::cout << "KeepAliveThread | Sleeping for: " << (int64_t)(Period * 0.7) << std::endl; } + std::unique_lock lock(Mutex); - std::cv_status status = Condition.wait_for(lock, std::chrono::milliseconds( (int64_t) ( Period * 0.7) )); - if (status == std::cv_status::no_timeout ) - { - break; - } + std::cv_status status = Condition.wait_for(lock, std::chrono::milliseconds((int64_t)(Period * 0.7))); + + if (status == std::cv_status::no_timeout) + { + break; + } + if (Debug) { std::cout << "KeepAliveThread | renewing secure channel " << std::endl; } + OpenSecureChannelParameters params; params.ClientProtocolVersion = 0; params.RequestType = SecurityTokenRequestType::Renew; @@ -60,344 +65,398 @@ namespace OpcUa params.ClientNonce = std::vector(1, 0); params.RequestLifeTime = Period; OpenSecureChannelResponse response = Server->OpenSecureChannel(params); - if ( (response.ChannelSecurityToken.RevisedLifetime < Period) && (response.ChannelSecurityToken.RevisedLifetime > 0) ) - { - Period = response.ChannelSecurityToken.RevisedLifetime; - } + + if ((response.ChannelSecurityToken.RevisedLifetime < Period) && (response.ChannelSecurityToken.RevisedLifetime > 0)) + { + Period = response.ChannelSecurityToken.RevisedLifetime; + } if (Debug) { std::cout << "KeepAliveThread | read a variable from address space to keep session open " << std::endl; } + NodeToRead.GetValue(); } - Running = false; - if (Debug) + + Running = false; + + if (Debug) { std::cout << "KeepAliveThread | Stopped" << std::endl; } - } +} - void KeepAliveThread::Stop() - { - if (! Running) { return; } - if (Debug) { std::cout << "KeepAliveThread | Stopping." << std::endl; } - StopRequest = true; - Condition.notify_all(); - try +void KeepAliveThread::Stop() +{ + if (! Running) { return; } + + if (Debug) { std::cout << "KeepAliveThread | Stopping." << std::endl; } + + StopRequest = true; + Condition.notify_all(); + + try { Thread.join(); } - catch (std::system_error ex) + + catch (std::system_error ex) { if (Debug) { std::cout << "KeepaliveThread | Exception thrown at attempt to join: " << ex.what() << std::endl; } + throw ex; } - } +} - std::vector UaClient::GetServerEndpoints(const std::string& endpoint) - { - const Common::Uri serverUri(endpoint); - OpcUa::IOChannel::SharedPtr channel = OpcUa::Connect(serverUri.Host(), serverUri.Port()); +std::vector UaClient::GetServerEndpoints(const std::string & endpoint) +{ + const Common::Uri serverUri(endpoint); + OpcUa::IOChannel::SharedPtr channel = OpcUa::Connect(serverUri.Host(), serverUri.Port()); - OpcUa::SecureConnectionParams params; - params.EndpointUrl = endpoint; - params.SecurePolicy = "http://opcfoundation.org/UA/SecurityPolicy#None"; + OpcUa::SecureConnectionParams params; + params.EndpointUrl = endpoint; + params.SecurePolicy = "http://opcfoundation.org/UA/SecurityPolicy#None"; - Server = OpcUa::CreateBinaryClient(channel, params, Debug); + Server = OpcUa::CreateBinaryClient(channel, params, Debug); - OpenSecureChannel(); - std::vector endpoints = UaClient::GetServerEndpoints(); - CloseSecureChannel(); + OpenSecureChannel(); + std::vector endpoints = UaClient::GetServerEndpoints(); + CloseSecureChannel(); - Server.reset(); //close channel + Server.reset(); //close channel - return endpoints; - } + return endpoints; +} - std::vector UaClient::GetServerEndpoints() - { - GetEndpointsParameters filter; - filter.EndpointUrl = Endpoint.EndpointUrl; - filter.ProfileUris.push_back("http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary"); - filter.LocaleIds.push_back("http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary"); - std::vector endpoints = Server->Endpoints()->GetEndpoints(filter); +std::vector UaClient::GetServerEndpoints() +{ + GetEndpointsParameters filter; + filter.EndpointUrl = Endpoint.EndpointUrl; + filter.ProfileUris.push_back("http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary"); + filter.LocaleIds.push_back("http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary"); + std::vector endpoints = Server->Endpoints()->GetEndpoints(filter); - return endpoints; - } + return endpoints; +} - EndpointDescription UaClient::SelectEndpoint(const std::string& endpoint) - { - std::vector endpoints = GetServerEndpoints(endpoint); - if (Debug) { std::cout << "UaClient | Going through server endpoints and selected one we support" << std::endl; } - Common::Uri uri(endpoint); - bool has_login = !uri.User().empty(); - for ( EndpointDescription ed : endpoints) +EndpointDescription UaClient::SelectEndpoint(const std::string & endpoint) +{ + std::vector endpoints = GetServerEndpoints(endpoint); + + if (Debug) { std::cout << "UaClient | Going through server endpoints and selected one we support" << std::endl; } + + Common::Uri uri(endpoint); + bool has_login = !uri.User().empty(); + + for (EndpointDescription ed : endpoints) { if (Debug) { std::cout << "UaClient | Examining endpoint: " << ed.EndpointUrl << " with security: " << ed.SecurityPolicyUri << std::endl; } - if ( ed.SecurityPolicyUri == "http://opcfoundation.org/UA/SecurityPolicy#None") - { - if (Debug) { std::cout << "UaClient | Security policy is OK, now looking at user token" << std::endl; } - if (ed.UserIdentityTokens.empty() ) - { - if (Debug) { std::cout << "UaClient | Server does not use user token, OK" << std::endl; } - return ed; - } - for ( UserTokenPolicy token : ed.UserIdentityTokens) + + if (ed.SecurityPolicyUri == "http://opcfoundation.org/UA/SecurityPolicy#None") { - if (has_login) - { - if (token.TokenType == UserTokenType::UserName) + if (Debug) { std::cout << "UaClient | Security policy is OK, now looking at user token" << std::endl; } + + if (ed.UserIdentityTokens.empty()) { - if (Debug) { std::cout << "UaClient | Endpoint selected " << std::endl; } + if (Debug) { std::cout << "UaClient | Server does not use user token, OK" << std::endl; } + return ed; } - } - else if (token.TokenType == UserTokenType::Anonymous) - { - if (Debug) { std::cout << "UaClient | Endpoint selected " << std::endl; } - return ed; - } + + for (UserTokenPolicy token : ed.UserIdentityTokens) + { + if (has_login) + { + if (token.TokenType == UserTokenType::UserName) + { + if (Debug) { std::cout << "UaClient | Endpoint selected " << std::endl; } + + return ed; + } + } + + else if (token.TokenType == UserTokenType::Anonymous) + { + if (Debug) { std::cout << "UaClient | Endpoint selected " << std::endl; } + + return ed; + } + } } - } } - throw std::runtime_error("No supported endpoints found on server"); - } - void UaClient::Connect(const std::string& endpoint) - { - EndpointDescription endpointdesc = SelectEndpoint(endpoint); - endpointdesc.EndpointUrl = endpoint; //force the use of the enpoint the user wants, seems like servers often send wrong hostname - Connect(endpointdesc); - } + throw std::runtime_error("No supported endpoints found on server"); +} - void UaClient::Connect(const EndpointDescription& endpoint) - { - Endpoint = endpoint; - const Common::Uri serverUri(Endpoint.EndpointUrl); - OpcUa::IOChannel::SharedPtr channel = OpcUa::Connect(serverUri.Host(), serverUri.Port()); +void UaClient::Connect(const std::string & endpoint) +{ + EndpointDescription endpointdesc = SelectEndpoint(endpoint); + endpointdesc.EndpointUrl = endpoint; //force the use of the enpoint the user wants, seems like servers often send wrong hostname + Connect(endpointdesc); +} - OpcUa::SecureConnectionParams params; - params.EndpointUrl = Endpoint.EndpointUrl; - params.SecurePolicy = "http://opcfoundation.org/UA/SecurityPolicy#None"; +void UaClient::Connect(const EndpointDescription & endpoint) +{ + Endpoint = endpoint; + const Common::Uri serverUri(Endpoint.EndpointUrl); + OpcUa::IOChannel::SharedPtr channel = OpcUa::Connect(serverUri.Host(), serverUri.Port()); - Server = OpcUa::CreateBinaryClient(channel, params, Debug); + OpcUa::SecureConnectionParams params; + params.EndpointUrl = Endpoint.EndpointUrl; + params.SecurePolicy = "http://opcfoundation.org/UA/SecurityPolicy#None"; - OpenSecureChannel(); + Server = OpcUa::CreateBinaryClient(channel, params, Debug); + OpenSecureChannel(); - if (Debug) { std::cout << "UaClient | Creating session ..." << std::endl; } - OpcUa::RemoteSessionParameters session; - session.ClientDescription.ApplicationUri = ApplicationUri; - session.ClientDescription.ProductUri = ProductUri; - session.ClientDescription.ApplicationName = LocalizedText(SessionName); - session.ClientDescription.ApplicationType = OpcUa::ApplicationType::Client; - session.SessionName = SessionName; - session.EndpointUrl = endpoint.EndpointUrl; - session.Timeout = DefaultTimeout; - session.ServerURI = endpoint.Server.ApplicationUri; - CreateSessionResponse response = Server->CreateSession(session); - CheckStatusCode(response.Header.ServiceResult); - if (Debug) { std::cout << "UaClient | Create session OK" << std::endl; } + if (Debug) { std::cout << "UaClient | Creating session ..." << std::endl; } - if (Debug) { std::cout << "UaClient | Activating session ..." << std::endl; } - ActivateSessionParameters session_parameters; - { - //const SessionData &session_data = response.Session; - Common::Uri uri(session.EndpointUrl); - std::string user = uri.User(); - std::string password = uri.Password(); - bool user_identify_token_found = false; - session_parameters.ClientSignature.Algorithm = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"; - for(auto ep : response.Parameters.ServerEndpoints) { - if(ep.SecurityMode == MessageSecurityMode::None) { - for(auto token : ep.UserIdentityTokens) { - if(user.empty()) { - if(token.TokenType == UserTokenType::Anonymous) { - session_parameters.UserIdentityToken.setPolicyId(token.PolicyId); - user_identify_token_found = true; - break; - } - } - else { - if(token.TokenType == UserTokenType::UserName) { - session_parameters.UserIdentityToken.setPolicyId(token.PolicyId); - session_parameters.UserIdentityToken.setUser(user, password); - user_identify_token_found = true; - break; + OpcUa::RemoteSessionParameters session; + session.ClientDescription.ApplicationUri = ApplicationUri; + session.ClientDescription.ProductUri = ProductUri; + session.ClientDescription.ApplicationName = LocalizedText(SessionName); + session.ClientDescription.ApplicationType = OpcUa::ApplicationType::Client; + session.SessionName = SessionName; + session.EndpointUrl = endpoint.EndpointUrl; + session.Timeout = DefaultTimeout; + session.ServerURI = endpoint.Server.ApplicationUri; + + CreateSessionResponse response = Server->CreateSession(session); + CheckStatusCode(response.Header.ServiceResult); + + if (Debug) { std::cout << "UaClient | Create session OK" << std::endl; } + + if (Debug) { std::cout << "UaClient | Activating session ..." << std::endl; } + + ActivateSessionParameters session_parameters; + { + //const SessionData &session_data = response.Session; + Common::Uri uri(session.EndpointUrl); + std::string user = uri.User(); + std::string password = uri.Password(); + bool user_identify_token_found = false; + session_parameters.ClientSignature.Algorithm = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"; + + for (auto ep : response.Parameters.ServerEndpoints) + { + if (ep.SecurityMode == MessageSecurityMode::None) + { + for (auto token : ep.UserIdentityTokens) + { + if (user.empty()) + { + if (token.TokenType == UserTokenType::Anonymous) + { + session_parameters.UserIdentityToken.setPolicyId(token.PolicyId); + user_identify_token_found = true; + break; + } + } + + else + { + if (token.TokenType == UserTokenType::UserName) + { + session_parameters.UserIdentityToken.setPolicyId(token.PolicyId); + session_parameters.UserIdentityToken.setUser(user, password); + user_identify_token_found = true; + break; + } + } } - } } - } } - if(!user_identify_token_found) { + + if (!user_identify_token_found) + { throw std::runtime_error("Cannot find suitable user identify token for session"); } - } - ActivateSessionResponse aresponse = Server->ActivateSession(session_parameters); - CheckStatusCode(aresponse.Header.ServiceResult); - if (Debug) { std::cout << "UaClient | Activate session OK" << std::endl; } + } + ActivateSessionResponse aresponse = Server->ActivateSession(session_parameters); + CheckStatusCode(aresponse.Header.ServiceResult); + + if (Debug) { std::cout << "UaClient | Activate session OK" << std::endl; } - if (response.Parameters.RevisedSessionTimeout > 0 && response.Parameters.RevisedSessionTimeout < DefaultTimeout ) + if (response.Parameters.RevisedSessionTimeout > 0 && response.Parameters.RevisedSessionTimeout < DefaultTimeout) { DefaultTimeout = response.Parameters.RevisedSessionTimeout; } - KeepAlive.Start(Server, Node(Server, ObjectId::Server_ServerStatus_State), DefaultTimeout); - } - void UaClient::OpenSecureChannel() - { - OpenSecureChannelParameters channelparams; - channelparams.ClientProtocolVersion = 0; - channelparams.RequestType = SecurityTokenRequestType::Issue; - channelparams.SecurityMode = MessageSecurityMode::None; - channelparams.ClientNonce = std::vector(1, 0); - channelparams.RequestLifeTime = DefaultTimeout; - const OpenSecureChannelResponse& response = Server->OpenSecureChannel(channelparams); - - CheckStatusCode(response.Header.ServiceResult); - - SecureChannelId = response.ChannelSecurityToken.SecureChannelId; - if ( response.ChannelSecurityToken.RevisedLifetime > 0 ) + KeepAlive.Start(Server, Node(Server, ObjectId::Server_ServerStatus_State), DefaultTimeout); +} + +void UaClient::OpenSecureChannel() +{ + OpenSecureChannelParameters channelparams; + channelparams.ClientProtocolVersion = 0; + channelparams.RequestType = SecurityTokenRequestType::Issue; + channelparams.SecurityMode = MessageSecurityMode::None; + channelparams.ClientNonce = std::vector(1, 0); + channelparams.RequestLifeTime = DefaultTimeout; + const OpenSecureChannelResponse & response = Server->OpenSecureChannel(channelparams); + + CheckStatusCode(response.Header.ServiceResult); + + SecureChannelId = response.ChannelSecurityToken.SecureChannelId; + + if (response.ChannelSecurityToken.RevisedLifetime > 0) { DefaultTimeout = response.ChannelSecurityToken.RevisedLifetime; } - } +} - void UaClient::CloseSecureChannel() - { - Server->CloseSecureChannel(SecureChannelId); - } +void UaClient::CloseSecureChannel() +{ + Server->CloseSecureChannel(SecureChannelId); +} - UaClient::~UaClient() - { - Disconnect();//Do not leave any thread or connection running - } +UaClient::~UaClient() +{ + Disconnect();//Do not leave any thread or connection running +} - void UaClient::Disconnect() - { - KeepAlive.Stop(); +void UaClient::Disconnect() +{ + KeepAlive.Stop(); - if ( Server.get() ) + if (Server.get()) { CloseSessionResponse response = Server->CloseSession(); + if (Debug) { std::cout << "CloseSession response is " << ToString(response.Header.ServiceResult) << std::endl; } + CloseSecureChannel(); Server.reset(); } - - } - void UaClient::Abort() - { - KeepAlive.Stop(); +} - Server.reset(); //FIXME: check if we still need this - } +void UaClient::Abort() +{ + KeepAlive.Stop(); - std::vector UaClient::GetServerNamespaces() - { - if ( ! Server ) { throw std::runtime_error("Not connected");} - Node namespacearray(Server, ObjectId::Server_NamespaceArray); - return namespacearray.GetValue().As>();; - } + Server.reset(); //FIXME: check if we still need this +} - uint32_t UaClient::GetNamespaceIndex(std::string uri) - { - if ( ! Server ) { throw std::runtime_error("Not connected");} - Node namespacearray(Server, ObjectId::Server_NamespaceArray); - std::vector uris = namespacearray.GetValue().As>();; - for ( uint32_t i=0; i UaClient::GetServerNamespaces() +{ + if (! Server) { throw std::runtime_error("Not connected");} + + Node namespacearray(Server, ObjectId::Server_NamespaceArray); + return namespacearray.GetValue().As>();; +} + +uint32_t UaClient::GetNamespaceIndex(std::string uri) +{ + if (! Server) { throw std::runtime_error("Not connected");} + + Node namespacearray(Server, ObjectId::Server_NamespaceArray); + std::vector uris = namespacearray.GetValue().As>();; + + for (uint32_t i = 0; i < uris.size(); ++i) { - if (uris[i] == uri ) - { - return i; - } + if (uris[i] == uri) + { + return i; + } } - throw(std::runtime_error("Error namespace uri does not exists in server")); - //return -1; - } + throw (std::runtime_error("Error namespace uri does not exists in server")); + //return -1; +} - Node UaClient::GetNode(const std::string& nodeId) const - { - return Node(Server, ToNodeId(nodeId)); - } - Node UaClient::GetNode(const NodeId& nodeId) const - { - if ( ! Server ) { throw std::runtime_error("Not connected");} - return Node(Server, nodeId); - } +Node UaClient::GetNode(const std::string & nodeId) const +{ + return Node(Server, ToNodeId(nodeId)); +} - Node UaClient::GetRootNode() const - { - if ( ! Server ) { throw std::runtime_error("Not connected");} - return Node(Server, OpcUa::ObjectId::RootFolder); - } +Node UaClient::GetNode(const NodeId & nodeId) const +{ + if (! Server) { throw std::runtime_error("Not connected");} - Node UaClient::GetObjectsNode() const - { - if ( ! Server ) { throw std::runtime_error("Not connected");} - return Node(Server, OpcUa::ObjectId::ObjectsFolder); - } + return Node(Server, nodeId); +} - Node UaClient::GetServerNode() const - { - if ( ! Server ) { throw std::runtime_error("Not connected");} - return Node(Server, OpcUa::ObjectId::Server); - } +Node UaClient::GetRootNode() const +{ + if (! Server) { throw std::runtime_error("Not connected");} - void UaClient::DeleteNodes(std::vector& nodes, bool recursive) - { - if (recursive) + return Node(Server, OpcUa::ObjectId::RootFolder); +} + +Node UaClient::GetObjectsNode() const +{ + if (! Server) { throw std::runtime_error("Not connected");} + + return Node(Server, OpcUa::ObjectId::ObjectsFolder); +} + +Node UaClient::GetServerNode() const +{ + if (! Server) { throw std::runtime_error("Not connected");} + + return Node(Server, OpcUa::ObjectId::Server); +} + +void UaClient::DeleteNodes(std::vector & nodes, bool recursive) +{ + if (recursive) { std::vector children = AddChilds(nodes); nodes.insert(nodes.end(), children.begin(), children.end()); } - if (Debug) { std::cout << "UaClient | Deleting nodes ..." << std::endl; } - std::vector nodesToDelete; - nodesToDelete.resize(nodes.size()); - for (unsigned i = 0; i < nodes.size(); i++) + + if (Debug) { std::cout << "UaClient | Deleting nodes ..." << std::endl; } + + std::vector nodesToDelete; + nodesToDelete.resize(nodes.size()); + + for (unsigned i = 0; i < nodes.size(); i++) { nodesToDelete[i].NodeId = nodes[i].GetId(); nodesToDelete[i].DeleteTargetReferences = true; } - DeleteNodesResponse response = Server->DeleteNodes(nodesToDelete); - for (std::vector::iterator it = response.Results.begin(); it < response.Results.end(); it++) + DeleteNodesResponse response = Server->DeleteNodes(nodesToDelete); + + for (std::vector::iterator it = response.Results.begin(); it < response.Results.end(); it++) { CheckStatusCode(*it); } - } +} - std::vector UaClient::AddChilds(std::vector nodes) - { - std::vector results; - std::vector temp; - for (std::vector::iterator it = nodes.begin(); it < nodes.end(); it++) +std::vector UaClient::AddChilds(std::vector nodes) +{ + std::vector results; + std::vector temp; + + for (std::vector::iterator it = nodes.begin(); it < nodes.end(); it++) { temp.clear(); temp = it->GetChildren(); + if (!temp.empty()) - { - results.insert(results.begin(), temp.begin(), temp.end()); - temp = AddChilds(temp); - results.insert(results.begin(), temp.begin(), temp.end()); - } + { + results.insert(results.begin(), temp.begin(), temp.end()); + temp = AddChilds(temp); + results.insert(results.begin(), temp.begin(), temp.end()); + } } - return results; - } - std::unique_ptr UaClient::CreateSubscription(unsigned int period, SubscriptionHandler& callback) - { - CreateSubscriptionParameters params; - params.RequestedPublishingInterval = period; + return results; +} - return std::unique_ptr(new Subscription (Server, params, callback, Debug)); - } +std::unique_ptr UaClient::CreateSubscription(unsigned int period, SubscriptionHandler & callback) +{ + CreateSubscriptionParameters params; + params.RequestedPublishingInterval = period; - ServerOperations UaClient::CreateServerOperations() - { - return std::move(ServerOperations(Server)); - } + return std::unique_ptr(new Subscription(Server, params, callback, Debug)); +} + +ServerOperations UaClient::CreateServerOperations() +{ + return std::move(ServerOperations(Server)); +} } // namespace OpcUa diff --git a/src/clientapp/opcua_main.cpp b/src/clientapp/opcua_main.cpp index d2682d97..0d802d25 100644 --- a/src/clientapp/opcua_main.cpp +++ b/src/clientapp/opcua_main.cpp @@ -26,748 +26,814 @@ namespace { - using namespace OpcUa; +using namespace OpcUa; - struct Tabs +struct Tabs +{ + Tabs(unsigned num = 0) + : Num(num) { - Tabs(unsigned num = 0) - : Num(num) - { - } - unsigned Num; - }; + } + unsigned Num; +}; - std::ostream& operator <<(std::ostream& os, const Tabs& tabs) - { - for (unsigned i = 0; i < tabs.Num; ++i) +std::ostream & operator <<(std::ostream & os, const Tabs & tabs) +{ + for (unsigned i = 0; i < tabs.Num; ++i) { os << " "; } - return os; - } + return os; +} - std::string GetName(OpcUa::MessageSecurityMode mode) - { - switch (mode) + +std::string GetName(OpcUa::MessageSecurityMode mode) +{ + switch (mode) { - case MessageSecurityMode::None: - return "none"; - case MessageSecurityMode::Sign: - return "sign"; - case MessageSecurityMode::SignAndEncrypt: - return "sign and encrypt"; + case MessageSecurityMode::None: + return "none"; + + case MessageSecurityMode::Sign: + return "sign"; + + case MessageSecurityMode::SignAndEncrypt: + return "sign and encrypt"; - default: - return "unknown"; + default: + return "unknown"; } - } +} - std::string GetName(OpcUa::ApplicationType type) - { - switch (type) - { - case OpcUa::ApplicationType::Server: - return "server"; - case OpcUa::ApplicationType::Client: - return "client"; - case OpcUa::ApplicationType::ClientAndServer: - return "client and server"; - case OpcUa::ApplicationType::DiscoveryServer: - return "discovery server"; - default: - return "unknown"; +std::string GetName(OpcUa::ApplicationType type) +{ + switch (type) + { + case OpcUa::ApplicationType::Server: + return "server"; + + case OpcUa::ApplicationType::Client: + return "client"; + + case OpcUa::ApplicationType::ClientAndServer: + return "client and server"; + + case OpcUa::ApplicationType::DiscoveryServer: + return "discovery server"; + + default: + return "unknown"; } - } +} - std::string GetName(OpcUa::UserTokenType type) - { - switch (type) - { - case OpcUa::UserTokenType::Anonymous: - return "anonymous"; - case OpcUa::UserTokenType::UserName: - return "username"; - case OpcUa::UserTokenType::Certificate: - return "x509v3 certificate"; - case OpcUa::UserTokenType::IssuedToken: - return "WS_Security token"; - default: - return "unknown"; +std::string GetName(OpcUa::UserTokenType type) +{ + switch (type) + { + case OpcUa::UserTokenType::Anonymous: + return "anonymous"; + + case OpcUa::UserTokenType::UserName: + return "username"; + + case OpcUa::UserTokenType::Certificate: + return "x509v3 certificate"; + + case OpcUa::UserTokenType::IssuedToken: + return "WS_Security token"; + + default: + return "unknown"; } - } +} - std::string GetNodeClassName(unsigned cls) - { - std::string result; - NodeClass nodeClass = static_cast(cls); - if (nodeClass == NodeClass::Object) +std::string GetNodeClassName(unsigned cls) +{ + std::string result; + NodeClass nodeClass = static_cast(cls); + + if (nodeClass == NodeClass::Object) { result += "object"; } - if (nodeClass == NodeClass::Variable) + if (nodeClass == NodeClass::Variable) { if (!result.empty()) - { - result += ", "; - } + { + result += ", "; + } + result += "variable"; } - if (nodeClass == NodeClass::Method) + if (nodeClass == NodeClass::Method) { if (!result.empty()) - { - result += ", "; - } + { + result += ", "; + } + result += "method"; } - if (nodeClass == NodeClass::ObjectType) + if (nodeClass == NodeClass::ObjectType) { if (!result.empty()) - { - result += ", "; - } + { + result += ", "; + } + result += "object type"; } - if (nodeClass == NodeClass::VariableType) + if (nodeClass == NodeClass::VariableType) { if (!result.empty()) - { - result += ", "; - } + { + result += ", "; + } + result += "variable type"; } - if (nodeClass == NodeClass::ReferenceType) + if (nodeClass == NodeClass::ReferenceType) { if (!result.empty()) - { - result += ", "; - } + { + result += ", "; + } + result += "reference type"; } - if (nodeClass == NodeClass::DataType) + if (nodeClass == NodeClass::DataType) { if (!result.empty()) - { - result += ", "; - } + { + result += ", "; + } + result += "data type"; } - if (nodeClass == NodeClass::View) + if (nodeClass == NodeClass::View) { if (!result.empty()) - { - result += ", "; - } + { + result += ", "; + } + result += "view"; } - return result; - } + return result; +} - void Print(const OpcUa::NodeId& nodeId, const Tabs& tabs) - { - OpcUa::NodeIdEncoding encoding = static_cast(nodeId.Encoding & OpcUa::NodeIdEncoding::EV_VALUE_MASK); +void Print(const OpcUa::NodeId & nodeId, const Tabs & tabs) +{ + OpcUa::NodeIdEncoding encoding = static_cast(nodeId.Encoding & OpcUa::NodeIdEncoding::EV_VALUE_MASK); - const Tabs dataTabs(tabs.Num + 2); - switch (encoding) + const Tabs dataTabs(tabs.Num + 2); + + switch (encoding) { - case OpcUa::NodeIdEncoding::EV_TWO_BYTE: - { - std::cout << tabs << "Two byte:" << std::endl; - std::cout << dataTabs << "Identifier:" << (unsigned)nodeId.TwoByteData.Identifier << std::endl; - break; - } + case OpcUa::NodeIdEncoding::EV_TWO_BYTE: + { + std::cout << tabs << "Two byte:" << std::endl; + std::cout << dataTabs << "Identifier:" << (unsigned)nodeId.TwoByteData.Identifier << std::endl; + break; + } - case OpcUa::NodeIdEncoding::EV_FOUR_BYTE: - { - std::cout << tabs << "Four byte:" << std::endl; - std::cout << dataTabs << "NamespaceIndex:" << (unsigned)nodeId.FourByteData.NamespaceIndex << std::endl; - std::cout << dataTabs << "Identifier" << (unsigned)nodeId.FourByteData.Identifier << std::endl; - break; - } + case OpcUa::NodeIdEncoding::EV_FOUR_BYTE: + { + std::cout << tabs << "Four byte:" << std::endl; + std::cout << dataTabs << "NamespaceIndex:" << (unsigned)nodeId.FourByteData.NamespaceIndex << std::endl; + std::cout << dataTabs << "Identifier" << (unsigned)nodeId.FourByteData.Identifier << std::endl; + break; + } - case OpcUa::NodeIdEncoding::EV_NUMERIC: - { - std::cout << tabs << "Numeric:" << std::endl; - std::cout << dataTabs << "NamespaceIndex" << (unsigned)nodeId.NumericData.NamespaceIndex << std::endl; - std::cout << dataTabs << "Identifier" << (unsigned)nodeId.NumericData.Identifier << std::endl; - break; - } + case OpcUa::NodeIdEncoding::EV_NUMERIC: + { + std::cout << tabs << "Numeric:" << std::endl; + std::cout << dataTabs << "NamespaceIndex" << (unsigned)nodeId.NumericData.NamespaceIndex << std::endl; + std::cout << dataTabs << "Identifier" << (unsigned)nodeId.NumericData.Identifier << std::endl; + break; + } - case OpcUa::NodeIdEncoding::EV_STRING: - { - std::cout << tabs << "String: " << std::endl; - std::cout << dataTabs << "NamespaceIndex: " << (unsigned)nodeId.StringData.NamespaceIndex << std::endl; - std::cout << dataTabs << "Identifier: " << nodeId.StringData.Identifier << std::endl; - break; - } + case OpcUa::NodeIdEncoding::EV_STRING: + { + std::cout << tabs << "String: " << std::endl; + std::cout << dataTabs << "NamespaceIndex: " << (unsigned)nodeId.StringData.NamespaceIndex << std::endl; + std::cout << dataTabs << "Identifier: " << nodeId.StringData.Identifier << std::endl; + break; + } - case OpcUa::NodeIdEncoding::EV_BYTE_STRING: - { - std::cout << tabs << "Binary: " << std::endl; - std::cout << dataTabs << "NamespaceIndex: " << (unsigned)nodeId.BinaryData.NamespaceIndex << std::endl; - std::cout << dataTabs << "Identifier: "; - for (auto val : nodeId.BinaryData.Identifier) {std::cout << (unsigned)val; } - std::cout << std::endl; - break; - } + case OpcUa::NodeIdEncoding::EV_BYTE_STRING: + { + std::cout << tabs << "Binary: " << std::endl; + std::cout << dataTabs << "NamespaceIndex: " << (unsigned)nodeId.BinaryData.NamespaceIndex << std::endl; + std::cout << dataTabs << "Identifier: "; - case OpcUa::NodeIdEncoding::EV_GUId: - { - std::cout << tabs << "Guid: " << std::endl; - std::cout << dataTabs << "Namespace Index: " << (unsigned)nodeId.GuidData.NamespaceIndex << std::endl; - const OpcUa::Guid& guid = nodeId.GuidData.Identifier; - std::cout << dataTabs << "Identifier: " << std::hex << guid.Data1 << "-" << guid.Data2 << "-" << guid.Data3; - for (auto val : guid.Data4) {std::cout << (unsigned)val; } - break; - } - default: - { - std::cout << tabs << "unknown id type:" << (unsigned)encoding << std::endl; - break; - } + for (auto val : nodeId.BinaryData.Identifier) {std::cout << (unsigned)val; } + + std::cout << std::endl; + break; } - if (nodeId.Encoding & OpcUa::NodeIdEncoding::EV_NAMESPACE_URI_FLAG) + case OpcUa::NodeIdEncoding::EV_GUId: + { + std::cout << tabs << "Guid: " << std::endl; + std::cout << dataTabs << "Namespace Index: " << (unsigned)nodeId.GuidData.NamespaceIndex << std::endl; + const OpcUa::Guid & guid = nodeId.GuidData.Identifier; + std::cout << dataTabs << "Identifier: " << std::hex << guid.Data1 << "-" << guid.Data2 << "-" << guid.Data3; + + for (auto val : guid.Data4) {std::cout << (unsigned)val; } + + break; + } + + default: + { + std::cout << tabs << "unknown id type:" << (unsigned)encoding << std::endl; + break; + } + } + + if (nodeId.Encoding & OpcUa::NodeIdEncoding::EV_NAMESPACE_URI_FLAG) { std::cout << tabs << "Namespace URI: " << nodeId.NamespaceURI << std::endl; } - if (nodeId.Encoding & OpcUa::NodeIdEncoding::EV_Server_INDEX_FLAG) + if (nodeId.Encoding & OpcUa::NodeIdEncoding::EV_Server_INDEX_FLAG) { std::cout << tabs << "Server index: " << nodeId.ServerIndex << std::endl; } - } +} - void Print(const OpcUa::UserTokenPolicy& policy, const Tabs& tabs) - { - std::cout << tabs << "Id: " << policy.PolicyId << std::endl; - std::cout << tabs << "TokenType: " << GetName(policy.TokenType) << std::endl; - std::cout << tabs << "IssuedTokenType: " << policy.IssuedTokenType << std::endl; - std::cout << tabs << "IssuerEndpointUrl: " << policy.IssuerEndpointUrl << std::endl; - std::cout << tabs << "SecurityPolicyUri: " << policy.SecurityPolicyUri << std::endl; - } +void Print(const OpcUa::UserTokenPolicy & policy, const Tabs & tabs) +{ + std::cout << tabs << "Id: " << policy.PolicyId << std::endl; + std::cout << tabs << "TokenType: " << GetName(policy.TokenType) << std::endl; + std::cout << tabs << "IssuedTokenType: " << policy.IssuedTokenType << std::endl; + std::cout << tabs << "IssuerEndpointUrl: " << policy.IssuerEndpointUrl << std::endl; + std::cout << tabs << "SecurityPolicyUri: " << policy.SecurityPolicyUri << std::endl; +} - void Print(const OpcUa::ApplicationDescription& desc, const Tabs& tab) - { - std::cout << tab << "Name: " << desc.ApplicationName.Text << " (" << desc.ApplicationName.Locale << ")" << std::endl; - std::cout << tab << "Type: " << GetName(desc.ApplicationType) << std::endl; - std::cout << tab << "URI: " << desc.ApplicationUri << std::endl; - std::cout << tab << "ProductURI: " << desc.ProductUri << std::endl; - std::cout << tab << "GatewayServerURI: " << desc.GatewayServerUri << std::endl; - std::cout << tab << "DiscoveryProfileURI: " << desc.DiscoveryProfileUri << std::endl; - if (!desc.DiscoveryUrls.empty()) +void Print(const OpcUa::ApplicationDescription & desc, const Tabs & tab) +{ + std::cout << tab << "Name: " << desc.ApplicationName.Text << " (" << desc.ApplicationName.Locale << ")" << std::endl; + std::cout << tab << "Type: " << GetName(desc.ApplicationType) << std::endl; + std::cout << tab << "URI: " << desc.ApplicationUri << std::endl; + std::cout << tab << "ProductURI: " << desc.ProductUri << std::endl; + std::cout << tab << "GatewayServerURI: " << desc.GatewayServerUri << std::endl; + std::cout << tab << "DiscoveryProfileURI: " << desc.DiscoveryProfileUri << std::endl; + + if (!desc.DiscoveryUrls.empty()) { std::cout << tab << "DiscoveryProfileURLs: "; + for (auto it = desc.DiscoveryUrls.begin(); it != desc.DiscoveryUrls.end(); ++it) - { - std::cout << "'" << *it << "' "; - } + { + std::cout << "'" << *it << "' "; + } + std::cout << std::endl; } - } +} - void Print(const OpcUa::EndpointDescription& desc, const Tabs& tab) - { - std::cout << tab << "URL: " << desc.EndpointUrl << std::endl; - std::cout << tab << "SecurityPolicyUri: " << desc.SecurityPolicyUri << std::endl; - std::cout << tab << "SecurityLevel: " << GetName(desc.SecurityMode) << " (" << (int)desc.SecurityMode << ")" << std::endl; - std::cout << tab << "TransportProfileURI: " << desc.TransportProfileUri << std::endl; - std::cout << tab << "SecurityLevel: " << (int)desc.SecurityLevel << std::endl; - std::cout << tab << "Server description: " << std::endl; - Print(desc.Server, Tabs(tab.Num + 2)); +void Print(const OpcUa::EndpointDescription & desc, const Tabs & tab) +{ + std::cout << tab << "URL: " << desc.EndpointUrl << std::endl; + std::cout << tab << "SecurityPolicyUri: " << desc.SecurityPolicyUri << std::endl; + std::cout << tab << "SecurityLevel: " << GetName(desc.SecurityMode) << " (" << (int)desc.SecurityMode << ")" << std::endl; + std::cout << tab << "TransportProfileURI: " << desc.TransportProfileUri << std::endl; + std::cout << tab << "SecurityLevel: " << (int)desc.SecurityLevel << std::endl; + std::cout << tab << "Server description: " << std::endl; + Print(desc.Server, Tabs(tab.Num + 2)); - if (!desc.UserIdentityTokens.empty()) + if (!desc.UserIdentityTokens.empty()) { std::cout << tab << "User identify tokens: " << std::endl; + for (auto it = desc.UserIdentityTokens.begin(); it != desc.UserIdentityTokens.end(); ++it) - { - std::cout << Tabs(tab.Num + 2) << "token: " << std::endl; - Print(*it, Tabs(tab.Num + 4)); - } + { + std::cout << Tabs(tab.Num + 2) << "token: " << std::endl; + Print(*it, Tabs(tab.Num + 4)); + } + std::cout << std::endl; } + // CertificateData ServerCertificate; // std::vector ; - } +} - void PrintEndpoints(OpcUa::Services& computer) - { - std::shared_ptr service = computer.Endpoints(); - OpcUa::GetEndpointsParameters filter; - std::vector endpoints = service->GetEndpoints(filter); - for(auto it = endpoints.begin(); it != endpoints.end(); ++it) +void PrintEndpoints(OpcUa::Services & computer) +{ + std::shared_ptr service = computer.Endpoints(); + OpcUa::GetEndpointsParameters filter; + std::vector endpoints = service->GetEndpoints(filter); + + for (auto it = endpoints.begin(); it != endpoints.end(); ++it) { std::cout << "endpoint:" << std::endl; Print(*it, Tabs(2)); } - } +} - void PrintServers(OpcUa::Services& computer) - { - std::shared_ptr service = computer.Endpoints(); - OpcUa::FindServersParameters filter; - std::vector applications = service->FindServers(filter); - for(const OpcUa::ApplicationDescription& desc : applications) +void PrintServers(OpcUa::Services & computer) +{ + std::shared_ptr service = computer.Endpoints(); + OpcUa::FindServersParameters filter; + std::vector applications = service->FindServers(filter); + + for (const OpcUa::ApplicationDescription & desc : applications) { std::cout << "Application:" << std::endl; Print(desc, Tabs(2)); } +} + +inline void PrintReference(const OpcUa::ReferenceDescription & desc, const Tabs & tabs) +{ + const Tabs tabs1(tabs.Num + 2); + std::cout << tabs << "DisplayName: " << desc.DisplayName.Text << std::endl; + std::cout << tabs << "Browse Name: " << desc.BrowseName.NamespaceIndex << ":" << desc.BrowseName.Name << std::endl; + std::cout << tabs << "Is Forward: " << desc.IsForward << std::endl; + + std::cout << tabs << "Target Node class: " << GetNodeClassName(static_cast(desc.TargetNodeClass)) << std::endl; + std::cout << tabs << "Target NodeId:" << std::endl; + Print(desc.TargetNodeId, tabs1); + + std::cout << tabs << "TypeId:" << std::endl; + Print(desc.ReferenceTypeId, tabs1); + + std::cout << tabs << "Type definition Id:" << std::endl; + Print(desc.TargetNodeTypeDefinition, tabs1); +} + +void Browse(OpcUa::ViewServices & view, OpcUa::NodeId nodeId) +{ + OpcUa::BrowseDescription description; + description.NodeToBrowse = nodeId; + description.Direction = OpcUa::BrowseDirection::Forward; + description.IncludeSubtypes = true; + description.NodeClasses = OpcUa::NodeClass::Unspecified; + description.ResultMask = OpcUa::BrowseResultMask::All; + + OpcUa::NodesQuery query; + query.View.Timestamp = OpcUa::DateTime::Current(); + query.NodesToBrowse.push_back(description); + query.MaxReferenciesPerNode = 100; + + std::vector results = view.Browse(query); + + while (true) + { + if (results.empty()) + { + return; + } + + if (results[0].Referencies.empty()) + { + break; + } + + for (auto refIt : results[0].Referencies) + { + std::cout << "reference:" << std::endl; + PrintReference(refIt, Tabs(2)); + std::cout << std::endl; + } + + results = view.BrowseNext(); + } +} + + +struct VariantPrinter +{ + template + void PrintValue(const T & val) + { + std::cout << val; } - inline void PrintReference(const OpcUa::ReferenceDescription& desc, const Tabs& tabs) + void PrintValue(const OpcUa::DiagnosticInfo & info) { - const Tabs tabs1(tabs.Num + 2); - std::cout << tabs << "DisplayName: " << desc.DisplayName.Text << std::endl; - std::cout << tabs << "Browse Name: " << desc.BrowseName.NamespaceIndex << ":" << desc.BrowseName.Name << std::endl; - std::cout << tabs << "Is Forward: " << desc.IsForward << std::endl; + std::cout << "!!!TODO!!!"; + } - std::cout << tabs << "Target Node class: " << GetNodeClassName(static_cast(desc.TargetNodeClass)) << std::endl; - std::cout << tabs << "Target NodeId:" << std::endl; - Print(desc.TargetNodeId, tabs1); + void PrintValue(const OpcUa::Variant & info) + { + std::cout << "!!!TODO!!!"; + } - std::cout << tabs << "TypeId:" << std::endl; - Print(desc.ReferenceTypeId, tabs1); + void PrintValue(const OpcUa::LocalizedText & text) + { + std::cout << text.Text << std::endl; + } - std::cout << tabs << "Type definition Id:" << std::endl; - Print(desc.TargetNodeTypeDefinition, tabs1); + void PrintValue(const OpcUa::StatusCode & code) + { + std::cout << OpcUa::ToString(code) << std::endl; } - void Browse(OpcUa::ViewServices& view, OpcUa::NodeId nodeId) + template + void OnScalar(const T & val) { - OpcUa::BrowseDescription description; - description.NodeToBrowse = nodeId; - description.Direction = OpcUa::BrowseDirection::Forward; - description.IncludeSubtypes = true; - description.NodeClasses = OpcUa::NodeClass::Unspecified; - description.ResultMask = OpcUa::BrowseResultMask::All; - - OpcUa::NodesQuery query; - query.View.Timestamp = OpcUa::DateTime::Current(); - query.NodesToBrowse.push_back(description); - query.MaxReferenciesPerNode = 100; - - std::vector results = view.Browse(query); - while(true) - { - if (results.empty() ) - { - return; - } - if (results[0].Referencies.empty()) - { - break; - } - for (auto refIt : results[0].Referencies) + PrintValue(val); + std::cout << std::endl; + } + + template + void OnContainer(const std::vector & vals) + { + typedef typename std::vector::const_iterator Iterator; + + for (Iterator it = vals.begin(); it != vals.end(); ++it) { - std::cout << "reference:" << std::endl; - PrintReference(refIt, Tabs(2)); - std::cout << std::endl; + PrintValue(*it); + std::cout << " "; } - results = view.BrowseNext(); - } + + std::cout << std::endl; } +}; +void Print(const OpcUa::Variant & var, const Tabs & tabs) +{ + VariantPrinter printer; + TypedVisitor visitor(printer); - struct VariantPrinter - { - template - void PrintValue(const T& val) + switch (var.Type()) + { + case VariantType::BOOLEAN: { - std::cout << val; + std::cout << tabs << "boolean: "; + break; } - void PrintValue(const OpcUa::DiagnosticInfo& info) + case VariantType::SBYTE: { - std::cout << "!!!TODO!!!"; + std::cout << tabs << "signed byte: "; + break; } - void PrintValue(const OpcUa::Variant& info) + case VariantType::BYTE: { - std::cout << "!!!TODO!!!"; + std::cout << tabs << "byte: "; + break; } - void PrintValue(const OpcUa::LocalizedText& text) + case VariantType::INT16: { - std::cout << text.Text << std::endl; + std::cout << tabs << "int16: "; + break; } - void PrintValue(const OpcUa::StatusCode& code) + case VariantType::UINT16: { - std::cout << OpcUa::ToString(code) << std::endl; + std::cout << tabs << "unsigned int16: "; + break; } - template - void OnScalar(const T& val) + case VariantType::INT32: { - PrintValue(val); - std::cout << std::endl; + std::cout << tabs << "int32: "; + break; } - template - void OnContainer(const std::vector& vals) + case VariantType::UINT32: { - typedef typename std::vector::const_iterator Iterator; - for (Iterator it = vals.begin(); it != vals.end(); ++it) - { - PrintValue(*it); - std::cout << " "; - } - std::cout << std::endl; + std::cout << tabs << "unsigned int32: "; + break; + } + + case VariantType::INT64: + { + std::cout << tabs << "int64: "; + break; } - }; - void Print(const OpcUa::Variant& var, const Tabs& tabs) - { - VariantPrinter printer; - TypedVisitor visitor(printer); - switch (var.Type()) + case VariantType::UINT64: { - case VariantType::BOOLEAN: - { - std::cout << tabs << "boolean: "; - break; - } - case VariantType::SBYTE: - { - std::cout << tabs << "signed byte: "; - break; - } - case VariantType::BYTE: - { - std::cout << tabs << "byte: "; - break; - } - case VariantType::INT16: - { - std::cout << tabs << "int16: "; - break; - } - case VariantType::UINT16: - { - std::cout << tabs << "unsigned int16: "; - break; - } - case VariantType::INT32: - { - std::cout << tabs << "int32: "; - break; - } - case VariantType::UINT32: - { - std::cout << tabs << "unsigned int32: "; - break; - } + std::cout << tabs << "unsigned int64: "; + break; + } - case VariantType::INT64: - { - std::cout << tabs << "int64: "; - break; - } + case VariantType::FLOAT: + { + std::cout << tabs << "float: "; + break; + } - case VariantType::UINT64: - { - std::cout << tabs << "unsigned int64: "; - break; - } + case VariantType::DOUBLE: + { + std::cout << tabs << "double: "; + break; + } - case VariantType::FLOAT: - { - std::cout << tabs << "float: "; - break; - } + case VariantType::STRING: + { + std::cout << tabs << "string: "; + break; + } - case VariantType::DOUBLE: - { - std::cout << tabs << "double: "; - break; - } + case VariantType::EXPANDED_NODE_Id: + case VariantType::NODE_Id: + { + std::cout << tabs << "NodeId: " << std::endl; + break; + } - case VariantType::STRING: - { - std::cout << tabs << "string: "; - break; - } + case VariantType::QUALIFIED_NAME: + { + std::cout << tabs << "Name: "; + break; + } + case VariantType::LOCALIZED_TEXT: + { + std::cout << tabs << "Text: "; + break; + } - case VariantType::EXPANDED_NODE_Id: - case VariantType::NODE_Id: - { - std::cout << tabs << "NodeId: " << std::endl; - break; - } - case VariantType::QUALIFIED_NAME: - { - std::cout << tabs << "Name: "; - break; - } + case VariantType::DATE_TIME: + { + std::cout << "DateTime: " << OpcUa::ToString(var.As()) << std::endl; + break; + } - case VariantType::LOCALIZED_TEXT: - { - std::cout << tabs << "Text: "; - break; - } + case VariantType::GUId: + case VariantType::BYTE_STRING: + case VariantType::XML_ELEMENT: + case VariantType::STATUS_CODE: + case VariantType::DIAGNOSTIC_INFO: + case VariantType::VARIANT: + case VariantType::DATA_VALUE: + case VariantType::NUL: + case VariantType::EXTENSION_OBJECT: + break; + default: + throw std::logic_error("Unknown variant type."); + } - case VariantType::DATE_TIME: - { - std::cout << "DateTime: " << OpcUa::ToString(var.As()) << std::endl; - break; - } - case VariantType::GUId: - case VariantType::BYTE_STRING: - case VariantType::XML_ELEMENT: - case VariantType::STATUS_CODE: - case VariantType::DIAGNOSTIC_INFO: - case VariantType::VARIANT: - case VariantType::DATA_VALUE: - case VariantType::NUL: - case VariantType::EXTENSION_OBJECT: - break; - default: - throw std::logic_error("Unknown variant type."); - } - var.Visit(visitor); - std::cout << std::endl; - } + var.Visit(visitor); + std::cout << std::endl; +} - void Print(const DataValue& value, const Tabs& tabs) - { - const Tabs tabs1(tabs.Num + 2); - if (value.Encoding & DATA_VALUE_STATUS_CODE) +void Print(const DataValue & value, const Tabs & tabs) +{ + const Tabs tabs1(tabs.Num + 2); + + if (value.Encoding & DATA_VALUE_STATUS_CODE) { std::cout << tabs << "Status code:" << std::endl; std::cout << tabs1 << "0x" << std::hex << static_cast(value.Status) << std::endl; } - if (value.Encoding & DATA_VALUE) + + if (value.Encoding & DATA_VALUE) { std::cout << tabs << "Value:" << std::endl; Print(value.Value, tabs1); } - } +} - void Read(OpcUa::AttributeServices& attributes, OpcUa::NodeId nodeId, OpcUa::AttributeId attributeId) - { - ReadParameters params; - ReadValueId attribute; - attribute.NodeId = nodeId; - attribute.AttributeId = attributeId; - params.AttributesToRead.push_back(attribute); - const std::vector values = attributes.Read(params); - if (values.size() != 1) +void Read(OpcUa::AttributeServices & attributes, OpcUa::NodeId nodeId, OpcUa::AttributeId attributeId) +{ + ReadParameters params; + ReadValueId attribute; + attribute.NodeId = nodeId; + attribute.AttributeId = attributeId; + params.AttributesToRead.push_back(attribute); + const std::vector values = attributes.Read(params); + + if (values.size() != 1) { std::cout << "Server returned " << values.size() << " instead of 1." << std::endl; return; } - std::cout << "data value:" << std::endl; - Print(values.front(), Tabs(2)); - } - void Write(OpcUa::AttributeServices& attributes, OpcUa::NodeId nodeId, OpcUa::AttributeId attributeId, const OpcUa::Variant& value) - { - OpcUa::WriteValue attribute; - attribute.NodeId = nodeId; - attribute.AttributeId = attributeId; - attribute.Value = value; - std::vector statuses = attributes.Write(std::vector(1, attribute)); - for (OpcUa::StatusCode status : statuses) + std::cout << "data value:" << std::endl; + Print(values.front(), Tabs(2)); +} + +void Write(OpcUa::AttributeServices & attributes, OpcUa::NodeId nodeId, OpcUa::AttributeId attributeId, const OpcUa::Variant & value) +{ + OpcUa::WriteValue attribute; + attribute.NodeId = nodeId; + attribute.AttributeId = attributeId; + attribute.Value = value; + std::vector statuses = attributes.Write(std::vector(1, attribute)); + + for (OpcUa::StatusCode status : statuses) { std::cout << "Status code: 0x" << std::hex << static_cast(status) << std::endl; } - } +} - void CreateSubscription(OpcUa::SubscriptionServices& subscriptions) - { - OpcUa::CreateSubscriptionRequest request; - request.Parameters.MaxNotificationsPerPublish = 1; - request.Parameters.Priority = 0; - request.Parameters.PublishingEnabled = false; - request.Parameters.RequestedLifetimeCount = 1; - request.Parameters.RequestedMaxKeepAliveCount = 1; - request.Parameters.RequestedPublishingInterval = 1000; - const OpcUa::SubscriptionData data = subscriptions.CreateSubscription(request, [](PublishResult){}); - std::cout << "Id: " << data.SubscriptionId << std::endl; - std::cout << "RevisedPublishingInterval: " << data.RevisedPublishingInterval << std::endl; - std::cout << "RevisedLifetimeCount: " << data.RevisedLifetimeCount << std::endl; - std::cout << "RevisedMaxKeepAliveCount: " << data.RevisedMaxKeepAliveCount << std::endl; - } +void CreateSubscription(OpcUa::SubscriptionServices & subscriptions) +{ + OpcUa::CreateSubscriptionRequest request; + request.Parameters.MaxNotificationsPerPublish = 1; + request.Parameters.Priority = 0; + request.Parameters.PublishingEnabled = false; + request.Parameters.RequestedLifetimeCount = 1; + request.Parameters.RequestedMaxKeepAliveCount = 1; + request.Parameters.RequestedPublishingInterval = 1000; + const OpcUa::SubscriptionData data = subscriptions.CreateSubscription(request, [](PublishResult) {}); + std::cout << "Id: " << data.SubscriptionId << std::endl; + std::cout << "RevisedPublishingInterval: " << data.RevisedPublishingInterval << std::endl; + std::cout << "RevisedLifetimeCount: " << data.RevisedLifetimeCount << std::endl; + std::cout << "RevisedMaxKeepAliveCount: " << data.RevisedMaxKeepAliveCount << std::endl; +} - void Process(OpcUa::CommandLine& cmd, const Common::AddonsManager& addons) - { - const std::string serverURI = cmd.GetServerURI(); - const Common::Uri uri(serverURI); - OpcUa::Client::Addon::SharedPtr addon = addons.GetAddon(uri.Scheme()); - std::shared_ptr computer = addon->Connect(serverURI); +void Process(OpcUa::CommandLine & cmd, const Common::AddonsManager & addons) +{ + const std::string serverURI = cmd.GetServerURI(); + const Common::Uri uri(serverURI); + OpcUa::Client::Addon::SharedPtr addon = addons.GetAddon(uri.Scheme()); + std::shared_ptr computer = addon->Connect(serverURI); - if (cmd.IsGetEndpointsOperation()) + if (cmd.IsGetEndpointsOperation()) { PrintEndpoints(*computer); return; } - else if (cmd.IsFindServersOperation()) + + else if (cmd.IsFindServersOperation()) { PrintServers(*computer); } - OpcUa::RemoteSessionParameters session; - session.ClientDescription.ApplicationUri = "https://github.com/treww/opc_layer.git"; - session.ClientDescription.ProductUri = "https://github.com/treww/opc_layer.git"; - session.ClientDescription.ApplicationName.Text = "opcua client"; - session.ClientDescription.ApplicationType = OpcUa::ApplicationType::Client; - session.SessionName = "opua command line"; - session.EndpointUrl = serverURI; - session.Timeout = 1200000; + OpcUa::RemoteSessionParameters session; + session.ClientDescription.ApplicationUri = "https://github.com/treww/opc_layer.git"; + session.ClientDescription.ProductUri = "https://github.com/treww/opc_layer.git"; + session.ClientDescription.ApplicationName.Text = "opcua client"; + session.ClientDescription.ApplicationType = OpcUa::ApplicationType::Client; + session.SessionName = "opua command line"; + session.EndpointUrl = serverURI; + session.Timeout = 1200000; - CreateSessionResponse resp = computer->CreateSession(session); - ActivateSessionParameters session_parameters; - computer->ActivateSession(session_parameters); + CreateSessionResponse resp = computer->CreateSession(session); + ActivateSessionParameters session_parameters; + computer->ActivateSession(session_parameters); - if (cmd.IsBrowseOperation()) + if (cmd.IsBrowseOperation()) { const OpcUa::NodeId nodeId = cmd.GetNodeId(); Print(nodeId, Tabs(0)); Browse(*computer->Views(), nodeId); } - else if (cmd.IsReadOperation()) + + else if (cmd.IsReadOperation()) { const OpcUa::NodeId nodeId = cmd.GetNodeId(); const OpcUa::AttributeId attributeId = cmd.GetAttribute(); Read(*computer->Attributes(), nodeId, attributeId); } - else if (cmd.IsWriteOperation()) + + else if (cmd.IsWriteOperation()) { const OpcUa::NodeId nodeId = cmd.GetNodeId(); const OpcUa::AttributeId attributeId = cmd.GetAttribute(); const OpcUa::Variant value = cmd.GetValue(); Write(*computer->Attributes(), nodeId, attributeId, value); } - else if (cmd.IsCreateSubscriptionOperation()) + + else if (cmd.IsCreateSubscriptionOperation()) { CreateSubscription(*computer->Subscriptions()); } - else + + else { std::cout << "nothing to do" << std::endl; } - computer->CloseSession(); - } + computer->CloseSession(); +} - int RegisterNewModule(const OpcUa::CommandLine& cmd) - { - std::cout << "Registering new module." << std::endl; - const std::string& configDir = cmd.GetConfigDir(); - const std::string& addonId = cmd.GetModuleId(); - const std::string& modulePath = cmd.GetModulePath(); +int RegisterNewModule(const OpcUa::CommandLine & cmd) +{ + std::cout << "Registering new module." << std::endl; + const std::string & configDir = cmd.GetConfigDir(); + const std::string & addonId = cmd.GetModuleId(); + const std::string & modulePath = cmd.GetModulePath(); + + std::cout << "Id: " << addonId << std::endl; + std::cout << "Path: " << modulePath << std::endl; + std::cout << "Configuration file: " << configDir << std::endl; - std::cout << "Id: " << addonId << std::endl; - std::cout << "Path: " << modulePath << std::endl; - std::cout << "Configuration file: " << configDir << std::endl; + Common::Configuration config = Common::ParseConfigurationFiles(configDir); + const Common::ModulesConfiguration::const_iterator moduleIt = std::find_if(config.Modules.begin(), config.Modules.end(), [&addonId](const Common::ModuleConfiguration & config) {return config.Id == addonId;}); - Common::Configuration config = Common::ParseConfigurationFiles(configDir); - const Common::ModulesConfiguration::const_iterator moduleIt = std::find_if(config.Modules.begin(), config.Modules.end(), [&addonId](const Common::ModuleConfiguration& config){return config.Id == addonId;}); - if (moduleIt != config.Modules.end()) + if (moduleIt != config.Modules.end()) { std::cerr << "Module already registered." << std::endl; return -1; } - Common::ModuleConfiguration module; - module.Id = addonId; - module.Path = modulePath; + Common::ModuleConfiguration module; + module.Id = addonId; + module.Path = modulePath; - config.Modules.push_back(module); - Common::SaveConfiguration(config.Modules, configDir); - std::cout << "Successfully registered." << std::endl; - return 0; - } + config.Modules.push_back(module); + Common::SaveConfiguration(config.Modules, configDir); + std::cout << "Successfully registered." << std::endl; + return 0; +} - int UnregisterModule(const OpcUa::CommandLine& cmd) - { - const Common::AddonId addonId = cmd.GetModuleId(); - const std::string& configDir = cmd.GetConfigDir(); - std::cout << "Unregistering module." << std::endl; - std::cout << "Id: " << addonId << std::endl; - std::cout << "Configuration file: " << configDir << std::endl; +int UnregisterModule(const OpcUa::CommandLine & cmd) +{ + const Common::AddonId addonId = cmd.GetModuleId(); + const std::string & configDir = cmd.GetConfigDir(); + std::cout << "Unregistering module." << std::endl; + std::cout << "Id: " << addonId << std::endl; + std::cout << "Configuration file: " << configDir << std::endl; + + Common::Configuration config = Common::ParseConfigurationFiles(configDir); + Common::ModulesConfiguration::iterator moduleIt = std::find_if(config.Modules.begin(), config.Modules.end(), [&addonId](const Common::ModuleConfiguration & config) {return config.Id == addonId;}); - Common::Configuration config = Common::ParseConfigurationFiles(configDir); - Common::ModulesConfiguration::iterator moduleIt = std::find_if(config.Modules.begin(), config.Modules.end(), [&addonId](const Common::ModuleConfiguration& config){return config.Id == addonId;}); - if (moduleIt == config.Modules.end()) + if (moduleIt == config.Modules.end()) { std::cerr << "Module not found" << std::endl; return -1; } - config.Modules.erase(moduleIt); - Common::SaveConfiguration(config.Modules, configDir); - std::cout << "Successfully unregistered." << std::endl; - return 0; - } + config.Modules.erase(moduleIt); + Common::SaveConfiguration(config.Modules, configDir); + + std::cout << "Successfully unregistered." << std::endl; + return 0; +} } -int main(int argc, char** argv) +int main(int argc, char ** argv) { try - { - OpcUa::CommandLine cmd(argc, argv); - if (cmd.IsHelpOperation()) { + OpcUa::CommandLine cmd(argc, argv); + + if (cmd.IsHelpOperation()) + { + return 0; + } + + if (cmd.IsRegisterModuleOperation()) + { + return RegisterNewModule(cmd); + } + + if (cmd.IsUnregisterModuleOperation()) + { + return UnregisterModule(cmd); + } + + const std::string configDir = cmd.GetConfigDir(); + const Common::Configuration & config = Common::ParseConfigurationFiles(configDir); + + std::vector infos(config.Modules.size()); + std::transform(config.Modules.begin(), config.Modules.end(), infos.begin(), std::bind(&Common::GetAddonInfomation, std::placeholders::_1)); + + Common::AddonsManager::UniquePtr manager = Common::CreateAddonsManager(); + std::for_each(infos.begin(), infos.end(), [&manager](const Common::AddonInformation & addon) + { + manager->Register(addon); + }); + manager->Start(); + Process(cmd, *manager); + manager->Stop(); return 0; } - if (cmd.IsRegisterModuleOperation()) + catch (const std::exception & exc) { - return RegisterNewModule(cmd); + std::cout << exc.what() << std::endl; } - if (cmd.IsUnregisterModuleOperation()) + catch (...) { - return UnregisterModule(cmd); + std::cout << "Unknown error." << std::endl; } - const std::string configDir = cmd.GetConfigDir(); - const Common::Configuration& config = Common::ParseConfigurationFiles(configDir); - - std::vector infos(config.Modules.size()); - std::transform(config.Modules.begin(), config.Modules.end(), infos.begin(), std::bind(&Common::GetAddonInfomation, std::placeholders::_1)); - - Common::AddonsManager::UniquePtr manager = Common::CreateAddonsManager(); - std::for_each(infos.begin(), infos.end(), [&manager](const Common::AddonInformation& addon){ - manager->Register(addon); - }); - manager->Start(); - Process(cmd, *manager); - manager->Stop(); - return 0; - } - catch (const std::exception& exc) - { - std::cout << exc.what() << std::endl; - } - catch (...) - { - std::cout << "Unknown error." << std::endl; - } return -1; } diff --git a/src/clientapp/opcua_options.cpp b/src/clientapp/opcua_options.cpp index 7a4369c2..7bd7764b 100644 --- a/src/clientapp/opcua_options.cpp +++ b/src/clientapp/opcua_options.cpp @@ -23,97 +23,108 @@ namespace { - namespace po = boost::program_options; - using namespace OpcUa; - - const char* OPTION_HELP = "help"; - const char* OPTION_GET_ENDPOINTS = "get-endpoints"; - const char* OPTION_BROWSE = "browse"; - const char* OPTION_READ = "read"; - const char* OPTION_WRITE = "write"; - const char* OPTION_CREATE_SUBSCRIPTION = "create-subscription"; - const char* OPTION_FIND_ServerS = "find-servers"; - const char* OPTION_REGISTER_MODULE = "register-module"; - const char* OPTION_UNREGISTER_MODULE = "unregister-module"; - - const char* OPTION_MODULE_Id = "id"; - const char* OPTION_MODULE_PATH = "path"; - const char* OPTION_CONFIG_DIR = "config-dir"; - - const char* OPTION_Server_URI = "uri"; - const char* OPTION_ATTRIBUTE = "attribute"; - const char* OPTION_NODE_Id = "node-id"; - - - const char* OPTION_VALUE_BYTE = "value-byte"; - const char* OPTION_VALUE_SBYTE = "value-sbyte"; - const char* OPTION_VALUE_UINT16 = "value-uint16"; - const char* OPTION_VALUE_INT16 = "value-int16"; - const char* OPTION_VALUE_UINT32 = "value-uint32"; - const char* OPTION_VALUE_INT32 = "value-int32"; - const char* OPTION_VALUE_UINT64 = "value-uint64"; - const char* OPTION_VALUE_INT64 = "value-int64"; - const char* OPTION_VALUE_FLOAT = "value-float"; - const char* OPTION_VALUE_DOUBLE = "value-double"; - const char* OPTION_VALUE_STRING = "value-string"; - - // codegen - #include "opcua_options_attribute_ids.h" - - NodeId GetNodeIdOptionValue(const po::variables_map& vm) - { - const std::string& value = vm[OPTION_NODE_Id].as(); - return OpcUa::ToNodeId(value); - } - - Variant GetOptionValue(const po::variables_map& vm) - { - if (vm.count(OPTION_VALUE_BYTE)) +namespace po = boost::program_options; +using namespace OpcUa; + +const char * OPTION_HELP = "help"; +const char * OPTION_GET_ENDPOINTS = "get-endpoints"; +const char * OPTION_BROWSE = "browse"; +const char * OPTION_READ = "read"; +const char * OPTION_WRITE = "write"; +const char * OPTION_CREATE_SUBSCRIPTION = "create-subscription"; +const char * OPTION_FIND_ServerS = "find-servers"; +const char * OPTION_REGISTER_MODULE = "register-module"; +const char * OPTION_UNREGISTER_MODULE = "unregister-module"; + +const char * OPTION_MODULE_Id = "id"; +const char * OPTION_MODULE_PATH = "path"; +const char * OPTION_CONFIG_DIR = "config-dir"; + +const char * OPTION_Server_URI = "uri"; +const char * OPTION_ATTRIBUTE = "attribute"; +const char * OPTION_NODE_Id = "node-id"; + + +const char * OPTION_VALUE_BYTE = "value-byte"; +const char * OPTION_VALUE_SBYTE = "value-sbyte"; +const char * OPTION_VALUE_UINT16 = "value-uint16"; +const char * OPTION_VALUE_INT16 = "value-int16"; +const char * OPTION_VALUE_UINT32 = "value-uint32"; +const char * OPTION_VALUE_INT32 = "value-int32"; +const char * OPTION_VALUE_UINT64 = "value-uint64"; +const char * OPTION_VALUE_INT64 = "value-int64"; +const char * OPTION_VALUE_FLOAT = "value-float"; +const char * OPTION_VALUE_DOUBLE = "value-double"; +const char * OPTION_VALUE_STRING = "value-string"; + +// codegen +#include "opcua_options_attribute_ids.h" + +NodeId GetNodeIdOptionValue(const po::variables_map & vm) +{ + const std::string & value = vm[OPTION_NODE_Id].as(); + return OpcUa::ToNodeId(value); +} + +Variant GetOptionValue(const po::variables_map & vm) +{ + if (vm.count(OPTION_VALUE_BYTE)) { return Variant(vm[OPTION_VALUE_BYTE].as()); } - if (vm.count(OPTION_VALUE_SBYTE)) + + if (vm.count(OPTION_VALUE_SBYTE)) { return Variant(vm[OPTION_VALUE_SBYTE].as()); } - if (vm.count(OPTION_VALUE_UINT16)) + + if (vm.count(OPTION_VALUE_UINT16)) { return Variant(vm[OPTION_VALUE_UINT16].as()); } - if (vm.count(OPTION_VALUE_INT16)) + + if (vm.count(OPTION_VALUE_INT16)) { return Variant(vm[OPTION_VALUE_INT16].as()); } - if (vm.count(OPTION_VALUE_UINT32)) + + if (vm.count(OPTION_VALUE_UINT32)) { return Variant(vm[OPTION_VALUE_UINT32].as()); } - if (vm.count(OPTION_VALUE_INT32)) + + if (vm.count(OPTION_VALUE_INT32)) { return Variant(vm[OPTION_VALUE_INT32].as()); } - if (vm.count(OPTION_VALUE_UINT64)) + + if (vm.count(OPTION_VALUE_UINT64)) { return Variant(vm[OPTION_VALUE_UINT64].as()); } - if (vm.count(OPTION_VALUE_INT64)) + + if (vm.count(OPTION_VALUE_INT64)) { return Variant(vm[OPTION_VALUE_INT64].as()); } - if (vm.count(OPTION_VALUE_FLOAT)) + + if (vm.count(OPTION_VALUE_FLOAT)) { return Variant(vm[OPTION_VALUE_FLOAT].as()); } - if (vm.count(OPTION_VALUE_DOUBLE)) + + if (vm.count(OPTION_VALUE_DOUBLE)) { return Variant(vm[OPTION_VALUE_DOUBLE].as()); } - if (vm.count(OPTION_VALUE_STRING)) + + if (vm.count(OPTION_VALUE_STRING)) { return Variant(vm[OPTION_VALUE_STRING].as()); } - return Variant(); - } + + return Variant(); +} } @@ -121,104 +132,107 @@ namespace namespace OpcUa { - CommandLine::CommandLine(int argc, char** argv) - : NamespaceIndex(0) - , Attribute(AttributeId::Unknown) - , IsHelp(false) - , IsGetEndpoints(false) - , IsBrowse(false) - , IsRead(false) - , IsWrite(false) - , IsCreateSubscription(false) - , IsFindServers(false) - , IsAddModule(false) - , IsRemoveModule(false) - { - // Declare the supported options. - po::options_description desc("Parameters"); - desc.add_options() - (OPTION_HELP, "produce help message") - (OPTION_GET_ENDPOINTS, "List endpoints endpoints.") - (OPTION_BROWSE, "browse command.") - (OPTION_READ, "read command.") - (OPTION_WRITE, "write command.") - (OPTION_CREATE_SUBSCRIPTION, "create subscription command.") - (OPTION_FIND_ServerS, "find servers command.") - (OPTION_REGISTER_MODULE, "Register new module.") - (OPTION_UNREGISTER_MODULE, "Unregister module.") - - (OPTION_Server_URI, po::value(), "Uri of the server.") - (OPTION_ATTRIBUTE, po::value(), "Name of attribute.") - (OPTION_NODE_Id, po::value(), "NodeId in the form 'nsu=uri;srv=1;ns=0;i=84.") - (OPTION_VALUE_BYTE, po::value(), "Byte value.") - (OPTION_VALUE_SBYTE, po::value(), "Signed byte value.") - (OPTION_VALUE_UINT16, po::value(), "UInt16 value.") - (OPTION_VALUE_INT16, po::value(), "Int16 value.") - (OPTION_VALUE_UINT32, po::value(), "UInt32 value.") - (OPTION_VALUE_INT32, po::value(), "Int32 value.") - (OPTION_VALUE_UINT64, po::value(), "UInt64 value.") - (OPTION_VALUE_INT64, po::value(), "Int64 value.") - (OPTION_VALUE_FLOAT, po::value(), "Float value.") - (OPTION_VALUE_DOUBLE, po::value(), "Double value.") - (OPTION_VALUE_STRING, po::value(), "String value.") - (OPTION_MODULE_Id, po::value(), "Id of the new module.") - (OPTION_MODULE_PATH, po::value(), "Path to the new module shared library.") - (OPTION_CONFIG_DIR, po::value(), "Path to the directory with modules configuration files. By default '" CONFIG_PATH "'."); - - - po::variables_map vm; - po::store(po::parse_command_line(argc, argv, desc), vm); - po::notify(vm); - - if (vm.count(OPTION_HELP)) +CommandLine::CommandLine(int argc, char ** argv) + : NamespaceIndex(0) + , Attribute(AttributeId::Unknown) + , IsHelp(false) + , IsGetEndpoints(false) + , IsBrowse(false) + , IsRead(false) + , IsWrite(false) + , IsCreateSubscription(false) + , IsFindServers(false) + , IsAddModule(false) + , IsRemoveModule(false) +{ + // Declare the supported options. + po::options_description desc("Parameters"); + desc.add_options() + (OPTION_HELP, "produce help message") + (OPTION_GET_ENDPOINTS, "List endpoints endpoints.") + (OPTION_BROWSE, "browse command.") + (OPTION_READ, "read command.") + (OPTION_WRITE, "write command.") + (OPTION_CREATE_SUBSCRIPTION, "create subscription command.") + (OPTION_FIND_ServerS, "find servers command.") + (OPTION_REGISTER_MODULE, "Register new module.") + (OPTION_UNREGISTER_MODULE, "Unregister module.") + + (OPTION_Server_URI, po::value(), "Uri of the server.") + (OPTION_ATTRIBUTE, po::value(), "Name of attribute.") + (OPTION_NODE_Id, po::value(), "NodeId in the form 'nsu=uri;srv=1;ns=0;i=84.") + (OPTION_VALUE_BYTE, po::value(), "Byte value.") + (OPTION_VALUE_SBYTE, po::value(), "Signed byte value.") + (OPTION_VALUE_UINT16, po::value(), "UInt16 value.") + (OPTION_VALUE_INT16, po::value(), "Int16 value.") + (OPTION_VALUE_UINT32, po::value(), "UInt32 value.") + (OPTION_VALUE_INT32, po::value(), "Int32 value.") + (OPTION_VALUE_UINT64, po::value(), "UInt64 value.") + (OPTION_VALUE_INT64, po::value(), "Int64 value.") + (OPTION_VALUE_FLOAT, po::value(), "Float value.") + (OPTION_VALUE_DOUBLE, po::value(), "Double value.") + (OPTION_VALUE_STRING, po::value(), "String value.") + (OPTION_MODULE_Id, po::value(), "Id of the new module.") + (OPTION_MODULE_PATH, po::value(), "Path to the new module shared library.") + (OPTION_CONFIG_DIR, po::value(), "Path to the directory with modules configuration files. By default '" CONFIG_PATH "'."); + + + po::variables_map vm; + po::store(po::parse_command_line(argc, argv, desc), vm); + po::notify(vm); + + if (vm.count(OPTION_HELP)) { IsHelp = true; desc.print(std::cout); return; } - if (vm.count(OPTION_Server_URI)) + if (vm.count(OPTION_Server_URI)) { ServerURI = vm[OPTION_Server_URI].as(); } - if (vm.count(OPTION_NODE_Id)) + if (vm.count(OPTION_NODE_Id)) { Node = GetNodeIdOptionValue(vm); } - if (vm.count(OPTION_ATTRIBUTE)) + if (vm.count(OPTION_ATTRIBUTE)) { Attribute = GetAttributeIdOptionValue(vm); } - Value = GetOptionValue(vm); - IsGetEndpoints = vm.count(OPTION_GET_ENDPOINTS) != 0; - IsBrowse = vm.count(OPTION_BROWSE) != 0; - IsRead = vm.count(OPTION_READ) != 0; - IsWrite = vm.count(OPTION_WRITE) != 0; - IsCreateSubscription = vm.count(OPTION_CREATE_SUBSCRIPTION) != 0; - IsFindServers = vm.count(OPTION_FIND_ServerS) != 0; - if (vm.count(OPTION_REGISTER_MODULE)) + + Value = GetOptionValue(vm); + IsGetEndpoints = vm.count(OPTION_GET_ENDPOINTS) != 0; + IsBrowse = vm.count(OPTION_BROWSE) != 0; + IsRead = vm.count(OPTION_READ) != 0; + IsWrite = vm.count(OPTION_WRITE) != 0; + IsCreateSubscription = vm.count(OPTION_CREATE_SUBSCRIPTION) != 0; + IsFindServers = vm.count(OPTION_FIND_ServerS) != 0; + + if (vm.count(OPTION_REGISTER_MODULE)) { IsAddModule = true; ModulePath = vm[OPTION_MODULE_PATH].as(); ModuleId = vm[OPTION_MODULE_Id].as(); } - if (vm.count(OPTION_UNREGISTER_MODULE)) + if (vm.count(OPTION_UNREGISTER_MODULE)) { IsRemoveModule = true; ModuleId = vm[OPTION_MODULE_Id].as(); } - if (vm.count(OPTION_CONFIG_DIR)) + if (vm.count(OPTION_CONFIG_DIR)) { ConfigDir = vm[OPTION_CONFIG_DIR].as(); } - else + + else { ConfigDir = CONFIG_PATH; } - } +} } diff --git a/src/clientapp/opcua_options.h b/src/clientapp/opcua_options.h index aec1c617..9dcf4dbf 100644 --- a/src/clientapp/opcua_options.h +++ b/src/clientapp/opcua_options.h @@ -18,116 +18,116 @@ namespace OpcUa { - class CommandLine - { - public: - CommandLine(int argc, char** argv); - - std::string GetServerURI() const - { - return ServerURI; - } - - NodeId GetNodeId() const - { - return Node; - } - - uint16_t GetNamespaceIndex() const - { - return NamespaceIndex; - } - - Variant GetValue() const - { - return Value; - } - - AttributeId GetAttribute() const - { - return Attribute; - } - - std::string GetModuleId() const - { - return ModuleId; - } - - std::string GetModulePath() const - { - return ModulePath; - } - - std::string GetConfigDir() const - { - return ConfigDir; - } - - bool IsGetEndpointsOperation() const - { - return IsGetEndpoints; - } - - bool IsBrowseOperation() const - { - return IsBrowse; - } - - bool IsReadOperation() const - { - return IsRead; - } - - bool IsWriteOperation() const - { - return IsWrite; - } - - bool IsCreateSubscriptionOperation() const - { - return IsCreateSubscription; - } - - bool IsFindServersOperation() const - { - return IsFindServers; - } - - bool IsRegisterModuleOperation() const - { - return IsAddModule; - } - - bool IsUnregisterModuleOperation() const - { - return IsRemoveModule; - } - - bool IsHelpOperation() const - { - return IsHelp; - } - - private: - std::string ServerURI; - NodeId Node; - uint16_t NamespaceIndex; - Variant Value; - AttributeId Attribute; - std::string ModuleId; - std::string ModulePath; - std::string ConfigDir; - - bool IsHelp; - bool IsGetEndpoints; - bool IsBrowse; - bool IsRead; - bool IsWrite; - bool IsCreateSubscription; - bool IsFindServers; - bool IsAddModule; - bool IsRemoveModule; - }; +class CommandLine +{ +public: + CommandLine(int argc, char ** argv); + + std::string GetServerURI() const + { + return ServerURI; + } + + NodeId GetNodeId() const + { + return Node; + } + + uint16_t GetNamespaceIndex() const + { + return NamespaceIndex; + } + + Variant GetValue() const + { + return Value; + } + + AttributeId GetAttribute() const + { + return Attribute; + } + + std::string GetModuleId() const + { + return ModuleId; + } + + std::string GetModulePath() const + { + return ModulePath; + } + + std::string GetConfigDir() const + { + return ConfigDir; + } + + bool IsGetEndpointsOperation() const + { + return IsGetEndpoints; + } + + bool IsBrowseOperation() const + { + return IsBrowse; + } + + bool IsReadOperation() const + { + return IsRead; + } + + bool IsWriteOperation() const + { + return IsWrite; + } + + bool IsCreateSubscriptionOperation() const + { + return IsCreateSubscription; + } + + bool IsFindServersOperation() const + { + return IsFindServers; + } + + bool IsRegisterModuleOperation() const + { + return IsAddModule; + } + + bool IsUnregisterModuleOperation() const + { + return IsRemoveModule; + } + + bool IsHelpOperation() const + { + return IsHelp; + } + +private: + std::string ServerURI; + NodeId Node; + uint16_t NamespaceIndex; + Variant Value; + AttributeId Attribute; + std::string ModuleId; + std::string ModulePath; + std::string ConfigDir; + + bool IsHelp; + bool IsGetEndpoints; + bool IsBrowse; + bool IsRead; + bool IsWrite; + bool IsCreateSubscription; + bool IsFindServers; + bool IsAddModule; + bool IsRemoveModule; +}; } diff --git a/src/clientapp/opcua_options_attribute_ids.h b/src/clientapp/opcua_options_attribute_ids.h index d2793acc..6eca63ab 100644 --- a/src/clientapp/opcua_options_attribute_ids.h +++ b/src/clientapp/opcua_options_attribute_ids.h @@ -5,98 +5,120 @@ #pragma once -inline AttributeId GetAttributeIdOptionValue(const po::variables_map& vm) - { - const std::string name = vm[OPTION_ATTRIBUTE].as(); - if (name == "node id") +inline AttributeId GetAttributeIdOptionValue(const po::variables_map & vm) +{ + const std::string name = vm[OPTION_ATTRIBUTE].as(); + + if (name == "node id") { return AttributeId::NodeId; } - if (name == "node class") + + if (name == "node class") { return AttributeId::NodeClass; } - if (name == "browse name") + + if (name == "browse name") { return AttributeId::BrowseName; } - if (name == "display name") + + if (name == "display name") { return AttributeId::DisplayName; } - if (name == "description") + + if (name == "description") { return AttributeId::Description; } - if (name == "write mask") + + if (name == "write mask") { return AttributeId::WriteMask; } - if (name == "user write mask") + + if (name == "user write mask") { return AttributeId::UserWriteMask; } - if (name == "is abstract") + + if (name == "is abstract") { return AttributeId::IsAbstract; } - if (name == "symmetric") + + if (name == "symmetric") { return AttributeId::Symmetric; } - if (name == "inverse name") + + if (name == "inverse name") { return AttributeId::InverseName; } - if (name == "contains no loops") + + if (name == "contains no loops") { return AttributeId::ContainsNoLoops; } - if (name == "event notifier") + + if (name == "event notifier") { return AttributeId::EventNotifier; } - if (name == "value") + + if (name == "value") { return AttributeId::Value; } - if (name == "data type") + + if (name == "data type") { return AttributeId::DataType; } - if (name == "value rank") + + if (name == "value rank") { return AttributeId::ValueRank; } - if (name == "array dimensions") + + if (name == "array dimensions") { return AttributeId::ArrayDimensions; } - if (name == "access level") + + if (name == "access level") { return AttributeId::AccessLevel; } - if (name == "user access level") + + if (name == "user access level") { return AttributeId::UserAccessLevel; } - if (name == "minimum sampling interval") + + if (name == "minimum sampling interval") { return AttributeId::MinimumSamplingInterval; } - if (name == "historizing") + + if (name == "historizing") { return AttributeId::Historizing; } - if (name == "executable") + + if (name == "executable") { return AttributeId::Executable; } - if (name == "user executable") + + if (name == "user executable") { return AttributeId::UserExecutable; } - throw std::logic_error(std::string("Unknown AttributeId: ") + name); - } + throw std::logic_error(std::string("Unknown AttributeId: ") + name); +} diff --git a/src/core/common/addons_core/addon_manager.cpp b/src/core/common/addons_core/addon_manager.cpp index 7d11aa4f..ff7332f5 100644 --- a/src/core/common/addons_core/addon_manager.cpp +++ b/src/core/common/addons_core/addon_manager.cpp @@ -18,274 +18,295 @@ namespace { - struct AddonData - { - Common::AddonId Id; - Common::AddonFactory::SharedPtr Factory; - std::vector Dependencies; - Common::AddonParameters Parameters; - Common::Addon::SharedPtr Addon; - - AddonData(const Common::AddonInformation& configuration) - : Id(configuration.Id) - , Factory(configuration.Factory) - , Dependencies(configuration.Dependencies) - , Parameters(configuration.Parameters) - { - } - }; - - bool IsAddonNotStarted(const std::pair& addonData) +struct AddonData +{ + Common::AddonId Id; + Common::AddonFactory::SharedPtr Factory; + std::vector Dependencies; + Common::AddonParameters Parameters; + Common::Addon::SharedPtr Addon; + + AddonData(const Common::AddonInformation & configuration) + : Id(configuration.Id) + , Factory(configuration.Factory) + , Dependencies(configuration.Dependencies) + , Parameters(configuration.Parameters) { - return addonData.second.Addon == Common::Addon::SharedPtr(); } +}; - class AddonsManagerImpl : public Common::AddonsManager - { - typedef std::map AddonList; +bool IsAddonNotStarted(const std::pair & addonData) +{ + return addonData.second.Addon == Common::Addon::SharedPtr(); +} + +class AddonsManagerImpl : public Common::AddonsManager +{ + typedef std::map AddonList; - public: - AddonsManagerImpl() - : ManagerStarted(false) - { - } +public: + AddonsManagerImpl() + : ManagerStarted(false) + { + } - virtual ~AddonsManagerImpl() - { - try + virtual ~AddonsManagerImpl() + { + try { if (ManagerStarted) - { - Stop(); - } + { + Stop(); + } } - catch(const Common::Error& err) + + catch (const Common::Error & err) { std::cerr << err.GetFullMessage() << std::endl; } - catch (...) + + catch (...) { std::cerr << "unknown exception, terminating" << std::endl; std::terminate(); } - } + } - virtual void Register(const Common::AddonInformation& addonConfiguration) - { - // TODO lock manager - if (ManagerStarted && !addonConfiguration.Dependencies.empty()) + virtual void Register(const Common::AddonInformation & addonConfiguration) + { + // TODO lock manager + if (ManagerStarted && !addonConfiguration.Dependencies.empty()) { THROW_ERROR1(UnableToRegisterAddonWhenStarted, addonConfiguration.Id); } - EnsureAddonNotRegistered(addonConfiguration.Id); - Addons.insert(std::make_pair(addonConfiguration.Id, AddonData(addonConfiguration))); - if (ManagerStarted) + EnsureAddonNotRegistered(addonConfiguration.Id); + Addons.insert(std::make_pair(addonConfiguration.Id, AddonData(addonConfiguration))); + + if (ManagerStarted) { DoStart(); } - } - - virtual void Unregister(const Common::AddonId& id) - { - // TODO lock manager - EnsureAddonRegistered(id); - AddonData& addonData = Addons.find(id)->second; - if (addonData.Addon) + } + + virtual void Unregister(const Common::AddonId & id) + { + // TODO lock manager + EnsureAddonRegistered(id); + AddonData & addonData = Addons.find(id)->second; + + if (addonData.Addon) { addonData.Addon->Stop(); } - Addons.erase(id); - } - - virtual Common::Addon::SharedPtr GetAddon(const Common::AddonId& id) const - { - // TODO lock manager - EnsureAddonRegistered(id); - EnsureAddonInitialized(id); - return Addons.find(id)->second.Addon; - } - - virtual void Start() - { - if (ManagerStarted) + + Addons.erase(id); + } + + virtual Common::Addon::SharedPtr GetAddon(const Common::AddonId & id) const + { + // TODO lock manager + EnsureAddonRegistered(id); + EnsureAddonInitialized(id); + return Addons.find(id)->second.Addon; + } + + virtual void Start() + { + if (ManagerStarted) { THROW_ERROR(AddonsManagerAlreadyStarted); } - // TODO lock manager - if (!DoStart()) + + // TODO lock manager + if (!DoStart()) { StopAddons(); THROW_ERROR(FailedToStartAddons); } - ManagerStarted = true; - } - virtual void Stop() - { - if (!ManagerStarted) + ManagerStarted = true; + } + + virtual void Stop() + { + if (!ManagerStarted) { THROW_ERROR(AddonsManagerAlreadyStopped); } - StopAddons(); - ManagerStarted = false; - } - private: - void StopAddons() - { - if (Addons.empty()) - return; + StopAddons(); + ManagerStarted = false; + } +private: + void StopAddons() + { + if (Addons.empty()) + { return; } - while (AddonData* addonData = GetNextAddonDataForStop()) + while (AddonData * addonData = GetNextAddonDataForStop()) { try - { - //std::cout << "Stopping addon '" << addonData->Id << "'" << std::endl; - addonData->Addon->Stop(); - addonData->Addon.reset(); - //std::cout << "Addon '" << addonData->Id << "' successfully stopped." << std::endl; - } - catch (const std::exception& exc) - { - std::cerr << "Failed to initialize addon '" << addonData->Id << "': "<< exc.what() << std::endl; - } + { + //std::cout << "Stopping addon '" << addonData->Id << "'" << std::endl; + addonData->Addon->Stop(); + addonData->Addon.reset(); + //std::cout << "Addon '" << addonData->Id << "' successfully stopped." << std::endl; + } + + catch (const std::exception & exc) + { + std::cerr << "Failed to initialize addon '" << addonData->Id << "': " << exc.what() << std::endl; + } } - Addons.clear(); - } - bool DoStart() - { - while (AddonData* addonData = GetNextAddonDataForStart()) + Addons.clear(); + } + + bool DoStart() + { + while (AddonData * addonData = GetNextAddonDataForStart()) { //std::cout << "Creating addon '" << addonData->Id << "'" << std::endl; Common::Addon::SharedPtr addon = addonData->Factory->CreateAddon(); + //std::cout << "Initializing addon '" << addonData->Id << "'" << std::endl; try - { - addon->Initialize(*this, addonData->Parameters); - //std::cout << "Addon '" << addonData->Id << "' successfully initialized." << std::endl; - } - catch (const std::exception& exc) - { - std::cerr << "Failed to initialize addon '" << addonData->Id << "': "<< exc.what() << std::endl; - return false; - } + { + addon->Initialize(*this, addonData->Parameters); + //std::cout << "Addon '" << addonData->Id << "' successfully initialized." << std::endl; + } + + catch (const std::exception & exc) + { + std::cerr << "Failed to initialize addon '" << addonData->Id << "': " << exc.what() << std::endl; + return false; + } + addonData->Addon = addon; } - EnsureAllAddonsStarted(); - return true; - } - - AddonData* GetNextAddonDataForStart() - { - for (AddonList::iterator it = Addons.begin(); it != Addons.end(); ++it) - { - if (!IsAddonStarted(it->second) && IsAllAddonsStarted(it->second.Dependencies)) - { - return &it->second; - } - } - return 0; - } - - - AddonData* GetNextAddonDataForStop() - { - for (AddonList::iterator it = Addons.begin(); it != Addons.end(); ++it) - { - if (IsAddonStarted(it->second) && IsAllDependentAddonsStopped(it->first)) - { - return &it->second; - } - } - return 0; - } - - bool IsAddonStarted(const AddonData& addonData) const - { - return static_cast(addonData.Addon); - } - - bool IsAllAddonsStarted(const std::vector& ids) const - { - for (std::vector::const_iterator it = ids.begin(); it != ids.end(); ++it) - { - const AddonList::const_iterator addonIt = Addons.find(*it); - if (addonIt == Addons.end()) - { - THROW_ERROR1(AddonNotFound, *it); - } - - if (!IsAddonStarted(addonIt->second)) - { - return false; - } - } - return true; - } - - bool IsAllDependentAddonsStopped(const Common::AddonId& id) const - { - for (const AddonList::value_type& addonIt : Addons) - { - // Skip alreay sopped addons. - if (!IsAddonStarted(addonIt.second)) - { - continue; - } - // If current addon depends on passed. - const std::vector& deps = addonIt.second.Dependencies; - if (std::find(deps.begin(), deps.end(), id) != deps.end()) - { - return false; - } - } - return true; - } - - void EnsureAddonInitialized(Common::AddonId id) const - { - if (!Addons.find(id)->second.Addon) - { - THROW_ERROR1(AddonNotInitializedYet, id); - } - } - - void EnsureAddonRegistered(Common::AddonId id) const - { - if (!IsAddonRegistered(id)) - { - THROW_ERROR1(AddonNotRegistered, id); - } - } - - void EnsureAddonNotRegistered(Common::AddonId id) const - { - if (IsAddonRegistered(id)) - { - THROW_ERROR1(AddonRegisteredButShouldnt, id); - } - } - - bool IsAddonRegistered(Common::AddonId id) const - { - return Addons.find(id) != Addons.end(); - } - - void EnsureAllAddonsStarted() const - { - AddonList::const_iterator addonIt = std::find_if(Addons.begin(), Addons.end(), IsAddonNotStarted); - if (!Addons.empty() && addonIt != Addons.end()) - { - THROW_ERROR1(AddonIsNotStarted, addonIt->first); - } - } - - private: - AddonList Addons; - bool ManagerStarted; - }; + + EnsureAllAddonsStarted(); + return true; + } + + AddonData * GetNextAddonDataForStart() + { + for (AddonList::iterator it = Addons.begin(); it != Addons.end(); ++it) + { + if (!IsAddonStarted(it->second) && IsAllAddonsStarted(it->second.Dependencies)) + { + return &it->second; + } + } + + return 0; + } + + + AddonData * GetNextAddonDataForStop() + { + for (AddonList::iterator it = Addons.begin(); it != Addons.end(); ++it) + { + if (IsAddonStarted(it->second) && IsAllDependentAddonsStopped(it->first)) + { + return &it->second; + } + } + + return 0; + } + + bool IsAddonStarted(const AddonData & addonData) const + { + return static_cast(addonData.Addon); + } + + bool IsAllAddonsStarted(const std::vector & ids) const + { + for (std::vector::const_iterator it = ids.begin(); it != ids.end(); ++it) + { + const AddonList::const_iterator addonIt = Addons.find(*it); + + if (addonIt == Addons.end()) + { + THROW_ERROR1(AddonNotFound, *it); + } + + if (!IsAddonStarted(addonIt->second)) + { + return false; + } + } + + return true; + } + + bool IsAllDependentAddonsStopped(const Common::AddonId & id) const + { + for (const AddonList::value_type & addonIt : Addons) + { + // Skip alreay sopped addons. + if (!IsAddonStarted(addonIt.second)) + { + continue; + } + + // If current addon depends on passed. + const std::vector & deps = addonIt.second.Dependencies; + + if (std::find(deps.begin(), deps.end(), id) != deps.end()) + { + return false; + } + } + + return true; + } + + void EnsureAddonInitialized(Common::AddonId id) const + { + if (!Addons.find(id)->second.Addon) + { + THROW_ERROR1(AddonNotInitializedYet, id); + } + } + + void EnsureAddonRegistered(Common::AddonId id) const + { + if (!IsAddonRegistered(id)) + { + THROW_ERROR1(AddonNotRegistered, id); + } + } + + void EnsureAddonNotRegistered(Common::AddonId id) const + { + if (IsAddonRegistered(id)) + { + THROW_ERROR1(AddonRegisteredButShouldnt, id); + } + } + + bool IsAddonRegistered(Common::AddonId id) const + { + return Addons.find(id) != Addons.end(); + } + + void EnsureAllAddonsStarted() const + { + AddonList::const_iterator addonIt = std::find_if(Addons.begin(), Addons.end(), IsAddonNotStarted); + + if (!Addons.empty() && addonIt != Addons.end()) + { + THROW_ERROR1(AddonIsNotStarted, addonIt->first); + } + } + +private: + AddonList Addons; + bool ManagerStarted; +}; } Common::AddonsManager::UniquePtr Common::CreateAddonsManager() diff --git a/src/core/common/addons_core/config_file.cpp b/src/core/common/addons_core/config_file.cpp index 300f7fe5..32c9a60c 100644 --- a/src/core/common/addons_core/config_file.cpp +++ b/src/core/common/addons_core/config_file.cpp @@ -23,92 +23,96 @@ using boost::property_tree::ptree; namespace { - Common::ParametersGroup GetGroup(const std::string& name, const ptree& groupTree) - { - Common::ParametersGroup group(name); +Common::ParametersGroup GetGroup(const std::string & name, const ptree & groupTree) +{ + Common::ParametersGroup group(name); - if (groupTree.empty()) + if (groupTree.empty()) { return group; } - BOOST_FOREACH(const ptree::value_type& child, groupTree) - { - if (child.second.empty()) + BOOST_FOREACH(const ptree::value_type & child, groupTree) + { + if (child.second.empty()) { group.Parameters.push_back(Common::Parameter(child.first, child.second.data())); continue; } - group.Groups.push_back(GetGroup(child.first, child.second)); - } - return group; + group.Groups.push_back(GetGroup(child.first, child.second)); } - void AddParameter(Common::AddonParameters& params, const std::string& name, const ptree& tree) - { - if (tree.empty()) + return group; +} + +void AddParameter(Common::AddonParameters & params, const std::string & name, const ptree & tree) +{ + if (tree.empty()) { params.Parameters.push_back(Common::Parameter(name, tree.data())); return; } - params.Groups.push_back(GetGroup(name, tree)); - } + + params.Groups.push_back(GetGroup(name, tree)); +} } // namespace -Common::Configuration Common::ParseConfiguration(const std::string& configPath) +Common::Configuration Common::ParseConfiguration(const std::string & configPath) { ptree pt; read_xml(configPath, pt); Configuration configuration; - BOOST_FOREACH(const ptree::value_type& config, pt) + BOOST_FOREACH(const ptree::value_type & config, pt) { if (config.first != "config") - { - std::cerr << "Unknown root tag " << config.first << " in the config file '" << configPath << "'" << std::endl; - continue; - } - - BOOST_FOREACH(const ptree::value_type& param, config.second) - { - if (param.first != "modules") { - AddParameter(configuration.Parameters, param.first, param.second); + std::cerr << "Unknown root tag " << config.first << " in the config file '" << configPath << "'" << std::endl; continue; } - BOOST_FOREACH(const ptree::value_type& module, param.second) - { - if (module.first != "module") + BOOST_FOREACH(const ptree::value_type & param, config.second) + { + if (param.first != "modules") { - std::cerr << "Unknown tag " << module.first << " inside 'modules' in the config file '" << configPath << "'" << std::endl; + AddParameter(configuration.Parameters, param.first, param.second); continue; } + BOOST_FOREACH(const ptree::value_type & module, param.second) + { + if (module.first != "module") + { + std::cerr << "Unknown tag " << module.first << " inside 'modules' in the config file '" << configPath << "'" << std::endl; + continue; + } + Common::ModuleConfiguration moduleConfig; moduleConfig.Id = module.second.get("id"); moduleConfig.Path = module.second.get("path"); - if (boost::optional dependsOn = module.second.get_child_optional("depends_on")) - { - BOOST_FOREACH(const ptree::value_type& depend, dependsOn.get()) + + if (boost::optional dependsOn = module.second.get_child_optional("depends_on")) { - if (depend.first != "id") + BOOST_FOREACH(const ptree::value_type & depend, dependsOn.get()) { - continue; + if (depend.first != "id") + { + continue; + } + + moduleConfig.Dependencies.push_back(depend.second.data()); } - moduleConfig.Dependencies.push_back(depend.second.data()); } - } - if (boost::optional parameters = module.second.get_child_optional("parameters")) - { - BOOST_FOREACH(const ptree::value_type& parameter, parameters.get()) + if (boost::optional parameters = module.second.get_child_optional("parameters")) { - AddParameter(moduleConfig.Parameters, parameter.first, parameter.second); + BOOST_FOREACH(const ptree::value_type & parameter, parameters.get()) + { + AddParameter(moduleConfig.Parameters, parameter.first, parameter.second); + } } - } configuration.Modules.push_back(moduleConfig); } @@ -117,7 +121,7 @@ Common::Configuration Common::ParseConfiguration(const std::string& configPath) return configuration; } -Common::Configuration Common::ParseConfigurationFiles(const std::string& directory) +Common::Configuration Common::ParseConfigurationFiles(const std::string & directory) { using namespace boost::filesystem; Common::Configuration configuration; @@ -125,16 +129,16 @@ Common::Configuration Common::ParseConfigurationFiles(const std::string& directo directory_iterator dirIt(p); directory_iterator end; - std::for_each(dirIt, end, [&configuration](const directory_entry& entry) + std::for_each(dirIt, end, [&configuration](const directory_entry & entry) { - if (entry.path().filename().extension() == ".conf") - { - std::cout << "Parsing config file: " << entry.path().native() << std::endl; - Common::Configuration tmp = Common::ParseConfiguration(entry.path().string()); - configuration.Modules.insert(configuration.Modules.end(), tmp.Modules.begin(), tmp.Modules.end()); - configuration.Parameters.Groups.insert(configuration.Parameters.Groups.end(), tmp.Parameters.Groups.begin(), tmp.Parameters.Groups.end()); - configuration.Parameters.Parameters.insert(configuration.Parameters.Parameters.end(), tmp.Parameters.Parameters.begin(), tmp.Parameters.Parameters.end()); - } + if (entry.path().filename().extension() == ".conf") + { + std::cout << "Parsing config file: " << entry.path().native() << std::endl; + Common::Configuration tmp = Common::ParseConfiguration(entry.path().string()); + configuration.Modules.insert(configuration.Modules.end(), tmp.Modules.begin(), tmp.Modules.end()); + configuration.Parameters.Groups.insert(configuration.Parameters.Groups.end(), tmp.Parameters.Groups.begin(), tmp.Parameters.Groups.end()); + configuration.Parameters.Parameters.insert(configuration.Parameters.Parameters.end(), tmp.Parameters.Parameters.begin(), tmp.Parameters.Parameters.end()); + } }); return configuration; } @@ -142,71 +146,76 @@ Common::Configuration Common::ParseConfigurationFiles(const std::string& directo namespace { - void AddDependencies(ptree& moduleTree, const std::vector& ids) - { - if (ids.empty()) +void AddDependencies(ptree & moduleTree, const std::vector & ids) +{ + if (ids.empty()) { return; } - ptree& deps = moduleTree.add("depends_on", ""); - for (auto idIt = ids.begin(); idIt != ids.end(); ++idIt) + ptree & deps = moduleTree.add("depends_on", ""); + + for (auto idIt = ids.begin(); idIt != ids.end(); ++idIt) { deps.add("id", *idIt); } - } +} - void AddGroup(ptree& moduleTree, const Common::ParametersGroup& group) - { - ptree& groupTree = moduleTree.add(group.Name, ""); - for (auto paramIt = group.Parameters.begin(); paramIt != group.Parameters.end(); ++paramIt) +void AddGroup(ptree & moduleTree, const Common::ParametersGroup & group) +{ + ptree & groupTree = moduleTree.add(group.Name, ""); + + for (auto paramIt = group.Parameters.begin(); paramIt != group.Parameters.end(); ++paramIt) { groupTree.add(paramIt->Name, paramIt->Value); } - for (auto groupIt = group.Groups.begin(); groupIt != group.Groups.end(); ++groupIt) + + for (auto groupIt = group.Groups.begin(); groupIt != group.Groups.end(); ++groupIt) { AddGroup(groupTree, *groupIt); } - } +} - void AddParameters(ptree& moduleTree, const Common::AddonParameters& params, const char* groupName) - { - if (params.Parameters.empty() && params.Groups.empty()) +void AddParameters(ptree & moduleTree, const Common::AddonParameters & params, const char * groupName) +{ + if (params.Parameters.empty() && params.Groups.empty()) { return; } - ptree& paramsTree = moduleTree.add(groupName, ""); - for (auto paramIt = params.Parameters.begin(); paramIt != params.Parameters.end(); ++paramIt) + ptree & paramsTree = moduleTree.add(groupName, ""); + + for (auto paramIt = params.Parameters.begin(); paramIt != params.Parameters.end(); ++paramIt) { paramsTree.add(paramIt->Name, paramIt->Value); } - for (auto groupIt = params.Groups.begin(); groupIt != params.Groups.end(); ++groupIt) + + for (auto groupIt = params.Groups.begin(); groupIt != params.Groups.end(); ++groupIt) { AddGroup(paramsTree, *groupIt); } - } +} } -void Common::SaveConfiguration(const Common::ModulesConfiguration& modules, const std::string& configPath) +void Common::SaveConfiguration(const Common::ModulesConfiguration & modules, const std::string & configPath) { ptree pt; - ptree& modulesPt = pt.put("config.modules", ""); + ptree & modulesPt = pt.put("config.modules", ""); for (auto configIt = modules.begin(); configIt != modules.end(); ++configIt) - { - ptree& moduleTree = modulesPt.add("module", ""); - const Common::ModuleConfiguration& config = *configIt; - moduleTree.add("id", config.Id); - moduleTree.add("path", config.Path); - AddDependencies(moduleTree, config.Dependencies); - AddParameters(moduleTree, config.Parameters, "parameters"); - } + { + ptree & moduleTree = modulesPt.add("module", ""); + const Common::ModuleConfiguration & config = *configIt; + moduleTree.add("id", config.Id); + moduleTree.add("path", config.Path); + AddDependencies(moduleTree, config.Dependencies); + AddParameters(moduleTree, config.Parameters, "parameters"); + } write_xml(configPath, pt); } -Common::AddonInformation Common::GetAddonInfomation(const Common::ModuleConfiguration& config) +Common::AddonInformation Common::GetAddonInfomation(const Common::ModuleConfiguration & config) { Common::AddonInformation info; info.Id = config.Id; diff --git a/src/core/common/addons_core/dynamic_addon_factory.cpp b/src/core/common/addons_core/dynamic_addon_factory.cpp index 190278c5..fad146d1 100644 --- a/src/core/common/addons_core/dynamic_addon_factory.cpp +++ b/src/core/common/addons_core/dynamic_addon_factory.cpp @@ -18,34 +18,34 @@ namespace { - using namespace Common; +using namespace Common; - class DynamicAddonFactory : public AddonFactory - { - public: - DEFINE_CLASS_POINTERS(DynamicAddonFactory) +class DynamicAddonFactory : public AddonFactory +{ +public: + DEFINE_CLASS_POINTERS(DynamicAddonFactory) - public: - DynamicAddonFactory(const std::string& modulePath); +public: + DynamicAddonFactory(const std::string & modulePath); - virtual Addon::UniquePtr CreateAddon(); + virtual Addon::UniquePtr CreateAddon(); - private: - DynamicLibrary Library; - }; +private: + DynamicLibrary Library; +}; - DynamicAddonFactory::DynamicAddonFactory(const std::string& modulePath) - : Library(modulePath) - { - } +DynamicAddonFactory::DynamicAddonFactory(const std::string & modulePath) + : Library(modulePath) +{ +} - Addon::UniquePtr DynamicAddonFactory::CreateAddon() - { - return Addon::UniquePtr(Library.Find("CreateAddon")()); - } +Addon::UniquePtr DynamicAddonFactory::CreateAddon() +{ + return Addon::UniquePtr(Library.Find("CreateAddon")()); +} } -Common::AddonFactory::UniquePtr Common::CreateDynamicAddonFactory(const char* modulePath) +Common::AddonFactory::UniquePtr Common::CreateDynamicAddonFactory(const char * modulePath) { return Common::AddonFactory::UniquePtr(new DynamicAddonFactory(modulePath)); } diff --git a/src/core/common/addons_core/dynamic_library.h b/src/core/common/addons_core/dynamic_library.h index fae0721a..dba6dff1 100644 --- a/src/core/common/addons_core/dynamic_library.h +++ b/src/core/common/addons_core/dynamic_library.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -17,25 +17,25 @@ namespace Common { - class DynamicLibrary +class DynamicLibrary +{ +public: + DynamicLibrary(const std::string & libraryPath); + ~DynamicLibrary(); + + template + FuncType Find(const std::string & funcName) { - public: - DynamicLibrary(const std::string& libraryPath); - ~DynamicLibrary(); - - template - FuncType Find(const std::string& funcName) - { - return reinterpret_cast(FindSymbol(funcName)); - } - - private: - void* FindSymbol(const std::string& funcName); - - private: - const std::string Path; - void* Library; - }; + return reinterpret_cast(FindSymbol(funcName)); + } + +private: + void * FindSymbol(const std::string & funcName); + +private: + const std::string Path; + void * Library; +}; } diff --git a/src/core/common/addons_core/dynamic_library_lin.cpp b/src/core/common/addons_core/dynamic_library_lin.cpp index 1d8a8e95..8445fef6 100644 --- a/src/core/common/addons_core/dynamic_library_lin.cpp +++ b/src/core/common/addons_core/dynamic_library_lin.cpp @@ -17,58 +17,66 @@ namespace { - void* LoadLibrary(const char* path) - { - void* library = dlopen(path, RTLD_LAZY); - if (!library) +void * LoadLibrary(const char * path) +{ + void * library = dlopen(path, RTLD_LAZY); + + if (!library) { std::string msg; - if (const char* err = dlerror()) - { - msg = err; - } + + if (const char * err = dlerror()) + { + msg = err; + } + THROW_ERROR2(UnableToLoadDynamicLibrary, path, msg); } - return library; - } + + return library; +} } namespace Common { - DynamicLibrary::DynamicLibrary(const std::string& libraryPath) - : Path(libraryPath) - , Library(0) - { - } +DynamicLibrary::DynamicLibrary(const std::string & libraryPath) + : Path(libraryPath) + , Library(0) +{ +} - DynamicLibrary::~DynamicLibrary() - { - if (Library) +DynamicLibrary::~DynamicLibrary() +{ + if (Library) { //dlclose(Library); } - } +} - void* DynamicLibrary::FindSymbol(const std::string& funcName) - { - if (!Library) +void * DynamicLibrary::FindSymbol(const std::string & funcName) +{ + if (!Library) { Library = LoadLibrary(Path.c_str()); } - void* func = dlsym(Library, funcName.c_str()); - if (!func) + void * func = dlsym(Library, funcName.c_str()); + + if (!func) { std::string msg; - if (const char* err =dlerror()) - { - msg = err; - } + + if (const char * err = dlerror()) + { + msg = err; + } + THROW_ERROR3(UnableToFundSymbolInTheLibrary, funcName, Path, msg); } - return func; - } + + return func; +} } diff --git a/src/core/common/addons_core/dynamic_library_win.cpp b/src/core/common/addons_core/dynamic_library_win.cpp index 604bba78..ff492a10 100644 --- a/src/core/common/addons_core/dynamic_library_win.cpp +++ b/src/core/common/addons_core/dynamic_library_win.cpp @@ -17,53 +17,57 @@ namespace { - void* LoadDll(const char* path) - { - // TODO Use SetDllDirctory to search inside installation path. - void* library = LoadLibrary(path); - if (!library) +void * LoadDll(const char * path) +{ + // TODO Use SetDllDirctory to search inside installation path. + void * library = LoadLibrary(path); + + if (!library) { std::string msg; // TODO Get windows error string. THROW_ERROR2(UnableToLoadDynamicLibrary, path, msg); } - return library; - } + + return library; +} } namespace Common { - DynamicLibrary::DynamicLibrary(const std::string& libraryPath) - : Path(libraryPath) - , Library(0) - { - } +DynamicLibrary::DynamicLibrary(const std::string & libraryPath) + : Path(libraryPath) + , Library(0) +{ +} - DynamicLibrary::~DynamicLibrary() - { - if (Library) +DynamicLibrary::~DynamicLibrary() +{ + if (Library) { FreeLibrary((HMODULE)Library); } - } +} - void* DynamicLibrary::FindSymbol(const std::string& funcName) - { - if (!Library) +void * DynamicLibrary::FindSymbol(const std::string & funcName) +{ + if (!Library) { Library = LoadDll(Path.c_str()); } - void* func = (void*)GetProcAddress((HMODULE)Library, funcName.c_str()); - if (!func) + void * func = (void *)GetProcAddress((HMODULE)Library, funcName.c_str()); + + if (!func) { std::string msg; // TODO GetWindows error string. THROW_ERROR3(UnableToFundSymbolInTheLibrary, funcName, Path, msg); } - return func; - } + + return func; +} } diff --git a/src/core/common/addons_core/errors_addon_manager.cpp b/src/core/common/addons_core/errors_addon_manager.cpp index 9c18465a..6d1e81fb 100644 --- a/src/core/common/addons_core/errors_addon_manager.cpp +++ b/src/core/common/addons_core/errors_addon_manager.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// diff --git a/src/core/common/common_errors.cpp b/src/core/common/common_errors.cpp index fe535e6b..25cca1ee 100644 --- a/src/core/common/common_errors.cpp +++ b/src/core/common/common_errors.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// diff --git a/src/core/common/exception.cpp b/src/core/common/exception.cpp index 26b0a243..b946a22a 100644 --- a/src/core/common/exception.cpp +++ b/src/core/common/exception.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -18,7 +18,7 @@ Common::Error::Error() { } -Common::Error::Error(unsigned lineNum, const char* fileName, unsigned errorCode, const char* msg) +Common::Error::Error(unsigned lineNum, const char * fileName, unsigned errorCode, const char * msg) : LineNum(lineNum) , FileName(fileName) , Code(errorCode) @@ -50,7 +50,7 @@ std::string Common::Error::GetMessage() const return Message; } -Common::Error& Common::Error::AddError(const Error& subError) +Common::Error & Common::Error::AddError(const Error & subError) { SubErrors.push_back(subError); return *this; @@ -64,14 +64,15 @@ std::string Common::Error::GetFullMessage() const std::vector::const_iterator it = SubErrors.begin(); for (; it != SubErrors.end(); ++ it) - { - msg += "\n"; - msg += it->GetMessage(); - } + { + msg += "\n"; + msg += it->GetMessage(); + } + return msg; } -const char* Common::Error::what() const throw() +const char * Common::Error::what() const throw() { return Message.c_str(); } diff --git a/src/core/common/thread.cpp b/src/core/common/thread.cpp index a11d06ca..3b360131 100644 --- a/src/core/common/thread.cpp +++ b/src/core/common/thread.cpp @@ -15,52 +15,55 @@ namespace Common { - Thread::Thread(std::function f, ThreadObserver* observer) - : Observer(observer) - , Func(f) - , Impl(Thread::ThreadProc, this) - { - } +Thread::Thread(std::function f, ThreadObserver * observer) + : Observer(observer) + , Func(f) + , Impl(Thread::ThreadProc, this) +{ +} - Thread::~Thread() +Thread::~Thread() +{ + try { - try - { - Join(); - } - catch (std::exception&) - { - } + Join(); } - void Thread::Join() + catch (std::exception &) { - Impl.join(); } +} - void Thread::Run() +void Thread::Join() +{ + Impl.join(); +} + +void Thread::Run() +{ + try { - try - { - Func(); - if (Observer) + Func(); + + if (Observer) { Observer->OnSuccess(); } - } - catch (const std::exception& exc) - { - if (Observer) + } + + catch (const std::exception & exc) + { + if (Observer) { Observer->OnError(exc); } - } } +} - void Thread::ThreadProc(Thread* thread) - { - thread->Run(); - } +void Thread::ThreadProc(Thread * thread) +{ + thread->Run(); +} } // namespace Common diff --git a/src/core/common/uri_facade_lin.cpp b/src/core/common/uri_facade_lin.cpp index 547b150e..c79100a1 100644 --- a/src/core/common/uri_facade_lin.cpp +++ b/src/core/common/uri_facade_lin.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -18,39 +18,45 @@ namespace Common { - void Uri::Initialize(const char* uriString, std::size_t) - { - xmlURIPtr uri = xmlParseURI(uriString); - if (!uri) +void Uri::Initialize(const char * uriString, std::size_t) +{ + xmlURIPtr uri = xmlParseURI(uriString); + + if (!uri) { THROW_ERROR1(CannotParseUri, uriString); } - if (uri->scheme) + + if (uri->scheme) { SchemeStr = uri->scheme; } - if (uri->user) + + if (uri->user) { UserStr = uri->user; int ix = UserStr.find(':'); - if(ix > 0) { - PasswordStr = UserStr.substr(ix + 1); - UserStr = UserStr.substr(0, ix); - } + + if (ix > 0) + { + PasswordStr = UserStr.substr(ix + 1); + UserStr = UserStr.substr(0, ix); + } } - if (uri->server) + + if (uri->server) { HostStr = uri->server; } - PortNum = uri->port; - xmlFreeURI(uri); + PortNum = uri->port; + xmlFreeURI(uri); - if (SchemeStr.empty() || HostStr.empty()) + if (SchemeStr.empty() || HostStr.empty()) { THROW_ERROR1(CannotParseUri, uriString); } - } +} } // namespace Common diff --git a/src/core/common/uri_facade_win.cpp b/src/core/common/uri_facade_win.cpp index c15c75e4..1a807fb8 100644 --- a/src/core/common/uri_facade_win.cpp +++ b/src/core/common/uri_facade_win.cpp @@ -19,35 +19,35 @@ namespace Common { - void Uri::Initialize(const char* uriString, std::size_t size) - { - URL_COMPONENTS url = {0}; - url.dwStructSize = sizeof(url); - url.dwSchemeLength = 1; - url.dwUserNameLength = 1; - url.dwPasswordLength = 1; - url.dwHostNameLength = 1; - DWORD options = 0; - - // TODO msdn says do not use this function in services and in server patforms. :( - // TODO http://msdn.microsoft.com/en-us/library/windows/desktop/aa384376(v=vs.85).aspx - if (!InternetCrackUrl(uriString, size, options, &url)) +void Uri::Initialize(const char * uriString, std::size_t size) +{ + URL_COMPONENTS url = {0}; + url.dwStructSize = sizeof(url); + url.dwSchemeLength = 1; + url.dwUserNameLength = 1; + url.dwPasswordLength = 1; + url.dwHostNameLength = 1; + DWORD options = 0; + + // TODO msdn says do not use this function in services and in server patforms. :( + // TODO http://msdn.microsoft.com/en-us/library/windows/desktop/aa384376(v=vs.85).aspx + if (!InternetCrackUrl(uriString, size, options, &url)) { THROW_ERROR1(CannotParseUri, uriString); } - SchemeStr = std::string(url.lpszScheme, url.lpszScheme + url.dwSchemeLength); - UserStr = std::string(url.lpszUserName, url.lpszUserName + url.dwUserNameLength); - PasswordStr = std::string(url.lpszPassword, url.lpszPassword + url.dwPasswordLength); - HostStr = std::string(url.lpszHostName, url.lpszHostName + url.dwHostNameLength); - PortNum = url.nPort; + SchemeStr = std::string(url.lpszScheme, url.lpszScheme + url.dwSchemeLength); + UserStr = std::string(url.lpszUserName, url.lpszUserName + url.dwUserNameLength); + PasswordStr = std::string(url.lpszPassword, url.lpszPassword + url.dwPasswordLength); + HostStr = std::string(url.lpszHostName, url.lpszHostName + url.dwHostNameLength); + PortNum = url.nPort; - if (SchemeStr.empty() || HostStr.empty()) + if (SchemeStr.empty() || HostStr.empty()) { THROW_ERROR1(CannotParseUri, uriString); } - } +} } // namespace Common diff --git a/src/core/common/value.cpp b/src/core/common/value.cpp index 1bdea60f..4acb85d2 100644 --- a/src/core/common/value.cpp +++ b/src/core/common/value.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// diff --git a/src/core/event.cpp b/src/core/event.cpp index 276344c4..72cbfc16 100644 --- a/src/core/event.cpp +++ b/src/core/event.cpp @@ -7,95 +7,104 @@ namespace OpcUa { - Event::Event() : EventType(ObjectId::BaseEventType) - { - } +Event::Event() : EventType(ObjectId::BaseEventType) +{ +} + +Event::Event(const NodeId & type) : EventType(type) {} - Event::Event(const NodeId& type) : EventType(type) {} +Event::Event(const Node & type) : EventType(type.GetId()) {} - Event::Event(const Node& type) : EventType(type.GetId()) {} +std::vector> Event::GetValueKeys() +{ + std::vector> qns; - std::vector> Event::GetValueKeys() - { - std::vector> qns; - for (auto qn : PathValues) + for (auto qn : PathValues) { qns.push_back(qn.first); } - return qns; - } - - void Event::SetValue(const QualifiedName& path, Variant value) - { - SetValue(std::vector({path}), value); - } - - void Event::SetValue(const std::vector& path, Variant value) - { - PathValues[path] = value; - } - - void Event::SetValue(AttributeId attribute, Variant value) - { - AttributeValues[attribute] = value; - } - - void Event::SetValue(const std::string& name, Variant value) - { - std::vector path; - path.push_back(ToQualifiedName(name)); - return SetValue(path, value); - } - - Variant Event::GetValue(const QualifiedName& path) const - { - return GetValue(std::vector({path})); - } - - Variant Event::GetValue(const std::vector& path) const - { - PathMap::const_iterator it = PathValues.find(path); - std::cout << "Looking for Event value: "; - for ( auto qn : path ){ - std::cout << qn ; - } - std::cout << std::endl; - if ( it == PathValues.end() ) + + return qns; +} + +void Event::SetValue(const QualifiedName & path, Variant value) +{ + SetValue(std::vector({path}), value); +} + +void Event::SetValue(const std::vector & path, Variant value) +{ + PathValues[path] = value; +} + +void Event::SetValue(AttributeId attribute, Variant value) +{ + AttributeValues[attribute] = value; +} + +void Event::SetValue(const std::string & name, Variant value) +{ + std::vector path; + path.push_back(ToQualifiedName(name)); + return SetValue(path, value); +} + +Variant Event::GetValue(const QualifiedName & path) const +{ + return GetValue(std::vector({path})); +} + +Variant Event::GetValue(const std::vector & path) const +{ + PathMap::const_iterator it = PathValues.find(path); + std::cout << "Looking for Event value: "; + + for (auto qn : path) + { + std::cout << qn ; + } + + std::cout << std::endl; + + if (it == PathValues.end()) { std::cout << "Bad Not found " << std::endl; return Variant(); } - else + + else { std::cout << "ok" << std::endl; return it->second; } - } - - Variant Event::GetValue(const std::string& qualifiedname) const - { - std::vector path; - path.push_back(ToQualifiedName(qualifiedname)); - return GetValue(path); - } - - Variant Event::GetValue(AttributeId attribute) const - { - AttributeMap::const_iterator it = AttributeValues.find(attribute); - if ( it == AttributeValues.end() ) +} + +Variant Event::GetValue(const std::string & qualifiedname) const +{ + std::vector path; + path.push_back(ToQualifiedName(qualifiedname)); + return GetValue(path); +} + +Variant Event::GetValue(AttributeId attribute) const +{ + AttributeMap::const_iterator it = AttributeValues.find(attribute); + + if (it == AttributeValues.end()) { return Variant(); } - else + + else { return it->second; } - } - - std::string ToString(const Event& event) - { - std::stringstream stream; - stream << "Event(type:" << event.EventType << ", time:" << event.Time << ", source:" << event.SourceNode << ", severity:" << event.Severity << ", message:" << event.Message << ")" ; - return stream.str(); - } +} + +std::string ToString(const Event & event) +{ + std::stringstream stream; + stream << "Event(type:" << event.EventType << ", time:" << event.Time << ", source:" << event.SourceNode << ", severity:" << event.Severity << ", message:" << event.Message << ")" ; + return stream.str(); +} } diff --git a/src/core/model_impl.h b/src/core/model_impl.h index d18d20bf..0f548c5a 100644 --- a/src/core/model_impl.h +++ b/src/core/model_impl.h @@ -23,30 +23,31 @@ namespace OpcUa { - namespace Model - { - template - std::vector Browse(const NodeId& node, NodeClass nodeClassMask, Services::SharedPtr services) - { - BrowseDescription desc; - desc.Direction = BrowseDirection::Forward; - desc.IncludeSubtypes = true; - desc.NodeClasses = nodeClassMask; - desc.ReferenceTypeId = ObjectId::HierarchicalReferences; - desc.NodeToBrowse = node; - desc.ResultMask = BrowseResultMask::None; +namespace Model +{ +template +std::vector Browse(const NodeId & node, NodeClass nodeClassMask, Services::SharedPtr services) +{ + BrowseDescription desc; + desc.Direction = BrowseDirection::Forward; + desc.IncludeSubtypes = true; + desc.NodeClasses = nodeClassMask; + desc.ReferenceTypeId = ObjectId::HierarchicalReferences; + desc.NodeToBrowse = node; + desc.ResultMask = BrowseResultMask::None; - NodesQuery query; - query.NodesToBrowse.push_back(desc); - ViewServices::SharedPtr views = services->Views(); - std::vector results = views->Browse(query); + NodesQuery query; + query.NodesToBrowse.push_back(desc); + ViewServices::SharedPtr views = services->Views(); + std::vector results = views->Browse(query); - std::vector objects; - std::for_each(results[0].Referencies.begin(), results[0].Referencies.end(), [&node, &services, &objects](const ReferenceDescription& ref){ - objects.push_back(T(ref.TargetNodeId, services)); - }); + std::vector objects; + std::for_each(results[0].Referencies.begin(), results[0].Referencies.end(), [&node, &services, &objects](const ReferenceDescription & ref) + { + objects.push_back(T(ref.TargetNodeId, services)); + }); - return objects; - } - } + return objects; +} +} } diff --git a/src/core/model_node.cpp b/src/core/model_node.cpp index 41108d23..81fabd26 100644 --- a/src/core/model_node.cpp +++ b/src/core/model_node.cpp @@ -21,44 +21,44 @@ namespace OpcUa { - namespace Model - { - Node::Node(NodeId id, Services::SharedPtr services) - : Id(id) - , OpcUaServices(services) - { - ReadParameters attrs; - attrs.AttributesToRead.push_back(ToReadValueId(id, AttributeId::DisplayName)); - attrs.AttributesToRead.push_back(ToReadValueId(id, AttributeId::BrowseName)); - std::vector values = services->Attributes()->Read(attrs); - DisplayName = values[0].Value.As(); - BrowseName = values[1].Value.As(); - } +namespace Model +{ +Node::Node(NodeId id, Services::SharedPtr services) + : Id(id) + , OpcUaServices(services) +{ + ReadParameters attrs; + attrs.AttributesToRead.push_back(ToReadValueId(id, AttributeId::DisplayName)); + attrs.AttributesToRead.push_back(ToReadValueId(id, AttributeId::BrowseName)); + std::vector values = services->Attributes()->Read(attrs); + DisplayName = values[0].Value.As(); + BrowseName = values[1].Value.As(); +} - Node::Node(Services::SharedPtr services) - : OpcUaServices(services) - { - } +Node::Node(Services::SharedPtr services) + : OpcUaServices(services) +{ +} - NodeId Node::GetId() const - { - return Id; - } +NodeId Node::GetId() const +{ + return Id; +} - QualifiedName Node::GetBrowseName() const - { - return BrowseName; - } +QualifiedName Node::GetBrowseName() const +{ + return BrowseName; +} - LocalizedText Node::GetDisplayName() const - { - return DisplayName; - } +LocalizedText Node::GetDisplayName() const +{ + return DisplayName; +} - std::vector Node::GetReferencies() const - { - return std::vector(); - } +std::vector Node::GetReferencies() const +{ + return std::vector(); +} - } +} } diff --git a/src/core/model_object.cpp b/src/core/model_object.cpp index 8da4d5ef..78f3421a 100644 --- a/src/core/model_object.cpp +++ b/src/core/model_object.cpp @@ -23,343 +23,360 @@ namespace OpcUa { - namespace Model - { +namespace Model +{ - Object::Object(NodeId objectId, Services::SharedPtr services) - : Node(services) - { - Id = objectId; - ReadParameters attrs; - attrs.AttributesToRead.push_back(ToReadValueId(objectId, AttributeId::DisplayName)); - attrs.AttributesToRead.push_back(ToReadValueId(objectId, AttributeId::BrowseName)); - std::vector values = services->Attributes()->Read(attrs); - DisplayName = values[0].Value.As(); - BrowseName = values[1].Value.As(); - } +Object::Object(NodeId objectId, Services::SharedPtr services) + : Node(services) +{ + Id = objectId; + ReadParameters attrs; + attrs.AttributesToRead.push_back(ToReadValueId(objectId, AttributeId::DisplayName)); + attrs.AttributesToRead.push_back(ToReadValueId(objectId, AttributeId::BrowseName)); + std::vector values = services->Attributes()->Read(attrs); + DisplayName = values[0].Value.As(); + BrowseName = values[1].Value.As(); +} + +Object::Object(Object && object) + : Node(std::move(object.OpcUaServices)) +{ + Id = std::move(object.Id); + DisplayName = std::move(object.DisplayName); + BrowseName = std::move(object.BrowseName); +} - Object::Object(Object&& object) - : Node(std::move(object.OpcUaServices)) - { - Id = std::move(object.Id); - DisplayName = std::move(object.DisplayName); - BrowseName = std::move(object.BrowseName); - } +Object::Object(const Object & object) + : Node(object.OpcUaServices) +{ + Id = object.Id; + DisplayName = object.DisplayName; + BrowseName = object.BrowseName; +} - Object::Object(const Object& object) - : Node(object.OpcUaServices) - { - Id = object.Id; - DisplayName = object.DisplayName; - BrowseName = object.BrowseName; - } +Object::Object(Services::SharedPtr services) + : Node(services) +{ +} - Object::Object(Services::SharedPtr services) - : Node(services) - { - } +ObjectType Object::GetType() const +{ + return ObjectType(ObjectId::Null, GetServices()); +} - ObjectType Object::GetType() const - { - return ObjectType(ObjectId::Null, GetServices()); - } +std::vector Object::GetVariables() const +{ + return Browse(GetId(), NodeClass::Variable, GetServices()); +} - std::vector Object::GetVariables() const - { - return Browse(GetId(), NodeClass::Variable, GetServices()); - } +Variable Object::GetVariable(const QualifiedName & name) const +{ + OpcUa::RelativePathElement element; + element.ReferenceTypeId = OpcUa::ObjectId::HierarchicalReferences; + element.IncludeSubtypes = true; + element.TargetName = name; - Variable Object::GetVariable(const QualifiedName& name) const - { - OpcUa::RelativePathElement element; - element.ReferenceTypeId = OpcUa::ObjectId::HierarchicalReferences; - element.IncludeSubtypes = true; - element.TargetName = name; - - OpcUa::RelativePath path; - path.Elements.push_back(element); - return GetVariable(path); - } + OpcUa::RelativePath path; + path.Elements.push_back(element); + return GetVariable(path); +} - Variable Object::GetVariable(const RelativePath& relativePath) const - { - OpcUa::BrowsePath browsePath; - browsePath.StartingNode = GetId(); - browsePath.Path = relativePath; - OpcUa::TranslateBrowsePathsParameters params; - params.BrowsePaths.push_back(browsePath); - const std::vector& result = GetServices()->Views()->TranslateBrowsePathsToNodeIds(params); - if (result.size() != 1) - throw std::runtime_error("object_model| Server returned more than one browse paths on TranslateBrowsePathsToNodeIds request."); - - const OpcUa::BrowsePathResult& resultPath = result.back(); - OpcUa::CheckStatusCode(resultPath.Status); - if (resultPath.Targets.size() != 1) - throw std::runtime_error("object_model| Server returned too many target elements on TranslateBrowsePathsToNodeIds request."); - - return Variable(resultPath.Targets.back().Node, GetServices()); - } +Variable Object::GetVariable(const RelativePath & relativePath) const +{ + OpcUa::BrowsePath browsePath; + browsePath.StartingNode = GetId(); + browsePath.Path = relativePath; + OpcUa::TranslateBrowsePathsParameters params; + params.BrowsePaths.push_back(browsePath); + const std::vector & result = GetServices()->Views()->TranslateBrowsePathsToNodeIds(params); + if (result.size() != 1) + { throw std::runtime_error("object_model| Server returned more than one browse paths on TranslateBrowsePathsToNodeIds request."); } - std::vector Object::GetObjects() const - { - return Browse(GetId(), NodeClass::Object, GetServices()); - } + const OpcUa::BrowsePathResult & resultPath = result.back(); + OpcUa::CheckStatusCode(resultPath.Status); - Object Object::GetObject(const QualifiedName& name) const - { - return Object(ObjectId::Null, GetServices()); - } + if (resultPath.Targets.size() != 1) + { throw std::runtime_error("object_model| Server returned too many target elements on TranslateBrowsePathsToNodeIds request."); } - Object Object::GetObject(const RelativePath& name) const - { - return Object(ObjectId::Null, GetServices()); - } + return Variable(resultPath.Targets.back().Node, GetServices()); +} - Object Object::CreateObject(const ObjectType& type, const QualifiedName& browseName) - { - return CreateObject(NodeId(), type, browseName); - } - Object Object::CreateObject(const NodeId& newNodeId, const ObjectType& nodeType, const QualifiedName& browseName) - { - return CreateObject(newNodeId, GetId(), nodeType.GetId(), browseName, browseName.Name); - } +std::vector Object::GetObjects() const +{ + return Browse(GetId(), NodeClass::Object, GetServices()); +} + +Object Object::GetObject(const QualifiedName & name) const +{ + return Object(ObjectId::Null, GetServices()); +} + +Object Object::GetObject(const RelativePath & name) const +{ + return Object(ObjectId::Null, GetServices()); +} + +Object Object::CreateObject(const ObjectType & type, const QualifiedName & browseName) +{ + return CreateObject(NodeId(), type, browseName); +} + +Object Object::CreateObject(const NodeId & newNodeId, const ObjectType & nodeType, const QualifiedName & browseName) +{ + return CreateObject(newNodeId, GetId(), nodeType.GetId(), browseName, browseName.Name); +} - Object Object::CreateObject(const ObjectType& type, const QualifiedName& browseName, const std::string& displayName) +Object Object::CreateObject(const ObjectType & type, const QualifiedName & browseName, const std::string & displayName) +{ + return CreateObject(NodeId(), GetId(), type.GetId(), browseName, displayName); +} + +Object Object::CreateObject(const NodeId & newNodeId, const NodeId & parentNode, const NodeId & typeId, const QualifiedName & browseName, const std::string & displayName) +{ + Object object(GetServices()); + object.Id = InstantiateType(newNodeId, parentNode, typeId, NodeClass::Object, browseName, displayName); + object.BrowseName = browseName; + object.DisplayName = LocalizedText(displayName); + return object; + +} + +NodeId Object::InstantiateType(const NodeId & newNodeId, const NodeId & parentNode, const NodeId & typeId, NodeClass nodeClass, const QualifiedName & browseName, const std::string & displayName) +{ + // Creating new node for object + AddNodesItem newNodeRequest; + newNodeRequest.BrowseName = browseName; + newNodeRequest.RequestedNewNodeId = newNodeId; + newNodeRequest.Class = nodeClass; + newNodeRequest.ParentNodeId = parentNode; + newNodeRequest.ReferenceTypeId = nodeClass == NodeClass::Object ? ObjectId::HasComponent : ObjectId::HasProperty; + newNodeRequest.TypeDefinition = typeId; + ObjectAttributes attrs; + attrs.Description = LocalizedText(displayName); + attrs.DisplayName = LocalizedText(displayName); + newNodeRequest.Attributes = attrs; + + NodeManagementServices::SharedPtr nodes = GetServices()->NodeManagement(); + std::vector newObjectNode = nodes->AddNodes({newNodeRequest}); + + if (newObjectNode.size() != 1) { - return CreateObject(NodeId(), GetId(), type.GetId(), browseName, displayName); + throw std::runtime_error("opcua_model| Server returned wrong number new nodes results."); } - Object Object::CreateObject(const NodeId& newNodeId, const NodeId& parentNode, const NodeId& typeId, const QualifiedName& browseName, const std::string& displayName) - { - Object object(GetServices()); - object.Id = InstantiateType(newNodeId, parentNode, typeId, NodeClass::Object, browseName, displayName); - object.BrowseName = browseName; - object.DisplayName = LocalizedText(displayName); - return object; + OpcUa::CheckStatusCode(newObjectNode[0].Status); - } + std::map> nextRefs; + nextRefs.insert({newObjectNode[0].AddedNodeId, BrowseObjectsAndVariables(typeId)}); - NodeId Object::InstantiateType(const NodeId& newNodeId, const NodeId& parentNode, const NodeId& typeId, NodeClass nodeClass, const QualifiedName& browseName, const std::string& displayName) + while (!nextRefs.empty()) { - // Creating new node for object - AddNodesItem newNodeRequest; - newNodeRequest.BrowseName = browseName; - newNodeRequest.RequestedNewNodeId = newNodeId; - newNodeRequest.Class = nodeClass; - newNodeRequest.ParentNodeId = parentNode; - newNodeRequest.ReferenceTypeId = nodeClass == NodeClass::Object ? ObjectId::HasComponent : ObjectId::HasProperty; - newNodeRequest.TypeDefinition = typeId; - ObjectAttributes attrs; - attrs.Description = LocalizedText(displayName); - attrs.DisplayName = LocalizedText(displayName); - newNodeRequest.Attributes = attrs; - - NodeManagementServices::SharedPtr nodes = GetServices()->NodeManagement(); - std::vector newObjectNode = nodes->AddNodes({newNodeRequest}); - if (newObjectNode.size() != 1) - { - throw std::runtime_error("opcua_model| Server returned wrong number new nodes results."); - } - - OpcUa::CheckStatusCode(newObjectNode[0].Status); - - std::map> nextRefs; - nextRefs.insert({newObjectNode[0].AddedNodeId, BrowseObjectsAndVariables(typeId)}); - while(!nextRefs.empty()) - { - std::map> newRefs; - for (auto idRefs : nextRefs) + std::map> newRefs; + + for (auto idRefs : nextRefs) { std::map> tmpRefs = CopyObjectsAndVariables(idRefs.first, idRefs.second); newRefs.insert(tmpRefs.begin(), tmpRefs.end()); } - nextRefs = std::move(newRefs); - } - return newObjectNode[0].AddedNodeId; - } - std::vector Object::BrowseObjectsAndVariables(const NodeId& id) - { - // Id of the new node. - BrowseDescription desc; - desc.Direction = BrowseDirection::Forward; - desc.IncludeSubtypes = true; - desc.NodeClasses = NodeClass::Object | NodeClass::Variable | NodeClass::Method; - desc.ReferenceTypeId = ObjectId::HierarchicalReferences; - desc.NodeToBrowse = id; - desc.ResultMask = BrowseResultMask::NodeClass | BrowseResultMask::TypeDefinition | BrowseResultMask::BrowseName | BrowseResultMask::DisplayName; - - // browse sub objects and variables. - NodesQuery query; - query.NodesToBrowse.push_back(desc); - ViewServices::SharedPtr views = GetServices()->Views(); - return views->Browse(query)[0].Referencies; //FIME: this method should return BrowseResults + nextRefs = std::move(newRefs); } - std::map> Object::CopyObjectsAndVariables(const NodeId& targetNode, const std::vector& refs) + return newObjectNode[0].AddedNodeId; +} + +std::vector Object::BrowseObjectsAndVariables(const NodeId & id) +{ + // Id of the new node. + BrowseDescription desc; + desc.Direction = BrowseDirection::Forward; + desc.IncludeSubtypes = true; + desc.NodeClasses = NodeClass::Object | NodeClass::Variable | NodeClass::Method; + desc.ReferenceTypeId = ObjectId::HierarchicalReferences; + desc.NodeToBrowse = id; + desc.ResultMask = BrowseResultMask::NodeClass | BrowseResultMask::TypeDefinition | BrowseResultMask::BrowseName | BrowseResultMask::DisplayName; + + // browse sub objects and variables. + NodesQuery query; + query.NodesToBrowse.push_back(desc); + ViewServices::SharedPtr views = GetServices()->Views(); + return views->Browse(query)[0].Referencies; //FIME: this method should return BrowseResults +} + +std::map> Object::CopyObjectsAndVariables(const NodeId & targetNode, const std::vector & refs) +{ + std::map> nextCopyData; + + for (const ReferenceDescription & ref : refs) { - std::map> nextCopyData; - for (const ReferenceDescription& ref : refs) - { - std::vector result; - std::vector newNodeRequest; - switch (ref.TargetNodeClass) + std::vector result; + std::vector newNodeRequest; + + switch (ref.TargetNodeClass) + { + case NodeClass::Object: { - case NodeClass::Object: - { - if (ref.TargetNodeTypeDefinition !=ObjectId::Null) + if (ref.TargetNodeTypeDefinition != ObjectId::Null) { InstantiateType(NodeId(), targetNode, ref.TargetNodeTypeDefinition, NodeClass::Object, ref.BrowseName, ref.DisplayName.Text); } - else + + else { newNodeRequest = {CreateObjectCopy(targetNode, ref)}; } - break; - } - case NodeClass::Variable: - { - newNodeRequest = {CreateVariableCopy(targetNode, ref)}; - break; - } - default: - { - continue; - } + + break; + } + + case NodeClass::Variable: + { + newNodeRequest = {CreateVariableCopy(targetNode, ref)}; + break; } - if (newNodeRequest.empty()) + + default: { continue; } - result = GetServices()->NodeManagement()->AddNodes(newNodeRequest); - std::vector newRefs = BrowseObjectsAndVariables(ref.TargetNodeId); - nextCopyData.insert({result[0].AddedNodeId, newRefs}); - } - return nextCopyData; - } + } - Variable Object::CreateVariable(const QualifiedName& browseName, const Variant& value) - { - return CreateVariable(NodeId(), browseName, value); - } + if (newNodeRequest.empty()) + { + continue; + } - Variable Object::CreateVariable(const NodeId& newVariableId, const QualifiedName& browseName, const Variant& value) - { - // Creating new node for object - AddNodesItem newNodeRequest; - newNodeRequest.BrowseName = browseName; - newNodeRequest.RequestedNewNodeId = newVariableId; - newNodeRequest.Class = NodeClass::Variable; - newNodeRequest.ParentNodeId = GetId(); - newNodeRequest.ReferenceTypeId = ObjectId::HasProperty; - newNodeRequest.TypeDefinition = NodeId(); - VariableAttributes attrs; - attrs.Description = LocalizedText(browseName.Name); - attrs.DisplayName = LocalizedText(browseName.Name); - attrs.Value = value; - attrs.Type = OpcUa::VariantTypeToDataType(value.Type()); - newNodeRequest.Attributes = attrs; - - NodeManagementServices::SharedPtr nodes = GetServices()->NodeManagement(); - std::vector newNode = nodes->AddNodes({newNodeRequest}); - if (newNode.size() != 1) - { - throw std::runtime_error("opcua_model| Server returned wrong number new nodes results."); - } - - OpcUa::CheckStatusCode(newNode[0].Status); - Variable newVariable(GetServices()); - newVariable.Id = newNode[0].AddedNodeId; - newVariable.BrowseName = browseName; - newVariable.DisplayName = attrs.Description; - newVariable.DataType = value.Type(); - newVariable.TypeId = newNodeRequest.TypeDefinition; - return newVariable; + result = GetServices()->NodeManagement()->AddNodes(newNodeRequest); + std::vector newRefs = BrowseObjectsAndVariables(ref.TargetNodeId); + nextCopyData.insert({result[0].AddedNodeId, newRefs}); } - Variable Object::CreateVariable(const QualifiedName& browseName, const VariableType& type) - { - return Variable(GetServices()); - } + return nextCopyData; +} - Variable Object::CreateVariable(const NodeId& newVariableId, const QualifiedName& browseName, const VariableType& type) - { - return Variable(GetServices()); - } +Variable Object::CreateVariable(const QualifiedName & browseName, const Variant & value) +{ + return CreateVariable(NodeId(), browseName, value); +} - AddNodesItem Object::CreateVariableCopy(const NodeId& parentId, const ReferenceDescription& ref) +Variable Object::CreateVariable(const NodeId & newVariableId, const QualifiedName & browseName, const Variant & value) +{ + // Creating new node for object + AddNodesItem newNodeRequest; + newNodeRequest.BrowseName = browseName; + newNodeRequest.RequestedNewNodeId = newVariableId; + newNodeRequest.Class = NodeClass::Variable; + newNodeRequest.ParentNodeId = GetId(); + newNodeRequest.ReferenceTypeId = ObjectId::HasProperty; + newNodeRequest.TypeDefinition = NodeId(); + VariableAttributes attrs; + attrs.Description = LocalizedText(browseName.Name); + attrs.DisplayName = LocalizedText(browseName.Name); + attrs.Value = value; + attrs.Type = OpcUa::VariantTypeToDataType(value.Type()); + newNodeRequest.Attributes = attrs; + + NodeManagementServices::SharedPtr nodes = GetServices()->NodeManagement(); + std::vector newNode = nodes->AddNodes({newNodeRequest}); + + if (newNode.size() != 1) { - const NodeId& nodeId = ref.TargetNodeId; - - ReadParameters readParams; - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::DisplayName)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::Description)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::Value)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::DataType)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::ValueRank)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::ArrayDimensions)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::AccessLevel)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::UserAccessLevel)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::MinimumSamplingInterval)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::Historizing)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::WriteMask)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::UserWriteMask)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::BrowseName)); - std::vector values = GetServices()->Attributes()->Read(readParams); - - VariableAttributes attrs; - attrs.DisplayName = values[0].Value.As(); - attrs.Description = values[1].Value.As(); - attrs.Value = values[2].Value; - attrs.Type = values[3].Value.As(); - attrs.Rank = values[4].Value.As(); - attrs.Dimensions = values[5].Value.As>(); - attrs.AccessLevel = static_cast(values[6].Value.As()); - attrs.UserAccessLevel = static_cast(values[7].Value.As()); - attrs.MinimumSamplingInterval = values[8].Value.As(); - attrs.Historizing = values[9].Value.As(); - attrs.WriteMask = values[10].Value.As(); - attrs.UserWriteMask = values[11].Value.As(); - - AddNodesItem newNode; - newNode.BrowseName = values[12].Value.As(); - newNode.Class = NodeClass::Variable; - newNode.ParentNodeId = parentId; - newNode.ReferenceTypeId = ref.ReferenceTypeId; - newNode.TypeDefinition = ref.TargetNodeTypeDefinition; - newNode.Attributes = attrs; - return newNode; + throw std::runtime_error("opcua_model| Server returned wrong number new nodes results."); } - AddNodesItem Object::CreateObjectCopy(const NodeId& parentId, const ReferenceDescription& ref) - { - const NodeId& nodeId = ref.TargetNodeId; - - ReadParameters readParams; - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::DisplayName)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::Description)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::WriteMask)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::UserWriteMask)); - readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::BrowseName)); - std::vector values = GetServices()->Attributes()->Read(readParams); - - ObjectAttributes attrs; - attrs.DisplayName = values[0].Value.As(); - attrs.Description = values[1].Value.As(); - attrs.WriteMask = values[2].Value.As(); - attrs.UserWriteMask = values[3].Value.As(); - - AddNodesItem newNode; - newNode.BrowseName = values[4].Value.As(); - newNode.Class = NodeClass::Object; - newNode.ParentNodeId = parentId; - newNode.ReferenceTypeId = ref.ReferenceTypeId; - newNode.TypeDefinition = ref.TargetNodeTypeDefinition; - newNode.Attributes = attrs; - return newNode; - } + OpcUa::CheckStatusCode(newNode[0].Status); + Variable newVariable(GetServices()); + newVariable.Id = newNode[0].AddedNodeId; + newVariable.BrowseName = browseName; + newVariable.DisplayName = attrs.Description; + newVariable.DataType = value.Type(); + newVariable.TypeId = newNodeRequest.TypeDefinition; + return newVariable; +} + +Variable Object::CreateVariable(const QualifiedName & browseName, const VariableType & type) +{ + return Variable(GetServices()); +} + +Variable Object::CreateVariable(const NodeId & newVariableId, const QualifiedName & browseName, const VariableType & type) +{ + return Variable(GetServices()); +} - } // namespace Model +AddNodesItem Object::CreateVariableCopy(const NodeId & parentId, const ReferenceDescription & ref) +{ + const NodeId & nodeId = ref.TargetNodeId; + + ReadParameters readParams; + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::DisplayName)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::Description)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::Value)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::DataType)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::ValueRank)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::ArrayDimensions)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::AccessLevel)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::UserAccessLevel)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::MinimumSamplingInterval)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::Historizing)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::WriteMask)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::UserWriteMask)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::BrowseName)); + std::vector values = GetServices()->Attributes()->Read(readParams); + + VariableAttributes attrs; + attrs.DisplayName = values[0].Value.As(); + attrs.Description = values[1].Value.As(); + attrs.Value = values[2].Value; + attrs.Type = values[3].Value.As(); + attrs.Rank = values[4].Value.As(); + attrs.Dimensions = values[5].Value.As>(); + attrs.AccessLevel = static_cast(values[6].Value.As()); + attrs.UserAccessLevel = static_cast(values[7].Value.As()); + attrs.MinimumSamplingInterval = values[8].Value.As(); + attrs.Historizing = values[9].Value.As(); + attrs.WriteMask = values[10].Value.As(); + attrs.UserWriteMask = values[11].Value.As(); + + AddNodesItem newNode; + newNode.BrowseName = values[12].Value.As(); + newNode.Class = NodeClass::Variable; + newNode.ParentNodeId = parentId; + newNode.ReferenceTypeId = ref.ReferenceTypeId; + newNode.TypeDefinition = ref.TargetNodeTypeDefinition; + newNode.Attributes = attrs; + return newNode; +} + +AddNodesItem Object::CreateObjectCopy(const NodeId & parentId, const ReferenceDescription & ref) +{ + const NodeId & nodeId = ref.TargetNodeId; + + ReadParameters readParams; + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::DisplayName)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::Description)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::WriteMask)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::UserWriteMask)); + readParams.AttributesToRead.push_back(ToReadValueId(nodeId, AttributeId::BrowseName)); + std::vector values = GetServices()->Attributes()->Read(readParams); + + ObjectAttributes attrs; + attrs.DisplayName = values[0].Value.As(); + attrs.Description = values[1].Value.As(); + attrs.WriteMask = values[2].Value.As(); + attrs.UserWriteMask = values[3].Value.As(); + + AddNodesItem newNode; + newNode.BrowseName = values[4].Value.As(); + newNode.Class = NodeClass::Object; + newNode.ParentNodeId = parentId; + newNode.ReferenceTypeId = ref.ReferenceTypeId; + newNode.TypeDefinition = ref.TargetNodeTypeDefinition; + newNode.Attributes = attrs; + return newNode; +} + +} // namespace Model } // namespace OpcUa diff --git a/src/core/model_object_type.cpp b/src/core/model_object_type.cpp index ca71db82..c89e075e 100644 --- a/src/core/model_object_type.cpp +++ b/src/core/model_object_type.cpp @@ -23,47 +23,47 @@ namespace OpcUa { - namespace Model - { +namespace Model +{ - ObjectType::ObjectType(NodeId objectId, Services::SharedPtr services) - : Node(services) - { - Id = objectId; - ReadParameters attrs; - attrs.AttributesToRead.push_back(ToReadValueId(objectId, AttributeId::DisplayName)); - attrs.AttributesToRead.push_back(ToReadValueId(objectId, AttributeId::BrowseName)); - attrs.AttributesToRead.push_back(ToReadValueId(objectId, AttributeId::IsAbstract)); - std::vector values = services->Attributes()->Read(attrs); - DisplayName = values[0].Value.As(); - BrowseName = values[1].Value.As(); - Abstract = values[2].Value.As(); - } +ObjectType::ObjectType(NodeId objectId, Services::SharedPtr services) + : Node(services) +{ + Id = objectId; + ReadParameters attrs; + attrs.AttributesToRead.push_back(ToReadValueId(objectId, AttributeId::DisplayName)); + attrs.AttributesToRead.push_back(ToReadValueId(objectId, AttributeId::BrowseName)); + attrs.AttributesToRead.push_back(ToReadValueId(objectId, AttributeId::IsAbstract)); + std::vector values = services->Attributes()->Read(attrs); + DisplayName = values[0].Value.As(); + BrowseName = values[1].Value.As(); + Abstract = values[2].Value.As(); +} - bool ObjectType::IsAbstract() const - { - return false; - } +bool ObjectType::IsAbstract() const +{ + return false; +} - std::vector ObjectType::Variables() const - { - return Browse(GetId(), NodeClass::Variable, GetServices()); - } +std::vector ObjectType::Variables() const +{ + return Browse(GetId(), NodeClass::Variable, GetServices()); +} - std::vector ObjectType::Objects() const - { - return Browse(GetId(), NodeClass::Object, GetServices()); - } +std::vector ObjectType::Objects() const +{ + return Browse(GetId(), NodeClass::Object, GetServices()); +} - std::vector ObjectType::SubTypes() const - { - return Browse(GetId(), NodeClass::ObjectType, GetServices()); - } +std::vector ObjectType::SubTypes() const +{ + return Browse(GetId(), NodeClass::ObjectType, GetServices()); +} - ObjectType ObjectType::Parent() const - { - return ObjectType(ObjectId::Null, GetServices()); - } +ObjectType ObjectType::Parent() const +{ + return ObjectType(ObjectId::Null, GetServices()); +} - } +} } diff --git a/src/core/model_server.cpp b/src/core/model_server.cpp index e2558c60..5b62d283 100644 --- a/src/core/model_server.cpp +++ b/src/core/model_server.cpp @@ -21,32 +21,32 @@ namespace OpcUa { - namespace Model - { - Server::Server(Services::SharedPtr services) - : Connection(services) - { - } +namespace Model +{ +Server::Server(Services::SharedPtr services) + : Connection(services) +{ +} - Object Server::RootObject() const - { - return Object(ObjectId::RootFolder, Connection); - } +Object Server::RootObject() const +{ + return Object(ObjectId::RootFolder, Connection); +} - Object Server::GetObject(const NodeId& id) const - { - return Object(id, Connection); - } +Object Server::GetObject(const NodeId & id) const +{ + return Object(id, Connection); +} - ObjectType Server::GetObjectType(const NodeId& typeId) const - { - return ObjectType(typeId, Connection); - } +ObjectType Server::GetObjectType(const NodeId & typeId) const +{ + return ObjectType(typeId, Connection); +} - Services::SharedPtr Server::GetServices() const - { - return Connection; - } +Services::SharedPtr Server::GetServices() const +{ + return Connection; +} - } +} } diff --git a/src/core/model_variable.cpp b/src/core/model_variable.cpp index 967e00b2..9055f4d2 100644 --- a/src/core/model_variable.cpp +++ b/src/core/model_variable.cpp @@ -23,58 +23,62 @@ namespace OpcUa { - namespace Model - { - Variable::Variable(NodeId variableId, Services::SharedPtr services) - : Node(services) - { - Id = variableId; - ReadParameters attrs; - attrs.AttributesToRead.push_back(ToReadValueId(variableId, AttributeId::DisplayName)); - attrs.AttributesToRead.push_back(ToReadValueId(variableId, AttributeId::BrowseName)); - attrs.AttributesToRead.push_back(ToReadValueId(variableId, AttributeId::DataType)); - std::vector values = services->Attributes()->Read(attrs); - DisplayName = values[0].Value.As(); - BrowseName = values[1].Value.As(); - DataType = OpcUa::DataTypeToVariantType(values[2].Value.As()); - } +namespace Model +{ +Variable::Variable(NodeId variableId, Services::SharedPtr services) + : Node(services) +{ + Id = variableId; + ReadParameters attrs; + attrs.AttributesToRead.push_back(ToReadValueId(variableId, AttributeId::DisplayName)); + attrs.AttributesToRead.push_back(ToReadValueId(variableId, AttributeId::BrowseName)); + attrs.AttributesToRead.push_back(ToReadValueId(variableId, AttributeId::DataType)); + std::vector values = services->Attributes()->Read(attrs); + DisplayName = values[0].Value.As(); + BrowseName = values[1].Value.As(); + DataType = OpcUa::DataTypeToVariantType(values[2].Value.As()); +} - DataValue Variable::GetValue() const - { - ReadParameters params; - params.AttributesToRead.push_back(ToReadValueId(GetId(), AttributeId::Value)); - const std::vector result = GetServices()->Attributes()->Read(params); - if (result.size() != 1) - { - throw std::runtime_error("Cannot read variable value. Server returned invalid number of values."); - } - return result.front(); - } +DataValue Variable::GetValue() const +{ + ReadParameters params; + params.AttributesToRead.push_back(ToReadValueId(GetId(), AttributeId::Value)); + const std::vector result = GetServices()->Attributes()->Read(params); - void Variable::SetValue(const Variant& value) + if (result.size() != 1) { - DataValue data(value); - data.SetSourceTimestamp(OpcUa::DateTime::Current()); - SetValue(data); + throw std::runtime_error("Cannot read variable value. Server returned invalid number of values."); } - void Variable::SetValue(const DataValue& value) - { - WriteValue writeValue; - writeValue.AttributeId = AttributeId::Value; - writeValue.Value = value; - writeValue.NodeId = Id; - std::vector result = GetServices()->Attributes()->Write({writeValue}); - if (result.size() != 1) - { - throw std::runtime_error("Failed to write data. Server returned wron nunber of status codes."); - } - CheckStatusCode(result[0]); - } + return result.front(); +} - std::vector Variable::Variables() const +void Variable::SetValue(const Variant & value) +{ + DataValue data(value); + data.SetSourceTimestamp(OpcUa::DateTime::Current()); + SetValue(data); +} + +void Variable::SetValue(const DataValue & value) +{ + WriteValue writeValue; + writeValue.AttributeId = AttributeId::Value; + writeValue.Value = value; + writeValue.NodeId = Id; + std::vector result = GetServices()->Attributes()->Write({writeValue}); + + if (result.size() != 1) { - return Browse(GetId(), NodeClass::Variable, GetServices()); + throw std::runtime_error("Failed to write data. Server returned wron nunber of status codes."); } - } + + CheckStatusCode(result[0]); +} + +std::vector Variable::Variables() const +{ + return Browse(GetId(), NodeClass::Variable, GetServices()); +} +} } diff --git a/src/core/node.cpp b/src/core/node.cpp index 0fe2f442..35f68ddd 100644 --- a/src/core/node.cpp +++ b/src/core/node.cpp @@ -30,68 +30,71 @@ namespace OpcUa { - Node::Node(Services::SharedPtr srv) - : Node(srv, NumericNodeId(0, 0)) - { - } - - Node::Node(Services::SharedPtr srv, const NodeId& id) - : Server(srv) - , Id(id) - { - } - - Node::Node(const Node& other) - : Server(other.Server) - , Id(other.Id) - { - } - - NodeId Node::GetId() const - { - return Id; - } - - DataValue Node::GetAttribute(const AttributeId attr) const - { - ReadParameters params; - ReadValueId attribute; - attribute.NodeId = Id; - attribute.AttributeId = attr; - params.AttributesToRead.push_back(attribute); - std::vector vec = Server->Attributes()-> Read(params); - if ( vec.size() > 0 ) +Node::Node(Services::SharedPtr srv) + : Node(srv, NumericNodeId(0, 0)) +{ +} + +Node::Node(Services::SharedPtr srv, const NodeId & id) + : Server(srv) + , Id(id) +{ +} + +Node::Node(const Node & other) + : Server(other.Server) + , Id(other.Id) +{ +} + +NodeId Node::GetId() const +{ + return Id; +} + +DataValue Node::GetAttribute(const AttributeId attr) const +{ + ReadParameters params; + ReadValueId attribute; + attribute.NodeId = Id; + attribute.AttributeId = attr; + params.AttributesToRead.push_back(attribute); + std::vector vec = Server->Attributes()-> Read(params); + + if (vec.size() > 0) { - return vec.front(); + return vec.front(); } - else + + else { return DataValue(); //FIXME: What does it mean when not value is found? } - } +} - std::vector Node::CallMethod(const NodeId methodId, const std::vector inputArguments) const - { - std::vector vec_methodId; - vec_methodId.push_back(methodId); +std::vector Node::CallMethod(const NodeId methodId, const std::vector inputArguments) const +{ + std::vector vec_methodId; + vec_methodId.push_back(methodId); - std::vector> vec_inputArguments; - vec_inputArguments.push_back(inputArguments); + std::vector> vec_inputArguments; + vec_inputArguments.push_back(inputArguments); - std::vector> results = CallMethods(vec_methodId, vec_inputArguments); + std::vector> results = CallMethods(vec_methodId, vec_inputArguments); - return results.front(); - } + return results.front(); +} - std::vector> Node::CallMethods(const std::vector methodIds, const std::vector> inputArguments) const - { - std::vector methodsToCall; +std::vector> Node::CallMethods(const std::vector methodIds, const std::vector> inputArguments) const +{ + std::vector methodsToCall; + + std::vector::const_iterator it1; + std::vector>::const_iterator it2; - std::vector::const_iterator it1; - std::vector>::const_iterator it2; - for (it1 = methodIds.begin(), it2 = inputArguments.begin(); - it1 != methodIds.end() && it2 != inputArguments.end(); - ++it1, ++it2) + for (it1 = methodIds.begin(), it2 = inputArguments.begin(); + it1 != methodIds.end() && it2 != inputArguments.end(); + ++it1, ++it2) { CallMethodRequest callMethod; callMethod.ObjectId = Id; @@ -101,390 +104,402 @@ namespace OpcUa methodsToCall.push_back(callMethod); } - std::vector results = Server->Method()->Call(methodsToCall); + std::vector results = Server->Method()->Call(methodsToCall); - std::vector> ret; - for (std::vector::iterator it = results.begin(); it != results.end(); ++it) + std::vector> ret; + + for (std::vector::iterator it = results.begin(); it != results.end(); ++it) { CheckStatusCode(it->Status); ret.push_back(it->OutputArguments); } - return ret; - } - - void Node::SetAttribute(AttributeId attr, const DataValue &dval) const - { - WriteValue attribute; - attribute.NodeId = Id; - attribute.AttributeId = attr; - attribute.Value = dval; - std::vector codes = Server->Attributes()->Write(std::vector(1, attribute)); - CheckStatusCode(codes.front()); - } - - void Node::SetValue(const Variant& val) const - { - DataValue dval(val); - SetAttribute(AttributeId::Value, dval); - } - - void Node::SetValue(const DataValue &dval) const - { - SetAttribute(AttributeId::Value, dval); - } - - - std::vector Node::GetChildren(const ReferenceId& refid) const - { - BrowseDescription description; - description.NodeToBrowse = Id; - description.Direction = BrowseDirection::Forward; - description.IncludeSubtypes = true; - description.NodeClasses = NodeClass::Unspecified; - description.ResultMask = BrowseResultMask::All; - description.ReferenceTypeId = refid; - - NodesQuery query; - query.NodesToBrowse.push_back(description); - query.MaxReferenciesPerNode = 100; - std::vector nodes; - std::vector results = Server->Views()->Browse(query); - if ( results.empty() ) + return ret; +} + +void Node::SetAttribute(AttributeId attr, const DataValue & dval) const +{ + WriteValue attribute; + attribute.NodeId = Id; + attribute.AttributeId = attr; + attribute.Value = dval; + std::vector codes = Server->Attributes()->Write(std::vector(1, attribute)); + CheckStatusCode(codes.front()); +} + +void Node::SetValue(const Variant & val) const +{ + DataValue dval(val); + SetAttribute(AttributeId::Value, dval); +} + +void Node::SetValue(const DataValue & dval) const +{ + SetAttribute(AttributeId::Value, dval); +} + + +std::vector Node::GetChildren(const ReferenceId & refid) const +{ + BrowseDescription description; + description.NodeToBrowse = Id; + description.Direction = BrowseDirection::Forward; + description.IncludeSubtypes = true; + description.NodeClasses = NodeClass::Unspecified; + description.ResultMask = BrowseResultMask::All; + description.ReferenceTypeId = refid; + + NodesQuery query; + query.NodesToBrowse.push_back(description); + query.MaxReferenciesPerNode = 100; + std::vector nodes; + std::vector results = Server->Views()->Browse(query); + + if (results.empty()) { return nodes; } - while(!results[0].Referencies.empty()) + + while (!results[0].Referencies.empty()) { for (auto refIt : results[0].Referencies) - { - Node node(Server, refIt.TargetNodeId); - nodes.push_back(node); - } + { + Node node(Server, refIt.TargetNodeId); + nodes.push_back(node); + } + results = Server->Views()->BrowseNext(); - if ( results.empty() ) - { - return nodes; - } + + if (results.empty()) + { + return nodes; + } } - return nodes; - } - - std::vector Node::GetChildren() const - { - return GetChildren(ReferenceId::HierarchicalReferences); - } - - QualifiedName Node::GetBrowseName() const - { - Variant var = GetAttribute(AttributeId::BrowseName).Value; - if (var.Type() != VariantType::QUALIFIED_NAME) + + return nodes; +} + +std::vector Node::GetChildren() const +{ + return GetChildren(ReferenceId::HierarchicalReferences); +} + +QualifiedName Node::GetBrowseName() const +{ + Variant var = GetAttribute(AttributeId::BrowseName).Value; + + if (var.Type() != VariantType::QUALIFIED_NAME) { throw std::runtime_error("Could not retrieve browse name."); } - return var.As(); - } - - std::vector Node::AddNodes(std::vector items) const - { - return Server->NodeManagement()->AddNodes(items); - } - - std::vector Node::AddReferences(std::vector items) const - { - return Server->NodeManagement()->AddReferences(items); - } - - Node Node::GetChild(const std::string& browsename) const - { - return GetChild(std::vector({browsename})); - } - - Node Node::GetChild(const std::vector& path) const - { - std::vector vec; - uint16_t namespaceIdx = Id.GetNamespaceIndex(); - for (std::string str: path) + + return var.As(); +} + +std::vector Node::AddNodes(std::vector items) const +{ + return Server->NodeManagement()->AddNodes(items); +} + +std::vector Node::AddReferences(std::vector items) const +{ + return Server->NodeManagement()->AddReferences(items); +} + +Node Node::GetChild(const std::string & browsename) const +{ + return GetChild(std::vector({browsename})); +} + +Node Node::GetChild(const std::vector & path) const +{ + std::vector vec; + uint16_t namespaceIdx = Id.GetNamespaceIndex(); + + for (std::string str : path) { QualifiedName qname = ToQualifiedName(str, namespaceIdx); namespaceIdx = qname.NamespaceIndex; vec.push_back(qname); } - return GetChild(vec); - } + return GetChild(vec); +} + + +Node Node::GetChild(const std::vector & path) const +{ + std::vector rpath; - Node Node::GetChild(const std::vector& path) const - { - std::vector rpath; - for (QualifiedName qname: path) + for (QualifiedName qname : path) { RelativePathElement el; el.TargetName = qname; rpath.push_back(el); } - BrowsePath bpath; - bpath.Path.Elements = rpath; - bpath.StartingNode = Id; - std::vector bpaths; - bpaths.push_back(bpath); - TranslateBrowsePathsParameters params; - params.BrowsePaths = bpaths; - - std::vector result = Server->Views()->TranslateBrowsePathsToNodeIds(params); - CheckStatusCode(result.front().Status); - - NodeId node =result.front().Targets.front().Node ; - return Node(Server, node); - } - - std::string Node::ToString() const - { - std::ostringstream os; - os << "Node(" << Id << ")"; - return os.str(); - } - - Node Node::AddFolder(const std::string& nodeid, const std::string& browsename) const - { - NodeId node = ToNodeId(nodeid, this->Id.GetNamespaceIndex()); - QualifiedName qn = ToQualifiedName(browsename, GetBrowseName().NamespaceIndex); - return AddFolder(node, qn); - } - - Node Node::AddFolder(uint32_t namespaceIdx, const std::string& name) const - { - NodeId nodeid = NumericNodeId(0, namespaceIdx); - QualifiedName qn = ToQualifiedName(name, namespaceIdx); - return AddFolder(nodeid, qn); - } - - Node Node::AddFolder(const NodeId& nodeid, const QualifiedName& browsename) const - { - - AddNodesItem item; - item.BrowseName = browsename; - item.ParentNodeId = this->Id; - item.RequestedNewNodeId = nodeid; - item.Class = NodeClass::Object; - item.ReferenceTypeId = ReferenceId::Organizes; - item.TypeDefinition = ObjectId::FolderType; - ObjectAttributes attr; - attr.DisplayName = LocalizedText(browsename.Name); - attr.Description = LocalizedText(browsename.Name); - attr.WriteMask = 0; - attr.UserWriteMask = 0; - attr.EventNotifier = 0; - item.Attributes = attr; - - std::vector addnodesresults = Server->NodeManagement()->AddNodes(std::vector({item})); - AddNodesResult res = addnodesresults.front(); //This should always work - CheckStatusCode(res.Status); - - return Node(Server, res.AddedNodeId); - } - - Node Node::AddObject(const std::string& nodeid, const std::string& browsename) const - { - NodeId node = ToNodeId(nodeid, this->Id.GetNamespaceIndex()); - QualifiedName qn = ToQualifiedName(browsename, GetBrowseName().NamespaceIndex); - return AddObject(node, qn); - } - - Node Node::AddObject(uint32_t namespaceIdx, const std::string& name) const - { - //FIXME: should default namespace be the onde from the parent of the browsename? - NodeId nodeid = NumericNodeId(0, namespaceIdx); - QualifiedName qn = ToQualifiedName(name, namespaceIdx); - return AddObject(nodeid, qn); - } - - Node Node::AddObject(const NodeId& nodeid, const QualifiedName& browsename) const - { - AddNodesItem item; - item.BrowseName = browsename; - item.ParentNodeId = this->Id; - item.RequestedNewNodeId = nodeid; - item.Class = NodeClass::Object; - item.ReferenceTypeId = ReferenceId::HasComponent; - item.TypeDefinition = ObjectId::BaseObjectType; - ObjectAttributes attr; - attr.DisplayName = LocalizedText(browsename.Name); - attr.Description = LocalizedText(browsename.Name); - attr.WriteMask = 0; - attr.UserWriteMask = 0; - attr.EventNotifier = 0; - item.Attributes = attr; - - std::vector addnodesresults = Server->NodeManagement()->AddNodes(std::vector({item})); - - AddNodesResult res = addnodesresults.front(); //This should always work - CheckStatusCode(res.Status); - - return Node(Server, res.AddedNodeId); - } - - Node Node::AddVariable(uint32_t namespaceIdx, const std::string& name, const Variant& val) const - { - NodeId nodeid = NumericNodeId(0, namespaceIdx); - QualifiedName qn = ToQualifiedName(name, namespaceIdx); - return AddVariable(nodeid, qn, val); - } - - Node Node::AddVariable(const std::string& nodeid, const std::string& browsename, const Variant& val) const - { - NodeId node = ToNodeId(nodeid, this->Id.GetNamespaceIndex()); - QualifiedName qn = ToQualifiedName(browsename, GetBrowseName().NamespaceIndex); - return AddVariable(node, qn, val); - } - - Node Node::AddVariable(const NodeId& nodeid, const QualifiedName& browsename, const Variant& val) const - { - ObjectId datatype = VariantTypeToDataType(val.Type()); - - AddNodesItem item; - item.BrowseName = browsename; - item.ParentNodeId = this->Id; - item.RequestedNewNodeId = nodeid; - item.Class = NodeClass::Variable; - item.ReferenceTypeId = ReferenceId::HasComponent; - item.TypeDefinition = ObjectId::BaseDataVariableType; - VariableAttributes attr; - attr.DisplayName = LocalizedText(browsename.Name); - attr.Description = LocalizedText(browsename.Name); - attr.WriteMask = (uint32_t)OpenFileMode::Read; - attr.UserWriteMask = (uint32_t)OpenFileMode::Read; - attr.Value = val; - attr.Type = datatype; - attr.Rank = -1; - attr.Dimensions = val.Dimensions; - attr.AccessLevel = VariableAccessLevel::CurrentRead; - attr.UserAccessLevel = VariableAccessLevel::CurrentRead; - attr.MinimumSamplingInterval = 1; - attr.Historizing = 0; - item.Attributes = attr; - - std::vector addnodesresults = Server->NodeManagement()->AddNodes(std::vector({item})); - - AddNodesResult res = addnodesresults.front(); //This should always work - CheckStatusCode(res.Status); - - return Node(Server, res.AddedNodeId); - } - - - Node Node::AddProperty(uint32_t namespaceIdx, const std::string& name, const Variant& val) const - { - NodeId nodeid = NumericNodeId(0, namespaceIdx); - const QualifiedName& qname = ToQualifiedName(name, namespaceIdx); - return AddProperty(nodeid, qname, val); - } - - Node Node::AddProperty(const std::string& nodeid, const std::string& browsename, const Variant& val) const - { - NodeId node = ToNodeId(nodeid, this->Id.GetNamespaceIndex()); - QualifiedName qn = ToQualifiedName(browsename, GetBrowseName().NamespaceIndex); - return AddProperty(node, qn, val); - } - - Node Node::AddProperty(const NodeId& nodeid, const QualifiedName& browsename, const Variant& val) const - { - - ObjectId datatype = VariantTypeToDataType(val.Type()); - - AddNodesItem item; - item.BrowseName = browsename; - item.ParentNodeId = this->Id; - item.RequestedNewNodeId = nodeid; - item.Class = NodeClass::Variable; - item.ReferenceTypeId = ReferenceId::HasProperty; - item.TypeDefinition = ObjectId::PropertyType; - VariableAttributes attr; - attr.DisplayName = LocalizedText(browsename.Name); - attr.Description = LocalizedText(browsename.Name); - attr.WriteMask = 0; - attr.UserWriteMask = 0; - attr.Value = val; - attr.Type = datatype; - attr.Rank = 0; - attr.Dimensions = val.Dimensions; - attr.AccessLevel = VariableAccessLevel::CurrentRead; - attr.UserAccessLevel = VariableAccessLevel::CurrentRead; - attr.MinimumSamplingInterval = 0; - attr.Historizing = 0; - item.Attributes = attr; - - std::vector addnodesresults = Server->NodeManagement()->AddNodes(std::vector({item})); - - AddNodesResult res = addnodesresults.front(); //This should always work - CheckStatusCode(res.Status); - - return Node(Server, res.AddedNodeId); - - } - - Node Node::AddMethod(uint32_t namespaceIdx, const std::string& name, std::function (NodeId context, std::vector arguments)> method) const - { - NodeId nodeid = NumericNodeId(0, namespaceIdx); - QualifiedName qn = ToQualifiedName(name, namespaceIdx); - return AddMethod(nodeid, qn, method); - } - - Node Node::AddMethod(const std::string& nodeid, const std::string& browsename, std::function (NodeId context, std::vector arguments)> method) const - { - NodeId node = ToNodeId(nodeid, this->Id.GetNamespaceIndex()); - QualifiedName qn = ToQualifiedName(browsename, GetBrowseName().NamespaceIndex); - return AddMethod(node, qn, method); - } - - Node Node::AddMethod(const NodeId& nodeid, const QualifiedName& browsename, std::function (NodeId context, std::vector arguments)> method) const - { - AddNodesItem item; - item.BrowseName = browsename; - item.ParentNodeId = this->Id; - item.RequestedNewNodeId = nodeid; - item.Class = NodeClass::Method; - item.ReferenceTypeId = ReferenceId::HasComponent; - //item.TypeDefinition = ObjectId::BaseDataVariableType; - MethodAttributes attr; - attr.DisplayName = LocalizedText(browsename.Name); - attr.Description = LocalizedText(browsename.Name); - attr.WriteMask = 0; - attr.UserWriteMask = 0; - attr.Executable = true; - attr.UserExecutable = true; - item.Attributes = attr; - - std::vector addnodesresults = Server->NodeManagement()->AddNodes(std::vector({item})); - - AddNodesResult res = addnodesresults.front(); //This should always work - CheckStatusCode(res.Status); - Server->Method()->SetMethod(res.AddedNodeId, method); - - return Node(Server, res.AddedNodeId); - } - - - - Variant Node::GetValue() const - { - return (GetAttribute(AttributeId::Value)).Value; - } - - DataValue Node::GetDataValue() const - { - return GetAttribute(AttributeId::Value); - } - - Variant Node::GetDataType() const - { - return (GetAttribute(AttributeId::DataType)).Value; - } + + BrowsePath bpath; + bpath.Path.Elements = rpath; + bpath.StartingNode = Id; + std::vector bpaths; + bpaths.push_back(bpath); + TranslateBrowsePathsParameters params; + params.BrowsePaths = bpaths; + + std::vector result = Server->Views()->TranslateBrowsePathsToNodeIds(params); + CheckStatusCode(result.front().Status); + + NodeId node = result.front().Targets.front().Node ; + return Node(Server, node); +} + +std::string Node::ToString() const +{ + std::ostringstream os; + os << "Node(" << Id << ")"; + return os.str(); +} + +Node Node::AddFolder(const std::string & nodeid, const std::string & browsename) const +{ + NodeId node = ToNodeId(nodeid, this->Id.GetNamespaceIndex()); + QualifiedName qn = ToQualifiedName(browsename, GetBrowseName().NamespaceIndex); + return AddFolder(node, qn); +} + +Node Node::AddFolder(uint32_t namespaceIdx, const std::string & name) const +{ + NodeId nodeid = NumericNodeId(0, namespaceIdx); + QualifiedName qn = ToQualifiedName(name, namespaceIdx); + return AddFolder(nodeid, qn); +} + +Node Node::AddFolder(const NodeId & nodeid, const QualifiedName & browsename) const +{ + + AddNodesItem item; + item.BrowseName = browsename; + item.ParentNodeId = this->Id; + item.RequestedNewNodeId = nodeid; + item.Class = NodeClass::Object; + item.ReferenceTypeId = ReferenceId::Organizes; + item.TypeDefinition = ObjectId::FolderType; + ObjectAttributes attr; + attr.DisplayName = LocalizedText(browsename.Name); + attr.Description = LocalizedText(browsename.Name); + attr.WriteMask = 0; + attr.UserWriteMask = 0; + attr.EventNotifier = 0; + item.Attributes = attr; + + std::vector addnodesresults = Server->NodeManagement()->AddNodes(std::vector({item})); + AddNodesResult res = addnodesresults.front(); //This should always work + CheckStatusCode(res.Status); + + return Node(Server, res.AddedNodeId); +} + +Node Node::AddObject(const std::string & nodeid, const std::string & browsename) const +{ + NodeId node = ToNodeId(nodeid, this->Id.GetNamespaceIndex()); + QualifiedName qn = ToQualifiedName(browsename, GetBrowseName().NamespaceIndex); + return AddObject(node, qn); +} + +Node Node::AddObject(uint32_t namespaceIdx, const std::string & name) const +{ + //FIXME: should default namespace be the onde from the parent of the browsename? + NodeId nodeid = NumericNodeId(0, namespaceIdx); + QualifiedName qn = ToQualifiedName(name, namespaceIdx); + return AddObject(nodeid, qn); +} + +Node Node::AddObject(const NodeId & nodeid, const QualifiedName & browsename) const +{ + AddNodesItem item; + item.BrowseName = browsename; + item.ParentNodeId = this->Id; + item.RequestedNewNodeId = nodeid; + item.Class = NodeClass::Object; + item.ReferenceTypeId = ReferenceId::HasComponent; + item.TypeDefinition = ObjectId::BaseObjectType; + ObjectAttributes attr; + attr.DisplayName = LocalizedText(browsename.Name); + attr.Description = LocalizedText(browsename.Name); + attr.WriteMask = 0; + attr.UserWriteMask = 0; + attr.EventNotifier = 0; + item.Attributes = attr; + + std::vector addnodesresults = Server->NodeManagement()->AddNodes(std::vector({item})); + + AddNodesResult res = addnodesresults.front(); //This should always work + CheckStatusCode(res.Status); + + return Node(Server, res.AddedNodeId); +} + +Node Node::AddVariable(uint32_t namespaceIdx, const std::string & name, const Variant & val) const +{ + NodeId nodeid = NumericNodeId(0, namespaceIdx); + QualifiedName qn = ToQualifiedName(name, namespaceIdx); + return AddVariable(nodeid, qn, val); +} + +Node Node::AddVariable(const std::string & nodeid, const std::string & browsename, const Variant & val) const +{ + NodeId node = ToNodeId(nodeid, this->Id.GetNamespaceIndex()); + QualifiedName qn = ToQualifiedName(browsename, GetBrowseName().NamespaceIndex); + return AddVariable(node, qn, val); +} + +Node Node::AddVariable(const NodeId & nodeid, const QualifiedName & browsename, const Variant & val) const +{ + ObjectId datatype = VariantTypeToDataType(val.Type()); + + AddNodesItem item; + item.BrowseName = browsename; + item.ParentNodeId = this->Id; + item.RequestedNewNodeId = nodeid; + item.Class = NodeClass::Variable; + item.ReferenceTypeId = ReferenceId::HasComponent; + item.TypeDefinition = ObjectId::BaseDataVariableType; + VariableAttributes attr; + attr.DisplayName = LocalizedText(browsename.Name); + attr.Description = LocalizedText(browsename.Name); + attr.WriteMask = (uint32_t)OpenFileMode::Read; + attr.UserWriteMask = (uint32_t)OpenFileMode::Read; + attr.Value = val; + attr.Type = datatype; + attr.Rank = -1; + attr.Dimensions = val.Dimensions; + attr.AccessLevel = VariableAccessLevel::CurrentRead; + attr.UserAccessLevel = VariableAccessLevel::CurrentRead; + attr.MinimumSamplingInterval = 1; + attr.Historizing = 0; + item.Attributes = attr; + + std::vector addnodesresults = Server->NodeManagement()->AddNodes(std::vector({item})); + + AddNodesResult res = addnodesresults.front(); //This should always work + CheckStatusCode(res.Status); + + return Node(Server, res.AddedNodeId); +} + + +Node Node::AddProperty(uint32_t namespaceIdx, const std::string & name, const Variant & val) const +{ + NodeId nodeid = NumericNodeId(0, namespaceIdx); + const QualifiedName & qname = ToQualifiedName(name, namespaceIdx); + return AddProperty(nodeid, qname, val); +} + +Node Node::AddProperty(const std::string & nodeid, const std::string & browsename, const Variant & val) const +{ + NodeId node = ToNodeId(nodeid, this->Id.GetNamespaceIndex()); + QualifiedName qn = ToQualifiedName(browsename, GetBrowseName().NamespaceIndex); + return AddProperty(node, qn, val); +} + +Node Node::AddProperty(const NodeId & nodeid, const QualifiedName & browsename, const Variant & val) const +{ + + ObjectId datatype = VariantTypeToDataType(val.Type()); + + AddNodesItem item; + item.BrowseName = browsename; + item.ParentNodeId = this->Id; + item.RequestedNewNodeId = nodeid; + item.Class = NodeClass::Variable; + item.ReferenceTypeId = ReferenceId::HasProperty; + item.TypeDefinition = ObjectId::PropertyType; + VariableAttributes attr; + attr.DisplayName = LocalizedText(browsename.Name); + attr.Description = LocalizedText(browsename.Name); + attr.WriteMask = 0; + attr.UserWriteMask = 0; + attr.Value = val; + attr.Type = datatype; + attr.Rank = 0; + attr.Dimensions = val.Dimensions; + attr.AccessLevel = VariableAccessLevel::CurrentRead; + attr.UserAccessLevel = VariableAccessLevel::CurrentRead; + attr.MinimumSamplingInterval = 0; + attr.Historizing = 0; + item.Attributes = attr; + + std::vector addnodesresults = Server->NodeManagement()->AddNodes(std::vector({item})); + + AddNodesResult res = addnodesresults.front(); //This should always work + CheckStatusCode(res.Status); + + return Node(Server, res.AddedNodeId); + +} + +Node Node::AddMethod(uint32_t namespaceIdx, const std::string & name, std::function (NodeId context, std::vector arguments)> method) const +{ + NodeId nodeid = NumericNodeId(0, namespaceIdx); + QualifiedName qn = ToQualifiedName(name, namespaceIdx); + return AddMethod(nodeid, qn, method); +} + +Node Node::AddMethod(const std::string & nodeid, const std::string & browsename, std::function (NodeId context, std::vector arguments)> method) const +{ + NodeId node = ToNodeId(nodeid, this->Id.GetNamespaceIndex()); + QualifiedName qn = ToQualifiedName(browsename, GetBrowseName().NamespaceIndex); + return AddMethod(node, qn, method); +} + +Node Node::AddMethod(const NodeId & nodeid, const QualifiedName & browsename, std::function (NodeId context, std::vector arguments)> method) const +{ + AddNodesItem item; + item.BrowseName = browsename; + item.ParentNodeId = this->Id; + item.RequestedNewNodeId = nodeid; + item.Class = NodeClass::Method; + item.ReferenceTypeId = ReferenceId::HasComponent; + //item.TypeDefinition = ObjectId::BaseDataVariableType; + MethodAttributes attr; + attr.DisplayName = LocalizedText(browsename.Name); + attr.Description = LocalizedText(browsename.Name); + attr.WriteMask = 0; + attr.UserWriteMask = 0; + attr.Executable = true; + attr.UserExecutable = true; + item.Attributes = attr; + + std::vector addnodesresults = Server->NodeManagement()->AddNodes(std::vector({item})); + + AddNodesResult res = addnodesresults.front(); //This should always work + CheckStatusCode(res.Status); + Server->Method()->SetMethod(res.AddedNodeId, method); + + return Node(Server, res.AddedNodeId); +} + + + +Variant Node::GetValue() const +{ + return (GetAttribute(AttributeId::Value)).Value; +} + +DataValue Node::GetDataValue() const +{ + return GetAttribute(AttributeId::Value); +} + +Variant Node::GetDataType() const +{ + return (GetAttribute(AttributeId::DataType)).Value; +} } // namespace OpcUa -std::ostream& OpcUa::operator<<(std::ostream& os, const Node& node) +std::ostream & OpcUa::operator<<(std::ostream & os, const Node & node) { os << node.ToString(); return os; diff --git a/src/core/opcua_errors.cpp b/src/core/opcua_errors.cpp index d84de020..f417e4de 100644 --- a/src/core/opcua_errors.cpp +++ b/src/core/opcua_errors.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// diff --git a/src/core/server_operations.cpp b/src/core/server_operations.cpp index 3fd022aa..4973e437 100644 --- a/src/core/server_operations.cpp +++ b/src/core/server_operations.cpp @@ -1,60 +1,70 @@ #include "opc/ua/server_operations.h" -namespace OpcUa { - ServerOperations::ServerOperations(Services::SharedPtr Server) : Server(Server) - { - } - - void ServerOperations::WriteAttributes(std::vector& updates) - { - std::vector codes = Server->Attributes()->Write(updates); - CheckStatusCode(codes.front()); - } - - std::vector ServerOperations::ReadAttributes(std::vector& attributes) - { - ReadParameters params; - params.AttributesToRead = attributes; - auto vec = Server->Attributes()->Read(params); - return vec; - } - - std::vector ServerOperations::ReadAttributes(std::vector& nodes, AttributeId attr) - { - std::vector request; - for (auto& n : nodes) { - ReadValueId r; - r.NodeId = n.GetId(); - r.AttributeId = attr; - request.push_back(r); - } - return ReadAttributes(request); - } - - std::vector ServerOperations::RegisterNodes(std::vector& nodes) - { - std::vector ids; - for (auto& node : nodes) { - ids.push_back(node.GetId()); - } - auto result = Server->Views()->RegisterNodes(ids); - auto rit = result.begin(); - std::vector out; - for (auto nit = nodes.begin(); nit != nodes.end() && rit != result.end(); ++nit, ++rit) - { - out.push_back(Node(nit->GetServices(), *rit)); - } - - return out; - } - - void ServerOperations::UnregisterNodes(std::vector& nodes) - { - std::vector ids; - for (auto& node : nodes) { - ids.push_back(node.GetId()); - } - - Server->Views()->UnregisterNodes(ids); - } +namespace OpcUa +{ +ServerOperations::ServerOperations(Services::SharedPtr Server) : Server(Server) +{ +} + +void ServerOperations::WriteAttributes(std::vector & updates) +{ + std::vector codes = Server->Attributes()->Write(updates); + CheckStatusCode(codes.front()); +} + +std::vector ServerOperations::ReadAttributes(std::vector & attributes) +{ + ReadParameters params; + params.AttributesToRead = attributes; + auto vec = Server->Attributes()->Read(params); + return vec; +} + +std::vector ServerOperations::ReadAttributes(std::vector & nodes, AttributeId attr) +{ + std::vector request; + + for (auto & n : nodes) + { + ReadValueId r; + r.NodeId = n.GetId(); + r.AttributeId = attr; + request.push_back(r); + } + + return ReadAttributes(request); +} + +std::vector ServerOperations::RegisterNodes(std::vector & nodes) +{ + std::vector ids; + + for (auto & node : nodes) + { + ids.push_back(node.GetId()); + } + + auto result = Server->Views()->RegisterNodes(ids); + auto rit = result.begin(); + std::vector out; + + for (auto nit = nodes.begin(); nit != nodes.end() && rit != result.end(); ++nit, ++rit) + { + out.push_back(Node(nit->GetServices(), *rit)); + } + + return out; +} + +void ServerOperations::UnregisterNodes(std::vector & nodes) +{ + std::vector ids; + + for (auto & node : nodes) + { + ids.push_back(node.GetId()); + } + + Server->Views()->UnregisterNodes(ids); +} } diff --git a/src/core/socket_channel.cpp b/src/core/socket_channel.cpp index c21903ff..0294f94e 100644 --- a/src/core/socket_channel.cpp +++ b/src/core/socket_channel.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -36,10 +36,11 @@ OpcUa::SocketChannel::SocketChannel(int sock) { int flag = 1; setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, sizeof(int)); + if (Socket < 0) - { - THROW_ERROR(CannotCreateChannelOnInvalidSocket); - } + { + THROW_ERROR(CannotCreateChannelOnInvalidSocket); + } } OpcUa::SocketChannel::~SocketChannel() @@ -50,31 +51,36 @@ OpcUa::SocketChannel::~SocketChannel() void OpcUa::SocketChannel::Stop() { int error = shutdown(Socket, 2); + if (error < 0) - { - std::cerr << "Failed to close socket connection. " << strerror(errno) << std::endl; - } + { + std::cerr << "Failed to close socket connection. " << strerror(errno) << std::endl; + } } -std::size_t OpcUa::SocketChannel::Receive(char* data, std::size_t size) +std::size_t OpcUa::SocketChannel::Receive(char * data, std::size_t size) { int received = recv(Socket, data, size, MSG_WAITALL); + if (received < 0) - { - THROW_OS_ERROR("Failed to receive data from host."); - } + { + THROW_OS_ERROR("Failed to receive data from host."); + } + if (received == 0) - { - THROW_OS_ERROR("Connection was closed by host."); - } + { + THROW_OS_ERROR("Connection was closed by host."); + } + return (std::size_t)size; } -void OpcUa::SocketChannel::Send(const char* message, std::size_t size) +void OpcUa::SocketChannel::Send(const char * message, std::size_t size) { int sent = send(Socket, message, size, 0); + if (sent != (int)size) - { - THROW_OS_ERROR("unable to send data to the host. "); - } + { + THROW_OS_ERROR("unable to send data to the host. "); + } } diff --git a/src/core/subscription.cpp b/src/core/subscription.cpp index 24b88015..faa836c2 100644 --- a/src/core/subscription.cpp +++ b/src/core/subscription.cpp @@ -26,206 +26,239 @@ namespace OpcUa { - Subscription::Subscription(Services::SharedPtr server, const CreateSubscriptionParameters& params, SubscriptionHandler& callback, bool debug) - : Server(server), Client(callback), Debug(debug) - { - CreateSubscriptionRequest request; - request.Parameters = params; - Services::SharedPtr serverptr = Server; - Data = Server->Subscriptions()->CreateSubscription(request, [this, serverptr](PublishResult i){ this->PublishCallback(serverptr, i); } ); - //After creating the subscription, it is expected to send at least one publish request - Server->Subscriptions()->Publish(PublishRequest()); - Server->Subscriptions()->Publish(PublishRequest()); - } - - void Subscription::Delete() - { - std::vector results = Server->Subscriptions()->DeleteSubscriptions(std::vector{Data.SubscriptionId}); - for (auto res: results) +Subscription::Subscription(Services::SharedPtr server, const CreateSubscriptionParameters & params, SubscriptionHandler & callback, bool debug) + : Server(server), Client(callback), Debug(debug) +{ + CreateSubscriptionRequest request; + request.Parameters = params; + Services::SharedPtr serverptr = Server; + Data = Server->Subscriptions()->CreateSubscription(request, [this, serverptr](PublishResult i) { this->PublishCallback(serverptr, i); }); + //After creating the subscription, it is expected to send at least one publish request + Server->Subscriptions()->Publish(PublishRequest()); + Server->Subscriptions()->Publish(PublishRequest()); +} + +void Subscription::Delete() +{ + std::vector results = Server->Subscriptions()->DeleteSubscriptions(std::vector {Data.SubscriptionId}); + + for (auto res : results) { CheckStatusCode(res); } - } +} + +void Subscription::PublishCallback(Services::SharedPtr server, const PublishResult result) +{ - void Subscription::PublishCallback(Services::SharedPtr server, const PublishResult result) - { + if (Debug) { std::cout << "Subscription | Suscription::PublishCallback called with " << result.NotificationMessage.NotificationData.size() << " notifications " << std::endl; } - if (Debug){ std::cout << "Subscription | Suscription::PublishCallback called with " <Subscriptions()->Publish(request); - } - - void Subscription::CallDataChangeCallback(const NotificationData& data) - { - for ( const MonitoredItems& item: data.DataChange.Notification) + + OpcUa::SubscriptionAcknowledgement ack; + ack.SubscriptionId = GetId(); + ack.SequenceNumber = result.NotificationMessage.SequenceNumber; + PublishRequest request; + request.SubscriptionAcknowledgements.push_back(ack); + server->Subscriptions()->Publish(request); +} + +void Subscription::CallDataChangeCallback(const NotificationData & data) +{ + for (const MonitoredItems & item : data.DataChange.Notification) { std::unique_lock lock(Mutex); //could used boost::shared_lock to improve perf AttValMap::iterator mapit = AttributeValueMap.find(item.ClientHandle); - if ( mapit == AttributeValueMap.end() ) - { - std::cout << "Subscription | Server Error got publishresult for an unknown monitoreditem id : "<< item.ClientHandle << std::endl; - } + + if (mapit == AttributeValueMap.end()) + { + std::cout << "Subscription | Server Error got publishresult for an unknown monitoreditem id : " << item.ClientHandle << std::endl; + } + else - { - AttributeId attr = mapit->second.Attribute; - Node node = mapit->second.TargetNode; - lock.unlock(); //unlock before calling client cades, you never know what they may do - if (Debug) { std::cout << "Subscription | Debug: Calling DataChange user callback " << item.ClientHandle << " and node: " << mapit->second.TargetNode << std::endl; } - Client.DataValueChange(mapit->second.MonitoredItemId, node, item.Value, attr); - Client.DataChange(mapit->second.MonitoredItemId, node, item.Value.Value, attr); - } + { + AttributeId attr = mapit->second.Attribute; + Node node = mapit->second.TargetNode; + lock.unlock(); //unlock before calling client cades, you never know what they may do + + if (Debug) { std::cout << "Subscription | Debug: Calling DataChange user callback " << item.ClientHandle << " and node: " << mapit->second.TargetNode << std::endl; } + + Client.DataValueChange(mapit->second.MonitoredItemId, node, item.Value, attr); + Client.DataChange(mapit->second.MonitoredItemId, node, item.Value.Value, attr); + } } - } +} - void Subscription::CallStatusChangeCallback(const NotificationData& data) - { - Client.StatusChange(data.StatusChange.Status); - } +void Subscription::CallStatusChangeCallback(const NotificationData & data) +{ + Client.StatusChange(data.StatusChange.Status); +} - void Subscription::CallEventCallback(const NotificationData& data) - { - for ( EventFieldList ef : data.Events.Events) +void Subscription::CallEventCallback(const NotificationData & data) +{ + for (EventFieldList ef : data.Events.Events) { std::unique_lock lock(Mutex); //could used boost::shared_lock to improve perf AttValMap::iterator mapit = AttributeValueMap.find(ef.ClientHandle); - if ( mapit == AttributeValueMap.end() ) - { - std::cout << "Subscription | Server Error got publishresult for an unknown monitoreditem id : "<< ef.ClientHandle << std::endl; - } - else - { - Event ev; - uint32_t count = 0; - if ( mapit->second.Filter.Event.SelectClauses.size() != ef.EventFields.size() ) + + if (mapit == AttributeValueMap.end()) { - throw std::runtime_error("Subscription | Error receive event format does not match requested filter"); + std::cout << "Subscription | Server Error got publishresult for an unknown monitoreditem id : " << ef.ClientHandle << std::endl; } - for (SimpleAttributeOperand op : mapit->second.Filter.Event.SelectClauses ) + + else { - //set the default fiedls of events into their event attributes - if ( op.BrowsePath.size() == 1 ) - { - if ( op.BrowsePath[0] == QualifiedName("EventId", 0) ) - { - ev.EventId = ef.EventFields[count].As(); - } - else if ( op.BrowsePath[0] == QualifiedName("EventType", 0) ) - { - ev.EventType = ef.EventFields[count].As(); - } - else if ( op.BrowsePath[0] == QualifiedName("SourceNode", 0) ) - { - ev.SourceNode = ef.EventFields[count].As(); - } - else if ( op.BrowsePath[0] == QualifiedName("SourceName", 0) ) - { - ev.SourceName = ef.EventFields[count].As(); - } - else if ( op.BrowsePath[0] == QualifiedName("Message", 0) ) - { - ev.Message = ef.EventFields[count].As(); - } - else if ( op.BrowsePath[0] == QualifiedName("Severity", 0) ) - { - ev.Severity = ef.EventFields[count].As(); - } - else if ( op.BrowsePath[0] == QualifiedName("LocalTime", 0) ) - { - ev.LocalTime = ef.EventFields[count].As(); - } - else if ( op.BrowsePath[0] == QualifiedName("ReceiveTime", 0) ) + Event ev; + uint32_t count = 0; + + if (mapit->second.Filter.Event.SelectClauses.size() != ef.EventFields.size()) { - ev.ReceiveTime = ef.EventFields[count].As(); + throw std::runtime_error("Subscription | Error receive event format does not match requested filter"); } - else if ( op.BrowsePath[0] == QualifiedName("Time", 0) ) + + for (SimpleAttributeOperand op : mapit->second.Filter.Event.SelectClauses) { - ev.Time = ef.EventFields[count].As(); + //set the default fiedls of events into their event attributes + if (op.BrowsePath.size() == 1) + { + if (op.BrowsePath[0] == QualifiedName("EventId", 0)) + { + ev.EventId = ef.EventFields[count].As(); + } + + else if (op.BrowsePath[0] == QualifiedName("EventType", 0)) + { + ev.EventType = ef.EventFields[count].As(); + } + + else if (op.BrowsePath[0] == QualifiedName("SourceNode", 0)) + { + ev.SourceNode = ef.EventFields[count].As(); + } + + else if (op.BrowsePath[0] == QualifiedName("SourceName", 0)) + { + ev.SourceName = ef.EventFields[count].As(); + } + + else if (op.BrowsePath[0] == QualifiedName("Message", 0)) + { + ev.Message = ef.EventFields[count].As(); + } + + else if (op.BrowsePath[0] == QualifiedName("Severity", 0)) + { + ev.Severity = ef.EventFields[count].As(); + } + + else if (op.BrowsePath[0] == QualifiedName("LocalTime", 0)) + { + ev.LocalTime = ef.EventFields[count].As(); + } + + else if (op.BrowsePath[0] == QualifiedName("ReceiveTime", 0)) + { + ev.ReceiveTime = ef.EventFields[count].As(); + } + + else if (op.BrowsePath[0] == QualifiedName("Time", 0)) + { + ev.Time = ef.EventFields[count].As(); + } + } + + //Add anyway all fields as value + ev.SetValue(op.BrowsePath, ef.EventFields[count]); + ++count; } - } - //Add anyway all fields as value - ev.SetValue(op.BrowsePath, ef.EventFields[count]); - ++count; + + lock.unlock(); + + if (Debug) { std::cout << "Subscription | Debug: Calling client event callback\n"; } + + Client.Event(mapit->second.MonitoredItemId, ev); + + if (Debug) { std::cout << "Subscription | Debug: callback call finished\n"; } } - lock.unlock(); - if (Debug) { std::cout << "Subscription | Debug: Calling client event callback\n"; } - Client.Event(mapit->second.MonitoredItemId, ev); - if (Debug) { std::cout << "Subscription | Debug: callback call finished\n"; } - } } - } - - RepublishResponse Subscription::Republish(uint32_t sequenceNumber) - { - RepublishParameters params; - params.SubscriptionId = Data.SubscriptionId; - params.RetransmitSequenceNumber = sequenceNumber; - RepublishResponse response = Server->Subscriptions()->Republish(params); - return response; - } - - uint32_t Subscription::SubscribeDataChange(const Node& node, AttributeId attr) - { - ReadValueId avid; - avid.NodeId = node.GetId(); - avid.AttributeId = attr; - //avid.IndexRange //We leave it null, then the entire array is returned - std::vector results = SubscribeDataChange(std::vector({avid})); - if (results.size() != 1) { throw std::runtime_error("Subscription | Server error, SubscribeDataChange should have returned exactly one result"); } - return results.front(); - } - - std::vector Subscription::Subscribe(std::vector request) - { - std::unique_lock lock(Mutex); - - MonitoredItemsParameters itemsParams; - itemsParams.SubscriptionId = Data.SubscriptionId; - itemsParams.TimestampsToReturn = TimestampsToReturn(2); // Don't know for better - for (auto req : request) +} + +RepublishResponse Subscription::Republish(uint32_t sequenceNumber) +{ + RepublishParameters params; + params.SubscriptionId = Data.SubscriptionId; + params.RetransmitSequenceNumber = sequenceNumber; + RepublishResponse response = Server->Subscriptions()->Republish(params); + return response; +} + +uint32_t Subscription::SubscribeDataChange(const Node & node, AttributeId attr) +{ + ReadValueId avid; + avid.NodeId = node.GetId(); + avid.AttributeId = attr; + //avid.IndexRange //We leave it null, then the entire array is returned + std::vector results = SubscribeDataChange(std::vector({avid})); + + if (results.size() != 1) { throw std::runtime_error("Subscription | Server error, SubscribeDataChange should have returned exactly one result"); } + + return results.front(); +} + +std::vector Subscription::Subscribe(std::vector request) +{ + std::unique_lock lock(Mutex); + + MonitoredItemsParameters itemsParams; + itemsParams.SubscriptionId = Data.SubscriptionId; + itemsParams.TimestampsToReturn = TimestampsToReturn(2); // Don't know for better + + for (auto req : request) { itemsParams.ItemsToCreate.push_back(req); } - return Server->Subscriptions()->CreateMonitoredItems(itemsParams); - } - - std::vector Subscription::SubscribeDataChange(const std::vector& attributes) - { - std::unique_lock lock(Mutex); + return Server->Subscriptions()->CreateMonitoredItems(itemsParams); +} - MonitoredItemsParameters itemsParams; - itemsParams.SubscriptionId = Data.SubscriptionId; - itemsParams.TimestampsToReturn = TimestampsToReturn(2); // Don't know for better +std::vector Subscription::SubscribeDataChange(const std::vector & attributes) +{ + std::unique_lock lock(Mutex); - for (ReadValueId attr : attributes) + MonitoredItemsParameters itemsParams; + itemsParams.SubscriptionId = Data.SubscriptionId; + itemsParams.TimestampsToReturn = TimestampsToReturn(2); // Don't know for better + + for (ReadValueId attr : attributes) { MonitoredItemCreateRequest req; req.ItemToMonitor = attr; @@ -239,20 +272,23 @@ namespace OpcUa itemsParams.ItemsToCreate.push_back(req); } - std::vector results = Server->Subscriptions()->CreateMonitoredItems(itemsParams); + std::vector results = Server->Subscriptions()->CreateMonitoredItems(itemsParams); - if ( results.size() != attributes.size() ) + if (results.size() != attributes.size()) { - throw(std::runtime_error("Subscription | Error server did not send answer for all monitoreditem requests")); + throw (std::runtime_error("Subscription | Error server did not send answer for all monitoreditem requests")); } - std::vector monitoredItemsIds; - unsigned int i = 0; - for (const auto& res : results) + std::vector monitoredItemsIds; + unsigned int i = 0; + + for (const auto & res : results) { CheckStatusCode(res.Status); - if (Debug ) { std::cout << "Subscription | storing monitoreditem with handle " << itemsParams.ItemsToCreate[i].RequestedParameters.ClientHandle << " and id " << res.MonitoredItemId << std::endl; } - MonitoredItemData mdata; + + if (Debug) { std::cout << "Subscription | storing monitoreditem with handle " << itemsParams.ItemsToCreate[i].RequestedParameters.ClientHandle << " and id " << res.MonitoredItemId << std::endl; } + + MonitoredItemData mdata; mdata.MonitoredItemId = res.MonitoredItemId; mdata.Attribute = attributes[i].AttributeId; mdata.TargetNode = Node(Server, attributes[i].NodeId); @@ -260,118 +296,129 @@ namespace OpcUa monitoredItemsIds.push_back(res.MonitoredItemId); ++i; } - return monitoredItemsIds; - } - - void Subscription::setUsrPtr(uint32_t handle,UserData *usr) - { - AttributeValueMap[handle].usrVar = usr; - } - - UserData * Subscription::getUsrPtr(uint32_t handle) - { - return AttributeValueMap[handle].usrVar; - } - - void Subscription::UnSubscribe(uint32_t handle) - { - return UnSubscribe(std::vector(1, handle)); - } - - void Subscription::UnSubscribe(std::vector handles) - { - std::unique_lock lock(Mutex); - - DeleteMonitoredItemsParameters params; - params.SubscriptionId = Data.SubscriptionId; - std::vector mids; - for (auto id : handles) + + return monitoredItemsIds; +} + +void Subscription::setUsrPtr(uint32_t handle, UserData * usr) +{ + AttributeValueMap[handle].usrVar = usr; +} + +UserData * Subscription::getUsrPtr(uint32_t handle) +{ + return AttributeValueMap[handle].usrVar; +} + +void Subscription::UnSubscribe(uint32_t handle) +{ + return UnSubscribe(std::vector(1, handle)); +} + +void Subscription::UnSubscribe(std::vector handles) +{ + std::unique_lock lock(Mutex); + + DeleteMonitoredItemsParameters params; + params.SubscriptionId = Data.SubscriptionId; + std::vector mids; + + for (auto id : handles) { - if (Debug) std::cout << "Subscription | Sending unsubscribe for monitoreditemsid: " << id << std::endl; + if (Debug) { std::cout << "Subscription | Sending unsubscribe for monitoreditemsid: " << id << std::endl; } + mids.push_back(uint32_t(id)); + //Now trying to remove monitoreditem from our internal cache - for ( auto pair : AttributeValueMap ) - { - if (pair.second.MonitoredItemId == id) + for (auto pair : AttributeValueMap) { - AttributeValueMap.erase(pair.first); - break; //we modified our iterating object, so quit!! + if (pair.second.MonitoredItemId == id) + { + AttributeValueMap.erase(pair.first); + break; //we modified our iterating object, so quit!! + } } - } } - params.MonitoredItemIds = mids; - auto results = Server->Subscriptions()-> DeleteMonitoredItems(params); - for (auto res : results) + + params.MonitoredItemIds = mids; + auto results = Server->Subscriptions()-> DeleteMonitoredItems(params); + + for (auto res : results) { CheckStatusCode(res); } - } - - uint32_t Subscription::SubscribeEvents() - { - return SubscribeEvents(Node(Server, ObjectId::Server), Node(Server, ObjectId::BaseEventType)); - } - - uint32_t Subscription::SubscribeEvents(const Node& node, const Node& eventtype) - { - EventFilter filter; - if (Debug) std::cout << "Subscription | Subscribing events with filter for properties:" << std::endl; - for ( Node& child: eventtype.GetProperties() ) +} + +uint32_t Subscription::SubscribeEvents() +{ + return SubscribeEvents(Node(Server, ObjectId::Server), Node(Server, ObjectId::BaseEventType)); +} + +uint32_t Subscription::SubscribeEvents(const Node & node, const Node & eventtype) +{ + EventFilter filter; + + if (Debug) { std::cout << "Subscription | Subscribing events with filter for properties:" << std::endl; } + + for (Node & child : eventtype.GetProperties()) { - if (Debug) std::cout << " property: "<< child.GetBrowseName() << std::endl; + if (Debug) { std::cout << " property: " << child.GetBrowseName() << std::endl; } + SimpleAttributeOperand op; op.TypeId = eventtype.GetId(); op.Attribute = AttributeId::Value; op.BrowsePath = std::vector({child.GetBrowseName()}); filter.SelectClauses.push_back(op); } - return SubscribeEvents(node, filter); - } - - uint32_t Subscription::SubscribeEvents(const Node& node, const EventFilter& eventfilter) - { - std::unique_lock lock(Mutex); - - MonitoredItemsParameters itemsParams; - itemsParams.SubscriptionId = Data.SubscriptionId; - itemsParams.TimestampsToReturn = TimestampsToReturn(2); // Don't know for better - - ReadValueId avid; - avid.NodeId = node.GetId(); - avid.AttributeId = AttributeId::EventNotifier; - - MonitoredItemCreateRequest req; - req.ItemToMonitor = avid; - req.MonitoringMode = MonitoringMode::Reporting; - MonitoringParameters params; - params.SamplingInterval = Data.RevisedPublishingInterval; - params.QueueSize = std::numeric_limits::max(); - params.DiscardOldest = true; - params.ClientHandle = (uint32_t)++LastMonitoredItemHandle; - - MonitoringFilter filter(eventfilter); - params.Filter = filter; - req.RequestedParameters = params; - itemsParams.ItemsToCreate.push_back(req); - - std::vector results = Server->Subscriptions()->CreateMonitoredItems(itemsParams); - if ( results.size() != 1 ) + + return SubscribeEvents(node, filter); +} + +uint32_t Subscription::SubscribeEvents(const Node & node, const EventFilter & eventfilter) +{ + std::unique_lock lock(Mutex); + + MonitoredItemsParameters itemsParams; + itemsParams.SubscriptionId = Data.SubscriptionId; + itemsParams.TimestampsToReturn = TimestampsToReturn(2); // Don't know for better + + ReadValueId avid; + avid.NodeId = node.GetId(); + avid.AttributeId = AttributeId::EventNotifier; + + MonitoredItemCreateRequest req; + req.ItemToMonitor = avid; + req.MonitoringMode = MonitoringMode::Reporting; + MonitoringParameters params; + params.SamplingInterval = Data.RevisedPublishingInterval; + params.QueueSize = std::numeric_limits::max(); + params.DiscardOldest = true; + params.ClientHandle = (uint32_t)++LastMonitoredItemHandle; + + MonitoringFilter filter(eventfilter); + params.Filter = filter; + req.RequestedParameters = params; + itemsParams.ItemsToCreate.push_back(req); + + std::vector results = Server->Subscriptions()->CreateMonitoredItems(itemsParams); + + if (results.size() != 1) { - throw(std::runtime_error("Subscription | Protocol Error CreateMonitoredItems should return one result")); + throw (std::runtime_error("Subscription | Protocol Error CreateMonitoredItems should return one result")); } - MonitoredItemData mdata; - mdata.TargetNode = Node(Server, avid.NodeId); - mdata.Attribute = avid.AttributeId; - mdata.MonitoredItemId = results[0].MonitoredItemId; - mdata.Filter = results[0].FilterResult; - AttributeValueMap[params.ClientHandle] = mdata; + MonitoredItemData mdata; + mdata.TargetNode = Node(Server, avid.NodeId); + mdata.Attribute = avid.AttributeId; + mdata.MonitoredItemId = results[0].MonitoredItemId; + mdata.Filter = results[0].FilterResult; + AttributeValueMap[params.ClientHandle] = mdata; - MonitoredItemCreateResult res = results[0]; - CheckStatusCode(res.Status); - SimpleAttributeOperandMap[res.MonitoredItemId] = eventfilter; //Not used - return res.MonitoredItemId; - } + MonitoredItemCreateResult res = results[0]; + CheckStatusCode(res.Status); + SimpleAttributeOperandMap[res.MonitoredItemId] = eventfilter; //Not used + return res.MonitoredItemId; +} } diff --git a/src/examples/example_client.cpp b/src/examples/example_client.cpp index 2638c4aa..953bc9c0 100644 --- a/src/examples/example_client.cpp +++ b/src/examples/example_client.cpp @@ -20,98 +20,102 @@ using namespace OpcUa; class SubClient : public SubscriptionHandler { - void DataChange(uint32_t handle, const Node& node, const Variant& val, AttributeId attr) override + void DataChange(uint32_t handle, const Node & node, const Variant & val, AttributeId attr) override { std::cout << "Received DataChange event, value of Node " << node << " is now: " << val.ToString() << std::endl; } }; -int main(int argc, char** argv) +int main(int argc, char ** argv) { try - { - //std::string endpoint = "opc.tcp://192.168.56.101:48030"; - //std::string endpoint = "opc.tcp://user:password@192.168.56.101:48030"; - std::string endpoint = "opc.tcp://127.0.0.1:4840/freeopcua/server/"; - //std::string endpoint = "opc.tcp://localhost:53530/OPCUA/SimulationServer/"; - //std::string endpoint = "opc.tcp://localhost:48010"; - - if (argc > 1) - endpoint = argv[1]; - - std::cout << "Connecting to: " << endpoint << std::endl; - bool debug = false; - OpcUa::UaClient client(debug); - client.Connect(endpoint); - - //get Root node on server - OpcUa::Node root = client.GetRootNode(); - std::cout << "Root node is: " << root << std::endl; - - //get and browse Objects node - std::cout << "Child of objects node are: " << std::endl; - Node objects = client.GetObjectsNode(); - for (OpcUa::Node node : objects.GetChildren()) - std::cout << " " << node << std::endl; - - //get a node from standard namespace using objectId - std::cout << "NamespaceArray is: " << std::endl; - OpcUa::Node nsnode = client.GetNode(ObjectId::Server_NamespaceArray); - OpcUa::Variant ns = nsnode.GetValue(); - - for (std::string d : ns.As>()) - std::cout << " " << d << std::endl; - - OpcUa::Node myvar; - OpcUa::Node myobject; - OpcUa::Node mymethod; - - //Initialize Node myvar: - - //Get namespace index we are interested in - - // From freeOpcUa Server: - uint32_t idx = client.GetNamespaceIndex("http://examples.freeopcua.github.io"); - ////Get Node using path (BrowsePathToNodeId call) - //std::vector varpath({ std::to_string(idx) + ":NewObject", "MyVariable" }); - //myvar = objects.GetChild(varpath); - std::vector methodpath({ std::to_string(idx) + ":NewObject" }); - myobject = objects.GetChild(methodpath); - methodpath = { std::to_string(idx) + ":NewObject", "MyMethod" }; - mymethod = objects.GetChild(methodpath); - std::vector arguments; - arguments.push_back(static_cast(0)); - myobject.CallMethod(mymethod.GetId(), arguments); - - // Example data from Prosys server: - //std::vector varpath({"Objects", "5:Simulation", "5:Random1"}); - //myvar = root.GetChild(varpath); - - // Example from any UA server, standard dynamic variable node: - std::vector varpath{ "Objects", "Server", "ServerStatus", "CurrentTime" }; - myvar = root.GetChild(varpath); - - std::cout << "got node: " << myvar << std::endl; - - //Subscription - SubClient sclt; - std::unique_ptr sub = client.CreateSubscription(100, sclt); - uint32_t handle = sub->SubscribeDataChange(myvar); - std::cout << "Got sub handle: " << handle << ", sleeping 5 seconds" << std::endl; - std::this_thread::sleep_for(std::chrono::seconds(5)); - - std::cout << "Disconnecting" << std::endl; - client.Disconnect(); - return 0; - } - catch (const std::exception& exc) - { - std::cout << exc.what() << std::endl; - } + { + //std::string endpoint = "opc.tcp://192.168.56.101:48030"; + //std::string endpoint = "opc.tcp://user:password@192.168.56.101:48030"; + std::string endpoint = "opc.tcp://127.0.0.1:4840/freeopcua/server/"; + //std::string endpoint = "opc.tcp://localhost:53530/OPCUA/SimulationServer/"; + //std::string endpoint = "opc.tcp://localhost:48010"; + + if (argc > 1) + { endpoint = argv[1]; } + + std::cout << "Connecting to: " << endpoint << std::endl; + bool debug = false; + OpcUa::UaClient client(debug); + client.Connect(endpoint); + + //get Root node on server + OpcUa::Node root = client.GetRootNode(); + std::cout << "Root node is: " << root << std::endl; + + //get and browse Objects node + std::cout << "Child of objects node are: " << std::endl; + Node objects = client.GetObjectsNode(); + + for (OpcUa::Node node : objects.GetChildren()) + { std::cout << " " << node << std::endl; } + + //get a node from standard namespace using objectId + std::cout << "NamespaceArray is: " << std::endl; + OpcUa::Node nsnode = client.GetNode(ObjectId::Server_NamespaceArray); + OpcUa::Variant ns = nsnode.GetValue(); + + for (std::string d : ns.As>()) + { std::cout << " " << d << std::endl; } + + OpcUa::Node myvar; + OpcUa::Node myobject; + OpcUa::Node mymethod; + + //Initialize Node myvar: + + //Get namespace index we are interested in + + // From freeOpcUa Server: + uint32_t idx = client.GetNamespaceIndex("http://examples.freeopcua.github.io"); + ////Get Node using path (BrowsePathToNodeId call) + //std::vector varpath({ std::to_string(idx) + ":NewObject", "MyVariable" }); + //myvar = objects.GetChild(varpath); + std::vector methodpath({ std::to_string(idx) + ":NewObject" }); + myobject = objects.GetChild(methodpath); + methodpath = { std::to_string(idx) + ":NewObject", "MyMethod" }; + mymethod = objects.GetChild(methodpath); + std::vector arguments; + arguments.push_back(static_cast(0)); + myobject.CallMethod(mymethod.GetId(), arguments); + + // Example data from Prosys server: + //std::vector varpath({"Objects", "5:Simulation", "5:Random1"}); + //myvar = root.GetChild(varpath); + + // Example from any UA server, standard dynamic variable node: + std::vector varpath{ "Objects", "Server", "ServerStatus", "CurrentTime" }; + myvar = root.GetChild(varpath); + + std::cout << "got node: " << myvar << std::endl; + + //Subscription + SubClient sclt; + std::unique_ptr sub = client.CreateSubscription(100, sclt); + uint32_t handle = sub->SubscribeDataChange(myvar); + std::cout << "Got sub handle: " << handle << ", sleeping 5 seconds" << std::endl; + std::this_thread::sleep_for(std::chrono::seconds(5)); + + std::cout << "Disconnecting" << std::endl; + client.Disconnect(); + return 0; + } + + catch (const std::exception & exc) + { + std::cout << exc.what() << std::endl; + } + catch (...) - { - std::cout << "Unknown error." << std::endl; - } + { + std::cout << "Unknown error." << std::endl; + } + return -1; } diff --git a/src/examples/example_server.cpp b/src/examples/example_server.cpp index 54129e7a..b9305f7c 100644 --- a/src/examples/example_server.cpp +++ b/src/examples/example_server.cpp @@ -9,8 +9,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -23,7 +23,7 @@ using namespace OpcUa; class SubClient : public SubscriptionHandler { - void DataChange(uint32_t handle, const Node& node, const Variant& val, AttributeId attr) override + void DataChange(uint32_t handle, const Node & node, const Variant & val, AttributeId attr) override { std::cout << "Received DataChange event for Node " << node << std::endl; } @@ -45,13 +45,13 @@ void RunServer() server.SetEndpoint("opc.tcp://localhost:4840/freeopcua/server"); server.SetServerURI("urn://exampleserver.freeopcua.github.io"); server.Start(); - + //then register our server namespace and get its index in server uint32_t idx = server.RegisterNamespace("http://examples.freeopcua.github.io"); - + //Create our address space using different methods Node objects = server.GetObjectsNode(); - + //Add a custom object with specific nodeid NodeId nid(99, idx); QualifiedName qn("NewObject", idx); @@ -66,10 +66,11 @@ void RunServer() Node root = server.GetRootNode(); std::cout << "Root node is: " << root << std::endl; std::cout << "Childs are: " << std::endl; + for (Node node : root.GetChildren()) - { - std::cout << " " << node << std::endl; - } + { + std::cout << " " << node << std::endl; + } //Uncomment following to subscribe to datachange events inside server @@ -95,29 +96,32 @@ void RunServer() std::cout << "Ctrl-C to exit" << std::endl; + for (;;) - { - myvar.SetValue(Variant(++counter)); //will change value and trigger datachange event - std::stringstream ss; - ss << "This is event number: " << counter; - ev.Message = LocalizedText(ss.str()); - server.TriggerEvent(ev); - std::this_thread::sleep_for(std::chrono::milliseconds(5000)); - } + { + myvar.SetValue(Variant(++counter)); //will change value and trigger datachange event + std::stringstream ss; + ss << "This is event number: " << counter; + ev.Message = LocalizedText(ss.str()); + server.TriggerEvent(ev); + std::this_thread::sleep_for(std::chrono::milliseconds(5000)); + } server.Stop(); } -int main(int argc, char** argv) +int main(int argc, char ** argv) { try - { - RunServer(); - } - catch (const std::exception& exc) - { - std::cout << exc.what() << std::endl; - } + { + RunServer(); + } + + catch (const std::exception & exc) + { + std::cout << exc.what() << std::endl; + } + return 0; } diff --git a/src/protocol/binary_attribute.cpp b/src/protocol/binary_attribute.cpp index ff8d07fd..4af622e6 100644 --- a/src/protocol/binary_attribute.cpp +++ b/src/protocol/binary_attribute.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -23,31 +23,31 @@ namespace OpcUa { - namespace Binary - { +namespace Binary +{ - template<> - std::size_t RawSize(const AttributeId&) - { - return 4; - } +template<> +std::size_t RawSize(const AttributeId &) +{ + return 4; +} - template<> - void DataSerializer::Serialize(const AttributeId& attr) - { - *this << static_cast(attr); - } +template<> +void DataSerializer::Serialize(const AttributeId & attr) +{ + *this << static_cast(attr); +} - template<> - void DataDeserializer::Deserialize(AttributeId& t) - { - uint32_t tmp = 0; - *this >> tmp; - t = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(AttributeId & t) +{ + uint32_t tmp = 0; + *this >> tmp; + t = static_cast(tmp); +} - } // namespace Binary +} // namespace Binary } // namespace OpcUa diff --git a/src/protocol/binary_data_value.cpp b/src/protocol/binary_data_value.cpp index 83e30f73..b44cee0c 100644 --- a/src/protocol/binary_data_value.cpp +++ b/src/protocol/binary_data_value.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -23,99 +23,118 @@ namespace OpcUa { - namespace Binary - { - - template<> - std::size_t RawSize(const DataValue& val) - { - std::size_t size = RawSize(val.Encoding); - if (val.Encoding & DATA_VALUE) - { - size += RawSize(val.Value); - } - if (val.Encoding & DATA_VALUE_STATUS_CODE) - { - size += RawSize(val.Status); - } - if (val.Encoding & DATA_VALUE_SOURCE_TIMESTAMP) - { - size += RawSize(val.SourceTimestamp); - } - if (val.Encoding & DATA_VALUE_Server_TIMESTAMP) - { - size += RawSize(val.ServerTimestamp); - } - if (val.Encoding & DATA_VALUE_SOURCE_PICOSECONDS) - { - size += RawSize(val.SourcePicoseconds); - } - if (val.Encoding & DATA_VALUE_Server_PICOSECONDS) - { - size += RawSize(val.ServerPicoseconds); - } - return size; - } - - template<> - void DataSerializer::Serialize(const DataValue& val) - { - *this << val.Encoding; - if (val.Encoding & DATA_VALUE) - { - *this << val.Value; - } - if (val.Encoding & DATA_VALUE_STATUS_CODE) - { - *this << val.Status; - } - if (val.Encoding & DATA_VALUE_SOURCE_TIMESTAMP) - { - *this << val.SourceTimestamp; - } - if (val.Encoding & DATA_VALUE_SOURCE_PICOSECONDS) - { - *this << val.SourcePicoseconds; - } - if (val.Encoding & DATA_VALUE_Server_TIMESTAMP) - { - *this << val.ServerTimestamp; - } - if (val.Encoding & DATA_VALUE_Server_PICOSECONDS) - { - *this << val.ServerPicoseconds; - } - } - - template<> - void DataDeserializer::Deserialize(DataValue& val) - { - *this >> val.Encoding; - if (val.Encoding & DATA_VALUE) - { - *this >> val.Value; - } - if (val.Encoding & DATA_VALUE_STATUS_CODE) - { - *this >> val.Status; - } - if (val.Encoding & DATA_VALUE_SOURCE_TIMESTAMP) - { - *this >> val.SourceTimestamp; - } - if (val.Encoding & DATA_VALUE_SOURCE_PICOSECONDS) - { - *this >> val.SourcePicoseconds; - } - if (val.Encoding & DATA_VALUE_Server_TIMESTAMP) - { - *this >> val.ServerTimestamp; - } - if (val.Encoding & DATA_VALUE_Server_PICOSECONDS) - { - *this >> val.ServerPicoseconds; - } - } - } // namespace Binary +namespace Binary +{ + +template<> +std::size_t RawSize(const DataValue & val) +{ + std::size_t size = RawSize(val.Encoding); + + if (val.Encoding & DATA_VALUE) + { + size += RawSize(val.Value); + } + + if (val.Encoding & DATA_VALUE_STATUS_CODE) + { + size += RawSize(val.Status); + } + + if (val.Encoding & DATA_VALUE_SOURCE_TIMESTAMP) + { + size += RawSize(val.SourceTimestamp); + } + + if (val.Encoding & DATA_VALUE_Server_TIMESTAMP) + { + size += RawSize(val.ServerTimestamp); + } + + if (val.Encoding & DATA_VALUE_SOURCE_PICOSECONDS) + { + size += RawSize(val.SourcePicoseconds); + } + + if (val.Encoding & DATA_VALUE_Server_PICOSECONDS) + { + size += RawSize(val.ServerPicoseconds); + } + + return size; +} + +template<> +void DataSerializer::Serialize(const DataValue & val) +{ + *this << val.Encoding; + + if (val.Encoding & DATA_VALUE) + { + *this << val.Value; + } + + if (val.Encoding & DATA_VALUE_STATUS_CODE) + { + *this << val.Status; + } + + if (val.Encoding & DATA_VALUE_SOURCE_TIMESTAMP) + { + *this << val.SourceTimestamp; + } + + if (val.Encoding & DATA_VALUE_SOURCE_PICOSECONDS) + { + *this << val.SourcePicoseconds; + } + + if (val.Encoding & DATA_VALUE_Server_TIMESTAMP) + { + *this << val.ServerTimestamp; + } + + if (val.Encoding & DATA_VALUE_Server_PICOSECONDS) + { + *this << val.ServerPicoseconds; + } +} + +template<> +void DataDeserializer::Deserialize(DataValue & val) +{ + *this >> val.Encoding; + + if (val.Encoding & DATA_VALUE) + { + *this >> val.Value; + } + + if (val.Encoding & DATA_VALUE_STATUS_CODE) + { + *this >> val.Status; + } + + if (val.Encoding & DATA_VALUE_SOURCE_TIMESTAMP) + { + *this >> val.SourceTimestamp; + } + + if (val.Encoding & DATA_VALUE_SOURCE_PICOSECONDS) + { + *this >> val.SourcePicoseconds; + } + + if (val.Encoding & DATA_VALUE_Server_TIMESTAMP) + { + *this >> val.ServerTimestamp; + } + + if (val.Encoding & DATA_VALUE_Server_PICOSECONDS) + { + *this >> val.ServerPicoseconds; + } +} +} // namespace Binary } // namespace OpcUa diff --git a/src/protocol/binary_endpoints.cpp b/src/protocol/binary_endpoints.cpp index 7597ade9..6bb0a4c6 100644 --- a/src/protocol/binary_endpoints.cpp +++ b/src/protocol/binary_endpoints.cpp @@ -20,123 +20,123 @@ namespace OpcUa { - FindServersRequest::FindServersRequest() - : TypeId(FIND_ServerS_REQUEST) - { - - } - - FindServersResponse::FindServersResponse() - : TypeId(FIND_ServerS_RESPONSE) - { - - } - - namespace Binary - { - - //----------------------------------------------------- - // FindServersParameters - //----------------------------------------------------- - - template<> - std::size_t RawSize(const FindServersParameters& params) - { - return RawSize(params.EndpointUrl) + - RawSizeContainer(params.Locales) + - RawSizeContainer(params.ServersToReturn); - } - - template<> - void DataSerializer::Serialize(const FindServersParameters& params) - { - *this << params.EndpointUrl; - *this << params.Locales; - *this << params.ServersToReturn; - } - - template<> - void DataDeserializer::Deserialize(FindServersParameters& params) - { - *this >> params.EndpointUrl; - *this >> params.Locales; - *this >> params.ServersToReturn; - } - - //--------------------------------------------------- - // FindServersRequest - //--------------------------------------------------- - - template<> - std::size_t RawSize(const FindServersRequest& request) - { - return RawSize(request.TypeId) + RawSize(request.Header) + RawSize(request.Parameters); - } - - template<> - void DataSerializer::Serialize(const FindServersRequest& request) - { - *this << request.TypeId; - *this << request.Header; - *this << request.Parameters; - } - - template<> - void DataDeserializer::Deserialize(FindServersRequest& request) - { - *this >> request.TypeId; - *this >> request.Header; - *this >> request.Parameters; - } - - //----------------------------------------------------- - // FindServersData - //----------------------------------------------------- - - template<> - std::size_t RawSize(const FindServersData& data) - { - return RawSizeContainer(data.Descriptions); - } - - template<> - void DataSerializer::Serialize(const FindServersData& data) - { - SerializeContainer(*this, data.Descriptions); - } - - template<> - void DataDeserializer::Deserialize(FindServersData& data) - { - DeserializeContainer(*this, data.Descriptions); - } - - //----------------------------------------------------- - // FindServersResponse - //----------------------------------------------------- - - template<> - std::size_t RawSize(const FindServersResponse& resp) - { - return RawSize(resp.TypeId) + RawSize(resp.Header) + RawSize(resp.Data); - } - - template<> - void DataSerializer::Serialize(const FindServersResponse& resp) - { - *this << resp.TypeId; - *this << resp.Header; - *this << resp.Data; - } - - template<> - void DataDeserializer::Deserialize(FindServersResponse& resp) - { - *this >> resp.TypeId; - *this >> resp.Header; - *this >> resp.Data; - } - - } +FindServersRequest::FindServersRequest() + : TypeId(FIND_ServerS_REQUEST) +{ + +} + +FindServersResponse::FindServersResponse() + : TypeId(FIND_ServerS_RESPONSE) +{ + +} + +namespace Binary +{ + +//----------------------------------------------------- +// FindServersParameters +//----------------------------------------------------- + +template<> +std::size_t RawSize(const FindServersParameters & params) +{ + return RawSize(params.EndpointUrl) + + RawSizeContainer(params.Locales) + + RawSizeContainer(params.ServersToReturn); +} + +template<> +void DataSerializer::Serialize(const FindServersParameters & params) +{ + *this << params.EndpointUrl; + *this << params.Locales; + *this << params.ServersToReturn; +} + +template<> +void DataDeserializer::Deserialize(FindServersParameters & params) +{ + *this >> params.EndpointUrl; + *this >> params.Locales; + *this >> params.ServersToReturn; +} + +//--------------------------------------------------- +// FindServersRequest +//--------------------------------------------------- + +template<> +std::size_t RawSize(const FindServersRequest & request) +{ + return RawSize(request.TypeId) + RawSize(request.Header) + RawSize(request.Parameters); +} + +template<> +void DataSerializer::Serialize(const FindServersRequest & request) +{ + *this << request.TypeId; + *this << request.Header; + *this << request.Parameters; +} + +template<> +void DataDeserializer::Deserialize(FindServersRequest & request) +{ + *this >> request.TypeId; + *this >> request.Header; + *this >> request.Parameters; +} + +//----------------------------------------------------- +// FindServersData +//----------------------------------------------------- + +template<> +std::size_t RawSize(const FindServersData & data) +{ + return RawSizeContainer(data.Descriptions); +} + +template<> +void DataSerializer::Serialize(const FindServersData & data) +{ + SerializeContainer(*this, data.Descriptions); +} + +template<> +void DataDeserializer::Deserialize(FindServersData & data) +{ + DeserializeContainer(*this, data.Descriptions); +} + +//----------------------------------------------------- +// FindServersResponse +//----------------------------------------------------- + +template<> +std::size_t RawSize(const FindServersResponse & resp) +{ + return RawSize(resp.TypeId) + RawSize(resp.Header) + RawSize(resp.Data); +} + +template<> +void DataSerializer::Serialize(const FindServersResponse & resp) +{ + *this << resp.TypeId; + *this << resp.Header; + *this << resp.Data; +} + +template<> +void DataDeserializer::Deserialize(FindServersResponse & resp) +{ + *this >> resp.TypeId; + *this >> resp.Header; + *this >> resp.Data; +} + +} } diff --git a/src/protocol/binary_messages.cpp b/src/protocol/binary_messages.cpp index e67f4f0c..fa3b39d7 100644 --- a/src/protocol/binary_messages.cpp +++ b/src/protocol/binary_messages.cpp @@ -19,193 +19,195 @@ namespace OpcUa { - // TODO move all in binary namespace to the binary_common.h - namespace Binary - { - Header::Header() - : Type(MT_INVALID) - , Chunk(CHT_INVALID) - , Size(0) - { - ResetSize(); - } +// TODO move all in binary namespace to the binary_common.h +namespace Binary +{ +Header::Header() + : Type(MT_INVALID) + , Chunk(CHT_INVALID) + , Size(0) +{ + ResetSize(); +} - Header::Header(MessageType type, ChunkType chunk) - : Type(type) - , Chunk(chunk) - , Size(0) - { - ResetSize(); - } +Header::Header(MessageType type, ChunkType chunk) + : Type(type) + , Chunk(chunk) + , Size(0) +{ + ResetSize(); +} - std::size_t Header::AddSize(std::size_t size) - { - Size += size; - return Size; - } +std::size_t Header::AddSize(std::size_t size) +{ + Size += size; + return Size; +} - std::size_t Header::MessageSize() const - { - return Size - RawSize(*this); - } +std::size_t Header::MessageSize() const +{ + return Size - RawSize(*this); +} - void Header::ResetSize() - { - Size = RawSize(*this); - } +void Header::ResetSize() +{ + Size = RawSize(*this); +} + +SecureHeader::SecureHeader() + : Type(MT_INVALID) + , Chunk(CHT_INVALID) + , Size(0) + , ChannelId(0) +{ + ResetSize(); +} + +SecureHeader::SecureHeader(MessageType type, ChunkType chunk, uint32_t channelId) + : Type(type) + , Chunk(chunk) + , Size(0) + , ChannelId(channelId) +{ + ResetSize(); +} - SecureHeader::SecureHeader() - : Type(MT_INVALID) - , Chunk(CHT_INVALID) - , Size(0) - , ChannelId(0) - { - ResetSize(); - } +std::size_t SecureHeader::AddSize(std::size_t size) +{ + Size += size; + return Size; +} - SecureHeader::SecureHeader(MessageType type, ChunkType chunk, uint32_t channelId) - : Type(type) - , Chunk(chunk) - , Size(0) - , ChannelId(channelId) - { - ResetSize(); - } - std::size_t SecureHeader::AddSize(std::size_t size) - { - Size += size; - return Size; - } +std::size_t SecureHeader::MessageSize() const +{ + return Size - RawSize(*this); +} +void SecureHeader::ResetSize() +{ + Size = RawSize(*this); +} - std::size_t SecureHeader::MessageSize() const - { - return Size - RawSize(*this); - } - void SecureHeader::ResetSize() - { - Size = RawSize(*this); - } +Hello::Hello() + : ProtocolVersion(0) + , ReceiveBufferSize(0) + , SendBufferSize(0) + , MaxMessageSize(0) + , MaxChunkCount(0) +{ +} - Hello::Hello() - : ProtocolVersion(0) - , ReceiveBufferSize(0) - , SendBufferSize(0) - , MaxMessageSize(0) - , MaxChunkCount(0) - { - } +Acknowledge::Acknowledge() + : ProtocolVersion(0) + , ReceiveBufferSize(0) + , SendBufferSize(0) + , MaxMessageSize(0) + , MaxChunkCount(0) +{ +} +Error::Error() + : Code(0) +{ +} - Acknowledge::Acknowledge() - : ProtocolVersion(0) - , ReceiveBufferSize(0) - , SendBufferSize(0) - , MaxMessageSize(0) - , MaxChunkCount(0) - { - } +SequenceHeader::SequenceHeader() + : SequenceNumber(0) + , RequestId(0) +{ +} - Error::Error() - : Code(0) - { - } +SymmetricAlgorithmHeader::SymmetricAlgorithmHeader() + : TokenId(0) +{ +} - SequenceHeader::SequenceHeader() - : SequenceNumber(0) - , RequestId(0) - { - } +} // namespace Binary - SymmetricAlgorithmHeader::SymmetricAlgorithmHeader() - : TokenId(0) - { - } - } // namespace Binary - - - DateTime DateTime::FromTimeT(time_t t, unsigned usec) - { - const int64_t daysBetween1601And1970 = 134774; - const int64_t secsFrom1601To1970 = daysBetween1601And1970 * 24 * 3600LL; - int64_t t1 = t + secsFrom1601To1970; - t1 = t1 * 10000000LL; - t1 += usec * 10; - return DateTime(t1); - } - - DateTime DateTime::Current() - { - using namespace std::chrono; - const auto t = time_point(high_resolution_clock::now()); - const auto us = duration_cast(t.time_since_epoch()); - const auto n = us.count(); - return DateTime::FromTimeT(n / 1000000, n % 1000000); - } - - time_t DateTime::ToTimeT(DateTime dateTime) - { - const int64_t daysBetween1601And1970 = 134774; - const int64_t secsFrom1601To1970 = daysBetween1601And1970 * 24 * 3600LL; - if (dateTime.Value < secsFrom1601To1970) +DateTime DateTime::FromTimeT(time_t t, unsigned usec) +{ + const int64_t daysBetween1601And1970 = 134774; + const int64_t secsFrom1601To1970 = daysBetween1601And1970 * 24 * 3600LL; + int64_t t1 = t + secsFrom1601To1970; + t1 = t1 * 10000000LL; + t1 += usec * 10; + return DateTime(t1); +} + +DateTime DateTime::Current() +{ + using namespace std::chrono; + const auto t = time_point(high_resolution_clock::now()); + const auto us = duration_cast(t.time_since_epoch()); + const auto n = us.count(); + return DateTime::FromTimeT(n / 1000000, n % 1000000); +} + +time_t DateTime::ToTimeT(DateTime dateTime) +{ + const int64_t daysBetween1601And1970 = 134774; + const int64_t secsFrom1601To1970 = daysBetween1601And1970 * 24 * 3600LL; + + if (dateTime.Value < secsFrom1601To1970) { std::stringstream stream; stream << "OpcUa date time cannot be less than " << secsFrom1601To1970; throw std::invalid_argument(stream.str()); } - const int64_t secsFrom1970 = dateTime.Value / 10000000LL - secsFrom1601To1970; - return secsFrom1970; - } - - - RequestHeader::RequestHeader() - { - SessionAuthenticationToken.Encoding = EV_TWO_BYTE; - SessionAuthenticationToken.TwoByteData.Identifier = 0; - UtcTime = DateTime::Current(); - RequestHandle = 0; - ReturnDiagnostics = 0; - AuditEntryId = ""; - Timeout = 0; // in miliseconds - Additional.TypeId.Encoding = EV_TWO_BYTE; - Additional.TypeId.TwoByteData.Identifier = 0; - } - - OpenSecureChannelParameters::OpenSecureChannelParameters() - : ClientProtocolVersion(0) - , RequestType(SecurityTokenRequestType::Issue) - , SecurityMode(MessageSecurityMode::None) - , RequestLifeTime(300000) - { - } - - OpenSecureChannelRequest::OpenSecureChannelRequest() - : TypeId(OPEN_SECURE_CHANNEL_REQUEST) - { - } - - ResponseHeader::ResponseHeader() - : Timestamp(DateTime::Current()) - , RequestHandle(0) - , ServiceResult(StatusCode::Good) - { - } - - OpenSecureChannelResponse::OpenSecureChannelResponse() - : TypeId(OPEN_SECURE_CHANNEL_RESPONSE) - , ServerProtocolVersion(0) - { - } - - CloseSecureChannelRequest::CloseSecureChannelRequest() - : TypeId(OpcUa::CLOSE_SECURE_CHANNEL_REQUEST) - { - } + + const int64_t secsFrom1970 = dateTime.Value / 10000000LL - secsFrom1601To1970; + return secsFrom1970; +} + + +RequestHeader::RequestHeader() +{ + SessionAuthenticationToken.Encoding = EV_TWO_BYTE; + SessionAuthenticationToken.TwoByteData.Identifier = 0; + UtcTime = DateTime::Current(); + RequestHandle = 0; + ReturnDiagnostics = 0; + AuditEntryId = ""; + Timeout = 0; // in miliseconds + Additional.TypeId.Encoding = EV_TWO_BYTE; + Additional.TypeId.TwoByteData.Identifier = 0; +} + +OpenSecureChannelParameters::OpenSecureChannelParameters() + : ClientProtocolVersion(0) + , RequestType(SecurityTokenRequestType::Issue) + , SecurityMode(MessageSecurityMode::None) + , RequestLifeTime(300000) +{ +} + +OpenSecureChannelRequest::OpenSecureChannelRequest() + : TypeId(OPEN_SECURE_CHANNEL_REQUEST) +{ +} + +ResponseHeader::ResponseHeader() + : Timestamp(DateTime::Current()) + , RequestHandle(0) + , ServiceResult(StatusCode::Good) +{ +} + +OpenSecureChannelResponse::OpenSecureChannelResponse() + : TypeId(OPEN_SECURE_CHANNEL_RESPONSE) + , ServerProtocolVersion(0) +{ +} + +CloseSecureChannelRequest::CloseSecureChannelRequest() + : TypeId(OpcUa::CLOSE_SECURE_CHANNEL_REQUEST) +{ +} } // namespace OpcUa diff --git a/src/protocol/binary_node_management.cpp b/src/protocol/binary_node_management.cpp index a7af294a..b47bf13f 100644 --- a/src/protocol/binary_node_management.cpp +++ b/src/protocol/binary_node_management.cpp @@ -1,4 +1,4 @@ -/// @author Olivier Roulet-Dubonnet 2014 +/// @author Olivier Roulet-Dubonnet 2014 /// @email olivier.roulet@gmail.com /// @brief Opc Ua Binary. Attributes service. /// @license GNU LGPL @@ -26,232 +26,235 @@ namespace OpcUa { - NodeAttributes::NodeAttributes(const ObjectAttributes& attr) - { - Header.TypeId = ExpandedObjectId::ObjectAttribute; - Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); - - std::bitset<32> specattr; - specattr.set(SpecifiedAttributesEncoding::DisplayName); - specattr.set(SpecifiedAttributesEncoding::Description); - specattr.set(SpecifiedAttributesEncoding::EventNotifier); - specattr.set(SpecifiedAttributesEncoding::WriteMask); - specattr.set(SpecifiedAttributesEncoding::UserWriteMask); - SpecifiedAttributes = (uint32_t) specattr.to_ulong(); - - Attributes[AttributeId::DisplayName] = attr.DisplayName; - Attributes[AttributeId::Description] = attr.Description; - Attributes[AttributeId::EventNotifier] = attr.EventNotifier; - Attributes[AttributeId::WriteMask] = attr.WriteMask; - Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; - } - - NodeAttributes::NodeAttributes(const VariableAttributes& attr) - { - Header.TypeId = ExpandedObjectId::VariableAttribute; - Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); - - std::bitset<32> specattr; - specattr.set(SpecifiedAttributesEncoding::DisplayName); - specattr.set(SpecifiedAttributesEncoding::Description); - specattr.set(SpecifiedAttributesEncoding::Value); - specattr.set(SpecifiedAttributesEncoding::DataType); - specattr.set(SpecifiedAttributesEncoding::ValueRank); - specattr.set(SpecifiedAttributesEncoding::ArrayDimensions); - specattr.set(SpecifiedAttributesEncoding::AccessLevel); - specattr.set(SpecifiedAttributesEncoding::UserAccessLevel); - specattr.set(SpecifiedAttributesEncoding::MinimumSamplingInterval); - specattr.set(SpecifiedAttributesEncoding::Historizing); - specattr.set(SpecifiedAttributesEncoding::WriteMask); - specattr.set(SpecifiedAttributesEncoding::UserWriteMask); - SpecifiedAttributes = (uint32_t) specattr.to_ulong(); - - Attributes[AttributeId::DisplayName] = attr.DisplayName; - Attributes[AttributeId::Description] = attr.Description; - Attributes[AttributeId::Value] = attr.Value; - Attributes[AttributeId::DataType] = attr.Type; - Attributes[AttributeId::ValueRank] = attr.Rank; - Attributes[AttributeId::ArrayDimensions] = attr.Dimensions; - Attributes[AttributeId::AccessLevel] = static_cast(attr.AccessLevel); - Attributes[AttributeId::UserAccessLevel] = static_cast(attr.UserAccessLevel); - Attributes[AttributeId::MinimumSamplingInterval] = attr.MinimumSamplingInterval; - Attributes[AttributeId::Historizing] = attr.Historizing; - Attributes[AttributeId::WriteMask] = attr.WriteMask; - Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; - } - - NodeAttributes::NodeAttributes(const MethodAttributes& attr) - { - Header.TypeId = ExpandedObjectId::MethodAttribute; - Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); - - std::bitset<32> specattr; - specattr.set(SpecifiedAttributesEncoding::DisplayName); - specattr.set(SpecifiedAttributesEncoding::Description); - specattr.set(SpecifiedAttributesEncoding::Executable); - specattr.set(SpecifiedAttributesEncoding::UserExecutable); - specattr.set(SpecifiedAttributesEncoding::WriteMask); - specattr.set(SpecifiedAttributesEncoding::UserWriteMask); - SpecifiedAttributes = (uint32_t) specattr.to_ulong(); - - Attributes[AttributeId::DisplayName] = attr.DisplayName; - Attributes[AttributeId::Description] = attr.Description; - Attributes[AttributeId::Executable] = attr.Executable; - Attributes[AttributeId::UserExecutable] = attr.UserExecutable; - Attributes[AttributeId::WriteMask] = attr.WriteMask; - Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; - } - NodeAttributes::NodeAttributes(const ObjectTypeAttributes& attr) - { - Header.TypeId = ExpandedObjectId::ObjectTypeAttribute; - Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); - - std::bitset<32> specattr; - specattr.set(SpecifiedAttributesEncoding::DisplayName); - specattr.set(SpecifiedAttributesEncoding::Description); - specattr.set(SpecifiedAttributesEncoding::IsAbstract); - specattr.set(SpecifiedAttributesEncoding::WriteMask); - specattr.set(SpecifiedAttributesEncoding::UserWriteMask); - SpecifiedAttributes = (uint32_t) specattr.to_ulong(); - - Attributes[AttributeId::DisplayName] = attr.DisplayName; - Attributes[AttributeId::Description] = attr.Description; - Attributes[AttributeId::IsAbstract] = attr.IsAbstract; - Attributes[AttributeId::WriteMask] = attr.WriteMask; - Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; - } - - NodeAttributes::NodeAttributes(const VariableTypeAttributes& attr) - { - Header.TypeId = ExpandedObjectId::VariableTypeAttribute; - Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); - - std::bitset<32> specattr; - specattr.set(SpecifiedAttributesEncoding::DisplayName); - specattr.set(SpecifiedAttributesEncoding::Description); - specattr.set(SpecifiedAttributesEncoding::Value); - specattr.set(SpecifiedAttributesEncoding::DataType); - specattr.set(SpecifiedAttributesEncoding::ValueRank); - specattr.set(SpecifiedAttributesEncoding::ArrayDimensions); - specattr.set(SpecifiedAttributesEncoding::IsAbstract); - specattr.set(SpecifiedAttributesEncoding::WriteMask); - specattr.set(SpecifiedAttributesEncoding::UserWriteMask); - SpecifiedAttributes = (uint32_t) specattr.to_ulong(); - - Attributes[AttributeId::DisplayName] = attr.DisplayName; - Attributes[AttributeId::Description] = attr.Description; - Attributes[AttributeId::Value] = attr.Value; - Attributes[AttributeId::DataType] = attr.Type; - Attributes[AttributeId::ValueRank] = attr.Rank; - Attributes[AttributeId::IsAbstract] = attr.IsAbstract; - Attributes[AttributeId::ArrayDimensions] = attr.Dimensions; - Attributes[AttributeId::WriteMask] = attr.WriteMask; - Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; - } - - NodeAttributes::NodeAttributes(const ReferenceTypeAttributes& attr) - { - Header.TypeId = ExpandedObjectId::ReferenceTypeAttribute; - Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); - - std::bitset<32> specattr; - specattr.set(SpecifiedAttributesEncoding::DisplayName); - specattr.set(SpecifiedAttributesEncoding::Description); - specattr.set(SpecifiedAttributesEncoding::IsAbstract); - specattr.set(SpecifiedAttributesEncoding::Symmetric); - specattr.set(SpecifiedAttributesEncoding::WriteMask); - specattr.set(SpecifiedAttributesEncoding::UserWriteMask); - if (!attr.IsAbstract) - specattr.set(SpecifiedAttributesEncoding::InverseName); - SpecifiedAttributes = (uint32_t) specattr.to_ulong(); - - Attributes[AttributeId::DisplayName] = attr.DisplayName; - Attributes[AttributeId::Description] = attr.Description; - Attributes[AttributeId::IsAbstract] = attr.IsAbstract; - Attributes[AttributeId::Symmetric] = attr.Symmetric; - Attributes[AttributeId::WriteMask] = attr.WriteMask; - Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; - if (!attr.IsAbstract) - Attributes[AttributeId::InverseName] = attr.InverseName; - } - - NodeAttributes::NodeAttributes(const DataTypeAttributes& attr) - { - Header.TypeId = ExpandedObjectId::DataTypeAttribute; - Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); - - std::bitset<32> specattr; - specattr.set(SpecifiedAttributesEncoding::DisplayName); - specattr.set(SpecifiedAttributesEncoding::Description); - specattr.set(SpecifiedAttributesEncoding::IsAbstract); - specattr.set(SpecifiedAttributesEncoding::WriteMask); - specattr.set(SpecifiedAttributesEncoding::UserWriteMask); - SpecifiedAttributes = (uint32_t) specattr.to_ulong(); - - Attributes[AttributeId::DisplayName] = attr.DisplayName; - Attributes[AttributeId::Description] = attr.Description; - Attributes[AttributeId::IsAbstract] = attr.IsAbstract; - Attributes[AttributeId::WriteMask] = attr.WriteMask; - Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; - } - - NodeAttributes::NodeAttributes(const ViewAttributes& attr) - { - Header.TypeId = ExpandedObjectId::ViewAttribute; - Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); - - std::bitset<32> specattr; - specattr.set(SpecifiedAttributesEncoding::DisplayName); - specattr.set(SpecifiedAttributesEncoding::Description); - specattr.set(SpecifiedAttributesEncoding::ContainsNoLoops); - specattr.set(SpecifiedAttributesEncoding::WriteMask); - specattr.set(SpecifiedAttributesEncoding::UserWriteMask); - SpecifiedAttributes = (uint32_t) specattr.to_ulong(); - - Attributes[AttributeId::DisplayName] = attr.DisplayName; - Attributes[AttributeId::Description] = attr.Description; - Attributes[AttributeId::ContainsNoLoops] = attr.ContainsNoLoops; - Attributes[AttributeId::WriteMask] = attr.WriteMask; - Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; - } - - - - AddNodesRequest::AddNodesRequest() - : TypeId(ADD_NODES_REQUEST) - { - } - - AddNodesResponse::AddNodesResponse() - : TypeId(ADD_NODES_RESPONSE) - { - } - - AddReferencesRequest::AddReferencesRequest() - : TypeId(ADD_REFERENCES_REQUEST) - { - } - - AddReferencesResponse::AddReferencesResponse() - : TypeId(ADD_REFERENCES_RESPONSE) - { - } - - namespace Binary - { - - // - //AddNodeRequest - // +NodeAttributes::NodeAttributes(const ObjectAttributes & attr) +{ + Header.TypeId = ExpandedObjectId::ObjectAttribute; + Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); + + std::bitset<32> specattr; + specattr.set(SpecifiedAttributesEncoding::DisplayName); + specattr.set(SpecifiedAttributesEncoding::Description); + specattr.set(SpecifiedAttributesEncoding::EventNotifier); + specattr.set(SpecifiedAttributesEncoding::WriteMask); + specattr.set(SpecifiedAttributesEncoding::UserWriteMask); + SpecifiedAttributes = (uint32_t) specattr.to_ulong(); + + Attributes[AttributeId::DisplayName] = attr.DisplayName; + Attributes[AttributeId::Description] = attr.Description; + Attributes[AttributeId::EventNotifier] = attr.EventNotifier; + Attributes[AttributeId::WriteMask] = attr.WriteMask; + Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; +} + +NodeAttributes::NodeAttributes(const VariableAttributes & attr) +{ + Header.TypeId = ExpandedObjectId::VariableAttribute; + Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); + + std::bitset<32> specattr; + specattr.set(SpecifiedAttributesEncoding::DisplayName); + specattr.set(SpecifiedAttributesEncoding::Description); + specattr.set(SpecifiedAttributesEncoding::Value); + specattr.set(SpecifiedAttributesEncoding::DataType); + specattr.set(SpecifiedAttributesEncoding::ValueRank); + specattr.set(SpecifiedAttributesEncoding::ArrayDimensions); + specattr.set(SpecifiedAttributesEncoding::AccessLevel); + specattr.set(SpecifiedAttributesEncoding::UserAccessLevel); + specattr.set(SpecifiedAttributesEncoding::MinimumSamplingInterval); + specattr.set(SpecifiedAttributesEncoding::Historizing); + specattr.set(SpecifiedAttributesEncoding::WriteMask); + specattr.set(SpecifiedAttributesEncoding::UserWriteMask); + SpecifiedAttributes = (uint32_t) specattr.to_ulong(); + + Attributes[AttributeId::DisplayName] = attr.DisplayName; + Attributes[AttributeId::Description] = attr.Description; + Attributes[AttributeId::Value] = attr.Value; + Attributes[AttributeId::DataType] = attr.Type; + Attributes[AttributeId::ValueRank] = attr.Rank; + Attributes[AttributeId::ArrayDimensions] = attr.Dimensions; + Attributes[AttributeId::AccessLevel] = static_cast(attr.AccessLevel); + Attributes[AttributeId::UserAccessLevel] = static_cast(attr.UserAccessLevel); + Attributes[AttributeId::MinimumSamplingInterval] = attr.MinimumSamplingInterval; + Attributes[AttributeId::Historizing] = attr.Historizing; + Attributes[AttributeId::WriteMask] = attr.WriteMask; + Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; +} + +NodeAttributes::NodeAttributes(const MethodAttributes & attr) +{ + Header.TypeId = ExpandedObjectId::MethodAttribute; + Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); + + std::bitset<32> specattr; + specattr.set(SpecifiedAttributesEncoding::DisplayName); + specattr.set(SpecifiedAttributesEncoding::Description); + specattr.set(SpecifiedAttributesEncoding::Executable); + specattr.set(SpecifiedAttributesEncoding::UserExecutable); + specattr.set(SpecifiedAttributesEncoding::WriteMask); + specattr.set(SpecifiedAttributesEncoding::UserWriteMask); + SpecifiedAttributes = (uint32_t) specattr.to_ulong(); + + Attributes[AttributeId::DisplayName] = attr.DisplayName; + Attributes[AttributeId::Description] = attr.Description; + Attributes[AttributeId::Executable] = attr.Executable; + Attributes[AttributeId::UserExecutable] = attr.UserExecutable; + Attributes[AttributeId::WriteMask] = attr.WriteMask; + Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; +} +NodeAttributes::NodeAttributes(const ObjectTypeAttributes & attr) +{ + Header.TypeId = ExpandedObjectId::ObjectTypeAttribute; + Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); + + std::bitset<32> specattr; + specattr.set(SpecifiedAttributesEncoding::DisplayName); + specattr.set(SpecifiedAttributesEncoding::Description); + specattr.set(SpecifiedAttributesEncoding::IsAbstract); + specattr.set(SpecifiedAttributesEncoding::WriteMask); + specattr.set(SpecifiedAttributesEncoding::UserWriteMask); + SpecifiedAttributes = (uint32_t) specattr.to_ulong(); + + Attributes[AttributeId::DisplayName] = attr.DisplayName; + Attributes[AttributeId::Description] = attr.Description; + Attributes[AttributeId::IsAbstract] = attr.IsAbstract; + Attributes[AttributeId::WriteMask] = attr.WriteMask; + Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; +} + +NodeAttributes::NodeAttributes(const VariableTypeAttributes & attr) +{ + Header.TypeId = ExpandedObjectId::VariableTypeAttribute; + Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); + + std::bitset<32> specattr; + specattr.set(SpecifiedAttributesEncoding::DisplayName); + specattr.set(SpecifiedAttributesEncoding::Description); + specattr.set(SpecifiedAttributesEncoding::Value); + specattr.set(SpecifiedAttributesEncoding::DataType); + specattr.set(SpecifiedAttributesEncoding::ValueRank); + specattr.set(SpecifiedAttributesEncoding::ArrayDimensions); + specattr.set(SpecifiedAttributesEncoding::IsAbstract); + specattr.set(SpecifiedAttributesEncoding::WriteMask); + specattr.set(SpecifiedAttributesEncoding::UserWriteMask); + SpecifiedAttributes = (uint32_t) specattr.to_ulong(); + + Attributes[AttributeId::DisplayName] = attr.DisplayName; + Attributes[AttributeId::Description] = attr.Description; + Attributes[AttributeId::Value] = attr.Value; + Attributes[AttributeId::DataType] = attr.Type; + Attributes[AttributeId::ValueRank] = attr.Rank; + Attributes[AttributeId::IsAbstract] = attr.IsAbstract; + Attributes[AttributeId::ArrayDimensions] = attr.Dimensions; + Attributes[AttributeId::WriteMask] = attr.WriteMask; + Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; +} + +NodeAttributes::NodeAttributes(const ReferenceTypeAttributes & attr) +{ + Header.TypeId = ExpandedObjectId::ReferenceTypeAttribute; + Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); + + std::bitset<32> specattr; + specattr.set(SpecifiedAttributesEncoding::DisplayName); + specattr.set(SpecifiedAttributesEncoding::Description); + specattr.set(SpecifiedAttributesEncoding::IsAbstract); + specattr.set(SpecifiedAttributesEncoding::Symmetric); + specattr.set(SpecifiedAttributesEncoding::WriteMask); + specattr.set(SpecifiedAttributesEncoding::UserWriteMask); + + if (!attr.IsAbstract) + { specattr.set(SpecifiedAttributesEncoding::InverseName); } + + SpecifiedAttributes = (uint32_t) specattr.to_ulong(); + + Attributes[AttributeId::DisplayName] = attr.DisplayName; + Attributes[AttributeId::Description] = attr.Description; + Attributes[AttributeId::IsAbstract] = attr.IsAbstract; + Attributes[AttributeId::Symmetric] = attr.Symmetric; + Attributes[AttributeId::WriteMask] = attr.WriteMask; + Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; + + if (!attr.IsAbstract) + { Attributes[AttributeId::InverseName] = attr.InverseName; } +} + +NodeAttributes::NodeAttributes(const DataTypeAttributes & attr) +{ + Header.TypeId = ExpandedObjectId::DataTypeAttribute; + Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); + + std::bitset<32> specattr; + specattr.set(SpecifiedAttributesEncoding::DisplayName); + specattr.set(SpecifiedAttributesEncoding::Description); + specattr.set(SpecifiedAttributesEncoding::IsAbstract); + specattr.set(SpecifiedAttributesEncoding::WriteMask); + specattr.set(SpecifiedAttributesEncoding::UserWriteMask); + SpecifiedAttributes = (uint32_t) specattr.to_ulong(); + + Attributes[AttributeId::DisplayName] = attr.DisplayName; + Attributes[AttributeId::Description] = attr.Description; + Attributes[AttributeId::IsAbstract] = attr.IsAbstract; + Attributes[AttributeId::WriteMask] = attr.WriteMask; + Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; +} + +NodeAttributes::NodeAttributes(const ViewAttributes & attr) +{ + Header.TypeId = ExpandedObjectId::ViewAttribute; + Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); + + std::bitset<32> specattr; + specattr.set(SpecifiedAttributesEncoding::DisplayName); + specattr.set(SpecifiedAttributesEncoding::Description); + specattr.set(SpecifiedAttributesEncoding::ContainsNoLoops); + specattr.set(SpecifiedAttributesEncoding::WriteMask); + specattr.set(SpecifiedAttributesEncoding::UserWriteMask); + SpecifiedAttributes = (uint32_t) specattr.to_ulong(); + + Attributes[AttributeId::DisplayName] = attr.DisplayName; + Attributes[AttributeId::Description] = attr.Description; + Attributes[AttributeId::ContainsNoLoops] = attr.ContainsNoLoops; + Attributes[AttributeId::WriteMask] = attr.WriteMask; + Attributes[AttributeId::UserWriteMask] = attr.UserWriteMask; +} + + + +AddNodesRequest::AddNodesRequest() + : TypeId(ADD_NODES_REQUEST) +{ +} + +AddNodesResponse::AddNodesResponse() + : TypeId(ADD_NODES_RESPONSE) +{ +} + +AddReferencesRequest::AddReferencesRequest() + : TypeId(ADD_REFERENCES_REQUEST) +{ +} + +AddReferencesResponse::AddReferencesResponse() + : TypeId(ADD_REFERENCES_RESPONSE) +{ +} + +namespace Binary +{ + +// +//AddNodeRequest +// /* template<> std::size_t RawSize(const ObjectAttributes& val) { - return RawSize(val.SpecifiedAttributes) + - RawSize(val.DisplayName) + - RawSize(val.Description) + - RawSize(val.EventNotifier) + - RawSize(val.WriteMask) + + return RawSize(val.SpecifiedAttributes) + + RawSize(val.DisplayName) + + RawSize(val.Description) + + RawSize(val.EventNotifier) + + RawSize(val.WriteMask) + RawSize(val.UserWriteMask) ; } @@ -281,18 +284,18 @@ namespace OpcUa template<> std::size_t RawSize(const VariableAttributes& val) { - return RawSize(val.SpecifiedAttributes) + - RawSize(val.DisplayName) + - RawSize(val.Description) + - RawSize(val.Value) + - RawSize(val.Type) + - RawSize(val.Rank) + - RawSizeContainer(val.Dimensions) + + return RawSize(val.SpecifiedAttributes) + + RawSize(val.DisplayName) + + RawSize(val.Description) + + RawSize(val.Value) + + RawSize(val.Type) + + RawSize(val.Rank) + + RawSizeContainer(val.Dimensions) + RawSize((uint8_t)val.AccessLevel) + RawSize((uint8_t)val.UserAccessLevel) + - RawSize(val.MinimumSamplingInterval) + - RawSize(val.Historizing) + - RawSize(val.WriteMask) + + RawSize(val.MinimumSamplingInterval) + + RawSize(val.Historizing) + + RawSize(val.WriteMask) + RawSize(val.UserWriteMask) ; } @@ -338,12 +341,12 @@ namespace OpcUa template<> std::size_t RawSize(const MethodAttributes& val) { - return RawSize(val.SpecifiedAttributes) + - RawSize(val.DisplayName) + - RawSize(val.Description) + - RawSize(val.Executable) + - RawSize(val.UserExecutable) + - RawSize(val.WriteMask) + + return RawSize(val.SpecifiedAttributes) + + RawSize(val.DisplayName) + + RawSize(val.Description) + + RawSize(val.Executable) + + RawSize(val.UserExecutable) + + RawSize(val.WriteMask) + RawSize(val.UserWriteMask) ; } @@ -375,11 +378,11 @@ namespace OpcUa template<> std::size_t RawSize(const ObjectTypeAttributes& val) { - return RawSize(val.SpecifiedAttributes) + - RawSize(val.DisplayName) + - RawSize(val.Description) + - RawSize(val.IsAbstract) + - RawSize(val.WriteMask) + + return RawSize(val.SpecifiedAttributes) + + RawSize(val.DisplayName) + + RawSize(val.Description) + + RawSize(val.IsAbstract) + + RawSize(val.WriteMask) + RawSize(val.UserWriteMask) ; } @@ -410,15 +413,15 @@ namespace OpcUa template<> std::size_t RawSize(const VariableTypeAttributes& val) { - return RawSize(val.SpecifiedAttributes) + - RawSize(val.DisplayName) + - RawSize(val.Description) + - RawSize(val.Value) + - RawSize(val.Type) + - RawSize(val.Rank) + - RawSizeContainer(val.Dimensions) + - RawSize(val.IsAbstract) + - RawSize(val.WriteMask) + + return RawSize(val.SpecifiedAttributes) + + RawSize(val.DisplayName) + + RawSize(val.Description) + + RawSize(val.Value) + + RawSize(val.Type) + + RawSize(val.Rank) + + RawSizeContainer(val.Dimensions) + + RawSize(val.IsAbstract) + + RawSize(val.WriteMask) + RawSize(val.UserWriteMask) ; } @@ -457,13 +460,13 @@ namespace OpcUa template<> std::size_t RawSize(const ReferenceTypeAttributes& val) { - return RawSize(val.SpecifiedAttributes) + - RawSize(val.DisplayName) + - RawSize(val.Description) + - RawSize(val.IsAbstract) + - RawSize(val.Symmetric) + - RawSize(val.InverseName) + - RawSize(val.WriteMask) + + return RawSize(val.SpecifiedAttributes) + + RawSize(val.DisplayName) + + RawSize(val.Description) + + RawSize(val.IsAbstract) + + RawSize(val.Symmetric) + + RawSize(val.InverseName) + + RawSize(val.WriteMask) + RawSize(val.UserWriteMask) ; } @@ -498,11 +501,11 @@ namespace OpcUa template<> std::size_t RawSize(const DataTypeAttributes& val) { - return RawSize(val.SpecifiedAttributes) + - RawSize(val.DisplayName) + - RawSize(val.Description) + - RawSize(val.IsAbstract) + - RawSize(val.WriteMask) + + return RawSize(val.SpecifiedAttributes) + + RawSize(val.DisplayName) + + RawSize(val.Description) + + RawSize(val.IsAbstract) + + RawSize(val.WriteMask) + RawSize(val.UserWriteMask) ; } @@ -532,11 +535,11 @@ namespace OpcUa template<> std::size_t RawSize(const ViewAttributes& val) { - return RawSize(val.SpecifiedAttributes) + - RawSize(val.DisplayName) + - RawSize(val.Description) + - RawSize(val.ContainsNoLoops) + - RawSize(val.WriteMask) + + return RawSize(val.SpecifiedAttributes) + + RawSize(val.DisplayName) + + RawSize(val.Description) + + RawSize(val.ContainsNoLoops) + + RawSize(val.WriteMask) + RawSize(val.UserWriteMask) ; } @@ -567,617 +570,680 @@ namespace OpcUa */ - std::size_t RawSizeBodyNodeAttributes(const NodeAttributes& val) - { - size_t total = 0; - total += RawSize(val.SpecifiedAttributes); - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::DisplayName)) - { - total += RawSize(val.Attributes.find(AttributeId::DisplayName)->second.As()); //We assume the attr exists!!! - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Description)) - { - total += RawSize(val.Attributes.find(AttributeId::Description)->second.As()); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::EventNotifier)) - { - total += 1;//RawSize(val.Attributes.find(AttributeId::EventNotifier)->second.Value.U); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Value)) - { - total += RawSize(val.Attributes.find(AttributeId::Value)->second); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::DataType)) - { - total += RawSize(val.Attributes.find(AttributeId::DataType)->second.As()); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ValueRank)) - { - total += 4; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ArrayDimensions)) - { - total += RawSizeContainer(val.Attributes.find(AttributeId::ArrayDimensions)->second.As>()); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::AccessLevel)) - { - total += 1; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserAccessLevel)) - { - total += 1; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::MinimumSamplingInterval)) - { - total += sizeof(double); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Historizing)) - { - total += sizeof(bool); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Executable)) - { - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserExecutable)) - { - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::IsAbstract)) - { - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Symmetric)) - { - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::InverseName)) - { - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ContainsNoLoops)) - { - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::WriteMask)) - { - total += 4; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserWriteMask)) - { - total += 4; - } - - return total; +std::size_t RawSizeBodyNodeAttributes(const NodeAttributes & val) +{ + size_t total = 0; + total += RawSize(val.SpecifiedAttributes); + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::DisplayName)) + { + total += RawSize(val.Attributes.find(AttributeId::DisplayName)->second.As()); //We assume the attr exists!!! } - - template<> - std::size_t RawSize(const NodeAttributes& val) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Description)) { - size_t total = 0; - total += RawSize(val.Header); - total += 4 ; //uint32_t size body - total += RawSizeBodyNodeAttributes(val) ; - return total; + total += RawSize(val.Attributes.find(AttributeId::Description)->second.As()); } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::EventNotifier)) + { + total += 1;//RawSize(val.Attributes.find(AttributeId::EventNotifier)->second.Value.U); + } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Value)) + { + total += RawSize(val.Attributes.find(AttributeId::Value)->second); + } - template<> - void DataSerializer::Serialize(const NodeAttributes& val) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::DataType)) { - *this << val.Header; - *this << (int32_t) RawSizeBodyNodeAttributes(val); //debug - *this << val.SpecifiedAttributes; - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::DisplayName)) - { - *this << val.Attributes.find(AttributeId::DisplayName)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Description)) - { - *this << val.Attributes.find(AttributeId::Description)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::WriteMask)) - { - *this << val.Attributes.find(AttributeId::WriteMask)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserWriteMask)) - { - *this << val.Attributes.find(AttributeId::UserWriteMask)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::EventNotifier)) - { - *this << (uint8_t) val.Attributes.find(AttributeId::EventNotifier)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Value)) - { - *this << val.Attributes.find(AttributeId::Value)->second; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::DataType)) - { - *this << val.Attributes.find(AttributeId::DataType)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ValueRank)) - { - *this << val.Attributes.find(AttributeId::ValueRank)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ArrayDimensions)) - { - *this << val.Attributes.find(AttributeId::ArrayDimensions)->second.As>(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::AccessLevel)) - { - *this << val.Attributes.find(AttributeId::AccessLevel)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserAccessLevel)) - { - *this << val.Attributes.find(AttributeId::UserAccessLevel)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::MinimumSamplingInterval)) - { - *this << val.Attributes.find(AttributeId::MinimumSamplingInterval)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Historizing)) - { - *this << val.Attributes.find(AttributeId::Historizing)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Executable)) - { - *this << val.Attributes.find(AttributeId::Executable)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserExecutable)) - { - *this << val.Attributes.find(AttributeId::UserExecutable)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::IsAbstract)) - { - *this << val.Attributes.find(AttributeId::IsAbstract)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Symmetric)) - { - *this << val.Attributes.find(AttributeId::Symmetric)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::InverseName)) - { - *this << val.Attributes.find(AttributeId::InverseName)->second.As(); - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ContainsNoLoops)) - { - *this << val.Attributes.find(AttributeId::ContainsNoLoops)->second.As(); - } + total += RawSize(val.Attributes.find(AttributeId::DataType)->second.As()); + } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ValueRank)) + { + total += 4; } - template<> - void DataDeserializer::Deserialize(NodeAttributes& val) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ArrayDimensions)) { - *this >> val.Header; - int32_t size; - *this >> size ; // not used yet - *this >> val.SpecifiedAttributes; + total += RawSizeContainer(val.Attributes.find(AttributeId::ArrayDimensions)->second.As>()); + } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::DisplayName)) - { - LocalizedText tmp; - *this >> tmp; - val.Attributes[AttributeId::DisplayName] = tmp; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Description)) - { - LocalizedText tmp; - *this >> tmp; - val.Attributes[AttributeId::Description] = tmp; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::WriteMask)) - { - uint32_t tmp; - *this >> tmp; - val.Attributes[AttributeId::WriteMask] = tmp; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserWriteMask)) - { - uint32_t tmp; - *this >> tmp; - val.Attributes[AttributeId::UserWriteMask] = tmp; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::EventNotifier)) - { - uint8_t tmp; - *this >> tmp; - val.Attributes[AttributeId::EventNotifier] = tmp; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Value)) - { - Variant tmp; - *this >> tmp; - val.Attributes[AttributeId::Value] = tmp; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::DataType)) - { - NodeId tmp; - *this >> tmp; - val.Attributes[AttributeId::DataType] = tmp; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ValueRank)) - { - int32_t tmp; - *this >> tmp; - val.Attributes[AttributeId::ValueRank] = tmp; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ArrayDimensions)) - { - std::vector tmp; - *this >> tmp; - val.Attributes[AttributeId::ArrayDimensions] = tmp; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::AccessLevel)) - { - uint8_t tmp; - *this >> tmp; - val.Attributes[AttributeId::AccessLevel] = tmp; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserAccessLevel)) - { - uint8_t tmp; - *this >> tmp; - val.Attributes[AttributeId::UserAccessLevel] = tmp; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::MinimumSamplingInterval)) - { - Duration tmp; - *this >> tmp; - val.Attributes[AttributeId::MinimumSamplingInterval] = tmp; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Historizing)) - { - bool tmp; - *this >> tmp; - val.Attributes[AttributeId::Historizing] = tmp; - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Executable)) - { - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserExecutable)) - { - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::IsAbstract)) - { - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Symmetric)) - { - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::InverseName)) - { - } - if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ContainsNoLoops)) - { - } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::AccessLevel)) + { + total += 1; + } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserAccessLevel)) + { + total += 1; } - template<> - std::size_t RawSize(const AddNodesItem& resp) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::MinimumSamplingInterval)) { - return RawSize(resp.ParentNodeId) + - RawSize(resp.ReferenceTypeId) + - RawSize(resp.RequestedNewNodeId) + - RawSize(resp.BrowseName) + - RawSize(resp.Class) + - RawSize(resp.Attributes) + - RawSize(resp.TypeDefinition); + total += sizeof(double); } - template<> - void DataSerializer::Serialize(const AddNodesItem& resp) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Historizing)) { - *this << resp.ParentNodeId; - *this << resp.ReferenceTypeId; - *this << resp.RequestedNewNodeId; - *this << resp.BrowseName; - *this << resp.Class; - *this << resp.Attributes; - *this << resp.TypeDefinition; + total += sizeof(bool); } - template<> - void DataDeserializer::Deserialize(AddNodesItem& resp) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Executable)) { - *this >> resp.ParentNodeId; - *this >> resp.ReferenceTypeId; - *this >> resp.RequestedNewNodeId; - *this >> resp.BrowseName; - *this >> resp.Class; - *this >> resp.Attributes; - *this >> resp.TypeDefinition; } - template<> - std::size_t RawSize(const std::vector& ack) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserExecutable)) { - return RawSizeContainer(ack); } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::IsAbstract)) + { + } - template<> - void DataDeserializer::Deserialize>(std::vector& ack) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Symmetric)) { - DeserializeContainer(*this, ack); } - template<> - void DataSerializer::Serialize>(const std::vector& ack) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::InverseName)) { - SerializeContainer(*this, ack); } - template<> - std::size_t RawSize(const AddNodesParameters& val) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ContainsNoLoops)) { - return RawSize(val.NodesToAdd); } - template<> - void DataSerializer::Serialize(const AddNodesParameters& val) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::WriteMask)) { - *this << val.NodesToAdd; + total += 4; } - template<> - void DataDeserializer::Deserialize(AddNodesParameters& resp) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserWriteMask)) { - *this >> resp.NodesToAdd; + total += 4; } + return total; +} - template<> - std::size_t RawSize(const AddNodesRequest& resp) + +template<> +std::size_t RawSize(const NodeAttributes & val) +{ + size_t total = 0; + total += RawSize(val.Header); + total += 4 ; //uint32_t size body + total += RawSizeBodyNodeAttributes(val) ; + return total; +} + + + +template<> +void DataSerializer::Serialize(const NodeAttributes & val) +{ + *this << val.Header; + *this << (int32_t) RawSizeBodyNodeAttributes(val); //debug + *this << val.SpecifiedAttributes; + + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::DisplayName)) { - return RawSize(resp.TypeId) + RawSize(resp.Header) + RawSize(resp.Parameters); + *this << val.Attributes.find(AttributeId::DisplayName)->second.As(); } - template<> - void DataSerializer::Serialize(const AddNodesRequest& resp) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Description)) { - *this << resp.TypeId; - *this << resp.Header; - *this << resp.Parameters; + *this << val.Attributes.find(AttributeId::Description)->second.As(); } - template<> - void DataDeserializer::Deserialize(AddNodesRequest& resp) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::WriteMask)) { - *this >> resp.TypeId; - *this >> resp.Header; - *this >> resp.Parameters; + *this << val.Attributes.find(AttributeId::WriteMask)->second.As(); } - template<> - std::size_t RawSize(const AddNodesResult& resp) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserWriteMask)) { - return RawSize(resp.Status) + RawSize(resp.AddedNodeId); + *this << val.Attributes.find(AttributeId::UserWriteMask)->second.As(); } - template<> - void DataSerializer::Serialize(const AddNodesResult& resp) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::EventNotifier)) { - *this << resp.Status; - *this << resp.AddedNodeId; + *this << (uint8_t) val.Attributes.find(AttributeId::EventNotifier)->second.As(); } - template<> - void DataDeserializer::Deserialize(AddNodesResult& resp) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Value)) { - *this >> resp.Status; - *this >> resp.AddedNodeId; + *this << val.Attributes.find(AttributeId::Value)->second; } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::DataType)) + { + *this << val.Attributes.find(AttributeId::DataType)->second.As(); + } - template<> - void DataDeserializer::Deserialize>(std::vector& ack) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ValueRank)) { - DeserializeContainer(*this, ack); + *this << val.Attributes.find(AttributeId::ValueRank)->second.As(); } - template<> - void DataSerializer::Serialize>(const std::vector& ack) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ArrayDimensions)) { - SerializeContainer(*this, ack); + *this << val.Attributes.find(AttributeId::ArrayDimensions)->second.As>(); } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::AccessLevel)) + { + *this << val.Attributes.find(AttributeId::AccessLevel)->second.As(); + } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserAccessLevel)) + { + *this << val.Attributes.find(AttributeId::UserAccessLevel)->second.As(); + } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::MinimumSamplingInterval)) + { + *this << val.Attributes.find(AttributeId::MinimumSamplingInterval)->second.As(); + } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Historizing)) + { + *this << val.Attributes.find(AttributeId::Historizing)->second.As(); + } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Executable)) + { + *this << val.Attributes.find(AttributeId::Executable)->second.As(); + } - template<> - std::size_t RawSize(const AddNodesResponse& resp) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserExecutable)) { - return RawSize(resp.TypeId) + RawSize(resp.Header) + RawSizeContainer(resp.results) + RawSize(resp.Diagnostics); + *this << val.Attributes.find(AttributeId::UserExecutable)->second.As(); } - template<> - void DataSerializer::Serialize(const AddNodesResponse& resp) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::IsAbstract)) { - *this << resp.TypeId; - *this << resp.Header; - *this << resp.results; - *this << resp.Diagnostics; + *this << val.Attributes.find(AttributeId::IsAbstract)->second.As(); } - template<> - void DataDeserializer::Deserialize(AddNodesResponse& resp) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Symmetric)) { - *this >> resp.TypeId; - *this >> resp.Header; - *this >> resp.results; - *this >> resp.Diagnostics; + *this << val.Attributes.find(AttributeId::Symmetric)->second.As(); } - - // - // AddReferences - // + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::InverseName)) + { + *this << val.Attributes.find(AttributeId::InverseName)->second.As(); + } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ContainsNoLoops)) + { + *this << val.Attributes.find(AttributeId::ContainsNoLoops)->second.As(); + } +} +template<> +void DataDeserializer::Deserialize(NodeAttributes & val) +{ + *this >> val.Header; + int32_t size; + *this >> size ; // not used yet + *this >> val.SpecifiedAttributes; - template<> - std::size_t RawSize(const AddReferencesResponse& resp) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::DisplayName)) { - return RawSize(resp.TypeId) + RawSize(resp.Header) + RawSizeContainer(resp.Results) + RawSize(resp.Diagnostics); + LocalizedText tmp; + *this >> tmp; + val.Attributes[AttributeId::DisplayName] = tmp; } - template<> - void DataSerializer::Serialize(const AddReferencesResponse& resp) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Description)) { - *this << resp.TypeId; - *this << resp.Header; - *this << resp.Results; - *this << resp.Diagnostics; + LocalizedText tmp; + *this >> tmp; + val.Attributes[AttributeId::Description] = tmp; } - template<> - void DataDeserializer::Deserialize(AddReferencesResponse& resp) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::WriteMask)) { - *this >> resp.TypeId; - *this >> resp.Header; - *this >> resp.Results; - *this >> resp.Diagnostics; + uint32_t tmp; + *this >> tmp; + val.Attributes[AttributeId::WriteMask] = tmp; } - template<> - std::size_t RawSize(const AddReferencesItem& val) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserWriteMask)) { - return RawSize(val.SourceNodeId) + - RawSize(val.ReferenceTypeId) + - RawSize(val.IsForward) + - RawSize(val.TargetServerUri) + - RawSize(val.TargetNodeId) + - RawSize(val.TargetNodeClass) - ; + uint32_t tmp; + *this >> tmp; + val.Attributes[AttributeId::UserWriteMask] = tmp; } - template<> - void DataSerializer::Serialize(const AddReferencesItem& val) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::EventNotifier)) { - *this << val.SourceNodeId; - *this << val.ReferenceTypeId; - *this << val.IsForward; - *this << val.TargetServerUri; - *this << val.TargetNodeId; - *this << val.TargetNodeClass; + uint8_t tmp; + *this >> tmp; + val.Attributes[AttributeId::EventNotifier] = tmp; } - template<> - void DataDeserializer::Deserialize(AddReferencesItem& val) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Value)) { - *this >> val.SourceNodeId; - *this >> val.ReferenceTypeId; - *this >> val.IsForward; - *this >> val.TargetServerUri; - *this >> val.TargetNodeId; - *this >> val.TargetNodeClass; + Variant tmp; + *this >> tmp; + val.Attributes[AttributeId::Value] = tmp; } - template<> - std::size_t RawSize(const std::vector& ack) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::DataType)) { - return RawSizeContainer(ack); + NodeId tmp; + *this >> tmp; + val.Attributes[AttributeId::DataType] = tmp; } - - - template<> - void DataDeserializer::Deserialize>(std::vector& ack) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ValueRank)) { - DeserializeContainer(*this, ack); + int32_t tmp; + *this >> tmp; + val.Attributes[AttributeId::ValueRank] = tmp; } - template<> - void DataSerializer::Serialize>(const std::vector& ack) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ArrayDimensions)) { - SerializeContainer(*this, ack); + std::vector tmp; + *this >> tmp; + val.Attributes[AttributeId::ArrayDimensions] = tmp; } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::AccessLevel)) + { + uint8_t tmp; + *this >> tmp; + val.Attributes[AttributeId::AccessLevel] = tmp; + } - template<> - std::size_t RawSize(const AddReferencesParameters& val) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserAccessLevel)) { - return RawSizeContainer(val.ReferencesToAdd); + uint8_t tmp; + *this >> tmp; + val.Attributes[AttributeId::UserAccessLevel] = tmp; } - template<> - void DataSerializer::Serialize(const AddReferencesParameters& val) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::MinimumSamplingInterval)) { - *this << val.ReferencesToAdd; + Duration tmp; + *this >> tmp; + val.Attributes[AttributeId::MinimumSamplingInterval] = tmp; } - template<> - void DataDeserializer::Deserialize(AddReferencesParameters& val) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Historizing)) { - *this >> val.ReferencesToAdd; + bool tmp; + *this >> tmp; + val.Attributes[AttributeId::Historizing] = tmp; } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Executable)) + { + } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::UserExecutable)) + { + } + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::IsAbstract)) + { + } - template<> - std::size_t RawSize(const AddReferencesRequest& val) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::Symmetric)) { - return RawSize(val.TypeId) + RawSize(val.Header) + - RawSize(val.Parameters) - ; } - template<> - void DataSerializer::Serialize(const AddReferencesRequest& val) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::InverseName)) { - *this << val.TypeId; - *this << val.Header; - *this << val.Parameters; } - template<> - void DataDeserializer::Deserialize(AddReferencesRequest& val) + if (std::bitset<32>(val.SpecifiedAttributes).test(SpecifiedAttributesEncoding::ContainsNoLoops)) { - *this >> val.TypeId; - *this >> val.Header; - *this >> val.Parameters; } +} + +template<> +std::size_t RawSize(const AddNodesItem & resp) +{ + return RawSize(resp.ParentNodeId) + + RawSize(resp.ReferenceTypeId) + + RawSize(resp.RequestedNewNodeId) + + RawSize(resp.BrowseName) + + RawSize(resp.Class) + + RawSize(resp.Attributes) + + RawSize(resp.TypeDefinition); +} + +template<> +void DataSerializer::Serialize(const AddNodesItem & resp) +{ + *this << resp.ParentNodeId; + *this << resp.ReferenceTypeId; + *this << resp.RequestedNewNodeId; + *this << resp.BrowseName; + *this << resp.Class; + *this << resp.Attributes; + *this << resp.TypeDefinition; +} + +template<> +void DataDeserializer::Deserialize(AddNodesItem & resp) +{ + *this >> resp.ParentNodeId; + *this >> resp.ReferenceTypeId; + *this >> resp.RequestedNewNodeId; + *this >> resp.BrowseName; + *this >> resp.Class; + *this >> resp.Attributes; + *this >> resp.TypeDefinition; +} + +template<> +std::size_t RawSize(const std::vector & ack) +{ + return RawSizeContainer(ack); +} + + +template<> +void DataDeserializer::Deserialize>(std::vector & ack) +{ + DeserializeContainer(*this, ack); +} + +template<> +void DataSerializer::Serialize>(const std::vector & ack) +{ + SerializeContainer(*this, ack); +} + +template<> +std::size_t RawSize(const AddNodesParameters & val) +{ + return RawSize(val.NodesToAdd); +} + +template<> +void DataSerializer::Serialize(const AddNodesParameters & val) +{ + *this << val.NodesToAdd; +} + +template<> +void DataDeserializer::Deserialize(AddNodesParameters & resp) +{ + *this >> resp.NodesToAdd; +} + + + +template<> +std::size_t RawSize(const AddNodesRequest & resp) +{ + return RawSize(resp.TypeId) + RawSize(resp.Header) + RawSize(resp.Parameters); +} + +template<> +void DataSerializer::Serialize(const AddNodesRequest & resp) +{ + *this << resp.TypeId; + *this << resp.Header; + *this << resp.Parameters; +} + +template<> +void DataDeserializer::Deserialize(AddNodesRequest & resp) +{ + *this >> resp.TypeId; + *this >> resp.Header; + *this >> resp.Parameters; +} + +template<> +std::size_t RawSize(const AddNodesResult & resp) +{ + return RawSize(resp.Status) + RawSize(resp.AddedNodeId); +} + +template<> +void DataSerializer::Serialize(const AddNodesResult & resp) +{ + *this << resp.Status; + *this << resp.AddedNodeId; +} + +template<> +void DataDeserializer::Deserialize(AddNodesResult & resp) +{ + *this >> resp.Status; + *this >> resp.AddedNodeId; +} + + +template<> +void DataDeserializer::Deserialize>(std::vector & ack) +{ + DeserializeContainer(*this, ack); +} + +template<> +void DataSerializer::Serialize>(const std::vector & ack) +{ + SerializeContainer(*this, ack); +} + + + + + + +template<> +std::size_t RawSize(const AddNodesResponse & resp) +{ + return RawSize(resp.TypeId) + RawSize(resp.Header) + RawSizeContainer(resp.results) + RawSize(resp.Diagnostics); +} + +template<> +void DataSerializer::Serialize(const AddNodesResponse & resp) +{ + *this << resp.TypeId; + *this << resp.Header; + *this << resp.results; + *this << resp.Diagnostics; +} + +template<> +void DataDeserializer::Deserialize(AddNodesResponse & resp) +{ + *this >> resp.TypeId; + *this >> resp.Header; + *this >> resp.results; + *this >> resp.Diagnostics; +} +// +// AddReferences +// - } // namespace Binary - const char* GetObjectIdName(const NodeId& id) - { - if ( id == ObjectId::FolderType ) + + +template<> +std::size_t RawSize(const AddReferencesResponse & resp) +{ + return RawSize(resp.TypeId) + RawSize(resp.Header) + RawSizeContainer(resp.Results) + RawSize(resp.Diagnostics); +} + +template<> +void DataSerializer::Serialize(const AddReferencesResponse & resp) +{ + *this << resp.TypeId; + *this << resp.Header; + *this << resp.Results; + *this << resp.Diagnostics; +} + +template<> +void DataDeserializer::Deserialize(AddReferencesResponse & resp) +{ + *this >> resp.TypeId; + *this >> resp.Header; + *this >> resp.Results; + *this >> resp.Diagnostics; +} + +template<> +std::size_t RawSize(const AddReferencesItem & val) +{ + return RawSize(val.SourceNodeId) + + RawSize(val.ReferenceTypeId) + + RawSize(val.IsForward) + + RawSize(val.TargetServerUri) + + RawSize(val.TargetNodeId) + + RawSize(val.TargetNodeClass) + ; +} + +template<> +void DataSerializer::Serialize(const AddReferencesItem & val) +{ + *this << val.SourceNodeId; + *this << val.ReferenceTypeId; + *this << val.IsForward; + *this << val.TargetServerUri; + *this << val.TargetNodeId; + *this << val.TargetNodeClass; +} + +template<> +void DataDeserializer::Deserialize(AddReferencesItem & val) +{ + *this >> val.SourceNodeId; + *this >> val.ReferenceTypeId; + *this >> val.IsForward; + *this >> val.TargetServerUri; + *this >> val.TargetNodeId; + *this >> val.TargetNodeClass; +} + +template<> +std::size_t RawSize(const std::vector & ack) +{ + return RawSizeContainer(ack); +} + + + +template<> +void DataDeserializer::Deserialize>(std::vector & ack) +{ + DeserializeContainer(*this, ack); +} + +template<> +void DataSerializer::Serialize>(const std::vector & ack) +{ + SerializeContainer(*this, ack); +} + + +template<> +std::size_t RawSize(const AddReferencesParameters & val) +{ + return RawSizeContainer(val.ReferencesToAdd); +} + +template<> +void DataSerializer::Serialize(const AddReferencesParameters & val) +{ + *this << val.ReferencesToAdd; +} + +template<> +void DataDeserializer::Deserialize(AddReferencesParameters & val) +{ + *this >> val.ReferencesToAdd; +} + + + + +template<> +std::size_t RawSize(const AddReferencesRequest & val) +{ + return RawSize(val.TypeId) + RawSize(val.Header) + + RawSize(val.Parameters) + ; +} + +template<> +void DataSerializer::Serialize(const AddReferencesRequest & val) +{ + *this << val.TypeId; + *this << val.Header; + *this << val.Parameters; +} + +template<> +void DataDeserializer::Deserialize(AddReferencesRequest & val) +{ + *this >> val.TypeId; + *this >> val.Header; + *this >> val.Parameters; +} + + + + +} // namespace Binary + +const char * GetObjectIdName(const NodeId & id) +{ + if (id == ObjectId::FolderType) { return Names::FolderType; } - else if ( id == ObjectId::BaseVariableType ) + + else if (id == ObjectId::BaseVariableType) { return Names::BaseVariableType; } - else if ( id == ObjectId::BaseDataVariableType ) + + else if (id == ObjectId::BaseDataVariableType) { return Names::BaseDataVariableType; } - else if ( id == ObjectId::PropertyType ) + + else if (id == ObjectId::PropertyType) { return Names::PropertyType; } - else if ( id == ObjectId::BaseObjectType ) + + else if (id == ObjectId::BaseObjectType) { return Names::BaseObjectType; } - else if (id == ObjectId::ModellingRule_Mandatory) + + else if (id == ObjectId::ModellingRule_Mandatory) { return Names::ModellingRule_Mandatory; } - else if ( id == ObjectId::ServerType ) + + else if (id == ObjectId::ServerType) { return Names::ServerType; } - return "NoNameFound"; - } + + return "NoNameFound"; +} } diff --git a/src/protocol/binary_raw_size.cpp b/src/protocol/binary_raw_size.cpp index cac1e993..d4870a72 100644 --- a/src/protocol/binary_raw_size.cpp +++ b/src/protocol/binary_raw_size.cpp @@ -17,387 +17,396 @@ namespace OpcUa { - namespace Binary - { - template<> - std::size_t RawSize(const bool&) - { - return 1; - } +namespace Binary +{ +template<> +std::size_t RawSize(const bool &) +{ + return 1; +} - template<> - std::size_t RawSize(const uint8_t&) - { - return 1; - } +template<> +std::size_t RawSize(const uint8_t &) +{ + return 1; +} - template<> - std::size_t RawSize(const int8_t&) - { - return 1; - } +template<> +std::size_t RawSize(const int8_t &) +{ + return 1; +} - template<> - std::size_t RawSize(const uint16_t&) - { - return 2; - } +template<> +std::size_t RawSize(const uint16_t &) +{ + return 2; +} - template<> - std::size_t RawSize(const int16_t&) - { - return 2; - } +template<> +std::size_t RawSize(const int16_t &) +{ + return 2; +} - template<> - std::size_t RawSize(const uint32_t&) - { - return 4; - } +template<> +std::size_t RawSize(const uint32_t &) +{ + return 4; +} - template<> - std::size_t RawSize(const int32_t&) - { - return 4; - } +template<> +std::size_t RawSize(const int32_t &) +{ + return 4; +} - template<> - std::size_t RawSize(const uint64_t&) - { - return 8; - } +template<> +std::size_t RawSize(const uint64_t &) +{ + return 8; +} - template<> - std::size_t RawSize(const int64_t&) - { - return 8; - } +template<> +std::size_t RawSize(const int64_t &) +{ + return 8; +} - template<> - std::size_t RawSize(const float&) - { - return 4; - } +template<> +std::size_t RawSize(const float &) +{ + return 4; +} - template<> - std::size_t RawSize(const double&) - { - return 8; - } +template<> +std::size_t RawSize(const double &) +{ + return 8; +} - template<> - std::size_t RawSize(const Guid&) - { - return 16; - } +template<> +std::size_t RawSize(const Guid &) +{ + return 16; +} - template<> - std::size_t RawSize(const StatusCode&) - { - return 4; - } +template<> +std::size_t RawSize(const StatusCode &) +{ + return 4; +} - template<> - std::size_t RawSize(const std::string& str) - { - const std::size_t headerSize = 4; - return headerSize + str.size(); - } +template<> +std::size_t RawSize(const std::string & str) +{ + const std::size_t headerSize = 4; + return headerSize + str.size(); +} - template<> - std::size_t RawSize(const ByteString& str) - { - const std::size_t headerSize = 4; - return headerSize + str.Data.size(); - } +template<> +std::size_t RawSize(const ByteString & str) +{ + const std::size_t headerSize = 4; + return headerSize + str.Data.size(); +} - template<> - std::size_t RawSize(const DateTime& date) - { - return RawSize(date.Value); - } +template<> +std::size_t RawSize(const DateTime & date) +{ + return RawSize(date.Value); +} - template<> - std::size_t RawSize>(const std::vector& vec) - { - const std::size_t headerSize = 4; - return headerSize + vec.size(); - } +template<> +std::size_t RawSize>(const std::vector & vec) +{ + const std::size_t headerSize = 4; + return headerSize + vec.size(); +} - template<> - std::size_t RawSize>>(const std::vector>& vec) - { - const std::size_t headerSize = 4; - std::size_t totalSize = headerSize; - std::for_each(vec.begin(), vec.end(), [&] (const std::vector& v) {totalSize += RawSize(v);}); - return totalSize; - } +template<> +std::size_t RawSize>>(const std::vector> & vec) +{ + const std::size_t headerSize = 4; + std::size_t totalSize = headerSize; + std::for_each(vec.begin(), vec.end(), [&](const std::vector & v) {totalSize += RawSize(v);}); + return totalSize; +} - template<> - std::size_t RawSize>(const std::vector& vec) - { - const std::size_t headerSize = 4; - std::size_t totalSize = headerSize; - std::for_each(vec.begin(), vec.end(), [&] (const std::string& str) {totalSize += RawSize(str);}); - return totalSize; - } +template<> +std::size_t RawSize>(const std::vector & vec) +{ + const std::size_t headerSize = 4; + std::size_t totalSize = headerSize; + std::for_each(vec.begin(), vec.end(), [&](const std::string & str) {totalSize += RawSize(str);}); + return totalSize; +} - template<> - std::size_t RawSize
(const Header&) - { - const std::size_t sizeofType = 3; // 'H', 'E', 'L' - const std::size_t sizeofChunk = 1; // 'F' - const std::size_t sizeofSize = 4; - return sizeofType + sizeofChunk + sizeofSize; - } +template<> +std::size_t RawSize
(const Header &) +{ + const std::size_t sizeofType = 3; // 'H', 'E', 'L' + const std::size_t sizeofChunk = 1; // 'F' + const std::size_t sizeofSize = 4; + return sizeofType + sizeofChunk + sizeofSize; +} - template<> - std::size_t RawSize(const SecureHeader&) - { - const std::size_t sizeofType = 3; // 'H', 'E', 'L' - const std::size_t sizeofChunk = 1; // 'F' - const std::size_t sizeofSize = 4; - const std::size_t sizeofChannelId = 4; - return sizeofType + sizeofChunk + sizeofSize + sizeofChannelId; - } +template<> +std::size_t RawSize(const SecureHeader &) +{ + const std::size_t sizeofType = 3; // 'H', 'E', 'L' + const std::size_t sizeofChunk = 1; // 'F' + const std::size_t sizeofSize = 4; + const std::size_t sizeofChannelId = 4; + return sizeofType + sizeofChunk + sizeofSize + sizeofChannelId; +} - template<> - std::size_t RawSize(const Hello& hello) - { - const std::size_t sizeOfProtocolVersion = 4; - const std::size_t sizeOfReceiveBufferSize = 4; - const std::size_t sizeOfSendBufferSize = 4; - const std::size_t sizeOfMaxMessageSize = 4; - const std::size_t sizeOfMaxChunkCount = 4; - - return sizeOfProtocolVersion + - sizeOfReceiveBufferSize + - sizeOfSendBufferSize + - sizeOfMaxMessageSize + - sizeOfMaxChunkCount + - RawSize(hello.EndpointUrl); - } +template<> +std::size_t RawSize(const Hello & hello) +{ + const std::size_t sizeOfProtocolVersion = 4; + const std::size_t sizeOfReceiveBufferSize = 4; + const std::size_t sizeOfSendBufferSize = 4; + const std::size_t sizeOfMaxMessageSize = 4; + const std::size_t sizeOfMaxChunkCount = 4; + + return sizeOfProtocolVersion + + sizeOfReceiveBufferSize + + sizeOfSendBufferSize + + sizeOfMaxMessageSize + + sizeOfMaxChunkCount + + RawSize(hello.EndpointUrl); +} - template<> - std::size_t RawSize(const Acknowledge&) - { - const std::size_t sizeofProtocolVersion = 4; - const std::size_t sizeofReceiveBufferSize = 4; - const std::size_t sizeofSendBufferSize = 4; - const std::size_t sizeofMaxMessageSize = 4; - const std::size_t sizeofMaxChunkCount = 4; +template<> +std::size_t RawSize(const Acknowledge &) +{ + const std::size_t sizeofProtocolVersion = 4; + const std::size_t sizeofReceiveBufferSize = 4; + const std::size_t sizeofSendBufferSize = 4; + const std::size_t sizeofMaxMessageSize = 4; + const std::size_t sizeofMaxChunkCount = 4; - return sizeofProtocolVersion + sizeofReceiveBufferSize + sizeofSendBufferSize + sizeofMaxMessageSize + sizeofMaxChunkCount; - } + return sizeofProtocolVersion + sizeofReceiveBufferSize + sizeofSendBufferSize + sizeofMaxMessageSize + sizeofMaxChunkCount; +} - template<> - std::size_t RawSize(const Error& err) - { - const std::size_t sizeofCode = 4; - return sizeofCode + RawSize(err.Reason); - } +template<> +std::size_t RawSize(const Error & err) +{ + const std::size_t sizeofCode = 4; + return sizeofCode + RawSize(err.Reason); +} - template<> - std::size_t RawSize(const AsymmetricAlgorithmHeader& ack) - { - const std::size_t sizeofUri = RawSize(ack.SecurityPolicyUri); - const std::size_t sizeofCertificate = RawSize(ack.SenderCertificate); - const std::size_t sizeofThumbprint = RawSize(ack.ReceiverCertificateThumbPrint); - return sizeofUri + sizeofCertificate + sizeofThumbprint; - } +template<> +std::size_t RawSize(const AsymmetricAlgorithmHeader & ack) +{ + const std::size_t sizeofUri = RawSize(ack.SecurityPolicyUri); + const std::size_t sizeofCertificate = RawSize(ack.SenderCertificate); + const std::size_t sizeofThumbprint = RawSize(ack.ReceiverCertificateThumbPrint); + return sizeofUri + sizeofCertificate + sizeofThumbprint; +} - template<> - std::size_t RawSize(const SequenceHeader&) - { - const std::size_t sizeofSequenceNumber = 4; - const std::size_t sizeofRequestId = 4; +template<> +std::size_t RawSize(const SequenceHeader &) +{ + const std::size_t sizeofSequenceNumber = 4; + const std::size_t sizeofRequestId = 4; - return sizeofSequenceNumber + sizeofRequestId; - } + return sizeofSequenceNumber + sizeofRequestId; +} + +template<> +std::size_t RawSize(const AdditionalHeader & header) +{ + const std::size_t sizeofTypeId = RawSize(header.TypeId); + const std::size_t sizeofEncoding = 1; + return sizeofTypeId + sizeofEncoding; +} + +template<> +std::size_t RawSize(const RequestHeader & header) +{ + const std::size_t sizeofSessionAuthenticationToken = RawSize(header.SessionAuthenticationToken); + const std::size_t sizeofUtcTime = 8; + const std::size_t sizeofRequestHandle = 4; + const std::size_t sizeofReturnDiagnostics = 4; + const std::size_t sizeofAuditEntryId = 4 + header.AuditEntryId.size(); + const std::size_t sizeofTimeout = 4; + const std::size_t sizeofAdditional = RawSize(header.Additional); + + return sizeofSessionAuthenticationToken + sizeofUtcTime + sizeofRequestHandle + sizeofReturnDiagnostics + sizeofAuditEntryId + sizeofTimeout + sizeofAdditional; +} + +template<> +std::size_t RawSize(const OpenSecureChannelRequest & request) +{ + const std::size_t sizeofTypeId = RawSize(request.TypeId); + const std::size_t sizeofHeader = RawSize(request.Header); + const std::size_t sizeofClientProtocolVersion = 4; + const std::size_t sizeofRequestType = 4; + const std::size_t sizeofSecurityMode = 4; + const std::size_t sizeofClientNonce = 4 + request.Parameters.ClientNonce.size(); + const std::size_t sizeofRequestLifeTime = 4; + + return sizeofTypeId + sizeofHeader + sizeofClientProtocolVersion + sizeofRequestType + sizeofSecurityMode + sizeofClientNonce + sizeofRequestLifeTime; +} + +template<> +std::size_t RawSize(const SymmetricAlgorithmHeader & header) +{ + const std::size_t sizeofTokenId = 4; + return sizeofTokenId; +} - template<> - std::size_t RawSize(const AdditionalHeader& header) +template<> +std::size_t RawSize(const DiagnosticInfo & info) +{ + const std::size_t sizeofEncodingMask = 1; + size_t size = sizeofEncodingMask; + + if (info.EncodingMask & DIM_SYMBOLIC_Id) { - const std::size_t sizeofTypeId = RawSize(header.TypeId); - const std::size_t sizeofEncoding = 1; - return sizeofTypeId + sizeofEncoding; + const std::size_t sizeofSymbolicId = 4; + size += sizeofSymbolicId; } - template<> - std::size_t RawSize(const RequestHeader& header) + if (info.EncodingMask & DIM_NAMESPACE) { - const std::size_t sizeofSessionAuthenticationToken = RawSize(header.SessionAuthenticationToken); - const std::size_t sizeofUtcTime = 8; - const std::size_t sizeofRequestHandle = 4; - const std::size_t sizeofReturnDiagnostics = 4; - const std::size_t sizeofAuditEntryId = 4 + header.AuditEntryId.size(); - const std::size_t sizeofTimeout = 4; - const std::size_t sizeofAdditional = RawSize(header.Additional); - - return sizeofSessionAuthenticationToken + sizeofUtcTime + sizeofRequestHandle + sizeofReturnDiagnostics + sizeofAuditEntryId + sizeofTimeout + sizeofAdditional; + const std::size_t sizeofNamespace = 4; + size += sizeofNamespace; } - template<> - std::size_t RawSize(const OpenSecureChannelRequest& request) + if (info.EncodingMask & DIM_LOCALIZED_TEXT) { - const std::size_t sizeofTypeId = RawSize(request.TypeId); - const std::size_t sizeofHeader = RawSize(request.Header); - const std::size_t sizeofClientProtocolVersion = 4; - const std::size_t sizeofRequestType = 4; - const std::size_t sizeofSecurityMode = 4; - const std::size_t sizeofClientNonce = 4 + request.Parameters.ClientNonce.size(); - const std::size_t sizeofRequestLifeTime = 4; - - return sizeofTypeId + sizeofHeader + sizeofClientProtocolVersion + sizeofRequestType + sizeofSecurityMode + sizeofClientNonce + sizeofRequestLifeTime; + const std::size_t sizeofLocalizedText = 4; + size += sizeofLocalizedText; } - template<> - std::size_t RawSize(const SymmetricAlgorithmHeader& header) + if (info.EncodingMask & DIM_LOCALE) { - const std::size_t sizeofTokenId = 4; - return sizeofTokenId; + const std::size_t sizeofLocale = 4; + size += sizeofLocale; } - template<> - std::size_t RawSize(const DiagnosticInfo& info) + if (info.EncodingMask & DIM_ADDITIONAL_INFO) { - const std::size_t sizeofEncodingMask = 1; - size_t size = sizeofEncodingMask; - - if (info.EncodingMask & DIM_SYMBOLIC_Id) - { - const std::size_t sizeofSymbolicId = 4; - size += sizeofSymbolicId; - } - if (info.EncodingMask & DIM_NAMESPACE) - { - const std::size_t sizeofNamespace = 4; - size += sizeofNamespace; - } - if (info.EncodingMask & DIM_LOCALIZED_TEXT) - { - const std::size_t sizeofLocalizedText = 4; - size += sizeofLocalizedText; - } - if (info.EncodingMask & DIM_LOCALE) - { - const std::size_t sizeofLocale = 4; - size += sizeofLocale; - } - if (info.EncodingMask & DIM_ADDITIONAL_INFO) - { - const std::size_t sizeofAdditionalInfo = 4 + info.AdditionalInfo.size(); - size += sizeofAdditionalInfo; - } - if (info.EncodingMask & DIM_INNER_STATUS_CODE) - { - const std::size_t sizeofInnerStatusCode= 4; - size += sizeofInnerStatusCode; - } - if ((info.EncodingMask & DIM_INNER_DIAGNOSTIC_INFO) && info.InnerDiagnostics) - { - size += RawSize(*info.InnerDiagnostics); - } - - return size; + const std::size_t sizeofAdditionalInfo = 4 + info.AdditionalInfo.size(); + size += sizeofAdditionalInfo; } - template<> - std::size_t RawSize(const DiagnosticInfoList& infos) + if (info.EncodingMask & DIM_INNER_STATUS_CODE) { - return RawSizeContainer(infos); + const std::size_t sizeofInnerStatusCode = 4; + size += sizeofInnerStatusCode; } - template<> - std::size_t RawSize(const ResponseHeader& header) + if ((info.EncodingMask & DIM_INNER_DIAGNOSTIC_INFO) && info.InnerDiagnostics) { - const std::size_t sizeofTimestamp = 8; - const std::size_t sizeofRequestHandle = 4; - const std::size_t sizeofServiceResult = 4; + size += RawSize(*info.InnerDiagnostics); + } - std::size_t sizeofDiagnostics = RawSize(header.InnerDiagnostics); - std::size_t sizeofStringTable = 4; - std::for_each(header.StringTable.begin(), header.StringTable.end(), [&] (const std::string& str) {sizeofStringTable += RawSize(str);}); + return size; +} - const std::size_t sizeofAdditional = RawSize(header.Additional); - return sizeofTimestamp + sizeofRequestHandle + sizeofServiceResult + sizeofDiagnostics + sizeofStringTable + sizeofAdditional; - } +template<> +std::size_t RawSize(const DiagnosticInfoList & infos) +{ + return RawSizeContainer(infos); +} - template<> - std::size_t RawSize(const SecurityToken&) - { - const std::size_t sizeofSecureChannelId = 4; - const std::size_t sizeofTokenId = 4; - const std::size_t sizeofCreatedAt = 8; - const std::size_t sizeofRevisedLifetime = 4; +template<> +std::size_t RawSize(const ResponseHeader & header) +{ + const std::size_t sizeofTimestamp = 8; + const std::size_t sizeofRequestHandle = 4; + const std::size_t sizeofServiceResult = 4; - return sizeofSecureChannelId + sizeofTokenId + sizeofCreatedAt + sizeofRevisedLifetime; - } + std::size_t sizeofDiagnostics = RawSize(header.InnerDiagnostics); + std::size_t sizeofStringTable = 4; + std::for_each(header.StringTable.begin(), header.StringTable.end(), [&](const std::string & str) {sizeofStringTable += RawSize(str);}); - template<> - std::size_t RawSize(const OpenSecureChannelResponse& response) - { - const std::size_t sizeofTypeId = RawSize(response.TypeId); - const std::size_t sizeofHeader = RawSize(response.Header); - const std::size_t sizeofServerProtocolVersion = 4; - const std::size_t sizeofChannelSecurityToken = RawSize(response.ChannelSecurityToken); - const std::size_t sizeofServerNonce = 4 + response.ServerNonce.size(); + const std::size_t sizeofAdditional = RawSize(header.Additional); + return sizeofTimestamp + sizeofRequestHandle + sizeofServiceResult + sizeofDiagnostics + sizeofStringTable + sizeofAdditional; +} - return sizeofTypeId + sizeofHeader + sizeofServerProtocolVersion + sizeofChannelSecurityToken + sizeofServerNonce; - } +template<> +std::size_t RawSize(const SecurityToken &) +{ + const std::size_t sizeofSecureChannelId = 4; + const std::size_t sizeofTokenId = 4; + const std::size_t sizeofCreatedAt = 8; + const std::size_t sizeofRevisedLifetime = 4; + + return sizeofSecureChannelId + sizeofTokenId + sizeofCreatedAt + sizeofRevisedLifetime; +} + +template<> +std::size_t RawSize(const OpenSecureChannelResponse & response) +{ + const std::size_t sizeofTypeId = RawSize(response.TypeId); + const std::size_t sizeofHeader = RawSize(response.Header); + const std::size_t sizeofServerProtocolVersion = 4; + const std::size_t sizeofChannelSecurityToken = RawSize(response.ChannelSecurityToken); + const std::size_t sizeofServerNonce = 4 + response.ServerNonce.size(); + + return sizeofTypeId + sizeofHeader + sizeofServerProtocolVersion + sizeofChannelSecurityToken + sizeofServerNonce; +} + +template<> +std::size_t RawSize(const CloseSecureChannelRequest & request) +{ + const std::size_t sizeofTypeId = RawSize(request.TypeId); + const std::size_t sizeofHeader = RawSize(request.Header); + return sizeofTypeId + sizeofHeader; +} - template<> - std::size_t RawSize(const CloseSecureChannelRequest& request) + +template<> +std::size_t RawSize(const LocalizedText & text) +{ + std::size_t size = RawSize(text.Encoding); + + if (text.Encoding & HAS_LOCALE) { - const std::size_t sizeofTypeId = RawSize(request.TypeId); - const std::size_t sizeofHeader = RawSize(request.Header); - return sizeofTypeId + sizeofHeader; + size += RawSize(text.Locale); } - - template<> - std::size_t RawSize(const LocalizedText& text) + if (text.Encoding & HAS_TEXT) { - std::size_t size = RawSize(text.Encoding); - if (text.Encoding & HAS_LOCALE) - { - size += RawSize(text.Locale); - } - if (text.Encoding & HAS_TEXT) - { - size += RawSize(text.Text); - } - return size; + size += RawSize(text.Text); } + return size; +} + // template<> // std::size_t RawSize(const SignatureData& s) // { // return RawSize(s.Signature) + RawSize(s.Algorithm); // } - template<> - std::size_t RawSize(const ExtensionObjectHeader& header) - { - const std::size_t sizeofEncoding = 1; - return RawSize(header.TypeId) + sizeofEncoding; - } +template<> +std::size_t RawSize(const ExtensionObjectHeader & header) +{ + const std::size_t sizeofEncoding = 1; + return RawSize(header.TypeId) + sizeofEncoding; +} - template<> - std::size_t RawSize(const QualifiedName& name) - { - return RawSize(name.NamespaceIndex) + RawSize(name.Name); - } +template<> +std::size_t RawSize(const QualifiedName & name) +{ + return RawSize(name.NamespaceIndex) + RawSize(name.Name); +} - template<> - std::size_t RawSize(const IntegerId&) - { - return 4; - } +template<> +std::size_t RawSize(const IntegerId &) +{ + return 4; +} - } +} } diff --git a/src/protocol/binary_serialization.h b/src/protocol/binary_serialization.h index 1182c9a7..2d42a49e 100644 --- a/src/protocol/binary_serialization.h +++ b/src/protocol/binary_serialization.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -17,39 +17,41 @@ namespace OpcUa { - template - inline void SerializeContainer(Stream& out, const Container& c, uint32_t emptySizeValue = ~uint32_t()) - { - if (c.empty()) +template +inline void SerializeContainer(Stream & out, const Container & c, uint32_t emptySizeValue = ~uint32_t()) +{ + if (c.empty()) { out.Serialize(emptySizeValue); } - else + + else { out.Serialize(static_cast(c.size())); - std::for_each(c.begin(), c.end(), [&](typename Container::value_type const& v) { out.Serialize(v); }); + std::for_each(c.begin(), c.end(), [&](typename Container::value_type const & v) { out.Serialize(v); }); } - } +} - template - inline void DeserializeContainer(Stream& in, Container& c) - { - uint32_t size = 0; - in.Deserialize(size); +template +inline void DeserializeContainer(Stream & in, Container & c) +{ + uint32_t size = 0; + in.Deserialize(size); + + c.clear(); - c.clear(); - if (!size || size == ~uint32_t()) + if (!size || size == ~uint32_t()) { return; } - for (uint32_t i = 0; i < size; ++i) + for (uint32_t i = 0; i < size; ++i) { typename Container::value_type val; in.Deserialize(val); c.push_back(val); } - } +} } #endif // __OPC_UA_BINARY_SERIALIZATION_TOOLS_H__ diff --git a/src/protocol/binary_session.cpp b/src/protocol/binary_session.cpp index cd8df116..464a53d1 100644 --- a/src/protocol/binary_session.cpp +++ b/src/protocol/binary_session.cpp @@ -21,188 +21,196 @@ namespace OpcUa { - CloseSessionResponse::CloseSessionResponse() - : TypeId(CLOSE_SESSION_RESPONSE) - { - } - - UserIdentifyToken::UserIdentifyToken() - : Header(USER_IdENTIFY_TOKEN_ANONYMOUS, HAS_BINARY_BODY) - { - } - - UserTokenType UserIdentifyToken::type() const - { - UserTokenType type = UserTokenType::Anonymous; - if(Header.TypeId.FourByteData.Identifier == USER_IdENTIFY_TOKEN_USERNAME) - type = UserTokenType::UserName; - return type; - } - - void UserIdentifyToken::setUser(const std::string &user, const std::string &password) - { - Header.TypeId.FourByteData.Identifier = USER_IdENTIFY_TOKEN_USERNAME; - UserName.UserName = user; - UserName.Password = password; - //UserName.EncryptionAlgorithm = "http://www.w3.org/2001/04/xmlenc#rsa-oaep"; - } - - void UserIdentifyToken::setPolicyId(const std::string &id) - { - int sz = id.length(); - PolicyId.resize(sz); - for(int i=0; i - std::size_t RawSize(const UserIdentifyToken::UserNameStruct& uname) - { - return RawSize(uname.UserName) + RawSize(uname.Password) + RawSize(uname.EncryptionAlgorithm); - } +CloseSessionResponse::CloseSessionResponse() + : TypeId(CLOSE_SESSION_RESPONSE) +{ +} - template<> - void DataSerializer::Serialize(const UserIdentifyToken::UserNameStruct& uname) - { - *this << uname.UserName; - *this << uname.Password; - *this << uname.EncryptionAlgorithm; - } +UserIdentifyToken::UserIdentifyToken() + : Header(USER_IdENTIFY_TOKEN_ANONYMOUS, HAS_BINARY_BODY) +{ +} - template<> - void DataDeserializer::Deserialize(UserIdentifyToken::UserNameStruct& uname) - { - *this >> uname.UserName; - *this >> uname.Password; - *this >> uname.EncryptionAlgorithm; - } +UserTokenType UserIdentifyToken::type() const +{ + UserTokenType type = UserTokenType::Anonymous; - template<> - std::size_t RawSize(const UserIdentifyToken& token) - { - std::size_t ret = RawSize(token.Header) + RawSize(token.PolicyId) + RawSize(( uint32_t)0); - if(token.type() == UserTokenType::UserName) - ret += RawSize(token.UserName); - return ret; - } + if (Header.TypeId.FourByteData.Identifier == USER_IdENTIFY_TOKEN_USERNAME) + { type = UserTokenType::UserName; } - template<> - void DataSerializer::Serialize(const UserIdentifyToken& token) - { - *this << token.Header; - *this << int32_t(RawSize(token)-RawSize(token.Header)-RawSize(( uint32_t)0)); - *this << token.PolicyId; - if(token.type() == UserTokenType::UserName) - *this << token.UserName; - } + return type; +} - template<> - void DataDeserializer::Deserialize(UserIdentifyToken& token) - { - *this >> token.Header; - int32_t tmp; - *this >> tmp; - *this >> token.PolicyId; - if(token.type() == UserTokenType::UserName) - *this >> token.UserName; - } +void UserIdentifyToken::setUser(const std::string & user, const std::string & password) +{ + Header.TypeId.FourByteData.Identifier = USER_IdENTIFY_TOKEN_USERNAME; + UserName.UserName = user; + UserName.Password = password; + //UserName.EncryptionAlgorithm = "http://www.w3.org/2001/04/xmlenc#rsa-oaep"; +} - //--------------------------------------------------- - // CloseSessionRequest - //--------------------------------------------------- +void UserIdentifyToken::setPolicyId(const std::string & id) +{ + int sz = id.length(); + PolicyId.resize(sz); - template<> - std::size_t RawSize(const CloseSessionRequest& request) + for (int i = 0; i < sz; i++) { - return RawSize(request.TypeId) + RawSize(request.Header) + - RawSize(request.DeleteSubscriptions); + PolicyId[i] = id[i]; } +} - template<> - void DataSerializer::Serialize(const CloseSessionRequest& request) - { - *this << request.TypeId; - *this << request.Header; +CloseSessionRequest::CloseSessionRequest() + : TypeId(CLOSE_SESSION_REQUEST) + , DeleteSubscriptions(true) +{ +} - *this << request.DeleteSubscriptions; - } +ServiceFaultResponse::ServiceFaultResponse() + : TypeId(SERVICE_FAULT) +{ +} - template<> - void DataDeserializer::Deserialize(CloseSessionRequest& request) - { - *this >> request.TypeId; - *this >> request.Header; +namespace Binary +{ +//--------------------------------------------------- +// UserIdentifyToken +//--------------------------------------------------- - *this >> request.DeleteSubscriptions; - } +template<> +std::size_t RawSize(const UserIdentifyToken::UserNameStruct & uname) +{ + return RawSize(uname.UserName) + RawSize(uname.Password) + RawSize(uname.EncryptionAlgorithm); +} - //--------------------------------------------------- - // CloseSessionResponse - //--------------------------------------------------- +template<> +void DataSerializer::Serialize(const UserIdentifyToken::UserNameStruct & uname) +{ + *this << uname.UserName; + *this << uname.Password; + *this << uname.EncryptionAlgorithm; +} - template<> - std::size_t RawSize(const CloseSessionResponse& response) - { - return RawSize(response.TypeId) + RawSize(response.Header); - } +template<> +void DataDeserializer::Deserialize(UserIdentifyToken::UserNameStruct & uname) +{ + *this >> uname.UserName; + *this >> uname.Password; + *this >> uname.EncryptionAlgorithm; +} - template<> - void DataSerializer::Serialize(const CloseSessionResponse& response) - { - *this << response.TypeId; - *this << response.Header; - } +template<> +std::size_t RawSize(const UserIdentifyToken & token) +{ + std::size_t ret = RawSize(token.Header) + RawSize(token.PolicyId) + RawSize((uint32_t)0); - template<> - void DataDeserializer::Deserialize(CloseSessionResponse& response) - { - *this >> response.TypeId; - *this >> response.Header; - } + if (token.type() == UserTokenType::UserName) + { ret += RawSize(token.UserName); } - //--------------------------------------------------- - // ServiceFaultResponse - //--------------------------------------------------- + return ret; +} - template<> - std::size_t RawSize(const ServiceFaultResponse& request) - { - return RawSize(request.TypeId) + RawSize(request.Header); - } +template<> +void DataSerializer::Serialize(const UserIdentifyToken & token) +{ + *this << token.Header; + *this << int32_t(RawSize(token) - RawSize(token.Header) - RawSize((uint32_t)0)); + *this << token.PolicyId; - template<> - void DataSerializer::Serialize(const ServiceFaultResponse& request) - { - *this << request.TypeId; - *this << request.Header; - } + if (token.type() == UserTokenType::UserName) + { *this << token.UserName; } +} - template<> - void DataDeserializer::Deserialize(ServiceFaultResponse& request) - { - *this >> request.TypeId; - *this >> request.Header; - } +template<> +void DataDeserializer::Deserialize(UserIdentifyToken & token) +{ + *this >> token.Header; + int32_t tmp; + *this >> tmp; + *this >> token.PolicyId; + + if (token.type() == UserTokenType::UserName) + { *this >> token.UserName; } +} + +//--------------------------------------------------- +// CloseSessionRequest +//--------------------------------------------------- + +template<> +std::size_t RawSize(const CloseSessionRequest & request) +{ + return RawSize(request.TypeId) + RawSize(request.Header) + + RawSize(request.DeleteSubscriptions); +} + +template<> +void DataSerializer::Serialize(const CloseSessionRequest & request) +{ + *this << request.TypeId; + *this << request.Header; + + *this << request.DeleteSubscriptions; +} + +template<> +void DataDeserializer::Deserialize(CloseSessionRequest & request) +{ + *this >> request.TypeId; + *this >> request.Header; + + *this >> request.DeleteSubscriptions; +} + +//--------------------------------------------------- +// CloseSessionResponse +//--------------------------------------------------- + +template<> +std::size_t RawSize(const CloseSessionResponse & response) +{ + return RawSize(response.TypeId) + RawSize(response.Header); +} + +template<> +void DataSerializer::Serialize(const CloseSessionResponse & response) +{ + *this << response.TypeId; + *this << response.Header; +} + +template<> +void DataDeserializer::Deserialize(CloseSessionResponse & response) +{ + *this >> response.TypeId; + *this >> response.Header; +} + +//--------------------------------------------------- +// ServiceFaultResponse +//--------------------------------------------------- + +template<> +std::size_t RawSize(const ServiceFaultResponse & request) +{ + return RawSize(request.TypeId) + RawSize(request.Header); +} + +template<> +void DataSerializer::Serialize(const ServiceFaultResponse & request) +{ + *this << request.TypeId; + *this << request.Header; +} + +template<> +void DataDeserializer::Deserialize(ServiceFaultResponse & request) +{ + *this >> request.TypeId; + *this >> request.Header; +} - } // namespace Binary +} // namespace Binary } // namespace OpcUa diff --git a/src/protocol/binary_stream.cpp b/src/protocol/binary_stream.cpp index 037c783d..0ce306e6 100644 --- a/src/protocol/binary_stream.cpp +++ b/src/protocol/binary_stream.cpp @@ -27,119 +27,122 @@ namespace { - /* - * not used - * - float float_htonl(float value){ - std::cout << "sizez: " << sizeof(float) << " " << sizeof(uint32_t) << std::endl; - union v { - float f; - uint32_t i; - }; +/* + * not used + * +float float_htonl(float value){ + std::cout << "sizez: " << sizeof(float) << " " << sizeof(uint32_t) << std::endl; + union v { + float f; + uint32_t i; + }; - union v val; + union v val; - val.f = value; - val.i = htonl(val.i); + val.f = value; + val.i = htonl(val.i); - return val.f; - } + return val.f; +} - float float_ntohl(float value){ - union v { - float f; - uint32_t i; - }; +float float_ntohl(float value){ + union v { + float f; + uint32_t i; + }; + + union v val; + + val.f = value; + val.i = ntohl(val.i); + + return val.f; +} + */ + +template +inline int8_t LoByte(Integer16 value) +{ + return value & 0xFF; +} + +template +inline int8_t HiByte(Integer16 value) +{ + return (value & 0xFF00) >> 8; +} + +template +inline uint16_t LoWord(Integer32 value) +{ + return value & 0xFFFF; +} - union v val; - - val.f = value; - val.i = ntohl(val.i); - - return val.f; - } - */ - - template - inline int8_t LoByte(Integer16 value) - { - return value & 0xFF; - } - - template - inline int8_t HiByte(Integer16 value) - { - return (value & 0xFF00) >> 8; - } - - template - inline uint16_t LoWord(Integer32 value) - { - return value & 0xFFFF; - } - - template - inline uint16_t HiWord(Integer32 value) - { - return (value & 0xFFFF0000) >> 16; - } - - template - inline uint32_t LoDWord(Integer64 value) - { - return value & 0xFFFFFFFF; - } - - template - inline uint32_t HiDWord(Integer64 value) - { - return (value & 0xFFFFFFFF00000000) >> 32; - } - - template - inline Integer16 MakeWord(int8_t loByte, int8_t hiByte) - { - const Integer16 word = hiByte; - return (word << 8) | (0x00FF & loByte); - } - - template - inline Integer MakeNumber(char* data) - { - unsigned size = sizeof(Integer); - Integer i = 0; - while(size) +template +inline uint16_t HiWord(Integer32 value) +{ + return (value & 0xFFFF0000) >> 16; +} + +template +inline uint32_t LoDWord(Integer64 value) +{ + return value & 0xFFFFFFFF; +} + +template +inline uint32_t HiDWord(Integer64 value) +{ + return (value & 0xFFFFFFFF00000000) >> 32; +} + +template +inline Integer16 MakeWord(int8_t loByte, int8_t hiByte) +{ + const Integer16 word = hiByte; + return (word << 8) | (0x00FF & loByte); +} + +template +inline Integer MakeNumber(char * data) +{ + unsigned size = sizeof(Integer); + Integer i = 0; + + while (size) { i = (i << 8) | (0x00FF & data[--size]); } - return i; - } + + return i; +} - const size_t MESSAGE_TYPE_SIZE = 3; - const char MESSAGE_TYPE_HELLO[MESSAGE_TYPE_SIZE] = {'H', 'E', 'L'}; - const char MESSAGE_TYPE_ACKNOWLEDGE[MESSAGE_TYPE_SIZE] = {'A', 'C', 'K'}; - const char MESSAGE_TYPE_ERROR[MESSAGE_TYPE_SIZE] = {'E', 'R', 'R'}; - const char MESSAGE_TYPE_MESSAGE[MESSAGE_TYPE_SIZE] = {'M', 'S', 'G'}; - const char MESSAGE_TYPE_OPEN[MESSAGE_TYPE_SIZE] = {'O', 'P', 'N'}; - const char MESSAGE_TYPE_CLOSE[MESSAGE_TYPE_SIZE] = {'C', 'L', 'O'}; +const size_t MESSAGE_TYPE_SIZE = 3; +const char MESSAGE_TYPE_HELLO[MESSAGE_TYPE_SIZE] = {'H', 'E', 'L'}; +const char MESSAGE_TYPE_ACKNOWLEDGE[MESSAGE_TYPE_SIZE] = {'A', 'C', 'K'}; +const char MESSAGE_TYPE_ERROR[MESSAGE_TYPE_SIZE] = {'E', 'R', 'R'}; +const char MESSAGE_TYPE_MESSAGE[MESSAGE_TYPE_SIZE] = {'M', 'S', 'G'}; +const char MESSAGE_TYPE_OPEN[MESSAGE_TYPE_SIZE] = {'O', 'P', 'N'}; +const char MESSAGE_TYPE_CLOSE[MESSAGE_TYPE_SIZE] = {'C', 'L', 'O'}; - inline void ThrowReceivedNotEnoughData() - { - throw std::logic_error("Not enough data was received from channel."); - } +inline void ThrowReceivedNotEnoughData() +{ + throw std::logic_error("Not enough data was received from channel."); +} - template - inline void GetData(ChannelType& channel, char* data, std::size_t size) - { - size_t recv = channel.Read(data, size); - if (recv != size) +template +inline void GetData(ChannelType & channel, char * data, std::size_t size) +{ + size_t recv = channel.Read(data, size); + + if (recv != size) { std::cout << "expecting " << size << " received: " << recv << std::endl; ThrowReceivedNotEnoughData(); } - } +} } // namespace @@ -147,1201 +150,1246 @@ namespace namespace OpcUa { - ExtensionObjectHeader::ExtensionObjectHeader() - : Encoding(ExtensionObjectEncoding::NONE) - { - } - - /// TODO move to apropriate file - ExtensionObjectHeader::ExtensionObjectHeader(ExtensionObjectId objectId, ExtensionObjectEncoding encoding) - : Encoding(encoding) - { - TypeId.Encoding = EV_FOUR_BYTE; - TypeId.FourByteData.Identifier = objectId; - } - /////////////////////////////////////////////////////// - // IntegerId - /////////////////////////////////////////////////////// - - IntegerId::IntegerId() - : Value(1) - { - } - - IntegerId::IntegerId(const IntegerId& id) - : Value(id.Value) - { - } - - IntegerId::IntegerId(uint32_t num) - : Value(num) - { - if (!Value) +ExtensionObjectHeader::ExtensionObjectHeader() + : Encoding(ExtensionObjectEncoding::NONE) +{ +} + +/// TODO move to apropriate file +ExtensionObjectHeader::ExtensionObjectHeader(ExtensionObjectId objectId, ExtensionObjectEncoding encoding) + : Encoding(encoding) +{ + TypeId.Encoding = EV_FOUR_BYTE; + TypeId.FourByteData.Identifier = objectId; +} +/////////////////////////////////////////////////////// +// IntegerId +/////////////////////////////////////////////////////// + +IntegerId::IntegerId() + : Value(1) +{ +} + +IntegerId::IntegerId(const IntegerId & id) + : Value(id.Value) +{ +} + +IntegerId::IntegerId(uint32_t num) + : Value(num) +{ + if (!Value) { throw std::invalid_argument("IntegerId cannot be zero"); } - } +} - IntegerId& IntegerId::operator= (const IntegerId& id) - { - Value = id.Value; - return *this; - } +IntegerId & IntegerId::operator= (const IntegerId & id) +{ + Value = id.Value; + return *this; +} - IntegerId& IntegerId::operator= (uint32_t value) - { - if (!Value) +IntegerId & IntegerId::operator= (uint32_t value) +{ + if (!Value) { throw std::invalid_argument("IntegerId cannot be zero"); } - Value = value; - return *this; - } + Value = value; + return *this; +} - IntegerId::operator uint32_t() const - { - return Value; - } +IntegerId::operator uint32_t() const +{ + return Value; +} - /////////////////////////////////////////////////////// +/////////////////////////////////////////////////////// - namespace Binary - { +namespace Binary +{ - template<> - void DataSerializer::Serialize(const int8_t& value) - { - Buffer.push_back(value); - } +template<> +void DataSerializer::Serialize(const int8_t & value) +{ + Buffer.push_back(value); +} - template<> - void DataSerializer::Serialize>(const std::vector& value) - { - SerializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize(const uint8_t& value) - { - Buffer.push_back(value); - } +template<> +void DataSerializer::Serialize(const uint8_t & value) +{ + Buffer.push_back(value); +} - template<> - void DataDeserializer::Deserialize(uint8_t& value) - { - char data = 0; - GetData(In, &data, 1); - value = static_cast(data); - } +template<> +void DataDeserializer::Deserialize(uint8_t & value) +{ + char data = 0; + GetData(In, &data, 1); + value = static_cast(data); +} - template<> - void DataDeserializer::Deserialize(int8_t& value) - { - char data = 0; - GetData(In, &data, 1); - value = data; - } +template<> +void DataDeserializer::Deserialize(int8_t & value) +{ + char data = 0; + GetData(In, &data, 1); + value = data; +} - template<> - void DataDeserializer::Deserialize>(std::vector& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize(const int16_t& value) - { - Buffer.push_back(LoByte(value)); - Buffer.push_back(HiByte(value)); - } +template<> +void DataSerializer::Serialize(const int16_t & value) +{ + Buffer.push_back(LoByte(value)); + Buffer.push_back(HiByte(value)); +} - template<> - void DataSerializer::Serialize(const uint16_t& value) - { - Buffer.push_back(LoByte(value)); - Buffer.push_back(HiByte(value)); - } +template<> +void DataSerializer::Serialize(const uint16_t & value) +{ + Buffer.push_back(LoByte(value)); + Buffer.push_back(HiByte(value)); +} - template<> - void DataDeserializer::Deserialize(uint16_t& value) - { - char data[2] = {0}; - GetData(In, data, 2); - value = MakeWord(data[0], data[1]); - } +template<> +void DataDeserializer::Deserialize(uint16_t & value) +{ + char data[2] = {0}; + GetData(In, data, 2); + value = MakeWord(data[0], data[1]); +} - template<> - void DataDeserializer::Deserialize(int16_t& value) - { - char data[2] = {0}; - GetData(In, data, 2); - value = MakeWord(data[0], data[1]); - } +template<> +void DataDeserializer::Deserialize(int16_t & value) +{ + char data[2] = {0}; + GetData(In, data, 2); + value = MakeWord(data[0], data[1]); +} - template<> - void DataSerializer::Serialize(const int32_t& value) - { - Serialize(LoWord(value)); - Serialize(HiWord(value)); - } +template<> +void DataSerializer::Serialize(const int32_t & value) +{ + Serialize(LoWord(value)); + Serialize(HiWord(value)); +} - template<> - void DataSerializer::Serialize(const uint32_t& value) - { - Serialize(LoWord(value)); - Serialize(HiWord(value)); - } +template<> +void DataSerializer::Serialize(const uint32_t & value) +{ + Serialize(LoWord(value)); + Serialize(HiWord(value)); +} - template<> - void DataDeserializer::Deserialize(uint32_t& value) - { - char data[4] = {0}; - GetData(In, data, 4); - value = MakeNumber(data); - } +template<> +void DataDeserializer::Deserialize(uint32_t & value) +{ + char data[4] = {0}; + GetData(In, data, 4); + value = MakeNumber(data); +} - template<> - void DataDeserializer::Deserialize(int32_t& value) - { - char data[4] = {0}; - GetData(In, data, 4); - value = MakeNumber(data); - } +template<> +void DataDeserializer::Deserialize(int32_t & value) +{ + char data[4] = {0}; + GetData(In, data, 4); + value = MakeNumber(data); +} - template<> - void DataSerializer::Serialize(const int64_t& value) - { - Serialize(LoDWord(value)); - Serialize(HiDWord(value)); - } +template<> +void DataSerializer::Serialize(const int64_t & value) +{ + Serialize(LoDWord(value)); + Serialize(HiDWord(value)); +} - template<> - void DataSerializer::Serialize(const uint64_t& value) - { - Serialize(LoDWord(value)); - Serialize(HiDWord(value)); - } +template<> +void DataSerializer::Serialize(const uint64_t & value) +{ + Serialize(LoDWord(value)); + Serialize(HiDWord(value)); +} - template<> - void DataDeserializer::Deserialize(uint64_t& value) - { - char data[8] = {0}; - GetData(In, data, 8); - value = MakeNumber(data); - } +template<> +void DataDeserializer::Deserialize(uint64_t & value) +{ + char data[8] = {0}; + GetData(In, data, 8); + value = MakeNumber(data); +} - template<> - void DataDeserializer::Deserialize(int64_t& value) - { - char data[8] = {0}; - GetData(In, data, 8); - value = MakeNumber(data); - } +template<> +void DataDeserializer::Deserialize(int64_t & value) +{ + char data[8] = {0}; + GetData(In, data, 8); + value = MakeNumber(data); +} - template<> - void DataSerializer::Serialize(const bool& value) - { - Serialize(static_cast(value)); - } +template<> +void DataSerializer::Serialize(const bool & value) +{ + Serialize(static_cast(value)); +} - template<> - void DataSerializer::Serialize>(const std::vector& value) - { - SerializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} - template<> - void DataDeserializer::Deserialize(bool& value) - { - uint8_t tmp = 0; - *this >> tmp; - value = (tmp != 0); - } +template<> +void DataDeserializer::Deserialize(bool & value) +{ + uint8_t tmp = 0; + *this >> tmp; + value = (tmp != 0); +} - template<> - void DataDeserializer::Deserialize>(std::vector& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize(const float& value) - { - //float network_value = float_htonl(value); - const uint8_t* data = reinterpret_cast(&value); - for (int i = 0; i < 4; ++i) - { - Serialize(data[i]); - } - } +template<> +void DataSerializer::Serialize(const float & value) +{ + //float network_value = float_htonl(value); + const uint8_t * data = reinterpret_cast(&value); - template<> - void DataDeserializer::Deserialize(float& value) - { - //float network_value = float_htonl(value); - uint8_t data[4] = {0}; - for (int i = 0; i < 4; ++i) - { - *this >> data[i]; - } - value = *reinterpret_cast(data); // FIXME: probably broken on ARM - } - - template<> - void DataSerializer::Serialize(const double& value) + for (int i = 0; i < 4; ++i) { - const uint8_t* data = reinterpret_cast(&value); - for (int i = 0; i < 8; ++i) - { - Serialize(data[i]); - } + Serialize(data[i]); } +} - template<> - void DataDeserializer::Deserialize(double& value) +template<> +void DataDeserializer::Deserialize(float & value) +{ + //float network_value = float_htonl(value); + uint8_t data[4] = {0}; + + for (int i = 0; i < 4; ++i) { - uint8_t data[8] = {0}; - for (int i = 0; i < 8; ++i) - { - *this >> data[i]; - } - value = *reinterpret_cast(data); //FIXME: probably broken on ARM + *this >> data[i]; } - template<> - void DataSerializer::Serialize(const OpcUa::Guid& value) + value = *reinterpret_cast(data); // FIXME: probably broken on ARM +} + +template<> +void DataSerializer::Serialize(const double & value) +{ + const uint8_t * data = reinterpret_cast(&value); + + for (int i = 0; i < 8; ++i) { - *this << value.Data1 << value.Data2 << value.Data3; - Buffer.insert(Buffer.end(), value.Data4, value.Data4 + 8); + Serialize(data[i]); } +} + +template<> +void DataDeserializer::Deserialize(double & value) +{ + uint8_t data[8] = {0}; - template<> - void DataDeserializer::Deserialize(OpcUa::Guid& value) + for (int i = 0; i < 8; ++i) { - *this >> value.Data1 >> value.Data2 >> value.Data3; - char data[8] = {0}; - GetData(In, data, 8); - std::copy(data, data + 8, value.Data4); + *this >> data[i]; } - template<> - void DataSerializer::Serialize(const std::string& value) + value = *reinterpret_cast(data); //FIXME: probably broken on ARM +} + +template<> +void DataSerializer::Serialize(const OpcUa::Guid & value) +{ + *this << value.Data1 << value.Data2 << value.Data3; + Buffer.insert(Buffer.end(), value.Data4, value.Data4 + 8); +} + +template<> +void DataDeserializer::Deserialize(OpcUa::Guid & value) +{ + *this >> value.Data1 >> value.Data2 >> value.Data3; + char data[8] = {0}; + GetData(In, data, 8); + std::copy(data, data + 8, value.Data4); +} + +template<> +void DataSerializer::Serialize(const std::string & value) +{ + if (value.empty()) { - if (value.empty()) - { - Serialize(~uint32_t()); - return; - } - Serialize(static_cast(value.size())); - Buffer.insert(Buffer.end(), value.begin(), value.end()); + Serialize(~uint32_t()); + return; } - template<> - void DataDeserializer::Deserialize(std::string& value) + Serialize(static_cast(value.size())); + Buffer.insert(Buffer.end(), value.begin(), value.end()); +} + +template<> +void DataDeserializer::Deserialize(std::string & value) +{ + uint32_t stringSize = 0; + *this >> stringSize; + + if (stringSize != ~uint32_t()) { - uint32_t stringSize = 0; - *this >> stringSize; - if (stringSize != ~uint32_t()) - { - value.resize(stringSize); - GetData(In, &value[0], stringSize); - return; - } - - value.clear(); + value.resize(stringSize); + GetData(In, &value[0], stringSize); return; - // TODO standard says that 0xff*4 - is the zero byte string , actually it seems that it is an empty string -/* - while(true) - { - uint8_t val = 0; - *this >> val; - if (val == 0) + } + + value.clear(); + return; + // TODO standard says that 0xff*4 - is the zero byte string , actually it seems that it is an empty string + /* + while(true) { - return; + uint8_t val = 0; + *this >> val; + if (val == 0) + { + return; + } + value.push_back(val); } - value.push_back(val); - } -*/ - } + */ +} - template<> - void DataSerializer::Serialize(const OpcUa::DateTime& date) - { - *this << date.Value; - } +template<> +void DataSerializer::Serialize(const OpcUa::DateTime & date) +{ + *this << date.Value; +} - template<> - void DataDeserializer::Deserialize(OpcUa::DateTime& date) - { - *this >> date.Value; - } +template<> +void DataDeserializer::Deserialize(OpcUa::DateTime & date) +{ + *this >> date.Value; +} - template<> - void DataSerializer::Serialize>(const std::vector& date) - { - SerializeContainer(*this, date); - } +template<> +void DataSerializer::Serialize>(const std::vector & date) +{ + SerializeContainer(*this, date); +} - template<> - void DataDeserializer::Deserialize>(std::vector& date) - { - DeserializeContainer(*this, date); - } +template<> +void DataDeserializer::Deserialize>(std::vector & date) +{ + DeserializeContainer(*this, date); +} - template<> - void DataSerializer::Serialize(const ByteString& value) +template<> +void DataSerializer::Serialize(const ByteString & value) +{ + if (value.Data.empty()) { - if (value.Data.empty()) - { - Serialize(~uint32_t()); - return; - } - Serialize(static_cast(value.Data.size())); - Buffer.insert(Buffer.end(), value.Data.begin(), value.Data.end()); + Serialize(~uint32_t()); + return; } - template<> - void DataDeserializer::Deserialize(ByteString& value) + Serialize(static_cast(value.Data.size())); + Buffer.insert(Buffer.end(), value.Data.begin(), value.Data.end()); +} + +template<> +void DataDeserializer::Deserialize(ByteString & value) +{ + uint32_t stringSize = 0; + *this >> stringSize; + + if (stringSize != ~uint32_t()) { - uint32_t stringSize = 0; - *this >> stringSize; - if (stringSize != ~uint32_t()) - { - value.Data.resize(stringSize); - GetData(In, reinterpret_cast(&value.Data[0]), stringSize); - return; - } - - value.Data.clear(); + value.Data.resize(stringSize); + GetData(In, reinterpret_cast(&value.Data[0]), stringSize); return; } + value.Data.clear(); + return; +} - template<> - void DataSerializer::Serialize>(const std::vector& value) - { - SerializeContainer(*this, value); - } - template<> - void DataDeserializer::Deserialize>(std::vector& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize>(const std::vector& value) - { - SerializeContainer(*this, value); - } - template<> - void DataDeserializer::Deserialize>(std::vector& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize>(const std::vector& value) - { - SerializeContainer(*this, value); - } +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataDeserializer::Deserialize>(std::vector& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize>(const std::vector& value) - { - SerializeContainer(*this, value); - } +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataDeserializer::Deserialize>(std::vector& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize>(const std::vector& value) - { - SerializeContainer(*this, value); - } - template<> - void DataDeserializer::Deserialize>(std::vector& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize>(const std::vector& value) - { - SerializeContainer(*this, value); - } +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataDeserializer::Deserialize>(std::vector& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize>(const std::vector& value) - { - SerializeContainer(*this, value); - } +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataDeserializer::Deserialize>(std::vector& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize>(const std::vector& value) - { - SerializeContainer(*this, value); - } +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataDeserializer::Deserialize>(std::vector& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize>(const std::vector& value) - { - SerializeContainer(*this, value); - } - template<> - void DataDeserializer::Deserialize>(std::vector& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize>(const std::vector& value) - { - SerializeContainer(*this, value); - } +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataDeserializer::Deserialize>(std::vector& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize>(const std::vector& value) - { - SerializeContainer(*this, value); - } - template<> - void DataDeserializer::Deserialize>(std::vector& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize>(const std::vector& value) - { - SerializeContainer(*this, value); - } +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataDeserializer::Deserialize>(std::vector& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize>(const std::vector& value) - { - SerializeContainer(*this, value); - } +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataDeserializer::Deserialize>(std::vector& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize>>(const std::vector>& value) - { - SerializeContainer(*this, value); - } +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataDeserializer::Deserialize>>(std::vector>& value) - { - DeserializeContainer(*this, value); - } +template<> +void DataSerializer::Serialize>>(const std::vector> & value) +{ + SerializeContainer(*this, value); +} - template<> - void DataSerializer::Serialize(const OpcUa::Binary::MessageType& value) - { - const char* typeName = nullptr; - switch(value) - { - case MT_HELLO: - typeName = MESSAGE_TYPE_HELLO; - break; - case MT_ACKNOWLEDGE: - typeName = MESSAGE_TYPE_ACKNOWLEDGE; - break; - case MT_ERROR: - typeName = MESSAGE_TYPE_ERROR; - break; - case MT_SECURE_OPEN: - typeName = MESSAGE_TYPE_OPEN; - break; - case MT_SECURE_CLOSE: - typeName = MESSAGE_TYPE_CLOSE; - break; - case MT_SECURE_MESSAGE: - typeName = MESSAGE_TYPE_MESSAGE; - break; - default: - throw std::logic_error("Invalid message type."); - } - Buffer.insert(Buffer.end(), typeName, typeName + MESSAGE_TYPE_SIZE); - } +template<> +void DataDeserializer::Deserialize>>(std::vector> & value) +{ + DeserializeContainer(*this, value); +} - template<> - void DataDeserializer::Deserialize(OpcUa::Binary::MessageType& value) - { - char data[MESSAGE_TYPE_SIZE] = {0}; - GetData(In, data, MESSAGE_TYPE_SIZE); - if (std::equal(data, data + MESSAGE_TYPE_SIZE, MESSAGE_TYPE_HELLO)) - { - value = OpcUa::Binary::MT_HELLO; - } - else if (std::equal(data, data + MESSAGE_TYPE_SIZE, MESSAGE_TYPE_ACKNOWLEDGE)) - { - value = OpcUa::Binary::MT_ACKNOWLEDGE; - } - else if (std::equal(data, data + MESSAGE_TYPE_SIZE, MESSAGE_TYPE_ERROR)) - { - value = OpcUa::Binary::MT_ERROR; - } - else if (std::equal(data, data + MESSAGE_TYPE_SIZE, MESSAGE_TYPE_MESSAGE)) - { - value = OpcUa::Binary::MT_SECURE_MESSAGE; - } - else if (std::equal(data, data + MESSAGE_TYPE_SIZE, MESSAGE_TYPE_OPEN)) - { - value = OpcUa::Binary::MT_SECURE_OPEN; - } - else if (std::equal(data, data + MESSAGE_TYPE_SIZE, MESSAGE_TYPE_CLOSE)) - { - value = OpcUa::Binary::MT_SECURE_CLOSE; - } - else - { - std::string msg("Cannot deserialize Unknown message type ["); - msg += std::to_string(data[0]) + ", " + std::to_string(data[1]) + ", " + std::to_string(data[2]); - msg += "] received."; - throw std::logic_error(msg); - } - } +template<> +void DataSerializer::Serialize(const OpcUa::Binary::MessageType & value) +{ + const char * typeName = nullptr; - template<> - void DataSerializer::Serialize(const OpcUa::Binary::ChunkType& value) + switch (value) { - switch (value) - { - case CHT_SINGLE: - Buffer.push_back('F'); - break; - case CHT_INTERMEDIATE: - Buffer.push_back('C'); - break; - case CHT_FINAL: - Buffer.push_back('A'); - break; - default: - throw std::logic_error("Invalid Chunk Type"); - } - } + case MT_HELLO: + typeName = MESSAGE_TYPE_HELLO; + break; - template<> - void DataDeserializer::Deserialize(OpcUa::Binary::ChunkType& value) - { - char data = 0; - GetData(In, &data, 1); - switch (data) - { - case 'F': - value = CHT_SINGLE; - break; - - case 'C': - value = CHT_INTERMEDIATE; - break; - - case 'A': - value = CHT_FINAL; - break; - - default: - throw std::logic_error("Invalid chunk type received."); - }; - } + case MT_ACKNOWLEDGE: + typeName = MESSAGE_TYPE_ACKNOWLEDGE; + break; - template<> - void DataSerializer::Serialize(const OpcUa::Binary::Header& header) - { - *this << header.Type; - *this << header.Chunk; - *this << header.Size; - } + case MT_ERROR: + typeName = MESSAGE_TYPE_ERROR; + break; - template<> - void DataDeserializer::Deserialize(OpcUa::Binary::Header& header) - { - *this >> header.Type; - *this >> header.Chunk; - *this >> header.Size; - } + case MT_SECURE_OPEN: + typeName = MESSAGE_TYPE_OPEN; + break; - template<> - void DataSerializer::Serialize(const OpcUa::Binary::Hello& message) - { - *this << message.ProtocolVersion; - *this << message.ReceiveBufferSize; - *this << message.SendBufferSize; - *this << message.MaxMessageSize; - *this << message.MaxChunkCount; - *this << message.EndpointUrl; - } + case MT_SECURE_CLOSE: + typeName = MESSAGE_TYPE_CLOSE; + break; - template<> - void DataDeserializer::Deserialize(OpcUa::Binary::Hello& message) - { - *this >> message.ProtocolVersion; - *this >> message.ReceiveBufferSize; - *this >> message.SendBufferSize; - *this >> message.MaxMessageSize; - *this >> message.MaxChunkCount; - *this >> message.EndpointUrl; - } + case MT_SECURE_MESSAGE: + typeName = MESSAGE_TYPE_MESSAGE; + break; - template<> - void DataSerializer::Serialize(const OpcUa::Binary::Acknowledge& message) - { - *this << message.ProtocolVersion; - *this << message.ReceiveBufferSize; - *this << message.SendBufferSize; - *this << message.MaxMessageSize; - *this << message.MaxChunkCount; + default: + throw std::logic_error("Invalid message type."); } - template<> - void DataDeserializer::Deserialize(OpcUa::Binary::Acknowledge& message) - { - *this >> message.ProtocolVersion; - *this >> message.ReceiveBufferSize; - *this >> message.SendBufferSize; - *this >> message.MaxMessageSize; - *this >> message.MaxChunkCount; - } + Buffer.insert(Buffer.end(), typeName, typeName + MESSAGE_TYPE_SIZE); +} + +template<> +void DataDeserializer::Deserialize(OpcUa::Binary::MessageType & value) +{ + char data[MESSAGE_TYPE_SIZE] = {0}; + GetData(In, data, MESSAGE_TYPE_SIZE); - template<> - void DataSerializer::Serialize(const OpcUa::Binary::Error& message) + if (std::equal(data, data + MESSAGE_TYPE_SIZE, MESSAGE_TYPE_HELLO)) { - *this << message.Code; - *this << message.Reason; + value = OpcUa::Binary::MT_HELLO; } - template<> - void DataDeserializer::Deserialize(OpcUa::Binary::Error& message) + else if (std::equal(data, data + MESSAGE_TYPE_SIZE, MESSAGE_TYPE_ACKNOWLEDGE)) { - *this >> message.Code; - *this >> message.Reason; + value = OpcUa::Binary::MT_ACKNOWLEDGE; } - template<> - void DataSerializer::Serialize(const OpcUa::Binary::SecureHeader& header) + else if (std::equal(data, data + MESSAGE_TYPE_SIZE, MESSAGE_TYPE_ERROR)) { - *this << header.Type; - *this << header.Chunk; - *this << header.Size; - *this << header.ChannelId; + value = OpcUa::Binary::MT_ERROR; } - template<> - void DataDeserializer::Deserialize(OpcUa::Binary::SecureHeader& header) + else if (std::equal(data, data + MESSAGE_TYPE_SIZE, MESSAGE_TYPE_MESSAGE)) { - *this >> header.Type; - *this >> header.Chunk; - *this >> header.Size; - *this >> header.ChannelId; + value = OpcUa::Binary::MT_SECURE_MESSAGE; } - template<> - void DataSerializer::Serialize(const OpcUa::Binary::AsymmetricAlgorithmHeader& header) + else if (std::equal(data, data + MESSAGE_TYPE_SIZE, MESSAGE_TYPE_OPEN)) { - *this << header.SecurityPolicyUri; - *this << header.SenderCertificate; - *this << header.ReceiverCertificateThumbPrint; + value = OpcUa::Binary::MT_SECURE_OPEN; } - template<> - void DataDeserializer::Deserialize(OpcUa::Binary::AsymmetricAlgorithmHeader& header) + else if (std::equal(data, data + MESSAGE_TYPE_SIZE, MESSAGE_TYPE_CLOSE)) { - *this >> header.SecurityPolicyUri; - *this >> header.SenderCertificate; - *this >> header.ReceiverCertificateThumbPrint; + value = OpcUa::Binary::MT_SECURE_CLOSE; } - template<> - void DataSerializer::Serialize(const OpcUa::Binary::SymmetricAlgorithmHeader& header) + else { - *this << header.TokenId; + std::string msg("Cannot deserialize Unknown message type ["); + msg += std::to_string(data[0]) + ", " + std::to_string(data[1]) + ", " + std::to_string(data[2]); + msg += "] received."; + throw std::logic_error(msg); } +} - template<> - void DataDeserializer::Deserialize(OpcUa::Binary::SymmetricAlgorithmHeader& header) +template<> +void DataSerializer::Serialize(const OpcUa::Binary::ChunkType & value) +{ + switch (value) { - *this >> header.TokenId; - } + case CHT_SINGLE: + Buffer.push_back('F'); + break; + case CHT_INTERMEDIATE: + Buffer.push_back('C'); + break; - template<> - void DataSerializer::Serialize(const OpcUa::Binary::SequenceHeader& header) - { - *this << header.SequenceNumber; - *this << header.RequestId; - } + case CHT_FINAL: + Buffer.push_back('A'); + break; - template<> - void DataDeserializer::Deserialize(OpcUa::Binary::SequenceHeader& header) - { - *this >> header.SequenceNumber; - *this >> header.RequestId; + default: + throw std::logic_error("Invalid Chunk Type"); } +} +template<> +void DataDeserializer::Deserialize(OpcUa::Binary::ChunkType & value) +{ + char data = 0; + GetData(In, &data, 1); - template<> - void DataSerializer::Serialize(const OpcUa::AdditionalHeader& header) + switch (data) { - *this << header.TypeId; - *this << header.Encoding; - } + case 'F': + value = CHT_SINGLE; + break; - template<> - void DataDeserializer::Deserialize(OpcUa::AdditionalHeader& header) - { - *this >> header.TypeId; - *this >> header.Encoding; - } + case 'C': + value = CHT_INTERMEDIATE; + break; + case 'A': + value = CHT_FINAL; + break; - template<> - void DataSerializer::Serialize(const OpcUa::RequestHeader& header) - { - *this << header.SessionAuthenticationToken; - *this << header.UtcTime; - *this << header.RequestHandle; - *this << header.ReturnDiagnostics; - *this << header.AuditEntryId; - *this << header.Timeout; // in miliseconds - *this << header.Additional; - } + default: + throw std::logic_error("Invalid chunk type received."); + }; +} - template<> - void DataDeserializer::Deserialize(OpcUa::RequestHeader& header) - { - *this >> header.SessionAuthenticationToken; - *this >> header.UtcTime; - *this >> header.RequestHandle; - *this >> header.ReturnDiagnostics; - *this >> header.AuditEntryId; - *this >> header.Timeout; // in miliseconds - *this >> header.Additional; - } +template<> +void DataSerializer::Serialize(const OpcUa::Binary::Header & header) +{ + *this << header.Type; + *this << header.Chunk; + *this << header.Size; +} - template<> - void DataSerializer::Serialize(const DiagnosticInfoMask& value) - { - *this << static_cast(value); - } +template<> +void DataDeserializer::Deserialize(OpcUa::Binary::Header & header) +{ + *this >> header.Type; + *this >> header.Chunk; + *this >> header.Size; +} - template<> - void DataDeserializer::Deserialize(DiagnosticInfoMask& value) - { - uint8_t tmp = 0; - *this >> tmp; - value = static_cast(tmp); - } +template<> +void DataSerializer::Serialize(const OpcUa::Binary::Hello & message) +{ + *this << message.ProtocolVersion; + *this << message.ReceiveBufferSize; + *this << message.SendBufferSize; + *this << message.MaxMessageSize; + *this << message.MaxChunkCount; + *this << message.EndpointUrl; +} + +template<> +void DataDeserializer::Deserialize(OpcUa::Binary::Hello & message) +{ + *this >> message.ProtocolVersion; + *this >> message.ReceiveBufferSize; + *this >> message.SendBufferSize; + *this >> message.MaxMessageSize; + *this >> message.MaxChunkCount; + *this >> message.EndpointUrl; +} + +template<> +void DataSerializer::Serialize(const OpcUa::Binary::Acknowledge & message) +{ + *this << message.ProtocolVersion; + *this << message.ReceiveBufferSize; + *this << message.SendBufferSize; + *this << message.MaxMessageSize; + *this << message.MaxChunkCount; +} + +template<> +void DataDeserializer::Deserialize(OpcUa::Binary::Acknowledge & message) +{ + *this >> message.ProtocolVersion; + *this >> message.ReceiveBufferSize; + *this >> message.SendBufferSize; + *this >> message.MaxMessageSize; + *this >> message.MaxChunkCount; +} + +template<> +void DataSerializer::Serialize(const OpcUa::Binary::Error & message) +{ + *this << message.Code; + *this << message.Reason; +} - template<> - void DataSerializer::Serialize(const OpcUa::DiagnosticInfo& info) - { - *this << info.EncodingMask; - - if (info.EncodingMask & DIM_SYMBOLIC_Id) - { - *this << info.SymbolicId; - } - if (info.EncodingMask & DIM_NAMESPACE) - { - *this << info.NamespaceURI; - } - if (info.EncodingMask & DIM_LOCALIZED_TEXT) - { - *this << info.LocalizedText; - } - if (info.EncodingMask & DIM_LOCALE) - { - *this << info.Locale; - } - if (info.EncodingMask & DIM_ADDITIONAL_INFO) - { - *this << info.AdditionalInfo; - } - if (info.EncodingMask & DIM_INNER_STATUS_CODE) - { - *this << info.InnerStatusCode; - } - if ((info.EncodingMask & DIM_INNER_DIAGNOSTIC_INFO) && info.InnerDiagnostics) - { - *this << *info.InnerDiagnostics; - } - } +template<> +void DataDeserializer::Deserialize(OpcUa::Binary::Error & message) +{ + *this >> message.Code; + *this >> message.Reason; +} +template<> +void DataSerializer::Serialize(const OpcUa::Binary::SecureHeader & header) +{ + *this << header.Type; + *this << header.Chunk; + *this << header.Size; + *this << header.ChannelId; +} + +template<> +void DataDeserializer::Deserialize(OpcUa::Binary::SecureHeader & header) +{ + *this >> header.Type; + *this >> header.Chunk; + *this >> header.Size; + *this >> header.ChannelId; +} + +template<> +void DataSerializer::Serialize(const OpcUa::Binary::AsymmetricAlgorithmHeader & header) +{ + *this << header.SecurityPolicyUri; + *this << header.SenderCertificate; + *this << header.ReceiverCertificateThumbPrint; +} - template<> - void DataDeserializer::Deserialize(OpcUa::DiagnosticInfo& info) - { - *this >> info.EncodingMask; - - if (info.EncodingMask & DIM_SYMBOLIC_Id) - { - *this >> info.SymbolicId; - } - if (info.EncodingMask & DIM_NAMESPACE) - { - *this >> info.NamespaceURI; - } - if (info.EncodingMask & DIM_LOCALIZED_TEXT) - { - *this >> info.LocalizedText; - } - if (info.EncodingMask & DIM_LOCALE) - { - *this >> info.Locale; - } - if (info.EncodingMask & DIM_ADDITIONAL_INFO) - { - *this >> info.AdditionalInfo; - } - if (info.EncodingMask & DIM_INNER_STATUS_CODE) - { - *this >> info.InnerStatusCode; - } - if (info.EncodingMask & DIM_INNER_DIAGNOSTIC_INFO) - { - std::shared_ptr tmp(new DiagnosticInfo); - *this >> *tmp; - info.InnerDiagnostics = tmp; - } - } +template<> +void DataDeserializer::Deserialize(OpcUa::Binary::AsymmetricAlgorithmHeader & header) +{ + *this >> header.SecurityPolicyUri; + *this >> header.SenderCertificate; + *this >> header.ReceiverCertificateThumbPrint; +} - template<> - void DataSerializer::Serialize(const OpcUa::DiagnosticInfoList& infos) - { - SerializeContainer(*this, infos, 0); - } +template<> +void DataSerializer::Serialize(const OpcUa::Binary::SymmetricAlgorithmHeader & header) +{ + *this << header.TokenId; +} - template<> - void DataDeserializer::Deserialize(OpcUa::DiagnosticInfoList& infos) - { - DeserializeContainer(*this, infos); - } +template<> +void DataDeserializer::Deserialize(OpcUa::Binary::SymmetricAlgorithmHeader & header) +{ + *this >> header.TokenId; +} - template<> - void DataSerializer::Serialize(const OpcUa::ResponseHeader& header) - { - *this << header.Timestamp; - *this << header.RequestHandle; - *this << header.ServiceResult; - *this << header.InnerDiagnostics; - SerializeContainer(*this, header.StringTable); - *this << header.Additional; - } - template<> - void DataDeserializer::Deserialize(OpcUa::ResponseHeader& header) - { - *this >> header.Timestamp; - *this >> header.RequestHandle; - *this >> header.ServiceResult; - *this >> header.InnerDiagnostics; - DeserializeContainer(*this, header.StringTable); - *this >> header.Additional; - } +template<> +void DataSerializer::Serialize(const OpcUa::Binary::SequenceHeader & header) +{ + *this << header.SequenceNumber; + *this << header.RequestId; +} +template<> +void DataDeserializer::Deserialize(OpcUa::Binary::SequenceHeader & header) +{ + *this >> header.SequenceNumber; + *this >> header.RequestId; +} - template<> - void DataSerializer::Serialize(const OpcUa::OpenSecureChannelRequest& request) - { - *this << request.TypeId; - *this << request.Header; - *this << request.Parameters.ClientProtocolVersion; - *this << (uint32_t)request.Parameters.RequestType; - *this << (uint32_t)request.Parameters.SecurityMode; - SerializeContainer(*this, request.Parameters.ClientNonce); - *this << request.Parameters.RequestLifeTime; - } - template<> - void DataDeserializer::Deserialize(OpcUa::OpenSecureChannelRequest& request) - { - *this >> request.TypeId; - *this >> request.Header; +template<> +void DataSerializer::Serialize(const OpcUa::AdditionalHeader & header) +{ + *this << header.TypeId; + *this << header.Encoding; +} - *this >> request.Parameters.ClientProtocolVersion; +template<> +void DataDeserializer::Deserialize(OpcUa::AdditionalHeader & header) +{ + *this >> header.TypeId; + *this >> header.Encoding; +} - uint32_t tmp = 0; - *this >> tmp; - request.Parameters.RequestType = static_cast(tmp); - uint32_t tmp2 = 0; - *this >> tmp2; - request.Parameters.SecurityMode = static_cast(tmp2); +template<> +void DataSerializer::Serialize(const OpcUa::RequestHeader & header) +{ + *this << header.SessionAuthenticationToken; + *this << header.UtcTime; + *this << header.RequestHandle; + *this << header.ReturnDiagnostics; + *this << header.AuditEntryId; + *this << header.Timeout; // in miliseconds + *this << header.Additional; +} + +template<> +void DataDeserializer::Deserialize(OpcUa::RequestHeader & header) +{ + *this >> header.SessionAuthenticationToken; + *this >> header.UtcTime; + *this >> header.RequestHandle; + *this >> header.ReturnDiagnostics; + *this >> header.AuditEntryId; + *this >> header.Timeout; // in miliseconds + *this >> header.Additional; +} + +template<> +void DataSerializer::Serialize(const DiagnosticInfoMask & value) +{ + *this << static_cast(value); +} - DeserializeContainer(*this, request.Parameters.ClientNonce); - *this >> request.Parameters.RequestLifeTime; - } +template<> +void DataDeserializer::Deserialize(DiagnosticInfoMask & value) +{ + uint8_t tmp = 0; + *this >> tmp; + value = static_cast(tmp); +} +template<> +void DataSerializer::Serialize(const OpcUa::DiagnosticInfo & info) +{ + *this << info.EncodingMask; - template<> - void DataSerializer::Serialize(const OpcUa::SecurityToken& token) + if (info.EncodingMask & DIM_SYMBOLIC_Id) { - *this << token.SecureChannelId; - *this << token.TokenId; - *this << token.CreatedAt; - *this << token.RevisedLifetime; + *this << info.SymbolicId; } - template<> - void DataDeserializer::Deserialize(OpcUa::SecurityToken& token) + if (info.EncodingMask & DIM_NAMESPACE) { - *this >> token.SecureChannelId; - *this >> token.TokenId; - *this >> token.CreatedAt; - *this >> token.RevisedLifetime; + *this << info.NamespaceURI; } - - template<> - void DataSerializer::Serialize(const OpcUa::OpenSecureChannelResponse& response) + if (info.EncodingMask & DIM_LOCALIZED_TEXT) { - *this << response.TypeId; - *this << response.Header; - *this << response.ServerProtocolVersion; - *this << response.ChannelSecurityToken; - SerializeContainer(*this, response.ServerNonce); + *this << info.LocalizedText; } - template<> - void DataDeserializer::Deserialize(OpcUa::OpenSecureChannelResponse& response) + if (info.EncodingMask & DIM_LOCALE) { - *this >> response.TypeId; - *this >> response.Header; - *this >> response.ServerProtocolVersion; - *this >> response.ChannelSecurityToken; - DeserializeContainer(*this, response.ServerNonce); + *this << info.Locale; } - template<> - void DataSerializer::Serialize(const OpcUa::Binary::RawMessage& raw) + if (info.EncodingMask & DIM_ADDITIONAL_INFO) { - Buffer.insert(Buffer.end(), raw.Data, raw.Data + raw.Size); + *this << info.AdditionalInfo; } - template<> - void DataDeserializer::Deserialize(OpcUa::Binary::RawBuffer& raw) + if (info.EncodingMask & DIM_INNER_STATUS_CODE) { - GetData(In, raw.Data, raw.Size); + *this << info.InnerStatusCode; } - template<> - void DataSerializer::Serialize(const OpcUa::CloseSecureChannelRequest& request) + if ((info.EncodingMask & DIM_INNER_DIAGNOSTIC_INFO) && info.InnerDiagnostics) { - *this << request.TypeId; - *this << request.Header; + *this << *info.InnerDiagnostics; } +} - template<> - void DataDeserializer::Deserialize(OpcUa::CloseSecureChannelRequest& request) - { - *this >> request.TypeId; - *this >> request.Header; - } - template<> - void DataSerializer::Serialize(const OpcUa::LocalizedText& lt) - { - *this << lt.Encoding; - if (lt.Encoding & HAS_LOCALE) - { - *this << lt.Locale; - } - if (lt.Encoding & HAS_TEXT) - { - *this << lt.Text; - } - } +template<> +void DataDeserializer::Deserialize(OpcUa::DiagnosticInfo & info) +{ + *this >> info.EncodingMask; - template<> - void DataDeserializer::Deserialize(OpcUa::LocalizedText& lt) + if (info.EncodingMask & DIM_SYMBOLIC_Id) { - *this >> lt.Encoding; - if (lt.Encoding & HAS_LOCALE) - { - *this >> lt.Locale; - } - if (lt.Encoding & HAS_TEXT) - { - *this >> lt.Text; - } + *this >> info.SymbolicId; } - - template<> - void DataSerializer::Serialize>(const std::vector& value) + if (info.EncodingMask & DIM_NAMESPACE) { - SerializeContainer(*this, value); + *this >> info.NamespaceURI; } - template<> - void DataDeserializer::Deserialize>(std::vector& value) + if (info.EncodingMask & DIM_LOCALIZED_TEXT) { - DeserializeContainer(*this, value); + *this >> info.LocalizedText; } - template<> - void DataSerializer::Serialize(const ExtensionObjectHeader& value) + if (info.EncodingMask & DIM_LOCALE) { - *this << value.TypeId; - *this << static_cast(value.Encoding); + *this >> info.Locale; } - template<> - void DataDeserializer::Deserialize(ExtensionObjectHeader& value) + if (info.EncodingMask & DIM_ADDITIONAL_INFO) { - *this >> value.TypeId; - uint8_t tmp = 0; - *this >> tmp; - value.Encoding = static_cast(tmp); + *this >> info.AdditionalInfo; } - template<> - void DataSerializer::Serialize(const QualifiedName& name) + if (info.EncodingMask & DIM_INNER_STATUS_CODE) { - *this << name.NamespaceIndex; - *this << name.Name; + *this >> info.InnerStatusCode; } - template<> - void DataDeserializer::Deserialize(QualifiedName& name) + if (info.EncodingMask & DIM_INNER_DIAGNOSTIC_INFO) { - *this >> name.NamespaceIndex; - *this >> name.Name; + std::shared_ptr tmp(new DiagnosticInfo); + *this >> *tmp; + info.InnerDiagnostics = tmp; } +} - //////////////////////////////////////////////////////////////////// - // IntegerId - //////////////////////////////////////////////////////////////////// +template<> +void DataSerializer::Serialize(const OpcUa::DiagnosticInfoList & infos) +{ + SerializeContainer(*this, infos, 0); +} - template<> - void DataSerializer::Serialize(const IntegerId& id) - { - *this << static_cast(id); - } +template<> +void DataDeserializer::Deserialize(OpcUa::DiagnosticInfoList & infos) +{ + DeserializeContainer(*this, infos); +} - template<> - void DataDeserializer::Deserialize(IntegerId& id) - { - uint32_t value = 0; - *this >> value; - id = value; - } +template<> +void DataSerializer::Serialize(const OpcUa::ResponseHeader & header) +{ + *this << header.Timestamp; + *this << header.RequestHandle; + *this << header.ServiceResult; + *this << header.InnerDiagnostics; + SerializeContainer(*this, header.StringTable); + *this << header.Additional; +} + +template<> +void DataDeserializer::Deserialize(OpcUa::ResponseHeader & header) +{ + *this >> header.Timestamp; + *this >> header.RequestHandle; + *this >> header.ServiceResult; + *this >> header.InnerDiagnostics; + DeserializeContainer(*this, header.StringTable); + *this >> header.Additional; +} - template<> - void DataSerializer::Serialize>(const std::vector& targets) - { - SerializeContainer(*this, targets); - } - template<> - void DataDeserializer::Deserialize>(std::vector& targets) - { - DeserializeContainer(*this, targets); - } +template<> +void DataSerializer::Serialize(const OpcUa::OpenSecureChannelRequest & request) +{ + *this << request.TypeId; + *this << request.Header; + *this << request.Parameters.ClientProtocolVersion; + *this << (uint32_t)request.Parameters.RequestType; + *this << (uint32_t)request.Parameters.SecurityMode; + SerializeContainer(*this, request.Parameters.ClientNonce); + *this << request.Parameters.RequestLifeTime; +} + +template<> +void DataDeserializer::Deserialize(OpcUa::OpenSecureChannelRequest & request) +{ + *this >> request.TypeId; + *this >> request.Header; - //////////////////////////////////////////////////////////////////// - // StatusCode - //////////////////////////////////////////////////////////////////// + *this >> request.Parameters.ClientProtocolVersion; - template<> - void DataSerializer::Serialize(const StatusCode& status) - { - *this << static_cast(status); - } + uint32_t tmp = 0; + *this >> tmp; + request.Parameters.RequestType = static_cast(tmp); + + uint32_t tmp2 = 0; + *this >> tmp2; + request.Parameters.SecurityMode = static_cast(tmp2); + + DeserializeContainer(*this, request.Parameters.ClientNonce); + *this >> request.Parameters.RequestLifeTime; +} + + +template<> +void DataSerializer::Serialize(const OpcUa::SecurityToken & token) +{ + *this << token.SecureChannelId; + *this << token.TokenId; + *this << token.CreatedAt; + *this << token.RevisedLifetime; +} + +template<> +void DataDeserializer::Deserialize(OpcUa::SecurityToken & token) +{ + *this >> token.SecureChannelId; + *this >> token.TokenId; + *this >> token.CreatedAt; + *this >> token.RevisedLifetime; +} - template<> - void DataDeserializer::Deserialize(StatusCode& status) - { - uint32_t value = 0; - *this >> value; - status = static_cast(value); - } - template<> - void DataSerializer::Serialize>(const std::vector& value) +template<> +void DataSerializer::Serialize(const OpcUa::OpenSecureChannelResponse & response) +{ + *this << response.TypeId; + *this << response.Header; + *this << response.ServerProtocolVersion; + *this << response.ChannelSecurityToken; + SerializeContainer(*this, response.ServerNonce); +} + +template<> +void DataDeserializer::Deserialize(OpcUa::OpenSecureChannelResponse & response) +{ + *this >> response.TypeId; + *this >> response.Header; + *this >> response.ServerProtocolVersion; + *this >> response.ChannelSecurityToken; + DeserializeContainer(*this, response.ServerNonce); +} + +template<> +void DataSerializer::Serialize(const OpcUa::Binary::RawMessage & raw) +{ + Buffer.insert(Buffer.end(), raw.Data, raw.Data + raw.Size); +} + +template<> +void DataDeserializer::Deserialize(OpcUa::Binary::RawBuffer & raw) +{ + GetData(In, raw.Data, raw.Size); +} + +template<> +void DataSerializer::Serialize(const OpcUa::CloseSecureChannelRequest & request) +{ + *this << request.TypeId; + *this << request.Header; +} + +template<> +void DataDeserializer::Deserialize(OpcUa::CloseSecureChannelRequest & request) +{ + *this >> request.TypeId; + *this >> request.Header; +} + +template<> +void DataSerializer::Serialize(const OpcUa::LocalizedText & lt) +{ + *this << lt.Encoding; + + if (lt.Encoding & HAS_LOCALE) { - SerializeContainer(*this, value); + *this << lt.Locale; } - template<> - void DataDeserializer::Deserialize>(std::vector& value) + if (lt.Encoding & HAS_TEXT) { - DeserializeContainer(*this, value); + *this << lt.Text; } +} - template<> - void DataSerializer::Serialize>(const std::vector& value) +template<> +void DataDeserializer::Deserialize(OpcUa::LocalizedText & lt) +{ + *this >> lt.Encoding; + + if (lt.Encoding & HAS_LOCALE) { - SerializeContainer(*this, value); + *this >> lt.Locale; } - template<> - void DataDeserializer::Deserialize>(std::vector& value) + if (lt.Encoding & HAS_TEXT) { - DeserializeContainer(*this, value); + *this >> lt.Text; } +} + + +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} + +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} + +template<> +void DataSerializer::Serialize(const ExtensionObjectHeader & value) +{ + *this << value.TypeId; + *this << static_cast(value.Encoding); +} + +template<> +void DataDeserializer::Deserialize(ExtensionObjectHeader & value) +{ + *this >> value.TypeId; + uint8_t tmp = 0; + *this >> tmp; + value.Encoding = static_cast(tmp); +} + +template<> +void DataSerializer::Serialize(const QualifiedName & name) +{ + *this << name.NamespaceIndex; + *this << name.Name; +} + +template<> +void DataDeserializer::Deserialize(QualifiedName & name) +{ + *this >> name.NamespaceIndex; + *this >> name.Name; +} + +//////////////////////////////////////////////////////////////////// +// IntegerId +//////////////////////////////////////////////////////////////////// + +template<> +void DataSerializer::Serialize(const IntegerId & id) +{ + *this << static_cast(id); +} + +template<> +void DataDeserializer::Deserialize(IntegerId & id) +{ + uint32_t value = 0; + *this >> value; + id = value; +} + +template<> +void DataSerializer::Serialize>(const std::vector & targets) +{ + SerializeContainer(*this, targets); +} + +template<> +void DataDeserializer::Deserialize>(std::vector & targets) +{ + DeserializeContainer(*this, targets); +} + +//////////////////////////////////////////////////////////////////// +// StatusCode +//////////////////////////////////////////////////////////////////// + +template<> +void DataSerializer::Serialize(const StatusCode & status) +{ + *this << static_cast(status); +} + +template<> +void DataDeserializer::Deserialize(StatusCode & status) +{ + uint32_t value = 0; + *this >> value; + status = static_cast(value); +} + +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} + +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} + +template<> +void DataSerializer::Serialize>(const std::vector & value) +{ + SerializeContainer(*this, value); +} + +template<> +void DataDeserializer::Deserialize>(std::vector & value) +{ + DeserializeContainer(*this, value); +} - } // namespace Binary +} // namespace Binary } // namespace OpcUa diff --git a/src/protocol/binary_variant.cpp b/src/protocol/binary_variant.cpp index 4c3a5631..d01b1306 100644 --- a/src/protocol/binary_variant.cpp +++ b/src/protocol/binary_variant.cpp @@ -29,308 +29,341 @@ namespace { - using namespace OpcUa; - using namespace OpcUa::Binary; +using namespace OpcUa; +using namespace OpcUa::Binary; - template - bool IsValueArray(const std::vector& t) - { - return t.size() > 1; - } +template +bool IsValueArray(const std::vector & t) +{ + return t.size() > 1; +} - template - void IsValueArray(const std::vector& t, bool& isArray) - { - isArray = IsValueArray(t); - } +template +void IsValueArray(const std::vector & t, bool & isArray) +{ + isArray = IsValueArray(t); +} - template - bool IsNulValue(const std::vector& t) - { - return t.empty(); - } +template +bool IsNulValue(const std::vector & t) +{ + return t.empty(); +} - template - void IsNulValue(const std::vector& t, bool& isNul) - { - isNul = IsNulValue(t); - } +template +void IsNulValue(const std::vector & t, bool & isNul) +{ + isNul = IsNulValue(t); +} - template - void RawValueSizeArray(const std::vector& t, std::size_t& size) - { - size = RawSizeContainer(t); - } +template +void RawValueSizeArray(const std::vector & t, std::size_t & size) +{ + size = RawSizeContainer(t); +} - template - void RawValueSize(const std::vector& t, std::size_t& size) - { - if (IsValueArray(t)) +template +void RawValueSize(const std::vector & t, std::size_t & size) +{ + if (IsValueArray(t)) { size = RawSizeContainer(t); } - else if (!IsNulValue(t)) + + else if (!IsNulValue(t)) { size = RawSize(t.at(0)); } - else + + else { size = 0; } - } +} - template - void SerializeValueArray(const std::vector& value, OpcUa::Binary::DataSerializer& stream) - { - SerializeContainer(stream, value); - } +template +void SerializeValueArray(const std::vector & value, OpcUa::Binary::DataSerializer & stream) +{ + SerializeContainer(stream, value); +} - template - void SerializeValue(const std::vector& value, OpcUa::Binary::DataSerializer& stream) - { - if (IsValueArray(value)) +template +void SerializeValue(const std::vector & value, OpcUa::Binary::DataSerializer & stream) +{ + if (IsValueArray(value)) { SerializeContainer(stream, value); } - else if (!IsNulValue(value)) + + else if (!IsNulValue(value)) { stream.Serialize(value.at(0)); } - } +} + +template +void DeserializeContainerValue(std::vector & value, OpcUa::Binary::DataDeserializer & stream) +{ + DeserializeContainer(stream, value); +} + +template +void DeserializeValue(std::vector & value, OpcUa::Binary::DataDeserializer & stream) +{ + T tmp; + stream.Deserialize(tmp); + value.push_back(tmp); +} + +struct RawSizeVisitor +{ + size_t Result = 0; template - void DeserializeContainerValue(std::vector& value, OpcUa::Binary::DataDeserializer& stream) + void OnContainer(const T & val) { - DeserializeContainer(stream, value); + Result = RawSizeContainer(val); } template - void DeserializeValue(std::vector& value, OpcUa::Binary::DataDeserializer& stream) + void OnScalar(const T & val) { - T tmp; - stream.Deserialize(tmp); - value.push_back(tmp); + Result = RawSize(val); } +}; - struct RawSizeVisitor - { - size_t Result = 0; - - template - void OnContainer(const T& val) - { - Result = RawSizeContainer(val); - } - - template - void OnScalar(const T& val) - { - Result = RawSize(val); - } - }; +struct VariantSerializer +{ + DataSerializer * Serializer; - struct VariantSerializer + explicit VariantSerializer(DataSerializer * serializer) + : Serializer(serializer) { - DataSerializer* Serializer; - - explicit VariantSerializer(DataSerializer* serializer) - : Serializer(serializer) - { - } - - template - void OnContainer(const T& val) - { - SerializeContainer(*Serializer, val); - } + } - template - void OnScalar(const T& val) - { - Serializer->Serialize(val); - } - }; + template + void OnContainer(const T & val) + { + SerializeContainer(*Serializer, val); + } - struct VariantDeserializer + template + void OnScalar(const T & val) { - DataDeserializer* Deserializer; + Serializer->Serialize(val); + } +}; - explicit VariantDeserializer(DataDeserializer* deserializer) - : Deserializer(deserializer) - { +struct VariantDeserializer +{ + DataDeserializer * Deserializer; - } + explicit VariantDeserializer(DataDeserializer * deserializer) + : Deserializer(deserializer) + { - template - typename std::enable_if::value == true, T>::type get() - { - T tmp; - DeserializeContainer(*Deserializer, tmp); - return tmp; - } + } - template - typename std::enable_if::value == false, T>::type get() - { - T tmp; - *Deserializer >> tmp; - return tmp; - } - }; + template + typename std::enable_if::value == true, T>::type get() + { + T tmp; + DeserializeContainer(*Deserializer, tmp); + return tmp; + } - template - bool Compare(const Variant& lhs, const Variant& rhs) + template + typename std::enable_if::value == false, T>::type get() { - return lhs.As() == rhs.As(); + T tmp; + *Deserializer >> tmp; + return tmp; } +}; + +template +bool Compare(const Variant & lhs, const Variant & rhs) +{ + return lhs.As() == rhs.As(); +} } namespace OpcUa { - //--------------------------------------------------- - // Variant - //--------------------------------------------------- +//--------------------------------------------------- +// Variant +//--------------------------------------------------- - bool Variant::operator== (const Variant& var) const - { - if (Value.empty() ^ var.Value.empty()) +bool Variant::operator== (const Variant & var) const +{ + if (Value.empty() ^ var.Value.empty()) { return false; } - if (Value.empty() && var.Value.empty()) + if (Value.empty() && var.Value.empty()) { return true; } - if (Value.type() != var.Value.type()) + if (Value.type() != var.Value.type()) { return false; } - using namespace boost; - const std::type_info& t = Value.type(); - if (t == typeid(bool)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - else if (t == typeid(int8_t)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - else if (t == typeid(uint8_t)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - else if (t == typeid(int16_t)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - else if (t == typeid(uint16_t)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - - else if (t == typeid(int32_t)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - else if (t == typeid(uint32_t)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - else if (t == typeid(int64_t)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - else if (t == typeid(uint64_t)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - - else if (t == typeid(float)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - - else if (t == typeid(double)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - - else if (t == typeid(std::string)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - - else if (t == typeid(DateTime)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - - else if (t == typeid(Guid)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - - else if (t == typeid(ByteString)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - - else if (t == typeid(NodeId)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - - else if (t == typeid(StatusCode)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - - else if (t == typeid(LocalizedText)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - - else if (t == typeid(QualifiedName)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); -/* - else if (t == typeid(DataValue)) - return Compare(*this, Value); - else if (t == typeid(std::vector)) - return Compare>(*this, var); -*/ - else if (t == typeid(Variant)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - - else if (t == typeid(DiagnosticInfo)) - return Compare(*this, var); - else if (t == typeid(std::vector)) - return Compare>(*this, var); - - throw std::logic_error(std::string("Unknown variant type '") + t.name() + std::string("'.")); - } + using namespace boost; + const std::type_info & t = Value.type(); - bool Variant::IsScalar() const - { - return !IsArray(); - } + if (t == typeid(bool)) + { return Compare(*this, var); } - bool Variant::IsNul() const - { - return Value.empty(); - } + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } - bool Variant::IsArray() const - { - const std::type_info& t = Value.type(); - return + else if (t == typeid(int8_t)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(uint8_t)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(int16_t)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(uint16_t)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(int32_t)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(uint32_t)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(int64_t)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(uint64_t)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(float)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(double)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(std::string)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(DateTime)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(Guid)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(ByteString)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(NodeId)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(StatusCode)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(LocalizedText)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(QualifiedName)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + /* + else if (t == typeid(DataValue)) + return Compare(*this, Value); + else if (t == typeid(std::vector)) + return Compare>(*this, var); + */ + else if (t == typeid(Variant)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + else if (t == typeid(DiagnosticInfo)) + { return Compare(*this, var); } + + else if (t == typeid(std::vector)) + { return Compare>(*this, var); } + + throw std::logic_error(std::string("Unknown variant type '") + t.name() + std::string("'.")); +} + +bool Variant::IsScalar() const +{ + return !IsArray(); +} + +bool Variant::IsNul() const +{ + return Value.empty(); +} + +bool Variant::IsArray() const +{ + const std::type_info & t = Value.type(); + return (t == typeid(std::vector)) || (t == typeid(std::vector)) || (t == typeid(std::vector)) || @@ -342,7 +375,7 @@ namespace OpcUa (t == typeid(std::vector)) || (t == typeid(std::vector)) || (t == typeid(std::vector)) || - (t == typeid(std::vector))|| + (t == typeid(std::vector)) || (t == typeid(std::vector)) || (t == typeid(std::vector)) || (t == typeid(std::vector)) || @@ -353,494 +386,709 @@ namespace OpcUa // (t == typeid(std::vector)) || (t == typeid(std::vector)) || (t == typeid(std::vector)); - } +} - VariantType Variant::Type() const - { - if (Value.empty()) - return VariantType::NUL; +VariantType Variant::Type() const +{ + if (Value.empty()) + { return VariantType::NUL; } + + const std::type_info & t = Value.type(); + + if (t == typeid(bool) || t == typeid(std::vector)) + { return VariantType::BOOLEAN; } + + else if (t == typeid(int8_t) || t == typeid(std::vector)) + { return VariantType::SBYTE; } + + else if (t == typeid(uint8_t) || t == typeid(std::vector)) + { return VariantType::BYTE; } + + else if (t == typeid(int16_t) || t == typeid(std::vector)) + { return VariantType::INT16; } + + else if (t == typeid(uint16_t) || t == typeid(std::vector)) + { return VariantType::UINT16; } + + else if (t == typeid(int32_t) || t == typeid(std::vector)) + { return VariantType::INT32; } + + else if (t == typeid(uint32_t) || t == typeid(std::vector)) + { return VariantType::UINT32; } + + else if (t == typeid(int64_t) || t == typeid(std::vector)) + { return VariantType::INT64; } + + else if (t == typeid(uint64_t) || t == typeid(std::vector)) + { return VariantType::UINT64; } + + else if (t == typeid(float) || t == typeid(std::vector)) + { return VariantType::FLOAT; } + + else if (t == typeid(double) || t == typeid(std::vector)) + { return VariantType::DOUBLE; } + + else if (t == typeid(std::string) || t == typeid(std::vector)) + { return VariantType::STRING; } + + else if (t == typeid(DateTime) || t == typeid(std::vector)) + { return VariantType::DATE_TIME; } + + else if (t == typeid(Guid) || t == typeid(std::vector)) + { return VariantType::GUId; } + + else if (t == typeid(ByteString) || t == typeid(std::vector)) + { return VariantType::BYTE_STRING; } + + else if (t == typeid(NodeId) || t == typeid(std::vector)) + { return VariantType::NODE_Id; } + + else if (t == typeid(StatusCode) || t == typeid(std::vector)) + { return VariantType::STATUS_CODE; } + + else if (t == typeid(LocalizedText) || t == typeid(std::vector)) + { return VariantType::LOCALIZED_TEXT; } + + else if (t == typeid(QualifiedName) || t == typeid(std::vector)) + { return VariantType::QUALIFIED_NAME; } + + /* + else if (t == typeid(DataValue) || t == typeid(std::vector)) + return VariantType::DATA_VALUE; + */ + else if (t == typeid(Variant) || t == typeid(std::vector)) + { return VariantType::VARIANT; } + + else if (t == typeid(DiagnosticInfo) || t == typeid(std::vector)) + { return VariantType::DIAGNOSTIC_INFO; } + + throw std::runtime_error(std::string("Unknown variant type '") + t.name() + "'."); +} + + +void Variant::Visit(VariantVisitor & visitor) const +{ + using namespace boost; + const std::type_info & t = Value.type(); + + if (t == typeid(bool)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(int8_t)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(uint8_t)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(int16_t)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(uint16_t)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(int32_t)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(uint32_t)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(int64_t)) + { visitor.Visit(any_cast(Value)); } - const std::type_info& t = Value.type(); - if (t == typeid(bool) || t == typeid(std::vector)) + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(uint64_t)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(float)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(double)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(std::string)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(DateTime)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(Guid)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(ByteString)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(NodeId)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(StatusCode)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(LocalizedText)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(QualifiedName)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + /* + else if (t == typeid(DataValue)) + visitor.Visit(any_cast(Value)); + else if (t == typeid(std::vector)) + visitor.Visit(any_cast>(Value)); + //Variant of variant is not allowed but variant of an array of variant is OK + else if (t == typeid(Variant)) + visitor.Visit(any_cast(Value)); + */ + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else if (t == typeid(DiagnosticInfo)) + { visitor.Visit(any_cast(Value)); } + + else if (t == typeid(std::vector)) + { visitor.Visit(any_cast>(Value)); } + + else + { throw std::runtime_error(std::string("Unknown variant type '") + t.name() + "'."); } +} + +ObjectId VariantTypeToDataType(VariantType vt) +{ + switch (vt) + { + case VariantType::BOOLEAN: + return ObjectId::Boolean; + + case VariantType::SBYTE: + return ObjectId::SByte; + + case VariantType::BYTE: + return ObjectId::Byte; + + case VariantType::INT16: + return ObjectId::Int16; + + case VariantType::UINT16: + return ObjectId::UInt16; + + case VariantType::INT32: + return ObjectId::Int32; + + case VariantType::UINT32: + return ObjectId::UInt32; + + case VariantType::INT64: + return ObjectId::Int64; + + case VariantType::UINT64: + return ObjectId::UInt64; + + case VariantType::FLOAT: + return ObjectId::Float; + + case VariantType::DOUBLE: + return ObjectId::Double; + + case VariantType::STRING: + return ObjectId::String; + + case VariantType::DATE_TIME: + return ObjectId::DateTime; + + case VariantType::GUId: + return ObjectId::Guid; + + case VariantType::BYTE_STRING: + return ObjectId::ByteString; + + case VariantType::XML_ELEMENT: + return ObjectId::XmlElement; + + case VariantType::NODE_Id: + return ObjectId::NodeId; + + case VariantType::EXPANDED_NODE_Id: + return ObjectId::ExpandedNodeId; + + case VariantType::STATUS_CODE: + return ObjectId::StatusCode; + + case VariantType::QUALIFIED_NAME: + return ObjectId::QualifiedName; + + case VariantType::LOCALIZED_TEXT: + return ObjectId::LocalizedText; + + case VariantType::DIAGNOSTIC_INFO: + return ObjectId::DiagnosticInfo; + + case VariantType::DATA_VALUE: + return ObjectId::DataValue; + + case VariantType::NUL: + return ObjectId::Null; + + case VariantType::EXTENSION_OBJECT: + case VariantType::VARIANT: + default: + { + throw std::runtime_error("Unknown variant type."); + } + } +} + +VariantType DataTypeToVariantType(const NodeId & dataType) +{ + if (dataType.GetNamespaceIndex()) + { + std::string msg("Cannot convert to variant type: invalid namespace of node "); + throw std::runtime_error(msg + ToString(dataType)); + } + + switch (static_cast(dataType.GetIntegerIdentifier())) + { + case ObjectId::Boolean: return VariantType::BOOLEAN; - else if (t == typeid(int8_t) || t == typeid(std::vector)) + + case ObjectId::SByte: return VariantType::SBYTE; - else if (t == typeid(uint8_t) || t == typeid(std::vector)) + + case ObjectId::Byte: return VariantType::BYTE; - else if (t == typeid(int16_t) || t == typeid(std::vector)) + + case ObjectId::Int16: return VariantType::INT16; - else if (t == typeid(uint16_t) || t == typeid(std::vector)) + + case ObjectId::UInt16: return VariantType::UINT16; - else if (t == typeid(int32_t) || t == typeid(std::vector)) + + case ObjectId::Int32: return VariantType::INT32; - else if (t == typeid(uint32_t) || t == typeid(std::vector)) + + case ObjectId::UInt32: return VariantType::UINT32; - else if (t == typeid(int64_t) || t == typeid(std::vector)) + + case ObjectId::Int64: return VariantType::INT64; - else if (t == typeid(uint64_t) || t == typeid(std::vector)) + + case ObjectId::UInt64: return VariantType::UINT64; - else if (t == typeid(float) || t == typeid(std::vector)) + + case ObjectId::Float: return VariantType::FLOAT; - else if (t == typeid(double) || t == typeid(std::vector)) + + case ObjectId::Double: return VariantType::DOUBLE; - else if (t == typeid(std::string) || t == typeid(std::vector)) + + case ObjectId::String: return VariantType::STRING; - else if (t == typeid(DateTime) || t == typeid(std::vector)) + + case ObjectId::DateTime: return VariantType::DATE_TIME; - else if (t == typeid(Guid) || t == typeid(std::vector)) + + case ObjectId::Guid: return VariantType::GUId; - else if (t == typeid(ByteString) || t == typeid(std::vector)) + + case ObjectId::ByteString: return VariantType::BYTE_STRING; - else if (t == typeid(NodeId) || t == typeid(std::vector)) + + case ObjectId::XmlElement: + return VariantType::XML_ELEMENT; + + case ObjectId::NodeId: return VariantType::NODE_Id; - else if (t == typeid(StatusCode) || t == typeid(std::vector)) + + case ObjectId::ExpandedNodeId: + return VariantType::EXPANDED_NODE_Id; + + case ObjectId::StatusCode: return VariantType::STATUS_CODE; - else if (t == typeid(LocalizedText) || t == typeid(std::vector)) - return VariantType::LOCALIZED_TEXT; - else if (t == typeid(QualifiedName) || t == typeid(std::vector)) + + case ObjectId::QualifiedName: return VariantType::QUALIFIED_NAME; -/* - else if (t == typeid(DataValue) || t == typeid(std::vector)) - return VariantType::DATA_VALUE; -*/ - else if (t == typeid(Variant) || t == typeid(std::vector)) - return VariantType::VARIANT; - else if (t == typeid(DiagnosticInfo) || t == typeid(std::vector)) + + case ObjectId::LocalizedText: + return VariantType::LOCALIZED_TEXT; + + case ObjectId::DiagnosticInfo: return VariantType::DIAGNOSTIC_INFO; - throw std::runtime_error(std::string("Unknown variant type '") + t.name() + "'."); - } + case ObjectId::DataValue: + return VariantType::DATA_VALUE; + case ObjectId::Null: + return VariantType::NUL; - void Variant::Visit(VariantVisitor& visitor) const - { - using namespace boost; - const std::type_info& t = Value.type(); - if (t == typeid(bool)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - else if (t == typeid(int8_t)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - else if (t == typeid(uint8_t)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - else if (t == typeid(int16_t)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - else if (t == typeid(uint16_t)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - - else if (t == typeid(int32_t)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - else if (t == typeid(uint32_t)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - else if (t == typeid(int64_t)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - else if (t == typeid(uint64_t)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - - else if (t == typeid(float)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - - else if (t == typeid(double)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - - else if (t == typeid(std::string)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - - else if (t == typeid(DateTime)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - - else if (t == typeid(Guid)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - - else if (t == typeid(ByteString)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - - else if (t == typeid(NodeId)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - - else if (t == typeid(StatusCode)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - - else if (t == typeid(LocalizedText)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - - else if (t == typeid(QualifiedName)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); -/* - else if (t == typeid(DataValue)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - //Variant of variant is not allowed but variant of an array of variant is OK - else if (t == typeid(Variant)) - visitor.Visit(any_cast(Value)); -*/ - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - - else if (t == typeid(DiagnosticInfo)) - visitor.Visit(any_cast(Value)); - else if (t == typeid(std::vector)) - visitor.Visit(any_cast>(Value)); - else - throw std::runtime_error(std::string("Unknown variant type '") + t.name() + "'."); - } + default: + return VariantType::NODE_Id; + /* + { + std::string msg("Unknown type id "); + throw std::runtime_error(msg + ToString(dataType)); + } + */ + } +} - ObjectId VariantTypeToDataType(VariantType vt) - { - switch (vt) +std::string Variant::ToString() const +{ + if (IsScalar()) { - case VariantType::BOOLEAN: return ObjectId::Boolean; - case VariantType::SBYTE: return ObjectId::SByte; - case VariantType::BYTE: return ObjectId::Byte; - case VariantType::INT16: return ObjectId::Int16; - case VariantType::UINT16: return ObjectId::UInt16; - case VariantType::INT32: return ObjectId::Int32; - case VariantType::UINT32: return ObjectId::UInt32; - case VariantType::INT64: return ObjectId::Int64; - case VariantType::UINT64: return ObjectId::UInt64; - case VariantType::FLOAT: return ObjectId::Float; - case VariantType::DOUBLE: return ObjectId::Double; - case VariantType::STRING: return ObjectId::String; - case VariantType::DATE_TIME: return ObjectId::DateTime; - case VariantType::GUId: return ObjectId::Guid; - case VariantType::BYTE_STRING: return ObjectId::ByteString; - case VariantType::XML_ELEMENT: return ObjectId::XmlElement; - case VariantType::NODE_Id: return ObjectId::NodeId; - case VariantType::EXPANDED_NODE_Id: return ObjectId::ExpandedNodeId; - case VariantType::STATUS_CODE: return ObjectId::StatusCode; - case VariantType::QUALIFIED_NAME: return ObjectId::QualifiedName; - case VariantType::LOCALIZED_TEXT: return ObjectId::LocalizedText; - case VariantType::DIAGNOSTIC_INFO: return ObjectId::DiagnosticInfo; - case VariantType::DATA_VALUE: return ObjectId::DataValue; - case VariantType::NUL: return ObjectId::Null; - case VariantType::EXTENSION_OBJECT: - case VariantType::VARIANT: - default: - { - throw std::runtime_error("Unknown variant type."); - } + std::stringstream str; + + switch (Type()) + { + case VariantType::DATE_TIME: + str << OpcUa::ToString(boost::any_cast (Value)); //As()); + break; + + case VariantType::STRING: + str << boost::any_cast (Value); + break; + + case VariantType::BOOLEAN: + str << ((boost::any_cast (Value)) ? "true" : "false"); + break; + + case VariantType::BYTE: + str << boost::any_cast (Value); + break; + + case VariantType::SBYTE: + str << boost::any_cast (Value); + break; + + case VariantType::DOUBLE: + str << boost::any_cast (Value); + break; + + case VariantType::FLOAT: + str << boost::any_cast (Value); + break; + + case VariantType::INT16: + str << boost::any_cast (Value); + break; + + case VariantType::INT32: + str << boost::any_cast (Value); + break; + + case VariantType::INT64: + str << boost::any_cast (Value); + break; + + case VariantType::UINT16: + str << boost::any_cast (Value); + break; + + case VariantType::UINT32: + str << boost::any_cast (Value); + break; + + case VariantType::UINT64: + str << boost::any_cast (Value); + break; + + default: + str << "conversion to string is not supported"; + break; + } + + return str.str(); } - } - VariantType DataTypeToVariantType(const NodeId& dataType) - { - if (dataType.GetNamespaceIndex()) + else { - std::string msg("Cannot convert to variant type: invalid namespace of node "); - throw std::runtime_error(msg + ToString(dataType)); + return "conversion to string is not supported"; //TODO - add implementation for conversion } +} +namespace Binary +{ +template<> +std::size_t RawSize(const Variant & var) +{ + const uint8_t encodingMask = 0; + std::size_t size = RawSize(encodingMask); - switch (static_cast(dataType.GetIntegerIdentifier())) + if (var.IsNul()) { - case ObjectId::Boolean: return VariantType::BOOLEAN; - case ObjectId::SByte: return VariantType::SBYTE; - case ObjectId::Byte: return VariantType::BYTE; - case ObjectId::Int16: return VariantType::INT16; - case ObjectId::UInt16: return VariantType::UINT16; - case ObjectId::Int32: return VariantType::INT32; - case ObjectId::UInt32: return VariantType::UINT32; - case ObjectId::Int64: return VariantType::INT64; - case ObjectId::UInt64: return VariantType::UINT64; - case ObjectId::Float: return VariantType::FLOAT; - case ObjectId::Double: return VariantType::DOUBLE; - case ObjectId::String: return VariantType::STRING; - case ObjectId::DateTime: return VariantType::DATE_TIME; - case ObjectId::Guid: return VariantType::GUId; - case ObjectId::ByteString: return VariantType::BYTE_STRING; - case ObjectId::XmlElement: return VariantType::XML_ELEMENT; - case ObjectId::NodeId: return VariantType::NODE_Id; - case ObjectId::ExpandedNodeId: return VariantType::EXPANDED_NODE_Id; - case ObjectId::StatusCode: return VariantType::STATUS_CODE; - case ObjectId::QualifiedName: return VariantType::QUALIFIED_NAME; - case ObjectId::LocalizedText: return VariantType::LOCALIZED_TEXT; - case ObjectId::DiagnosticInfo: return VariantType::DIAGNOSTIC_INFO; - case ObjectId::DataValue: return VariantType::DATA_VALUE; - case ObjectId::Null: return VariantType::NUL; - default: - return VariantType::NODE_Id; -/* - { - std::string msg("Unknown type id "); - throw std::runtime_error(msg + ToString(dataType)); - } -*/ + return size; } - } - - std::string Variant::ToString() const - { - if (IsScalar()) - { - std::stringstream str; - switch (Type()) - { - case VariantType::DATE_TIME: - str << OpcUa::ToString(boost::any_cast (Value)); //As()); - break; - case VariantType::STRING: - str << boost::any_cast (Value); - break; - case VariantType::BOOLEAN: - str << ((boost::any_cast (Value)) ? "true" : "false"); - break; - case VariantType::BYTE: - str << boost::any_cast (Value); - break; - case VariantType::SBYTE: - str << boost::any_cast (Value); - break; - case VariantType::DOUBLE: - str << boost::any_cast (Value); - break; - case VariantType::FLOAT: - str << boost::any_cast (Value); - break; - case VariantType::INT16: - str << boost::any_cast (Value); - break; - case VariantType::INT32: - str << boost::any_cast (Value); - break; - case VariantType::INT64: - str << boost::any_cast (Value); - break; - case VariantType::UINT16: - str << boost::any_cast (Value); - break; - case VariantType::UINT32: - str << boost::any_cast (Value); - break; - case VariantType::UINT64: - str << boost::any_cast (Value); - break; - default: - str << "conversion to string is not supported"; - break; - } - return str.str(); - } - else - { - return "conversion to string is not supported"; //TODO - add implementation for conversion - } - } - namespace Binary - { - template<> - std::size_t RawSize(const Variant& var) - { - const uint8_t encodingMask = 0; - std::size_t size = RawSize(encodingMask); - if (var.IsNul()) - { - return size; - } - - RawSizeVisitor rawSizeCalc; - TypedVisitor visitor(rawSizeCalc); - var.Visit(visitor); - size += rawSizeCalc.Result; - if (!var.Dimensions.empty()) - { - size += RawSizeContainer(var.Dimensions); - } - return size; + RawSizeVisitor rawSizeCalc; + TypedVisitor visitor(rawSizeCalc); + var.Visit(visitor); + size += rawSizeCalc.Result; + + if (!var.Dimensions.empty()) + { + size += RawSizeContainer(var.Dimensions); } - template<> - void DataSerializer::Serialize(const Variant& var) + return size; +} + +template<> +void DataSerializer::Serialize(const Variant & var) +{ + uint8_t encodingMask = static_cast(var.Type()); + + if (var.IsArray()) { - uint8_t encodingMask = static_cast(var.Type()); - if (var.IsArray()) - { - encodingMask |= HAS_ARRAY_MASK; - } - if (!var.Dimensions.empty()) - { - encodingMask |= HAS_DIMENSIONS_MASK; - } - Serialize(encodingMask); - if (var.IsNul()) - { - return; - } - - VariantSerializer variantSerializer(this); - TypedVisitor visitor(variantSerializer); - var.Visit(visitor); - - if (!var.Dimensions.empty()) - { - SerializeContainer(*this, var.Dimensions); - } + encodingMask |= HAS_ARRAY_MASK; } - template<> - void DataDeserializer::Deserialize(Variant& var) + if (!var.Dimensions.empty()) { + encodingMask |= HAS_DIMENSIONS_MASK; + } + + Serialize(encodingMask); - uint8_t encoding = 0; - Deserialize(encoding); - - VariantDeserializer deserializer(this); - - const uint8_t encodingMask = encoding & (~HAS_DIMENSIONS_MASK); - // TODO check validity of type value after decoding. - if(encodingMask == (uint8_t)VariantType::NUL) - ; - else if(encodingMask == (uint8_t)VariantType::BOOLEAN) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::BOOLEAN | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == (uint8_t)VariantType::SBYTE) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::SBYTE | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == (uint8_t)VariantType::BYTE) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::BYTE | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::INT16)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::INT16 | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::UINT16)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::UINT16 | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::INT32)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::INT32 | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::UINT32)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::UINT32 | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::INT64)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::INT64 | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::UINT64)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::UINT64 | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::FLOAT)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::FLOAT | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::DOUBLE)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::DOUBLE | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::STRING)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::STRING | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::DATE_TIME)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::DATE_TIME | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::GUId)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::GUId | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::BYTE_STRING)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::BYTE_STRING | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::NODE_Id)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::NODE_Id | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::STATUS_CODE)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::STATUS_CODE | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::LOCALIZED_TEXT)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::LOCALIZED_TEXT | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::QUALIFIED_NAME)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::QUALIFIED_NAME | HAS_ARRAY_MASK)) - var = deserializer.get>(); -/* - if(encodingMask == ((uint8_t)VariantType::DATA_VALUE)) - var = deserializer.get(); - if(encodingMask == ((uint8_t)VariantType::DATA_VALUE | HAS_ARRAY_MASK)) - var = deserializer.get>(); -*/ - else if(encodingMask == ((uint8_t)VariantType::VARIANT)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::VARIANT | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::DIAGNOSTIC_INFO)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::DIAGNOSTIC_INFO | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else if(encodingMask == ((uint8_t)VariantType::EXTENSION_OBJECT)) - var = deserializer.get(); - else if(encodingMask == ((uint8_t)VariantType::EXTENSION_OBJECT | HAS_ARRAY_MASK)) - var = deserializer.get>(); - else - throw std::logic_error("Deserialization of VariantType: " + std::to_string(encodingMask) + " is not supported yet."); - - if (encoding & HAS_DIMENSIONS_MASK) - { - DeserializeContainer(*this, var.Dimensions); - } + if (var.IsNul()) + { + return; } - template<> - void DataSerializer::Serialize>(const std::vector& targets) + VariantSerializer variantSerializer(this); + TypedVisitor visitor(variantSerializer); + var.Visit(visitor); + + if (!var.Dimensions.empty()) { - SerializeContainer(*this, targets); + SerializeContainer(*this, var.Dimensions); } +} + +template<> +void DataDeserializer::Deserialize(Variant & var) +{ + + uint8_t encoding = 0; + Deserialize(encoding); + + VariantDeserializer deserializer(this); + + const uint8_t encodingMask = encoding & (~HAS_DIMENSIONS_MASK); + + // TODO check validity of type value after decoding. + if (encodingMask == (uint8_t)VariantType::NUL) + ; + + else if (encodingMask == (uint8_t)VariantType::BOOLEAN) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::BOOLEAN | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == (uint8_t)VariantType::SBYTE) + { var = deserializer.get(); } - template<> - void DataDeserializer::Deserialize>(std::vector& targets) + else if (encodingMask == ((uint8_t)VariantType::SBYTE | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == (uint8_t)VariantType::BYTE) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::BYTE | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::INT16)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::INT16 | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::UINT16)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::UINT16 | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::INT32)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::INT32 | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::UINT32)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::UINT32 | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::INT64)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::INT64 | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::UINT64)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::UINT64 | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::FLOAT)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::FLOAT | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::DOUBLE)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::DOUBLE | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::STRING)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::STRING | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::DATE_TIME)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::DATE_TIME | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::GUId)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::GUId | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::BYTE_STRING)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::BYTE_STRING | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::NODE_Id)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::NODE_Id | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::STATUS_CODE)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::STATUS_CODE | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::LOCALIZED_TEXT)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::LOCALIZED_TEXT | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::QUALIFIED_NAME)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::QUALIFIED_NAME | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + /* + if(encodingMask == ((uint8_t)VariantType::DATA_VALUE)) + var = deserializer.get(); + if(encodingMask == ((uint8_t)VariantType::DATA_VALUE | HAS_ARRAY_MASK)) + var = deserializer.get>(); + */ + else if (encodingMask == ((uint8_t)VariantType::VARIANT)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::VARIANT | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::DIAGNOSTIC_INFO)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::DIAGNOSTIC_INFO | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else if (encodingMask == ((uint8_t)VariantType::EXTENSION_OBJECT)) + { var = deserializer.get(); } + + else if (encodingMask == ((uint8_t)VariantType::EXTENSION_OBJECT | HAS_ARRAY_MASK)) + { var = deserializer.get>(); } + + else + { throw std::logic_error("Deserialization of VariantType: " + std::to_string(encodingMask) + " is not supported yet."); } + + if (encoding & HAS_DIMENSIONS_MASK) { - DeserializeContainer(*this, targets); + DeserializeContainer(*this, var.Dimensions); } +} + +template<> +void DataSerializer::Serialize>(const std::vector & targets) +{ + SerializeContainer(*this, targets); +} + +template<> +void DataDeserializer::Deserialize>(std::vector & targets) +{ + DeserializeContainer(*this, targets); +} - } // namespace Binary +} // namespace Binary } // namespace OpcUa diff --git a/src/protocol/binary_view.cpp b/src/protocol/binary_view.cpp index 86965ccf..50bff627 100644 --- a/src/protocol/binary_view.cpp +++ b/src/protocol/binary_view.cpp @@ -21,757 +21,757 @@ namespace OpcUa { - //////////////////////////////////////////////////////////////////////////// - // NodesDescription - //////////////////////////////////////////////////////////////////////////// - - NodesQuery::NodesQuery() - : MaxReferenciesPerNode(0) - { - } - - //////////////////////////////////////////////////////////////////////////// - // ViewDescription - //////////////////////////////////////////////////////////////////////////// - - ViewDescription::ViewDescription() - : Timestamp(0) - , Version(0) - { - } - - BrowseDescription::BrowseDescription() - : Direction(BrowseDirection::Both) - , IncludeSubtypes(false) - , NodeClasses(NodeClass::Unspecified) - , ResultMask(BrowseResultMask::All) - { - } - - BrowseRequest::BrowseRequest() - : TypeId(BROWSE_REQUEST) - { - } - - TranslateBrowsePathsToNodeIdsRequest::TranslateBrowsePathsToNodeIdsRequest() - : TypeId(TRANSLATE_BROWSE_PATHS_TO_NODE_IdS_REQUEST) - { - } - - RegisterNodesRequest::RegisterNodesRequest() - : TypeId(REGISTER_NODES_REQUEST) - { - } - - RegisterNodesResponse::RegisterNodesResponse() - : TypeId(REGISTER_NODES_RESPONSE) - { - } - - UnregisterNodesRequest::UnregisterNodesRequest() - : TypeId(UNREGISTER_NODES_REQUEST) - { - } - - UnregisterNodesResponse::UnregisterNodesResponse() - : TypeId(UNREGISTER_NODES_RESPONSE) - { - } - - ReferenceDescription::ReferenceDescription() - : IsForward(false) - , TargetNodeClass(NodeClass::Unspecified) - { - } - - BrowseResult::BrowseResult() - : Status(StatusCode::Good) - { - } - - BrowseResponse::BrowseResponse() - : TypeId(BROWSE_RESPONSE) - { - } - - BrowseNextRequest::BrowseNextRequest() - : TypeId(BROWSE_NEXT_REQUEST) - , ReleaseContinuationPoints(false) - { - } - - BrowseNextResponse::BrowseNextResponse() - : TypeId(BROWSE_NEXT_RESPONSE) - { - } - - BrowsePathTarget::BrowsePathTarget() - : RemainingPathIndex(0) - { - } - - BrowsePathResult::BrowsePathResult() - : Status(StatusCode::Good) - { - } - - TranslateBrowsePathsToNodeIdsResponse::TranslateBrowsePathsToNodeIdsResponse() - : TypeId(TRANSLATE_BROWSE_PATHS_TO_NODE_IdS_RESPONSE) - { - } - - namespace Binary - { - - //--------------------------------------------------- - // ViewDescription - //--------------------------------------------------- - - template<> - std::size_t RawSize(const ViewDescription& desc) - { - return RawSize(desc.Id) + RawSize(desc.Timestamp) + RawSize(desc.Version); - } - - template<> - void DataSerializer::Serialize(const ViewDescription& desc) - { - *this << desc.Id; - *this << desc.Timestamp; - *this << desc.Version; - } - - template<> - void DataDeserializer::Deserialize(ViewDescription& desc) - { - *this >> desc.Id; - *this >> desc.Timestamp; - *this >> desc.Version; - } - - - //--------------------------------------------------- - // BrowseDescription - //--------------------------------------------------- - - template<> - std::size_t RawSize(const BrowseDescription& desc) - { - return RawSize(desc.NodeToBrowse) + - RawSize(desc.Direction) + - RawSize(desc.ReferenceTypeId) + - RawSize(desc.IncludeSubtypes) + - RawSize(desc.NodeClasses) + - RawSize(desc.ResultMask); - } - - template<> - void DataSerializer::Serialize(const BrowseDescription& desc) - { - *this << desc.NodeToBrowse; - *this << desc.Direction; - *this << desc.ReferenceTypeId; - *this << desc.IncludeSubtypes; - *this << desc.NodeClasses; - *this << desc.ResultMask; - } - - template<> - void DataDeserializer::Deserialize(BrowseDescription& desc) - { - *this >> desc.NodeToBrowse; - *this >> desc.Direction; - *this >> desc.ReferenceTypeId; - *this >> desc.IncludeSubtypes; - *this >> desc.NodeClasses; - *this >> desc.ResultMask; - } - - //////////////////////////////////////////////////////////////////////////// - // NodesDescription - //////////////////////////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const NodesQuery& desc) - { - return RawSize(desc.View) + RawSize(desc.MaxReferenciesPerNode) + RawSizeContainer(desc.NodesToBrowse); - } - - template<> - void DataSerializer::Serialize(const NodesQuery& desc) - { - *this << desc.View; - *this << desc.MaxReferenciesPerNode; - SerializeContainer(*this, desc.NodesToBrowse); - } - - template<> - void DataDeserializer::Deserialize(NodesQuery& desc) - { - *this >> desc.View; - *this >> desc.MaxReferenciesPerNode; - DeserializeContainer(*this, desc.NodesToBrowse); - } - - //--------------------------------------------------- - // BrowseRequest - //--------------------------------------------------- - - template<> - std::size_t RawSize(const BrowseRequest& request) - { - return RawSize(request.TypeId) + RawSize(request.Header) + RawSize(request.Query); - } - - template<> - void DataSerializer::Serialize(const BrowseRequest& request) - { - *this << request.TypeId; - *this << request.Header; - *this << request.Query; - } - - template<> - void DataDeserializer::Deserialize(BrowseRequest& request) - { - *this >> request.TypeId; - *this >> request.Header; - *this >> request.Query; - } - - //--------------------------------------------------- - // ReferenceDescription - //--------------------------------------------------- - - template<> - std::size_t RawSize(const ReferenceDescription& desc) - { - return RawSize(desc.ReferenceTypeId) + - RawSize(desc.IsForward) + - RawSize(desc.TargetNodeId) + - RawSize(desc.BrowseName) + - RawSize(desc.DisplayName) + - RawSize(desc.TargetNodeClass) + - RawSize(desc.TargetNodeTypeDefinition); - } - - template<> - void DataSerializer::Serialize(const ReferenceDescription& desc) - { - *this << desc.ReferenceTypeId; - *this << desc.IsForward; - *this << desc.TargetNodeId; - *this << desc.BrowseName; - *this << desc.DisplayName; - *this << desc.TargetNodeClass; - *this << desc.TargetNodeTypeDefinition; - } - - template<> - void DataDeserializer::Deserialize(ReferenceDescription& desc) - { - *this >> desc.ReferenceTypeId; - *this >> desc.IsForward; - *this >> desc.TargetNodeId; - *this >> desc.BrowseName; - *this >> desc.DisplayName; - *this >> desc.TargetNodeClass; - *this >> desc.TargetNodeTypeDefinition; - } - - //--------------------------------------------------- - // BrowseResult - //--------------------------------------------------- - - template<> - std::size_t RawSize(const BrowseResult& result) - { - return RawSize(result.Status) + - RawSizeContainer(result.ContinuationPoint) + - RawSizeContainer(result.Referencies); - } - - template<> - void DataSerializer::Serialize(const BrowseResult& result) - { - *this << result.Status; - SerializeContainer(*this, result.ContinuationPoint); - SerializeContainer(*this, result.Referencies); - } - - template<> - void DataDeserializer::Deserialize(BrowseResult& result) - { - *this >> result.Status; - DeserializeContainer(*this, result.ContinuationPoint); - DeserializeContainer(*this, result.Referencies); - } - - //--------------------------------------------------- - // BrowseResponse - //--------------------------------------------------- - - template<> - std::size_t RawSize(const BrowseResponse& response) - { - return RawSize(response.TypeId) + RawSize(response.Header) + - RawSizeContainer(response.Results) + - RawSizeContainer(response.Diagnostics); - } - - template<> - void DataSerializer::Serialize(const BrowseResponse& response) - { - *this << response.TypeId; - *this << response.Header; - - SerializeContainer(*this, response.Results, 0); - SerializeContainer(*this, response.Diagnostics, 0); - } - - template<> - void DataDeserializer::Deserialize(BrowseResponse& response) - { - *this >> response.TypeId; - *this >> response.Header; - - DeserializeContainer(*this, response.Results); - DeserializeContainer(*this, response.Diagnostics); - } - - //--------------------------------------------------- - // BrowseNextRequest - //--------------------------------------------------- - - template<> - std::size_t RawSize(const BrowseNextRequest& request) - { - return RawSize(request.TypeId) + RawSize(request.Header) + - RawSize(request.ReleaseContinuationPoints) + - RawSize(request.ContinuationPoints); - } - - template<> - void DataSerializer::Serialize(const BrowseNextRequest& request) - { - *this << request.TypeId; - *this << request.Header; - - *this << request.ReleaseContinuationPoints; - SerializeContainer(*this, request.ContinuationPoints); - } - - template<> - void DataDeserializer::Deserialize(BrowseNextRequest& request) - { - *this >> request.TypeId; - *this >> request.Header; - - *this >> request.ReleaseContinuationPoints; - DeserializeContainer(*this, request.ContinuationPoints); - } - - //--------------------------------------------------- - // BrowseNextResponse - //--------------------------------------------------- - - template<> - std::size_t RawSize(const BrowseNextResponse& response) - { - return RawSize(response.TypeId) + RawSize(response.Header) + - RawSizeContainer(response.Results) + - RawSizeContainer(response.Diagnostics); - } - - template<> - void DataSerializer::Serialize(const BrowseNextResponse& response) - { - *this << response.TypeId; - *this << response.Header; - - SerializeContainer(*this, response.Results, 0); - SerializeContainer(*this, response.Diagnostics, 0); - } - - template<> - void DataDeserializer::Deserialize(BrowseNextResponse& response) - { - *this >> response.TypeId; - *this >> response.Header; - - DeserializeContainer(*this, response.Results); - DeserializeContainer(*this, response.Diagnostics); - } - - //////////////////////////////////////////////////////////////////// - // BrowsePathTarget - //////////////////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const BrowsePathTarget& target) - { - return RawSize(target.Node) + RawSize(target.RemainingPathIndex); - } - - template<> - void DataSerializer::Serialize(const BrowsePathTarget& target) - { - *this << target.Node; - *this << target.RemainingPathIndex; - } - - template<> - void DataDeserializer::Deserialize(BrowsePathTarget& target) - { - *this >> target.Node; - *this >> target.RemainingPathIndex; - } - - template<> - void DataSerializer::Serialize>(const std::vector& targets) - { - SerializeContainer(*this, targets); - } - - template<> - void DataDeserializer::Deserialize>(std::vector& targets) - { - DeserializeContainer(*this, targets); - } - - //////////////////////////////////////////////////////////////////// - // BrowsePathResult - //////////////////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const BrowsePathResult& result) - { - return RawSize(result.Status) + RawSizeContainer(result.Targets); - } - - template<> - void DataSerializer::Serialize(const BrowsePathResult& result) - { - *this << result.Status; - *this << result.Targets; - } - - template<> - void DataDeserializer::Deserialize(BrowsePathResult& result) - { - *this >> result.Status; - *this >> result.Targets; - } - - template<> - void DataSerializer::Serialize>(const std::vector& results) - { - SerializeContainer(*this, results); - } - - template<> - void DataDeserializer::Deserialize>(std::vector& results) - { - DeserializeContainer(*this, results); - } - - //////////////////////////////////////////////////////////////////// - // TranslateBrowsePathsResult - //////////////////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const TranslateBrowsePathsResult& result) - { - return RawSizeContainer(result.Paths) + RawSizeContainer(result.Diagnostics); - } - - template<> - void DataSerializer::Serialize(const TranslateBrowsePathsResult& result) - { - *this << result.Paths; - *this << result.Diagnostics; - } - - template<> - void DataDeserializer::Deserialize(TranslateBrowsePathsResult& result) - { - *this >> result.Paths; - *this >> result.Diagnostics; - } - - //////////////////////////////////////////////////////////////////// - // TranslateBrowsePathsToNodeIdsResponse - //////////////////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const TranslateBrowsePathsToNodeIdsResponse& response) - { - return RawSize(response.TypeId) + RawSize(response.Header) + RawSize(response.Result); - } - - template<> - void DataSerializer::Serialize(const TranslateBrowsePathsToNodeIdsResponse& response) - { - *this << response.TypeId; - *this << response.Header; - *this << response.Result; - } - - template<> - void DataDeserializer::Deserialize(TranslateBrowsePathsToNodeIdsResponse& response) - { - *this >> response.TypeId; - *this >> response.Header; - *this >> response.Result; - } - - //////////////////////////////////////////////////////////////////// - // RegisterNodesRequest - //////////////////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const RegisterNodesRequest& request) - { - return RawSize(request.TypeId) + RawSize(request.Header) + RawSizeContainer(request.NodesToRegister); - } - - template<> - void DataSerializer::Serialize(const RegisterNodesRequest& request) - { - *this << request.TypeId; - *this << request.Header; - SerializeContainer(*this, request.NodesToRegister); - } - - template<> - void DataDeserializer::Deserialize(RegisterNodesRequest& request) - { - *this >> request.TypeId; - *this >> request.Header; - DeserializeContainer(*this, request.NodesToRegister); - } - - //////////////////////////////////////////////////////////////////// - // RegisterNodesResponse - //////////////////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const RegisterNodesResponse& response) - { - return RawSize(response.TypeId) + RawSize(response.Header) + RawSizeContainer(response.Result); - } - - template<> - void DataSerializer::Serialize(const RegisterNodesResponse& response) - { - *this << response.TypeId; - *this << response.Header; - SerializeContainer(*this, response.Result); - } - - template<> - void DataDeserializer::Deserialize(RegisterNodesResponse& response) - { - *this >> response.TypeId; - *this >> response.Header; - DeserializeContainer(*this, response.Result); - } - - //////////////////////////////////////////////////////////////////// - // UnregisterNodesRequest - //////////////////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const UnregisterNodesRequest& request) - { - return RawSize(request.TypeId) + RawSize(request.Header) + RawSizeContainer(request.NodesToUnregister); - } - - template<> - void DataSerializer::Serialize(const UnregisterNodesRequest& request) - { - *this << request.TypeId; - *this << request.Header; - SerializeContainer(*this, request.NodesToUnregister); - } - - template<> - void DataDeserializer::Deserialize(UnregisterNodesRequest& request) - { - *this >> request.TypeId; - *this >> request.Header; - DeserializeContainer(*this, request.NodesToUnregister); - } - - //////////////////////////////////////////////////////////////////// - // UnregisterNodesResponse - //////////////////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const UnregisterNodesResponse& response) - { - return RawSize(response.TypeId) + RawSize(response.Header); - } - - template<> - void DataSerializer::Serialize(const UnregisterNodesResponse& response) - { - *this << response.TypeId; - *this << response.Header; - } - - template<> - void DataDeserializer::Deserialize(UnregisterNodesResponse& response) - { - *this >> response.TypeId; - *this >> response.Header; - } - - //////////////////////////////////////////////////////////////////// - // RelativePathElement - //////////////////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const RelativePathElement& element) - { - return RawSize(element.IncludeSubtypes) + RawSize(element.IsInverse) + RawSize(element.ReferenceTypeId) + RawSize(element.TargetName); - } - - template<> - void DataSerializer::Serialize(const RelativePathElement& path) - { - *this << path.ReferenceTypeId; - *this << path.IsInverse; - *this << path.IncludeSubtypes; - *this << path.TargetName; - } - - template<> - void DataDeserializer::Deserialize(RelativePathElement& path) - { - *this >> path.ReferenceTypeId; - *this >> path.IsInverse; - *this >> path.IncludeSubtypes; - *this >> path.TargetName; - } - - template<> - void DataDeserializer::Deserialize>(std::vector& targets) - { - DeserializeContainer(*this, targets); - } - - template<> - void DataSerializer::Serialize>( const std::vector& targets) - { - SerializeContainer(*this, targets); - } - - //////////////////////////////////////////////////////////////////// - // RelativePath - //////////////////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const RelativePath& rpath) - { - return RawSizeContainer(rpath.Elements); - } - - template<> - void DataSerializer::Serialize(const RelativePath& path) - { - *this << path.Elements; - } - - template<> - void DataDeserializer::Deserialize(RelativePath& path) - { - *this >> path.Elements; - } - - //////////////////////////////////////////////////////////////////// - // BrowsePath - //////////////////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const BrowsePath& path) - { - return RawSize(path.StartingNode) + RawSize(path.Path); - } - - template<> - void DataDeserializer::Deserialize(BrowsePath& path) - { - *this >> path.StartingNode; - *this >> path.Path; - } - - template<> - void DataSerializer::Serialize(const BrowsePath& path) - { - *this << path.StartingNode; - *this << path.Path; - } - - template<> - void DataDeserializer::Deserialize>(std::vector& paths) - { - DeserializeContainer(*this, paths); - } - - template<> - void DataSerializer::Serialize>(const std::vector& paths) - { - SerializeContainer(*this, paths); - } - - //////////////////////////////////////////////////////////////////// - // TranslateBrowsePathsParameters - //////////////////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const TranslateBrowsePathsParameters& params) - { - return RawSizeContainer(params.BrowsePaths); - } - - template<> - void DataSerializer::Serialize(const TranslateBrowsePathsParameters& params) - { - *this << params.BrowsePaths; - } - - template<> - void DataDeserializer::Deserialize(TranslateBrowsePathsParameters& path) - { - *this >> path.BrowsePaths; - } - - //////////////////////////////////////////////////////////////////// - // TranslateBrowsePathsToNodeIdsRequest - //////////////////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const TranslateBrowsePathsToNodeIdsRequest& request) - { - return RawSize(request.TypeId) + RawSize(request.Header) + RawSize(request.Parameters) ; - } - - template<> - void DataSerializer::Serialize(const TranslateBrowsePathsToNodeIdsRequest& request) - { - *this << request.TypeId; - *this << request.Header; - *this << request.Parameters; - } - - template<> - void DataDeserializer::Deserialize(TranslateBrowsePathsToNodeIdsRequest& request) - { - *this >> request.TypeId; - *this >> request.Header; - *this >> request.Parameters; - } - - } // namespace Binary +//////////////////////////////////////////////////////////////////////////// +// NodesDescription +//////////////////////////////////////////////////////////////////////////// + +NodesQuery::NodesQuery() + : MaxReferenciesPerNode(0) +{ +} + +//////////////////////////////////////////////////////////////////////////// +// ViewDescription +//////////////////////////////////////////////////////////////////////////// + +ViewDescription::ViewDescription() + : Timestamp(0) + , Version(0) +{ +} + +BrowseDescription::BrowseDescription() + : Direction(BrowseDirection::Both) + , IncludeSubtypes(false) + , NodeClasses(NodeClass::Unspecified) + , ResultMask(BrowseResultMask::All) +{ +} + +BrowseRequest::BrowseRequest() + : TypeId(BROWSE_REQUEST) +{ +} + +TranslateBrowsePathsToNodeIdsRequest::TranslateBrowsePathsToNodeIdsRequest() + : TypeId(TRANSLATE_BROWSE_PATHS_TO_NODE_IdS_REQUEST) +{ +} + +RegisterNodesRequest::RegisterNodesRequest() + : TypeId(REGISTER_NODES_REQUEST) +{ +} + +RegisterNodesResponse::RegisterNodesResponse() + : TypeId(REGISTER_NODES_RESPONSE) +{ +} + +UnregisterNodesRequest::UnregisterNodesRequest() + : TypeId(UNREGISTER_NODES_REQUEST) +{ +} + +UnregisterNodesResponse::UnregisterNodesResponse() + : TypeId(UNREGISTER_NODES_RESPONSE) +{ +} + +ReferenceDescription::ReferenceDescription() + : IsForward(false) + , TargetNodeClass(NodeClass::Unspecified) +{ +} + +BrowseResult::BrowseResult() + : Status(StatusCode::Good) +{ +} + +BrowseResponse::BrowseResponse() + : TypeId(BROWSE_RESPONSE) +{ +} + +BrowseNextRequest::BrowseNextRequest() + : TypeId(BROWSE_NEXT_REQUEST) + , ReleaseContinuationPoints(false) +{ +} + +BrowseNextResponse::BrowseNextResponse() + : TypeId(BROWSE_NEXT_RESPONSE) +{ +} + +BrowsePathTarget::BrowsePathTarget() + : RemainingPathIndex(0) +{ +} + +BrowsePathResult::BrowsePathResult() + : Status(StatusCode::Good) +{ +} + +TranslateBrowsePathsToNodeIdsResponse::TranslateBrowsePathsToNodeIdsResponse() + : TypeId(TRANSLATE_BROWSE_PATHS_TO_NODE_IdS_RESPONSE) +{ +} + +namespace Binary +{ + +//--------------------------------------------------- +// ViewDescription +//--------------------------------------------------- + +template<> +std::size_t RawSize(const ViewDescription & desc) +{ + return RawSize(desc.Id) + RawSize(desc.Timestamp) + RawSize(desc.Version); +} + +template<> +void DataSerializer::Serialize(const ViewDescription & desc) +{ + *this << desc.Id; + *this << desc.Timestamp; + *this << desc.Version; +} + +template<> +void DataDeserializer::Deserialize(ViewDescription & desc) +{ + *this >> desc.Id; + *this >> desc.Timestamp; + *this >> desc.Version; +} + + +//--------------------------------------------------- +// BrowseDescription +//--------------------------------------------------- + +template<> +std::size_t RawSize(const BrowseDescription & desc) +{ + return RawSize(desc.NodeToBrowse) + + RawSize(desc.Direction) + + RawSize(desc.ReferenceTypeId) + + RawSize(desc.IncludeSubtypes) + + RawSize(desc.NodeClasses) + + RawSize(desc.ResultMask); +} + +template<> +void DataSerializer::Serialize(const BrowseDescription & desc) +{ + *this << desc.NodeToBrowse; + *this << desc.Direction; + *this << desc.ReferenceTypeId; + *this << desc.IncludeSubtypes; + *this << desc.NodeClasses; + *this << desc.ResultMask; +} + +template<> +void DataDeserializer::Deserialize(BrowseDescription & desc) +{ + *this >> desc.NodeToBrowse; + *this >> desc.Direction; + *this >> desc.ReferenceTypeId; + *this >> desc.IncludeSubtypes; + *this >> desc.NodeClasses; + *this >> desc.ResultMask; +} + +//////////////////////////////////////////////////////////////////////////// +// NodesDescription +//////////////////////////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const NodesQuery & desc) +{ + return RawSize(desc.View) + RawSize(desc.MaxReferenciesPerNode) + RawSizeContainer(desc.NodesToBrowse); +} + +template<> +void DataSerializer::Serialize(const NodesQuery & desc) +{ + *this << desc.View; + *this << desc.MaxReferenciesPerNode; + SerializeContainer(*this, desc.NodesToBrowse); +} + +template<> +void DataDeserializer::Deserialize(NodesQuery & desc) +{ + *this >> desc.View; + *this >> desc.MaxReferenciesPerNode; + DeserializeContainer(*this, desc.NodesToBrowse); +} + +//--------------------------------------------------- +// BrowseRequest +//--------------------------------------------------- + +template<> +std::size_t RawSize(const BrowseRequest & request) +{ + return RawSize(request.TypeId) + RawSize(request.Header) + RawSize(request.Query); +} + +template<> +void DataSerializer::Serialize(const BrowseRequest & request) +{ + *this << request.TypeId; + *this << request.Header; + *this << request.Query; +} + +template<> +void DataDeserializer::Deserialize(BrowseRequest & request) +{ + *this >> request.TypeId; + *this >> request.Header; + *this >> request.Query; +} + +//--------------------------------------------------- +// ReferenceDescription +//--------------------------------------------------- + +template<> +std::size_t RawSize(const ReferenceDescription & desc) +{ + return RawSize(desc.ReferenceTypeId) + + RawSize(desc.IsForward) + + RawSize(desc.TargetNodeId) + + RawSize(desc.BrowseName) + + RawSize(desc.DisplayName) + + RawSize(desc.TargetNodeClass) + + RawSize(desc.TargetNodeTypeDefinition); +} + +template<> +void DataSerializer::Serialize(const ReferenceDescription & desc) +{ + *this << desc.ReferenceTypeId; + *this << desc.IsForward; + *this << desc.TargetNodeId; + *this << desc.BrowseName; + *this << desc.DisplayName; + *this << desc.TargetNodeClass; + *this << desc.TargetNodeTypeDefinition; +} + +template<> +void DataDeserializer::Deserialize(ReferenceDescription & desc) +{ + *this >> desc.ReferenceTypeId; + *this >> desc.IsForward; + *this >> desc.TargetNodeId; + *this >> desc.BrowseName; + *this >> desc.DisplayName; + *this >> desc.TargetNodeClass; + *this >> desc.TargetNodeTypeDefinition; +} + +//--------------------------------------------------- +// BrowseResult +//--------------------------------------------------- + +template<> +std::size_t RawSize(const BrowseResult & result) +{ + return RawSize(result.Status) + + RawSizeContainer(result.ContinuationPoint) + + RawSizeContainer(result.Referencies); +} + +template<> +void DataSerializer::Serialize(const BrowseResult & result) +{ + *this << result.Status; + SerializeContainer(*this, result.ContinuationPoint); + SerializeContainer(*this, result.Referencies); +} + +template<> +void DataDeserializer::Deserialize(BrowseResult & result) +{ + *this >> result.Status; + DeserializeContainer(*this, result.ContinuationPoint); + DeserializeContainer(*this, result.Referencies); +} + +//--------------------------------------------------- +// BrowseResponse +//--------------------------------------------------- + +template<> +std::size_t RawSize(const BrowseResponse & response) +{ + return RawSize(response.TypeId) + RawSize(response.Header) + + RawSizeContainer(response.Results) + + RawSizeContainer(response.Diagnostics); +} + +template<> +void DataSerializer::Serialize(const BrowseResponse & response) +{ + *this << response.TypeId; + *this << response.Header; + + SerializeContainer(*this, response.Results, 0); + SerializeContainer(*this, response.Diagnostics, 0); +} + +template<> +void DataDeserializer::Deserialize(BrowseResponse & response) +{ + *this >> response.TypeId; + *this >> response.Header; + + DeserializeContainer(*this, response.Results); + DeserializeContainer(*this, response.Diagnostics); +} + +//--------------------------------------------------- +// BrowseNextRequest +//--------------------------------------------------- + +template<> +std::size_t RawSize(const BrowseNextRequest & request) +{ + return RawSize(request.TypeId) + RawSize(request.Header) + + RawSize(request.ReleaseContinuationPoints) + + RawSize(request.ContinuationPoints); +} + +template<> +void DataSerializer::Serialize(const BrowseNextRequest & request) +{ + *this << request.TypeId; + *this << request.Header; + + *this << request.ReleaseContinuationPoints; + SerializeContainer(*this, request.ContinuationPoints); +} + +template<> +void DataDeserializer::Deserialize(BrowseNextRequest & request) +{ + *this >> request.TypeId; + *this >> request.Header; + + *this >> request.ReleaseContinuationPoints; + DeserializeContainer(*this, request.ContinuationPoints); +} + +//--------------------------------------------------- +// BrowseNextResponse +//--------------------------------------------------- + +template<> +std::size_t RawSize(const BrowseNextResponse & response) +{ + return RawSize(response.TypeId) + RawSize(response.Header) + + RawSizeContainer(response.Results) + + RawSizeContainer(response.Diagnostics); +} + +template<> +void DataSerializer::Serialize(const BrowseNextResponse & response) +{ + *this << response.TypeId; + *this << response.Header; + + SerializeContainer(*this, response.Results, 0); + SerializeContainer(*this, response.Diagnostics, 0); +} + +template<> +void DataDeserializer::Deserialize(BrowseNextResponse & response) +{ + *this >> response.TypeId; + *this >> response.Header; + + DeserializeContainer(*this, response.Results); + DeserializeContainer(*this, response.Diagnostics); +} + +//////////////////////////////////////////////////////////////////// +// BrowsePathTarget +//////////////////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const BrowsePathTarget & target) +{ + return RawSize(target.Node) + RawSize(target.RemainingPathIndex); +} + +template<> +void DataSerializer::Serialize(const BrowsePathTarget & target) +{ + *this << target.Node; + *this << target.RemainingPathIndex; +} + +template<> +void DataDeserializer::Deserialize(BrowsePathTarget & target) +{ + *this >> target.Node; + *this >> target.RemainingPathIndex; +} + +template<> +void DataSerializer::Serialize>(const std::vector & targets) +{ + SerializeContainer(*this, targets); +} + +template<> +void DataDeserializer::Deserialize>(std::vector & targets) +{ + DeserializeContainer(*this, targets); +} + +//////////////////////////////////////////////////////////////////// +// BrowsePathResult +//////////////////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const BrowsePathResult & result) +{ + return RawSize(result.Status) + RawSizeContainer(result.Targets); +} + +template<> +void DataSerializer::Serialize(const BrowsePathResult & result) +{ + *this << result.Status; + *this << result.Targets; +} + +template<> +void DataDeserializer::Deserialize(BrowsePathResult & result) +{ + *this >> result.Status; + *this >> result.Targets; +} + +template<> +void DataSerializer::Serialize>(const std::vector & results) +{ + SerializeContainer(*this, results); +} + +template<> +void DataDeserializer::Deserialize>(std::vector & results) +{ + DeserializeContainer(*this, results); +} + +//////////////////////////////////////////////////////////////////// +// TranslateBrowsePathsResult +//////////////////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const TranslateBrowsePathsResult & result) +{ + return RawSizeContainer(result.Paths) + RawSizeContainer(result.Diagnostics); +} + +template<> +void DataSerializer::Serialize(const TranslateBrowsePathsResult & result) +{ + *this << result.Paths; + *this << result.Diagnostics; +} + +template<> +void DataDeserializer::Deserialize(TranslateBrowsePathsResult & result) +{ + *this >> result.Paths; + *this >> result.Diagnostics; +} + +//////////////////////////////////////////////////////////////////// +// TranslateBrowsePathsToNodeIdsResponse +//////////////////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const TranslateBrowsePathsToNodeIdsResponse & response) +{ + return RawSize(response.TypeId) + RawSize(response.Header) + RawSize(response.Result); +} + +template<> +void DataSerializer::Serialize(const TranslateBrowsePathsToNodeIdsResponse & response) +{ + *this << response.TypeId; + *this << response.Header; + *this << response.Result; +} + +template<> +void DataDeserializer::Deserialize(TranslateBrowsePathsToNodeIdsResponse & response) +{ + *this >> response.TypeId; + *this >> response.Header; + *this >> response.Result; +} + +//////////////////////////////////////////////////////////////////// +// RegisterNodesRequest +//////////////////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const RegisterNodesRequest & request) +{ + return RawSize(request.TypeId) + RawSize(request.Header) + RawSizeContainer(request.NodesToRegister); +} + +template<> +void DataSerializer::Serialize(const RegisterNodesRequest & request) +{ + *this << request.TypeId; + *this << request.Header; + SerializeContainer(*this, request.NodesToRegister); +} + +template<> +void DataDeserializer::Deserialize(RegisterNodesRequest & request) +{ + *this >> request.TypeId; + *this >> request.Header; + DeserializeContainer(*this, request.NodesToRegister); +} + +//////////////////////////////////////////////////////////////////// +// RegisterNodesResponse +//////////////////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const RegisterNodesResponse & response) +{ + return RawSize(response.TypeId) + RawSize(response.Header) + RawSizeContainer(response.Result); +} + +template<> +void DataSerializer::Serialize(const RegisterNodesResponse & response) +{ + *this << response.TypeId; + *this << response.Header; + SerializeContainer(*this, response.Result); +} + +template<> +void DataDeserializer::Deserialize(RegisterNodesResponse & response) +{ + *this >> response.TypeId; + *this >> response.Header; + DeserializeContainer(*this, response.Result); +} + +//////////////////////////////////////////////////////////////////// +// UnregisterNodesRequest +//////////////////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const UnregisterNodesRequest & request) +{ + return RawSize(request.TypeId) + RawSize(request.Header) + RawSizeContainer(request.NodesToUnregister); +} + +template<> +void DataSerializer::Serialize(const UnregisterNodesRequest & request) +{ + *this << request.TypeId; + *this << request.Header; + SerializeContainer(*this, request.NodesToUnregister); +} + +template<> +void DataDeserializer::Deserialize(UnregisterNodesRequest & request) +{ + *this >> request.TypeId; + *this >> request.Header; + DeserializeContainer(*this, request.NodesToUnregister); +} + +//////////////////////////////////////////////////////////////////// +// UnregisterNodesResponse +//////////////////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const UnregisterNodesResponse & response) +{ + return RawSize(response.TypeId) + RawSize(response.Header); +} + +template<> +void DataSerializer::Serialize(const UnregisterNodesResponse & response) +{ + *this << response.TypeId; + *this << response.Header; +} + +template<> +void DataDeserializer::Deserialize(UnregisterNodesResponse & response) +{ + *this >> response.TypeId; + *this >> response.Header; +} + +//////////////////////////////////////////////////////////////////// +// RelativePathElement +//////////////////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const RelativePathElement & element) +{ + return RawSize(element.IncludeSubtypes) + RawSize(element.IsInverse) + RawSize(element.ReferenceTypeId) + RawSize(element.TargetName); +} + +template<> +void DataSerializer::Serialize(const RelativePathElement & path) +{ + *this << path.ReferenceTypeId; + *this << path.IsInverse; + *this << path.IncludeSubtypes; + *this << path.TargetName; +} + +template<> +void DataDeserializer::Deserialize(RelativePathElement & path) +{ + *this >> path.ReferenceTypeId; + *this >> path.IsInverse; + *this >> path.IncludeSubtypes; + *this >> path.TargetName; +} + +template<> +void DataDeserializer::Deserialize>(std::vector & targets) +{ + DeserializeContainer(*this, targets); +} + +template<> +void DataSerializer::Serialize>(const std::vector & targets) +{ + SerializeContainer(*this, targets); +} + +//////////////////////////////////////////////////////////////////// +// RelativePath +//////////////////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const RelativePath & rpath) +{ + return RawSizeContainer(rpath.Elements); +} + +template<> +void DataSerializer::Serialize(const RelativePath & path) +{ + *this << path.Elements; +} + +template<> +void DataDeserializer::Deserialize(RelativePath & path) +{ + *this >> path.Elements; +} + +//////////////////////////////////////////////////////////////////// +// BrowsePath +//////////////////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const BrowsePath & path) +{ + return RawSize(path.StartingNode) + RawSize(path.Path); +} + +template<> +void DataDeserializer::Deserialize(BrowsePath & path) +{ + *this >> path.StartingNode; + *this >> path.Path; +} + +template<> +void DataSerializer::Serialize(const BrowsePath & path) +{ + *this << path.StartingNode; + *this << path.Path; +} + +template<> +void DataDeserializer::Deserialize>(std::vector & paths) +{ + DeserializeContainer(*this, paths); +} + +template<> +void DataSerializer::Serialize>(const std::vector & paths) +{ + SerializeContainer(*this, paths); +} + +//////////////////////////////////////////////////////////////////// +// TranslateBrowsePathsParameters +//////////////////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const TranslateBrowsePathsParameters & params) +{ + return RawSizeContainer(params.BrowsePaths); +} + +template<> +void DataSerializer::Serialize(const TranslateBrowsePathsParameters & params) +{ + *this << params.BrowsePaths; +} + +template<> +void DataDeserializer::Deserialize(TranslateBrowsePathsParameters & path) +{ + *this >> path.BrowsePaths; +} + +//////////////////////////////////////////////////////////////////// +// TranslateBrowsePathsToNodeIdsRequest +//////////////////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const TranslateBrowsePathsToNodeIdsRequest & request) +{ + return RawSize(request.TypeId) + RawSize(request.Header) + RawSize(request.Parameters) ; +} + +template<> +void DataSerializer::Serialize(const TranslateBrowsePathsToNodeIdsRequest & request) +{ + *this << request.TypeId; + *this << request.Header; + *this << request.Parameters; +} + +template<> +void DataDeserializer::Deserialize(TranslateBrowsePathsToNodeIdsRequest & request) +{ + *this >> request.TypeId; + *this >> request.Header; + *this >> request.Parameters; +} + +} // namespace Binary } // namespace OpcUa diff --git a/src/protocol/constructors_auto.cpp b/src/protocol/constructors_auto.cpp index 65a2efde..d7c910e2 100644 --- a/src/protocol/constructors_auto.cpp +++ b/src/protocol/constructors_auto.cpp @@ -16,7 +16,7 @@ #include namespace OpcUa -{ +{ /* DISABLED */ @@ -48,15 +48,15 @@ namespace OpcUa } */ - GetEndpointsRequest::GetEndpointsRequest() - : TypeId(FourByteNodeId((uint16_t)ObjectId::GetEndpointsRequest_Encoding_DefaultBinary)) - { - } +GetEndpointsRequest::GetEndpointsRequest() + : TypeId(FourByteNodeId((uint16_t)ObjectId::GetEndpointsRequest_Encoding_DefaultBinary)) +{ +} - GetEndpointsResponse::GetEndpointsResponse() - : TypeId(FourByteNodeId((uint16_t)ObjectId::GetEndpointsResponse_Encoding_DefaultBinary)) - { - } +GetEndpointsResponse::GetEndpointsResponse() + : TypeId(FourByteNodeId((uint16_t)ObjectId::GetEndpointsResponse_Encoding_DefaultBinary)) +{ +} /* DISABLED @@ -109,28 +109,28 @@ namespace OpcUa } */ - CreateSessionRequest::CreateSessionRequest() - : TypeId(FourByteNodeId((uint16_t)ObjectId::CreateSessionRequest_Encoding_DefaultBinary)) - { - } +CreateSessionRequest::CreateSessionRequest() + : TypeId(FourByteNodeId((uint16_t)ObjectId::CreateSessionRequest_Encoding_DefaultBinary)) +{ +} - CreateSessionResponse::CreateSessionResponse() - : TypeId(FourByteNodeId((uint16_t)ObjectId::CreateSessionResponse_Encoding_DefaultBinary)) - { - } +CreateSessionResponse::CreateSessionResponse() + : TypeId(FourByteNodeId((uint16_t)ObjectId::CreateSessionResponse_Encoding_DefaultBinary)) +{ +} /* DISABLED */ - ActivateSessionRequest::ActivateSessionRequest() - : TypeId(FourByteNodeId((uint16_t)ObjectId::ActivateSessionRequest_Encoding_DefaultBinary)) - { - } +ActivateSessionRequest::ActivateSessionRequest() + : TypeId(FourByteNodeId((uint16_t)ObjectId::ActivateSessionRequest_Encoding_DefaultBinary)) +{ +} - ActivateSessionResponse::ActivateSessionResponse() - : TypeId(FourByteNodeId((uint16_t)ObjectId::ActivateSessionResponse_Encoding_DefaultBinary)) - { - } +ActivateSessionResponse::ActivateSessionResponse() + : TypeId(FourByteNodeId((uint16_t)ObjectId::ActivateSessionResponse_Encoding_DefaultBinary)) +{ +} /* DISABLED @@ -196,15 +196,15 @@ namespace OpcUa } */ - DeleteNodesRequest::DeleteNodesRequest() - : TypeId(FourByteNodeId((uint16_t)ObjectId::DeleteNodesRequest_Encoding_DefaultBinary)) - { - } +DeleteNodesRequest::DeleteNodesRequest() + : TypeId(FourByteNodeId((uint16_t)ObjectId::DeleteNodesRequest_Encoding_DefaultBinary)) +{ +} - DeleteNodesResponse::DeleteNodesResponse() - : TypeId(FourByteNodeId((uint16_t)ObjectId::DeleteNodesResponse_Encoding_DefaultBinary)) - { - } +DeleteNodesResponse::DeleteNodesResponse() + : TypeId(FourByteNodeId((uint16_t)ObjectId::DeleteNodesResponse_Encoding_DefaultBinary)) +{ +} /* DISABLED @@ -343,15 +343,15 @@ namespace OpcUa } */ - ReadRequest::ReadRequest() - : TypeId(FourByteNodeId((uint16_t)ObjectId::ReadRequest_Encoding_DefaultBinary)) - { - } +ReadRequest::ReadRequest() + : TypeId(FourByteNodeId((uint16_t)ObjectId::ReadRequest_Encoding_DefaultBinary)) +{ +} - ReadResponse::ReadResponse() - : TypeId(FourByteNodeId((uint16_t)ObjectId::ReadResponse_Encoding_DefaultBinary)) - { - } +ReadResponse::ReadResponse() + : TypeId(FourByteNodeId((uint16_t)ObjectId::ReadResponse_Encoding_DefaultBinary)) +{ +} /* DISABLED @@ -369,15 +369,15 @@ namespace OpcUa } */ - WriteRequest::WriteRequest() - : TypeId(FourByteNodeId((uint16_t)ObjectId::WriteRequest_Encoding_DefaultBinary)) - { - } +WriteRequest::WriteRequest() + : TypeId(FourByteNodeId((uint16_t)ObjectId::WriteRequest_Encoding_DefaultBinary)) +{ +} - WriteResponse::WriteResponse() - : TypeId(FourByteNodeId((uint16_t)ObjectId::WriteResponse_Encoding_DefaultBinary)) - { - } +WriteResponse::WriteResponse() + : TypeId(FourByteNodeId((uint16_t)ObjectId::WriteResponse_Encoding_DefaultBinary)) +{ +} /* DISABLED @@ -395,25 +395,25 @@ namespace OpcUa } */ - CallRequest::CallRequest() - : TypeId(FourByteNodeId((uint16_t)ObjectId::CallRequest_Encoding_DefaultBinary)) - { - } +CallRequest::CallRequest() + : TypeId(FourByteNodeId((uint16_t)ObjectId::CallRequest_Encoding_DefaultBinary)) +{ +} - CallResponse::CallResponse() - : TypeId(FourByteNodeId((uint16_t)ObjectId::CallResponse_Encoding_DefaultBinary)) - { - } +CallResponse::CallResponse() + : TypeId(FourByteNodeId((uint16_t)ObjectId::CallResponse_Encoding_DefaultBinary)) +{ +} - CreateMonitoredItemsRequest::CreateMonitoredItemsRequest() - : TypeId(FourByteNodeId((uint16_t)ObjectId::CreateMonitoredItemsRequest_Encoding_DefaultBinary)) - { - } +CreateMonitoredItemsRequest::CreateMonitoredItemsRequest() + : TypeId(FourByteNodeId((uint16_t)ObjectId::CreateMonitoredItemsRequest_Encoding_DefaultBinary)) +{ +} - CreateMonitoredItemsResponse::CreateMonitoredItemsResponse() - : TypeId(FourByteNodeId((uint16_t)ObjectId::CreateMonitoredItemsResponse_Encoding_DefaultBinary)) - { - } +CreateMonitoredItemsResponse::CreateMonitoredItemsResponse() + : TypeId(FourByteNodeId((uint16_t)ObjectId::CreateMonitoredItemsResponse_Encoding_DefaultBinary)) +{ +} /* DISABLED @@ -463,65 +463,65 @@ namespace OpcUa } */ - DeleteMonitoredItemsRequest::DeleteMonitoredItemsRequest() - : TypeId(FourByteNodeId((uint16_t)ObjectId::DeleteMonitoredItemsRequest_Encoding_DefaultBinary)) - { - } +DeleteMonitoredItemsRequest::DeleteMonitoredItemsRequest() + : TypeId(FourByteNodeId((uint16_t)ObjectId::DeleteMonitoredItemsRequest_Encoding_DefaultBinary)) +{ +} - DeleteMonitoredItemsResponse::DeleteMonitoredItemsResponse() - : TypeId(FourByteNodeId((uint16_t)ObjectId::DeleteMonitoredItemsResponse_Encoding_DefaultBinary)) - { - } +DeleteMonitoredItemsResponse::DeleteMonitoredItemsResponse() + : TypeId(FourByteNodeId((uint16_t)ObjectId::DeleteMonitoredItemsResponse_Encoding_DefaultBinary)) +{ +} - CreateSubscriptionRequest::CreateSubscriptionRequest() - : TypeId(FourByteNodeId((uint16_t)ObjectId::CreateSubscriptionRequest_Encoding_DefaultBinary)) - { - } +CreateSubscriptionRequest::CreateSubscriptionRequest() + : TypeId(FourByteNodeId((uint16_t)ObjectId::CreateSubscriptionRequest_Encoding_DefaultBinary)) +{ +} - CreateSubscriptionResponse::CreateSubscriptionResponse() - : TypeId(FourByteNodeId((uint16_t)ObjectId::CreateSubscriptionResponse_Encoding_DefaultBinary)) - { - } +CreateSubscriptionResponse::CreateSubscriptionResponse() + : TypeId(FourByteNodeId((uint16_t)ObjectId::CreateSubscriptionResponse_Encoding_DefaultBinary)) +{ +} - ModifySubscriptionRequest::ModifySubscriptionRequest() - : TypeId(FourByteNodeId((uint16_t)ObjectId::ModifySubscriptionRequest_Encoding_DefaultBinary)) - { - } +ModifySubscriptionRequest::ModifySubscriptionRequest() + : TypeId(FourByteNodeId((uint16_t)ObjectId::ModifySubscriptionRequest_Encoding_DefaultBinary)) +{ +} - ModifySubscriptionResponse::ModifySubscriptionResponse() - : TypeId(FourByteNodeId((uint16_t)ObjectId::ModifySubscriptionResponse_Encoding_DefaultBinary)) - { - } +ModifySubscriptionResponse::ModifySubscriptionResponse() + : TypeId(FourByteNodeId((uint16_t)ObjectId::ModifySubscriptionResponse_Encoding_DefaultBinary)) +{ +} - SetPublishingModeRequest::SetPublishingModeRequest() - : TypeId(FourByteNodeId((uint16_t)ObjectId::SetPublishingModeRequest_Encoding_DefaultBinary)) - { - } +SetPublishingModeRequest::SetPublishingModeRequest() + : TypeId(FourByteNodeId((uint16_t)ObjectId::SetPublishingModeRequest_Encoding_DefaultBinary)) +{ +} - SetPublishingModeResponse::SetPublishingModeResponse() - : TypeId(FourByteNodeId((uint16_t)ObjectId::SetPublishingModeResponse_Encoding_DefaultBinary)) - { - } +SetPublishingModeResponse::SetPublishingModeResponse() + : TypeId(FourByteNodeId((uint16_t)ObjectId::SetPublishingModeResponse_Encoding_DefaultBinary)) +{ +} - PublishRequest::PublishRequest() - : TypeId(FourByteNodeId((uint16_t)ObjectId::PublishRequest_Encoding_DefaultBinary)) - { - } +PublishRequest::PublishRequest() + : TypeId(FourByteNodeId((uint16_t)ObjectId::PublishRequest_Encoding_DefaultBinary)) +{ +} - PublishResponse::PublishResponse() - : TypeId(FourByteNodeId((uint16_t)ObjectId::PublishResponse_Encoding_DefaultBinary)) - { - } +PublishResponse::PublishResponse() + : TypeId(FourByteNodeId((uint16_t)ObjectId::PublishResponse_Encoding_DefaultBinary)) +{ +} - RepublishRequest::RepublishRequest() - : TypeId(FourByteNodeId((uint16_t)ObjectId::RepublishRequest_Encoding_DefaultBinary)) - { - } +RepublishRequest::RepublishRequest() + : TypeId(FourByteNodeId((uint16_t)ObjectId::RepublishRequest_Encoding_DefaultBinary)) +{ +} - RepublishResponse::RepublishResponse() - : TypeId(FourByteNodeId((uint16_t)ObjectId::RepublishResponse_Encoding_DefaultBinary)) - { - } +RepublishResponse::RepublishResponse() + : TypeId(FourByteNodeId((uint16_t)ObjectId::RepublishResponse_Encoding_DefaultBinary)) +{ +} /* DISABLED @@ -539,15 +539,15 @@ namespace OpcUa } */ - DeleteSubscriptionsRequest::DeleteSubscriptionsRequest() - : TypeId(FourByteNodeId((uint16_t)ObjectId::DeleteSubscriptionsRequest_Encoding_DefaultBinary)) - { - } +DeleteSubscriptionsRequest::DeleteSubscriptionsRequest() + : TypeId(FourByteNodeId((uint16_t)ObjectId::DeleteSubscriptionsRequest_Encoding_DefaultBinary)) +{ +} - DeleteSubscriptionsResponse::DeleteSubscriptionsResponse() - : TypeId(FourByteNodeId((uint16_t)ObjectId::DeleteSubscriptionsResponse_Encoding_DefaultBinary)) - { - } +DeleteSubscriptionsResponse::DeleteSubscriptionsResponse() + : TypeId(FourByteNodeId((uint16_t)ObjectId::DeleteSubscriptionsResponse_Encoding_DefaultBinary)) +{ +} /* DISABLED @@ -582,4 +582,4 @@ namespace OpcUa */ } // namespace - + diff --git a/src/protocol/deserialize_auto.cpp b/src/protocol/deserialize_auto.cpp index 12205ad8..b20af533 100644 --- a/src/protocol/deserialize_auto.cpp +++ b/src/protocol/deserialize_auto.cpp @@ -19,231 +19,231 @@ namespace OpcUa { - namespace Binary - { +namespace Binary +{ - template<> - void DataDeserializer::Deserialize(OpenFileMode& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(OpenFileMode & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(NodeClass& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(NodeClass & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(ApplicationType& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(ApplicationType & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(MessageSecurityMode& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(MessageSecurityMode & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(UserTokenType& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(UserTokenType & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(SecurityTokenRequestType& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(SecurityTokenRequestType & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(NodeAttributesMask& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(NodeAttributesMask & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(AttributeWriteMask& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(AttributeWriteMask & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(BrowseDirection& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(BrowseDirection & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(BrowseResultMask& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(BrowseResultMask & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(ComplianceLevel& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(ComplianceLevel & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(FilterOperator& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(FilterOperator & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(TimestampsToReturn& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(TimestampsToReturn & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(HistoryUpdateType& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(HistoryUpdateType & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(PerformUpdateType& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(PerformUpdateType & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(MonitoringMode& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(MonitoringMode & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(DataChangeTrigger& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(DataChangeTrigger & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(DeadbandType& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(DeadbandType & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(EnumeratedTestType& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(EnumeratedTestType & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(RedundancySupport& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(RedundancySupport & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(ServerState& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(ServerState & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(ModelChangeStructureVerbMask& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(ModelChangeStructureVerbMask & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(AxisScaleEnumeration& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(AxisScaleEnumeration & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(ExceptionDeviationFormat& data) - { - uint32_t tmp; - *this >> tmp; - data = static_cast(tmp); - } +template<> +void DataDeserializer::Deserialize(ExceptionDeviationFormat & data) +{ + uint32_t tmp; + *this >> tmp; + data = static_cast(tmp); +} - template<> - void DataDeserializer::Deserialize(XmlElement& data) - { - *this >> data.Length; - DeserializeContainer(*this, data.Value); - } +template<> +void DataDeserializer::Deserialize(XmlElement & data) +{ + *this >> data.Length; + DeserializeContainer(*this, data.Value); +} /* DISABLED @@ -327,13 +327,14 @@ namespace OpcUa */ - template<> - void DataDeserializer::Deserialize(ExtensionObject& data) - { - *this >> data.TypeId; - *this >> data.Encoding; - if ((data.Encoding) & (1>>(0))) *this >> data.Body; - } +template<> +void DataDeserializer::Deserialize(ExtensionObject & data) +{ + *this >> data.TypeId; + *this >> data.Encoding; + + if ((data.Encoding) & (1 >> (0))) { *this >> data.Body; } +} /* DISABLED @@ -704,17 +705,17 @@ namespace OpcUa */ - template<> - void DataDeserializer::Deserialize(ApplicationDescription& data) - { - *this >> data.ApplicationUri; - *this >> data.ProductUri; - *this >> data.ApplicationName; - *this >> data.ApplicationType; - *this >> data.GatewayServerUri; - *this >> data.DiscoveryProfileUri; - DeserializeContainer(*this, data.DiscoveryUrls); - } +template<> +void DataDeserializer::Deserialize(ApplicationDescription & data) +{ + *this >> data.ApplicationUri; + *this >> data.ProductUri; + *this >> data.ApplicationName; + *this >> data.ApplicationType; + *this >> data.GatewayServerUri; + *this >> data.DiscoveryProfileUri; + DeserializeContainer(*this, data.DiscoveryUrls); +} /* DISABLED @@ -805,56 +806,56 @@ namespace OpcUa */ - template<> - void DataDeserializer::Deserialize(UserTokenPolicy& data) - { - *this >> data.PolicyId; - *this >> data.TokenType; - *this >> data.IssuedTokenType; - *this >> data.IssuerEndpointUrl; - *this >> data.SecurityPolicyUri; - } - - - template<> - void DataDeserializer::Deserialize(EndpointDescription& data) - { - *this >> data.EndpointUrl; - *this >> data.Server; - *this >> data.ServerCertificate; - *this >> data.SecurityMode; - *this >> data.SecurityPolicyUri; - DeserializeContainer(*this, data.UserIdentityTokens); - *this >> data.TransportProfileUri; - *this >> data.SecurityLevel; - } +template<> +void DataDeserializer::Deserialize(UserTokenPolicy & data) +{ + *this >> data.PolicyId; + *this >> data.TokenType; + *this >> data.IssuedTokenType; + *this >> data.IssuerEndpointUrl; + *this >> data.SecurityPolicyUri; +} - template<> - void DataDeserializer::Deserialize(GetEndpointsParameters& data) - { - *this >> data.EndpointUrl; - DeserializeContainer(*this, data.LocaleIds); - DeserializeContainer(*this, data.ProfileUris); - } +template<> +void DataDeserializer::Deserialize(EndpointDescription & data) +{ + *this >> data.EndpointUrl; + *this >> data.Server; + *this >> data.ServerCertificate; + *this >> data.SecurityMode; + *this >> data.SecurityPolicyUri; + DeserializeContainer(*this, data.UserIdentityTokens); + *this >> data.TransportProfileUri; + *this >> data.SecurityLevel; +} + + +template<> +void DataDeserializer::Deserialize(GetEndpointsParameters & data) +{ + *this >> data.EndpointUrl; + DeserializeContainer(*this, data.LocaleIds); + DeserializeContainer(*this, data.ProfileUris); +} - template<> - void DataDeserializer::Deserialize(GetEndpointsRequest& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(GetEndpointsRequest & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} - template<> - void DataDeserializer::Deserialize(GetEndpointsResponse& data) - { - *this >> data.TypeId; - *this >> data.Header; - DeserializeContainer(*this, data.Endpoints); - } +template<> +void DataDeserializer::Deserialize(GetEndpointsResponse & data) +{ + *this >> data.TypeId; + *this >> data.Header; + DeserializeContainer(*this, data.Endpoints); +} /* DISABLED @@ -992,67 +993,67 @@ namespace OpcUa */ - template<> - void DataDeserializer::Deserialize(SignedSoftwareCertificate& data) - { - *this >> data.CertificateData; - *this >> data.Signature; - } - - - template<> - void DataDeserializer::Deserialize(SignatureData& data) - { - *this >> data.Algorithm; - *this >> data.Signature; - } - - - template<> - void DataDeserializer::Deserialize(CreateSessionParameters& data) - { - *this >> data.ClientDescription; - *this >> data.ServerUri; - *this >> data.EndpointUrl; - *this >> data.SessionName; - *this >> data.ClientNonce; - *this >> data.ClientCertificate; - *this >> data.RequestedSessionTimeout; - *this >> data.MaxResponseMessageSize; - } +template<> +void DataDeserializer::Deserialize(SignedSoftwareCertificate & data) +{ + *this >> data.CertificateData; + *this >> data.Signature; +} - template<> - void DataDeserializer::Deserialize(CreateSessionRequest& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(SignatureData & data) +{ + *this >> data.Algorithm; + *this >> data.Signature; +} - template<> - void DataDeserializer::Deserialize(CreateSessionResult& data) - { - *this >> data.SessionId; - *this >> data.AuthenticationToken; - *this >> data.RevisedSessionTimeout; - *this >> data.ServerNonce; - *this >> data.ServerCertificate; - DeserializeContainer(*this, data.ServerEndpoints); - DeserializeContainer(*this, data.ServerSoftwareCertificates); - *this >> data.ServerSignature; - *this >> data.MaxRequestMessageSize; - } +template<> +void DataDeserializer::Deserialize(CreateSessionParameters & data) +{ + *this >> data.ClientDescription; + *this >> data.ServerUri; + *this >> data.EndpointUrl; + *this >> data.SessionName; + *this >> data.ClientNonce; + *this >> data.ClientCertificate; + *this >> data.RequestedSessionTimeout; + *this >> data.MaxResponseMessageSize; +} + + +template<> +void DataDeserializer::Deserialize(CreateSessionRequest & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} - template<> - void DataDeserializer::Deserialize(CreateSessionResponse& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(CreateSessionResult & data) +{ + *this >> data.SessionId; + *this >> data.AuthenticationToken; + *this >> data.RevisedSessionTimeout; + *this >> data.ServerNonce; + *this >> data.ServerCertificate; + DeserializeContainer(*this, data.ServerEndpoints); + DeserializeContainer(*this, data.ServerSoftwareCertificates); + *this >> data.ServerSignature; + *this >> data.MaxRequestMessageSize; +} + + +template<> +void DataDeserializer::Deserialize(CreateSessionResponse & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} /* DISABLED @@ -1126,42 +1127,42 @@ namespace OpcUa */ - template<> - void DataDeserializer::Deserialize(ActivateSessionParameters& data) - { - *this >> data.ClientSignature; - DeserializeContainer(*this, data.ClientSoftwareCertificates); - DeserializeContainer(*this, data.LocaleIds); - *this >> data.UserIdentityToken; - *this >> data.UserTokenSignature; - } +template<> +void DataDeserializer::Deserialize(ActivateSessionParameters & data) +{ + *this >> data.ClientSignature; + DeserializeContainer(*this, data.ClientSoftwareCertificates); + DeserializeContainer(*this, data.LocaleIds); + *this >> data.UserIdentityToken; + *this >> data.UserTokenSignature; +} - template<> - void DataDeserializer::Deserialize(ActivateSessionRequest& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(ActivateSessionRequest & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} - template<> - void DataDeserializer::Deserialize(ActivateSessionResult& data) - { - *this >> data.ServerNonce; - DeserializeContainer(*this, data.Results); - DeserializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataDeserializer::Deserialize(ActivateSessionResult & data) +{ + *this >> data.ServerNonce; + DeserializeContainer(*this, data.Results); + DeserializeContainer(*this, data.DiagnosticInfos); +} - template<> - void DataDeserializer::Deserialize(ActivateSessionResponse& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(ActivateSessionResponse & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} /* DISABLED @@ -1509,31 +1510,31 @@ namespace OpcUa */ - template<> - void DataDeserializer::Deserialize(DeleteNodesItem& data) - { - *this >> data.NodeId; - *this >> data.DeleteTargetReferences; - } +template<> +void DataDeserializer::Deserialize(DeleteNodesItem & data) +{ + *this >> data.NodeId; + *this >> data.DeleteTargetReferences; +} - template<> - void DataDeserializer::Deserialize(DeleteNodesRequest& data) - { - *this >> data.TypeId; - *this >> data.Header; - DeserializeContainer(*this, data.NodesToDelete); - } +template<> +void DataDeserializer::Deserialize(DeleteNodesRequest & data) +{ + *this >> data.TypeId; + *this >> data.Header; + DeserializeContainer(*this, data.NodesToDelete); +} - template<> - void DataDeserializer::Deserialize(DeleteNodesResponse& data) - { - *this >> data.TypeId; - *this >> data.Header; - DeserializeContainer(*this, data.Results); - DeserializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataDeserializer::Deserialize(DeleteNodesResponse & data) +{ + *this >> data.TypeId; + *this >> data.Header; + DeserializeContainer(*this, data.Results); + DeserializeContainer(*this, data.DiagnosticInfos); +} /* DISABLED @@ -2227,42 +2228,42 @@ namespace OpcUa */ - template<> - void DataDeserializer::Deserialize(ReadValueId& data) - { - *this >> data.NodeId; - *this >> data.AttributeId; - *this >> data.IndexRange; - *this >> data.DataEncoding; - } +template<> +void DataDeserializer::Deserialize(ReadValueId & data) +{ + *this >> data.NodeId; + *this >> data.AttributeId; + *this >> data.IndexRange; + *this >> data.DataEncoding; +} - template<> - void DataDeserializer::Deserialize(ReadParameters& data) - { - *this >> data.MaxAge; - *this >> data.TimestampsToReturn; - DeserializeContainer(*this, data.AttributesToRead); - } +template<> +void DataDeserializer::Deserialize(ReadParameters & data) +{ + *this >> data.MaxAge; + *this >> data.TimestampsToReturn; + DeserializeContainer(*this, data.AttributesToRead); +} - template<> - void DataDeserializer::Deserialize(ReadRequest& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(ReadRequest & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} - template<> - void DataDeserializer::Deserialize(ReadResponse& data) - { - *this >> data.TypeId; - *this >> data.Header; - DeserializeContainer(*this, data.Results); - DeserializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataDeserializer::Deserialize(ReadResponse & data) +{ + *this >> data.TypeId; + *this >> data.Header; + DeserializeContainer(*this, data.Results); + DeserializeContainer(*this, data.DiagnosticInfos); +} /* DISABLED @@ -2404,40 +2405,40 @@ namespace OpcUa */ - template<> - void DataDeserializer::Deserialize(WriteValue& data) - { - *this >> data.NodeId; - *this >> data.AttributeId; - *this >> data.IndexRange; - *this >> data.Value; - } +template<> +void DataDeserializer::Deserialize(WriteValue & data) +{ + *this >> data.NodeId; + *this >> data.AttributeId; + *this >> data.IndexRange; + *this >> data.Value; +} - template<> - void DataDeserializer::Deserialize(WriteParameters& data) - { - DeserializeContainer(*this, data.NodesToWrite); - } +template<> +void DataDeserializer::Deserialize(WriteParameters & data) +{ + DeserializeContainer(*this, data.NodesToWrite); +} - template<> - void DataDeserializer::Deserialize(WriteRequest& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(WriteRequest & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} - template<> - void DataDeserializer::Deserialize(WriteResponse& data) - { - *this >> data.TypeId; - *this >> data.Header; - DeserializeContainer(*this, data.Results); - DeserializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataDeserializer::Deserialize(WriteResponse & data) +{ + *this >> data.TypeId; + *this >> data.Header; + DeserializeContainer(*this, data.Results); + DeserializeContainer(*this, data.DiagnosticInfos); +} /* DISABLED @@ -2556,49 +2557,49 @@ namespace OpcUa */ - template<> - void DataDeserializer::Deserialize(CallMethodRequest& data) - { - *this >> data.ObjectId; - *this >> data.MethodId; - DeserializeContainer(*this, data.InputArguments); - } +template<> +void DataDeserializer::Deserialize(CallMethodRequest & data) +{ + *this >> data.ObjectId; + *this >> data.MethodId; + DeserializeContainer(*this, data.InputArguments); +} - template<> - void DataDeserializer::Deserialize(CallMethodResult& data) - { - *this >> data.Status; - DeserializeContainer(*this, data.InputArgumentResults); - DeserializeContainer(*this, data.InputArgumentDiagnosticInfos); - DeserializeContainer(*this, data.OutputArguments); - } +template<> +void DataDeserializer::Deserialize(CallMethodResult & data) +{ + *this >> data.Status; + DeserializeContainer(*this, data.InputArgumentResults); + DeserializeContainer(*this, data.InputArgumentDiagnosticInfos); + DeserializeContainer(*this, data.OutputArguments); +} - template<> - void DataDeserializer::Deserialize(CallParameters& data) - { - DeserializeContainer(*this, data.MethodsToCall); - } +template<> +void DataDeserializer::Deserialize(CallParameters & data) +{ + DeserializeContainer(*this, data.MethodsToCall); +} - template<> - void DataDeserializer::Deserialize(CallRequest& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(CallRequest & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} - template<> - void DataDeserializer::Deserialize(CallResponse& data) - { - *this >> data.TypeId; - *this >> data.Header; - DeserializeContainer(*this, data.Results); - DeserializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataDeserializer::Deserialize(CallResponse & data) +{ + *this >> data.TypeId; + *this >> data.Header; + DeserializeContainer(*this, data.Results); + DeserializeContainer(*this, data.DiagnosticInfos); +} /* DISABLED @@ -2758,63 +2759,63 @@ namespace OpcUa */ - template<> - void DataDeserializer::Deserialize(MonitoringParameters& data) - { - *this >> data.ClientHandle; - *this >> data.SamplingInterval; - *this >> data.Filter; - *this >> data.QueueSize; - *this >> data.DiscardOldest; - } +template<> +void DataDeserializer::Deserialize(MonitoringParameters & data) +{ + *this >> data.ClientHandle; + *this >> data.SamplingInterval; + *this >> data.Filter; + *this >> data.QueueSize; + *this >> data.DiscardOldest; +} - template<> - void DataDeserializer::Deserialize(MonitoredItemCreateRequest& data) - { - *this >> data.ItemToMonitor; - *this >> data.MonitoringMode; - *this >> data.RequestedParameters; - } +template<> +void DataDeserializer::Deserialize(MonitoredItemCreateRequest & data) +{ + *this >> data.ItemToMonitor; + *this >> data.MonitoringMode; + *this >> data.RequestedParameters; +} - template<> - void DataDeserializer::Deserialize(MonitoredItemCreateResult& data) - { - *this >> data.Status; - *this >> data.MonitoredItemId; - *this >> data.RevisedSamplingInterval; - *this >> data.RevisedQueueSize; - *this >> data.FilterResult; - } +template<> +void DataDeserializer::Deserialize(MonitoredItemCreateResult & data) +{ + *this >> data.Status; + *this >> data.MonitoredItemId; + *this >> data.RevisedSamplingInterval; + *this >> data.RevisedQueueSize; + *this >> data.FilterResult; +} - template<> - void DataDeserializer::Deserialize(MonitoredItemsParameters& data) - { - *this >> data.SubscriptionId; - *this >> data.TimestampsToReturn; - DeserializeContainer(*this, data.ItemsToCreate); - } +template<> +void DataDeserializer::Deserialize(MonitoredItemsParameters & data) +{ + *this >> data.SubscriptionId; + *this >> data.TimestampsToReturn; + DeserializeContainer(*this, data.ItemsToCreate); +} - template<> - void DataDeserializer::Deserialize(CreateMonitoredItemsRequest& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(CreateMonitoredItemsRequest & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} - template<> - void DataDeserializer::Deserialize(CreateMonitoredItemsResponse& data) - { - *this >> data.TypeId; - *this >> data.Header; - DeserializeContainer(*this, data.Results); - DeserializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataDeserializer::Deserialize(CreateMonitoredItemsResponse & data) +{ + *this >> data.TypeId; + *this >> data.Header; + DeserializeContainer(*this, data.Results); + DeserializeContainer(*this, data.DiagnosticInfos); +} /* DISABLED @@ -2975,153 +2976,153 @@ namespace OpcUa */ - template<> - void DataDeserializer::Deserialize(DeleteMonitoredItemsParameters& data) - { - *this >> data.SubscriptionId; - DeserializeContainer(*this, data.MonitoredItemIds); - } +template<> +void DataDeserializer::Deserialize(DeleteMonitoredItemsParameters & data) +{ + *this >> data.SubscriptionId; + DeserializeContainer(*this, data.MonitoredItemIds); +} - template<> - void DataDeserializer::Deserialize(DeleteMonitoredItemsRequest& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(DeleteMonitoredItemsRequest & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} - template<> - void DataDeserializer::Deserialize(DeleteMonitoredItemsResponse& data) - { - *this >> data.TypeId; - *this >> data.Header; - DeserializeContainer(*this, data.Results); - DeserializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataDeserializer::Deserialize(DeleteMonitoredItemsResponse & data) +{ + *this >> data.TypeId; + *this >> data.Header; + DeserializeContainer(*this, data.Results); + DeserializeContainer(*this, data.DiagnosticInfos); +} - template<> - void DataDeserializer::Deserialize(CreateSubscriptionParameters& data) - { - *this >> data.RequestedPublishingInterval; - *this >> data.RequestedLifetimeCount; - *this >> data.RequestedMaxKeepAliveCount; - *this >> data.MaxNotificationsPerPublish; - *this >> data.PublishingEnabled; - *this >> data.Priority; - } +template<> +void DataDeserializer::Deserialize(CreateSubscriptionParameters & data) +{ + *this >> data.RequestedPublishingInterval; + *this >> data.RequestedLifetimeCount; + *this >> data.RequestedMaxKeepAliveCount; + *this >> data.MaxNotificationsPerPublish; + *this >> data.PublishingEnabled; + *this >> data.Priority; +} - template<> - void DataDeserializer::Deserialize(CreateSubscriptionRequest& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(CreateSubscriptionRequest & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} - template<> - void DataDeserializer::Deserialize(SubscriptionData& data) - { - *this >> data.SubscriptionId; - *this >> data.RevisedPublishingInterval; - *this >> data.RevisedLifetimeCount; - *this >> data.RevisedMaxKeepAliveCount; - } +template<> +void DataDeserializer::Deserialize(SubscriptionData & data) +{ + *this >> data.SubscriptionId; + *this >> data.RevisedPublishingInterval; + *this >> data.RevisedLifetimeCount; + *this >> data.RevisedMaxKeepAliveCount; +} - template<> - void DataDeserializer::Deserialize(CreateSubscriptionResponse& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Data; - } +template<> +void DataDeserializer::Deserialize(CreateSubscriptionResponse & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Data; +} - template<> - void DataDeserializer::Deserialize(ModifySubscriptionParameters& data) - { - *this >> data.SubscriptionId; - *this >> data.RequestedPublishingInterval; - *this >> data.RequestedLifetimeCount; - *this >> data.RequestedMaxKeepAliveCount; - *this >> data.MaxNotificationsPerPublish; - *this >> data.Priority; - } +template<> +void DataDeserializer::Deserialize(ModifySubscriptionParameters & data) +{ + *this >> data.SubscriptionId; + *this >> data.RequestedPublishingInterval; + *this >> data.RequestedLifetimeCount; + *this >> data.RequestedMaxKeepAliveCount; + *this >> data.MaxNotificationsPerPublish; + *this >> data.Priority; +} - template<> - void DataDeserializer::Deserialize(ModifySubscriptionRequest& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(ModifySubscriptionRequest & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} - template<> - void DataDeserializer::Deserialize(ModifySubscriptionResult& data) - { - *this >> data.RevisedPublishingInterval; - *this >> data.RevisedLifetimeCount; - *this >> data.RevisedMaxKeepAliveCount; - } +template<> +void DataDeserializer::Deserialize(ModifySubscriptionResult & data) +{ + *this >> data.RevisedPublishingInterval; + *this >> data.RevisedLifetimeCount; + *this >> data.RevisedMaxKeepAliveCount; +} - template<> - void DataDeserializer::Deserialize(ModifySubscriptionResponse& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(ModifySubscriptionResponse & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} - template<> - void DataDeserializer::Deserialize(PublishingModeParameters& data) - { - *this >> data.PublishingEnabled; - DeserializeContainer(*this, data.SubscriptionIds); - } +template<> +void DataDeserializer::Deserialize(PublishingModeParameters & data) +{ + *this >> data.PublishingEnabled; + DeserializeContainer(*this, data.SubscriptionIds); +} - template<> - void DataDeserializer::Deserialize(SetPublishingModeRequest& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(SetPublishingModeRequest & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} - template<> - void DataDeserializer::Deserialize(PublishingModeResult& data) - { - DeserializeContainer(*this, data.Results); - DeserializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataDeserializer::Deserialize(PublishingModeResult & data) +{ + DeserializeContainer(*this, data.Results); + DeserializeContainer(*this, data.DiagnosticInfos); +} - template<> - void DataDeserializer::Deserialize(SetPublishingModeResponse& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Result; - } +template<> +void DataDeserializer::Deserialize(SetPublishingModeResponse & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Result; +} - template<> - void DataDeserializer::Deserialize(NotificationMessage& data) - { - *this >> data.SequenceNumber; - *this >> data.PublishTime; - DeserializeContainer(*this, data.NotificationData); - } +template<> +void DataDeserializer::Deserialize(NotificationMessage & data) +{ + *this >> data.SequenceNumber; + *this >> data.PublishTime; + DeserializeContainer(*this, data.NotificationData); +} /* DISABLED @@ -3232,68 +3233,68 @@ namespace OpcUa */ - template<> - void DataDeserializer::Deserialize(SubscriptionAcknowledgement& data) - { - *this >> data.SubscriptionId; - *this >> data.SequenceNumber; - } +template<> +void DataDeserializer::Deserialize(SubscriptionAcknowledgement & data) +{ + *this >> data.SubscriptionId; + *this >> data.SequenceNumber; +} - template<> - void DataDeserializer::Deserialize(PublishRequest& data) - { - *this >> data.TypeId; - *this >> data.Header; - DeserializeContainer(*this, data.SubscriptionAcknowledgements); - } +template<> +void DataDeserializer::Deserialize(PublishRequest & data) +{ + *this >> data.TypeId; + *this >> data.Header; + DeserializeContainer(*this, data.SubscriptionAcknowledgements); +} - template<> - void DataDeserializer::Deserialize(PublishResult& data) - { - *this >> data.SubscriptionId; - DeserializeContainer(*this, data.AvailableSequenceNumbers); - *this >> data.MoreNotifications; - *this >> data.NotificationMessage; - DeserializeContainer(*this, data.Results); - DeserializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataDeserializer::Deserialize(PublishResult & data) +{ + *this >> data.SubscriptionId; + DeserializeContainer(*this, data.AvailableSequenceNumbers); + *this >> data.MoreNotifications; + *this >> data.NotificationMessage; + DeserializeContainer(*this, data.Results); + DeserializeContainer(*this, data.DiagnosticInfos); +} - template<> - void DataDeserializer::Deserialize(PublishResponse& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(PublishResponse & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} - template<> - void DataDeserializer::Deserialize(RepublishParameters& data) - { - *this >> data.SubscriptionId; - *this >> data.RetransmitSequenceNumber; - } +template<> +void DataDeserializer::Deserialize(RepublishParameters & data) +{ + *this >> data.SubscriptionId; + *this >> data.RetransmitSequenceNumber; +} - template<> - void DataDeserializer::Deserialize(RepublishRequest& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.Parameters; - } +template<> +void DataDeserializer::Deserialize(RepublishRequest & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.Parameters; +} - template<> - void DataDeserializer::Deserialize(RepublishResponse& data) - { - *this >> data.TypeId; - *this >> data.Header; - *this >> data.NotificationMessage; - } +template<> +void DataDeserializer::Deserialize(RepublishResponse & data) +{ + *this >> data.TypeId; + *this >> data.Header; + *this >> data.NotificationMessage; +} /* DISABLED @@ -3353,23 +3354,23 @@ namespace OpcUa */ - template<> - void DataDeserializer::Deserialize(DeleteSubscriptionsRequest& data) - { - *this >> data.TypeId; - *this >> data.Header; - DeserializeContainer(*this, data.SubscriptionIds); - } +template<> +void DataDeserializer::Deserialize(DeleteSubscriptionsRequest & data) +{ + *this >> data.TypeId; + *this >> data.Header; + DeserializeContainer(*this, data.SubscriptionIds); +} - template<> - void DataDeserializer::Deserialize(DeleteSubscriptionsResponse& data) - { - *this >> data.TypeId; - *this >> data.Header; - DeserializeContainer(*this, data.Results); - DeserializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataDeserializer::Deserialize(DeleteSubscriptionsResponse & data) +{ + *this >> data.TypeId; + *this >> data.Header; + DeserializeContainer(*this, data.Results); + DeserializeContainer(*this, data.DiagnosticInfos); +} /* DISABLED @@ -3885,16 +3886,16 @@ namespace OpcUa */ - template<> - void DataDeserializer::Deserialize(Annotation& data) - { - *this >> data.Message; - *this >> data.UserName; - *this >> data.AnnotationTime; - } +template<> +void DataDeserializer::Deserialize(Annotation & data) +{ + *this >> data.Message; + *this >> data.UserName; + *this >> data.AnnotationTime; +} - } +} } // namespace - + diff --git a/src/protocol/input_from_buffer.cpp b/src/protocol/input_from_buffer.cpp index ab39a442..b1c0d015 100644 --- a/src/protocol/input_from_buffer.cpp +++ b/src/protocol/input_from_buffer.cpp @@ -26,31 +26,32 @@ namespace OpcUa { - InputFromBuffer::InputFromBuffer(const char* buf, std::size_t bufSize) - : Buffer(buf) - , Size(bufSize) - { - if (!Buffer) throw std::invalid_argument("InputFromBuffer: Input buffer cannot be empty."); - if (!bufSize) throw std::invalid_argument("InputFromBuffer: Invalid size of buffer"); - } - - std::size_t InputFromBuffer::Receive(char* data, std::size_t size) - { - if (Size == 0) +InputFromBuffer::InputFromBuffer(const char * buf, std::size_t bufSize) + : Buffer(buf) + , Size(bufSize) +{ + if (!Buffer) { throw std::invalid_argument("InputFromBuffer: Input buffer cannot be empty."); } + + if (!bufSize) { throw std::invalid_argument("InputFromBuffer: Invalid size of buffer"); } +} + +std::size_t InputFromBuffer::Receive(char * data, std::size_t size) +{ + if (Size == 0) { return 0; } - const std::size_t sizeToRead = std::min(Size, size); - memcpy(data, Buffer, sizeToRead); - Size -= sizeToRead; - Buffer += sizeToRead; - return sizeToRead; - } - - size_t InputFromBuffer::GetRemainSize() const - { - return Size; - } + const std::size_t sizeToRead = std::min(Size, size); + memcpy(data, Buffer, sizeToRead); + Size -= sizeToRead; + Buffer += sizeToRead; + return sizeToRead; +} + +size_t InputFromBuffer::GetRemainSize() const +{ + return Size; +} } diff --git a/src/protocol/monitored_items.cpp b/src/protocol/monitored_items.cpp index 21767c51..19852eef 100644 --- a/src/protocol/monitored_items.cpp +++ b/src/protocol/monitored_items.cpp @@ -20,515 +20,539 @@ namespace OpcUa { - MonitoringFilter::MonitoringFilter(DataChangeFilter filter) : DataChange(filter) - { - Header.TypeId = ExpandedObjectId::DataChangeFilter; - Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); - } - - MonitoringFilter::MonitoringFilter(EventFilter filter) : Event(filter) - { - Header.TypeId = ExpandedObjectId::EventFilter; - Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); - } - - MonitoringFilter:: MonitoringFilter(AggregateFilter filter) : Aggregate(filter) - { - Header.TypeId = ExpandedObjectId::DataChangeFilter; - Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); - } - - namespace Binary - { - - //////////////////////////////////////////////////////// - // AttributeOperand - //////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const OpcUa::AttributeOperand& params) +MonitoringFilter::MonitoringFilter(DataChangeFilter filter) : DataChange(filter) +{ + Header.TypeId = ExpandedObjectId::DataChangeFilter; + Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); +} + +MonitoringFilter::MonitoringFilter(EventFilter filter) : Event(filter) +{ + Header.TypeId = ExpandedObjectId::EventFilter; + Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); +} + +MonitoringFilter:: MonitoringFilter(AggregateFilter filter) : Aggregate(filter) +{ + Header.TypeId = ExpandedObjectId::DataChangeFilter; + Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); +} + +namespace Binary +{ + +//////////////////////////////////////////////////////// +// AttributeOperand +//////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const OpcUa::AttributeOperand & params) +{ + return RawSize(params.Node) + + RawSize(params.Alias) + + RawSize(params.Path) + + RawSize(params.AttributeId) + + RawSizeContainer(params.IndexRange); +} + +template<> +void DataDeserializer::Deserialize(AttributeOperand & params) +{ + *this >> params.Node; + *this >> params.Alias; + *this >> params.Path; + *this >> params.AttributeId; + *this >> params.IndexRange; +} + +template<> +void DataSerializer::Serialize(const AttributeOperand & params) +{ + *this << params.Node; + *this << params.Alias; + *this << params.Path; + *this << params.AttributeId; + *this << params.IndexRange; +} + +//////////////////////////////////////////////////////// +// SimpleAttributeOperand +//////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const OpcUa::SimpleAttributeOperand & params) +{ + return RawSize(params.TypeId) + + RawSizeContainer(params.BrowsePath) + + RawSize(params.Attribute) + + RawSizeContainer(params.IndexRange); +} + +template<> +void DataDeserializer::Deserialize(SimpleAttributeOperand & params) +{ + *this >> params.TypeId; + *this >> params.BrowsePath; + *this >> params.Attribute; + *this >> params.IndexRange; +} + +template<> +void DataSerializer::Serialize(const SimpleAttributeOperand & params) +{ + *this << params.TypeId; + *this << params.BrowsePath; + *this << params.Attribute; + *this << params.IndexRange; +} + +template<> +void DataSerializer::Serialize>(const std::vector & targets) +{ + SerializeContainer(*this, targets); +} + +template<> +void DataDeserializer::Deserialize>(std::vector & targets) +{ + DeserializeContainer(*this, targets); +} + + +//////////////////////////////////////////////////////// +// LiteralOperand +//////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const OpcUa::LiteralOperand & params) +{ + return RawSize(params.Value); +} + +template<> +void DataDeserializer::Deserialize(LiteralOperand & params) +{ + *this >> params.Value; +} + +template<> +void DataSerializer::Serialize(const LiteralOperand & params) +{ + *this << params.Value; +} + + + +//////////////////////////////////////////////////////// +// ElementOperand +//////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const OpcUa::ElementOperand & params) +{ + return RawSize(params.Index); +} + +template<> +void DataDeserializer::Deserialize(ElementOperand & params) +{ + *this >> params.Index; +} + +template<> +void DataSerializer::Serialize(const ElementOperand & params) +{ + *this << params.Index; +} + + +//////////////////////////////////////////////////////// +// FilterOperand +//////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const OpcUa::FilterOperand & params) +{ + size_t total = RawSize(params.Header); + + if (params.Header.TypeId == ExpandedObjectId::ElementOperand) { - return RawSize(params.Node) + - RawSize(params.Alias) + - RawSize(params.Path) + - RawSize(params.AttributeId) + - RawSizeContainer(params.IndexRange); + total += 4; + total += RawSize(params.Element); } - template<> - void DataDeserializer::Deserialize(AttributeOperand& params) + else if (params.Header.TypeId == ExpandedObjectId::LiteralOperand) { - *this >> params.Node; - *this >> params.Alias; - *this >> params.Path; - *this >> params.AttributeId; - *this >> params.IndexRange; + total += 4; + total += RawSize(params.Literal); } - template<> - void DataSerializer::Serialize(const AttributeOperand& params) + else if (params.Header.TypeId == ExpandedObjectId::AttributeOperand) { - *this << params.Node; - *this << params.Alias; - *this << params.Path; - *this << params.AttributeId; - *this << params.IndexRange; + total += 4; + total += RawSize(params.Attribute); } - //////////////////////////////////////////////////////// - // SimpleAttributeOperand - //////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const OpcUa::SimpleAttributeOperand& params) + else if (params.Header.TypeId == ExpandedObjectId::SimpleAttributeOperand) { - return RawSize(params.TypeId) + - RawSizeContainer(params.BrowsePath) + - RawSize(params.Attribute) + - RawSizeContainer(params.IndexRange); + total += 4; + total += RawSize(params.SimpleAttribute); } - template<> - void DataDeserializer::Deserialize(SimpleAttributeOperand& params) + return total; +} + +template<> +void DataDeserializer::Deserialize(FilterOperand & params) +{ + *this >> params.Header; + uint32_t size; + *this >> size; + + if (params.Header.TypeId == ExpandedObjectId::ElementOperand) { - *this >> params.TypeId; - *this >> params.BrowsePath; - *this >> params.Attribute; - *this >> params.IndexRange; + *this >> params.Element; } - template<> - void DataSerializer::Serialize(const SimpleAttributeOperand& params) + else if (params.Header.TypeId == ExpandedObjectId::LiteralOperand) { - *this << params.TypeId; - *this << params.BrowsePath; - *this << params.Attribute; - *this << params.IndexRange; + *this >> params.Literal; } - template<> - void DataSerializer::Serialize>(const std::vector& targets) + else if (params.Header.TypeId == ExpandedObjectId::AttributeOperand) { - SerializeContainer(*this, targets); + *this >> params.Attribute; } - template<> - void DataDeserializer::Deserialize>(std::vector& targets) + else if (params.Header.TypeId == ExpandedObjectId::SimpleAttributeOperand) { - DeserializeContainer(*this, targets); + *this >> params.SimpleAttribute; } +} +template<> +void DataSerializer::Serialize(const FilterOperand & params) +{ + *this << params.Header; - //////////////////////////////////////////////////////// - // LiteralOperand - //////////////////////////////////////////////////////// + if (params.Header.TypeId == ExpandedObjectId::ElementOperand) + { + uint32_t size = RawSize(params.Element); + *this << size; + *this << params.Element; + } - template<> - std::size_t RawSize(const OpcUa::LiteralOperand& params) + else if (params.Header.TypeId == ExpandedObjectId::LiteralOperand) { - return RawSize(params.Value); + uint32_t size = RawSize(params.Literal); + *this << size; + *this << params.Literal; } - template<> - void DataDeserializer::Deserialize(LiteralOperand& params) + else if (params.Header.TypeId == ExpandedObjectId::AttributeOperand) { - *this >> params.Value; + uint32_t size = RawSize(params.Attribute); + *this << size; + *this << params.Attribute; } - template<> - void DataSerializer::Serialize(const LiteralOperand& params) + else if (params.Header.TypeId == ExpandedObjectId::SimpleAttributeOperand) { - *this << params.Value; + uint32_t size = RawSize(params.SimpleAttribute); + *this << size; + *this << params.SimpleAttribute; } +} +template<> +void DataSerializer::Serialize>(const std::vector & targets) +{ + SerializeContainer(*this, targets); +} +template<> +void DataDeserializer::Deserialize>(std::vector & targets) +{ + DeserializeContainer(*this, targets); +} - //////////////////////////////////////////////////////// - // ElementOperand - //////////////////////////////////////////////////////// - template<> - std::size_t RawSize(const OpcUa::ElementOperand& params) - { - return RawSize(params.Index); - } - template<> - void DataDeserializer::Deserialize(ElementOperand& params) - { - *this >> params.Index; - } +//////////////////////////////////////////////////////// +// ContentFilterElement +//////////////////////////////////////////////////////// - template<> - void DataSerializer::Serialize(const ElementOperand& params) - { - *this << params.Index; - } +template<> +std::size_t RawSize(const OpcUa::ContentFilterElement & params) +{ + return RawSize(params.Operator) + + RawSizeContainer(params.FilterOperands); +} +template<> +void DataDeserializer::Deserialize(ContentFilterElement & params) +{ + *this >> params.Operator; + //*this >> params.FilterOperands; + DeserializeContainer(*this, params.FilterOperands); +} - //////////////////////////////////////////////////////// - // FilterOperand - //////////////////////////////////////////////////////// +template<> +void DataSerializer::Serialize(const ContentFilterElement & params) +{ + *this << params.Operator; + //*this << params.FilterOperands; + SerializeContainer(*this, params.FilterOperands); +} - template<> - std::size_t RawSize(const OpcUa::FilterOperand& params) - { - size_t total = RawSize(params.Header); - if (params.Header.TypeId == ExpandedObjectId::ElementOperand ) - { - total += 4; - total += RawSize(params.Element); - } - else if (params.Header.TypeId == ExpandedObjectId::LiteralOperand ) - { - total += 4; - total += RawSize(params.Literal); - } - else if (params.Header.TypeId == ExpandedObjectId::AttributeOperand ) - { - total += 4; - total += RawSize(params.Attribute); - } - else if (params.Header.TypeId == ExpandedObjectId::SimpleAttributeOperand ) - { - total += 4; - total += RawSize(params.SimpleAttribute); - } - - return total; - } - template<> - void DataDeserializer::Deserialize(FilterOperand& params) - { - *this >> params.Header; - uint32_t size; - *this >> size; - if ( params.Header.TypeId == ExpandedObjectId::ElementOperand ) - { - *this >> params.Element; - } - else if ( params.Header.TypeId == ExpandedObjectId::LiteralOperand ) - { - *this >> params.Literal; - } - else if ( params.Header.TypeId == ExpandedObjectId::AttributeOperand ) - { - *this >> params.Attribute; - } - else if ( params.Header.TypeId == ExpandedObjectId::SimpleAttributeOperand ) - { - *this >> params.SimpleAttribute; - } - } - template<> - void DataSerializer::Serialize(const FilterOperand& params) - { - *this << params.Header; - if ( params.Header.TypeId == ExpandedObjectId::ElementOperand ) - { - uint32_t size = RawSize(params.Element); - *this << size; - *this << params.Element; - } - else if ( params.Header.TypeId == ExpandedObjectId::LiteralOperand ) - { - uint32_t size = RawSize(params.Literal); - *this << size; - *this << params.Literal; - } - else if ( params.Header.TypeId == ExpandedObjectId::AttributeOperand ) - { - uint32_t size = RawSize(params.Attribute); - *this << size; - *this << params.Attribute; - } - else if ( params.Header.TypeId == ExpandedObjectId::SimpleAttributeOperand ) - { - uint32_t size = RawSize(params.SimpleAttribute); - *this << size; - *this << params.SimpleAttribute; - } - } - - template<> - void DataSerializer::Serialize>(const std::vector& targets) - { - SerializeContainer(*this, targets); - } - template<> - void DataDeserializer::Deserialize>(std::vector& targets) - { - DeserializeContainer(*this, targets); - } +//////////////////////////////////////////////////////// +// AggregateFilter +//////////////////////////////////////////////////////// +template<> +std::size_t RawSize(const OpcUa::AggregateFilter & params) +{ + return RawSize(params.StartTime) + + RawSize(params.AggregateType) + + RawSize(params.ProcessingInterval) + + RawSize(params.UseServerCapabilitiesDefaults) + + RawSize(params.TreatUncertainAsBad) + + RawSize(params.PercentDataBad) + + RawSize(params.PercentDataGood) + + RawSize(params.SteppedSlopedExtrapolation); +} +template<> +void DataDeserializer::Deserialize(AggregateFilter & params) +{ + *this >> params.StartTime; + *this >> params.AggregateType; + *this >> params.ProcessingInterval; + *this >> params.UseServerCapabilitiesDefaults; + *this >> params.TreatUncertainAsBad; + *this >> params.PercentDataBad; + *this >> params.PercentDataGood; + *this >> params.SteppedSlopedExtrapolation; +} - //////////////////////////////////////////////////////// - // ContentFilterElement - //////////////////////////////////////////////////////// +template<> +void DataSerializer::Serialize(const AggregateFilter & params) +{ + *this << params.StartTime; + *this << params.AggregateType; + *this << params.ProcessingInterval; + *this << params.UseServerCapabilitiesDefaults; + *this << params.TreatUncertainAsBad; + *this << params.PercentDataBad; + *this << params.PercentDataGood; + *this << params.SteppedSlopedExtrapolation; +} - template<> - std::size_t RawSize(const OpcUa::ContentFilterElement& params) - { - return RawSize(params.Operator) + - RawSizeContainer(params.FilterOperands); - } - template<> - void DataDeserializer::Deserialize(ContentFilterElement& params) - { - *this >> params.Operator; - //*this >> params.FilterOperands; - DeserializeContainer(*this, params.FilterOperands); - } - template<> - void DataSerializer::Serialize(const ContentFilterElement& params) - { - *this << params.Operator; - //*this << params.FilterOperands; - SerializeContainer(*this, params.FilterOperands); - } +//////////////////////////////////////////////////////// +// EventFilter +//////////////////////////////////////////////////////// +template<> +std::size_t RawSize(const OpcUa::EventFilter & params) +{ + return RawSizeContainer(params.SelectClauses) + + RawSizeContainer(params.WhereClause); +} +template<> +void DataDeserializer::Deserialize(EventFilter & params) +{ + *this >> params.SelectClauses; + DeserializeContainer(*this, params.WhereClause); +} +template<> +void DataSerializer::Serialize(const EventFilter & params) +{ + *this << params.SelectClauses; + SerializeContainer(*this, params.WhereClause); +} - //////////////////////////////////////////////////////// - // AggregateFilter - //////////////////////////////////////////////////////// - template<> - std::size_t RawSize(const OpcUa::AggregateFilter& params) - { - return RawSize(params.StartTime) + - RawSize(params.AggregateType) + - RawSize(params.ProcessingInterval) + - RawSize(params.UseServerCapabilitiesDefaults) + - RawSize(params.TreatUncertainAsBad) + - RawSize(params.PercentDataBad) + - RawSize(params.PercentDataGood) + - RawSize(params.SteppedSlopedExtrapolation); - } +//////////////////////////////////////////////////////// +// DataChangeFilter +//////////////////////////////////////////////////////// - template<> - void DataDeserializer::Deserialize(AggregateFilter& params) - { - *this >> params.StartTime; - *this >> params.AggregateType; - *this >> params.ProcessingInterval; - *this >> params.UseServerCapabilitiesDefaults; - *this >> params.TreatUncertainAsBad; - *this >> params.PercentDataBad; - *this >> params.PercentDataGood; - *this >> params.SteppedSlopedExtrapolation; - } +template<> +std::size_t RawSize(const OpcUa::DataChangeFilter & params) +{ + return RawSize(params.Trigger) + + RawSize(params.Deadband) + + RawSize(params.DeadbandValue); +} - template<> - void DataSerializer::Serialize(const AggregateFilter& params) - { - *this << params.StartTime; - *this << params.AggregateType; - *this << params.ProcessingInterval; - *this << params.UseServerCapabilitiesDefaults; - *this << params.TreatUncertainAsBad; - *this << params.PercentDataBad; - *this << params.PercentDataGood; - *this << params.SteppedSlopedExtrapolation; - } +template<> +void DataDeserializer::Deserialize(DataChangeFilter & params) +{ + *this >> params.Trigger; + *this >> params.Deadband; + *this >> params.DeadbandValue; +} + +template<> +void DataSerializer::Serialize(const DataChangeFilter & params) +{ + *this << params.Trigger; + *this << params.Deadband; + *this << params.DeadbandValue; +} +//////////////////////////////////////////////////////// +// MonitoringFilter +//////////////////////////////////////////////////////// - //////////////////////////////////////////////////////// - // EventFilter - //////////////////////////////////////////////////////// +template<> +std::size_t RawSize(const MonitoringFilter & data) +{ + size_t total = 0; + total += RawSize(data.Header); - template<> - std::size_t RawSize(const OpcUa::EventFilter& params) + if (data.Header.TypeId == ExpandedObjectId::DataChangeFilter) { - return RawSizeContainer(params.SelectClauses) + - RawSizeContainer(params.WhereClause); + total += 4; + total += RawSize(data.DataChange); } - template<> - void DataDeserializer::Deserialize(EventFilter& params) + else if (data.Header.TypeId == ExpandedObjectId::EventFilter) { - *this >> params.SelectClauses; - DeserializeContainer(*this, params.WhereClause); + total += 4; + total += RawSize(data.Event); } - template<> - void DataSerializer::Serialize(const EventFilter& params) + else if (data.Header.TypeId == ExpandedObjectId::AggregateFilter) { - *this << params.SelectClauses; - SerializeContainer(*this, params.WhereClause); + total += 4; + total += RawSize(data.Aggregate); } + else if (data.Header.TypeId == NodeId(0, 0)) + { + //No filter is used + } + else + { + throw std::runtime_error("MonitoringFilter type not implemented"); + } + + return total; +} + - //////////////////////////////////////////////////////// - // DataChangeFilter - //////////////////////////////////////////////////////// +template<> +void DataDeserializer::Deserialize(MonitoringFilter & data) +{ + *this >> data.Header; + int32_t size; - template<> - std::size_t RawSize(const OpcUa::DataChangeFilter& params) + if (data.Header.TypeId == ExpandedObjectId::DataChangeFilter) { - return RawSize(params.Trigger) + - RawSize(params.Deadband) + - RawSize(params.DeadbandValue); + *this >> size; //not used yet + *this >> data.DataChange; } - template<> - void DataDeserializer::Deserialize(DataChangeFilter& params) + else if (data.Header.TypeId == ExpandedObjectId::EventFilter) { - *this >> params.Trigger; - *this >> params.Deadband; - *this >> params.DeadbandValue; + *this >> size; //not used yet + *this >> data.Event; } - template<> - void DataSerializer::Serialize(const DataChangeFilter& params) + else if (data.Header.TypeId == ExpandedObjectId::AggregateFilter) { - *this << params.Trigger; - *this << params.Deadband; - *this << params.DeadbandValue; + *this >> size; //not used yet + *this >> data.Aggregate; } + else if (data.Header.TypeId == NodeId(0, 0)) + { + //No filter is used + } + else + { + throw std::runtime_error("Filter data type not supported in deserialization"); + } +} - //////////////////////////////////////////////////////// - // MonitoringFilter - //////////////////////////////////////////////////////// +template<> +void DataSerializer::Serialize(const MonitoringFilter & data) +{ + *this << data.Header; - template<> - std::size_t RawSize(const MonitoringFilter& data) + if (data.Header.TypeId == ExpandedObjectId::DataChangeFilter) { - size_t total = 0; - total += RawSize(data.Header); - if ( data.Header.TypeId == ExpandedObjectId::DataChangeFilter) - { - total += 4; - total += RawSize(data.DataChange); - } - else if ( data.Header.TypeId == ExpandedObjectId::EventFilter) - { - total += 4; - total += RawSize(data.Event); - } - else if ( data.Header.TypeId == ExpandedObjectId::AggregateFilter) - { - total += 4; - total += RawSize(data.Aggregate); - } - else if ( data.Header.TypeId == NodeId(0, 0) ) - { - //No filter is used - } - else - { - throw std::runtime_error("MonitoringFilter type not implemented"); - } - - return total; + *this << (uint32_t) RawSize(data.DataChange); + *this << data.DataChange; } - - template<> - void DataDeserializer::Deserialize(MonitoringFilter& data) + else if (data.Header.TypeId == ExpandedObjectId::EventFilter) { - *this >> data.Header; - int32_t size; - if ( data.Header.TypeId == ExpandedObjectId::DataChangeFilter ) - { - *this >> size; //not used yet - *this >> data.DataChange; - } - else if ( data.Header.TypeId == ExpandedObjectId::EventFilter ) - { - *this >> size; //not used yet - *this >> data.Event; - } - else if ( data.Header.TypeId == ExpandedObjectId::AggregateFilter ) - { - *this >> size; //not used yet - *this >> data.Aggregate; - } - else if ( data.Header.TypeId == NodeId(0, 0) ) - { - //No filter is used - } - else - { - throw std::runtime_error("Filter data type not supported in deserialization"); - } + *this << (uint32_t) RawSize(data.Event); + *this << data.Event; } - template<> - void DataSerializer::Serialize(const MonitoringFilter& data) + else if (data.Header.TypeId == ExpandedObjectId::AggregateFilter) { - *this << data.Header; - if ( data.Header.TypeId == ExpandedObjectId::DataChangeFilter ) - { - *this << (uint32_t) RawSize(data.DataChange); - *this << data.DataChange; - } - else if ( data.Header.TypeId == ExpandedObjectId::EventFilter ) - { - *this << (uint32_t) RawSize(data.Event); - *this << data.Event; - } - else if ( data.Header.TypeId == ExpandedObjectId::AggregateFilter ) - { - *this << (uint32_t) RawSize(data.Aggregate); - *this << data.Aggregate; - } - else if ( data.Header.TypeId == NodeId(0, 0) ) - { - //No filter is used - } - else - { - throw std::runtime_error("Filter data type not supported in serialization"); - } + *this << (uint32_t) RawSize(data.Aggregate); + *this << data.Aggregate; } - //////////////////////////////////////////////////////// - // MonitoredItemCreateRequest - //////////////////////////////////////////////////////// - - template<> - void DataSerializer::Serialize>(const std::vector& targets) + else if (data.Header.TypeId == NodeId(0, 0)) { - SerializeContainer(*this, targets); + //No filter is used } - - template<> - void DataDeserializer::Deserialize>(std::vector& targets) + else { - DeserializeContainer(*this, targets); + throw std::runtime_error("Filter data type not supported in serialization"); } +} - //////////////////////////////////////////////////////// - // CreateMonitoredItemsRequest - //////////////////////////////////////////////////////// +//////////////////////////////////////////////////////// +// MonitoredItemCreateRequest +//////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////// +template<> +void DataSerializer::Serialize>(const std::vector & targets) +{ + SerializeContainer(*this, targets); +} - template<> - void DataSerializer::Serialize>(const std::vector& targets) - { - SerializeContainer(*this, targets); - } +template<> +void DataDeserializer::Deserialize>(std::vector & targets) +{ + DeserializeContainer(*this, targets); +} - template<> - void DataDeserializer::Deserialize>(std::vector& targets) - { - DeserializeContainer(*this, targets); - } +//////////////////////////////////////////////////////// +// CreateMonitoredItemsRequest +//////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////// + +template<> +void DataSerializer::Serialize>(const std::vector & targets) +{ + SerializeContainer(*this, targets); +} +template<> +void DataDeserializer::Deserialize>(std::vector & targets) +{ + DeserializeContainer(*this, targets); +} - } + +} } diff --git a/src/protocol/nodeid.cpp b/src/protocol/nodeid.cpp index f9846b26..0f6756f5 100644 --- a/src/protocol/nodeid.cpp +++ b/src/protocol/nodeid.cpp @@ -21,792 +21,872 @@ namespace OpcUa { - NodeId::NodeId(uint32_t integerId, uint16_t index) - { - Encoding = EV_NUMERIC; - NumericData.Identifier = integerId; - NumericData.NamespaceIndex = index; - } - - NodeId::NodeId(std::string stringId, uint16_t index) - { - Encoding = EV_STRING; - StringData.Identifier = stringId; - StringData.NamespaceIndex = index; - } - - bool NodeId::IsInteger() const - { - const NodeIdEncoding enc = GetEncodingValue(); - return enc == EV_TWO_BYTE || enc == EV_FOUR_BYTE || enc == EV_NUMERIC; - } - - bool NodeId::IsString() const - { - const NodeIdEncoding enc = GetEncodingValue(); - return enc == EV_STRING; - } - - bool NodeId::IsBinary() const - { - const NodeIdEncoding enc = GetEncodingValue(); - return enc == EV_BYTE_STRING; - } - - bool NodeId::IsGuid() const - { - const NodeIdEncoding enc = GetEncodingValue(); - return enc == EV_GUId; - } - - std::string NodeId::GetStringIdentifier() const - { - if (IsString()) +NodeId::NodeId(uint32_t integerId, uint16_t index) +{ + Encoding = EV_NUMERIC; + NumericData.Identifier = integerId; + NumericData.NamespaceIndex = index; +} + +NodeId::NodeId(std::string stringId, uint16_t index) +{ + Encoding = EV_STRING; + StringData.Identifier = stringId; + StringData.NamespaceIndex = index; +} + +bool NodeId::IsInteger() const +{ + const NodeIdEncoding enc = GetEncodingValue(); + return enc == EV_TWO_BYTE || enc == EV_FOUR_BYTE || enc == EV_NUMERIC; +} + +bool NodeId::IsString() const +{ + const NodeIdEncoding enc = GetEncodingValue(); + return enc == EV_STRING; +} + +bool NodeId::IsBinary() const +{ + const NodeIdEncoding enc = GetEncodingValue(); + return enc == EV_BYTE_STRING; +} + +bool NodeId::IsGuid() const +{ + const NodeIdEncoding enc = GetEncodingValue(); + return enc == EV_GUId; +} + +std::string NodeId::GetStringIdentifier() const +{ + if (IsString()) { return StringData.Identifier; } - throw std::logic_error("Node id is not in String format."); - } - std::vector NodeId::GetBinaryIdentifier() const - { - if (IsBinary()) + throw std::logic_error("Node id is not in String format."); +} + +std::vector NodeId::GetBinaryIdentifier() const +{ + if (IsBinary()) { return BinaryData.Identifier; } - throw std::logic_error("Node id is not in String format."); - } - Guid NodeId::GetGuidIdentifier() const - { - if (IsGuid()) + throw std::logic_error("Node id is not in String format."); +} + +Guid NodeId::GetGuidIdentifier() const +{ + if (IsGuid()) { return GuidData.Identifier; } - throw std::logic_error("Node id is not in String format."); - } - - uint32_t NodeId::GetIntegerIdentifier() const - { - switch (GetEncodingValue()) - { - case EV_TWO_BYTE: - { - return TwoByteData.Identifier; - } - case EV_FOUR_BYTE: - { - return FourByteData.Identifier; - } - case EV_NUMERIC: - { - return NumericData.Identifier; - } - default: - { - throw std::logic_error("Cannot get integer identifier from NodeId - it is not in numeric format."); - } - } - } - - uint32_t NodeId::GetNamespaceIndex() const - { - switch (GetEncodingValue()) - { - case EV_FOUR_BYTE: - return FourByteData.NamespaceIndex; - case EV_NUMERIC: - return NumericData.NamespaceIndex; - case EV_STRING: - return StringData.NamespaceIndex; - case EV_GUId: - return GuidData.NamespaceIndex; - case EV_BYTE_STRING: - return BinaryData.NamespaceIndex; - default: - return 0; - } - } - - void NodeId::SetNamespaceIndex(uint32_t ns) - { - switch (GetEncodingValue()) - { - case EV_FOUR_BYTE: - FourByteData.NamespaceIndex = ns; - return; - case EV_NUMERIC: - NumericData.NamespaceIndex = ns; - return; - case EV_STRING: - StringData.NamespaceIndex = ns; - return; - case EV_GUId: - GuidData.NamespaceIndex = ns; - return; - case EV_BYTE_STRING: - BinaryData.NamespaceIndex = ns; - return; - default: - return; - } - } - - NodeId::NodeId() - : Encoding(EV_TWO_BYTE) - , ServerIndex(0) - { - } - - void NodeId::CopyNodeId(const NodeId& node) - { - Encoding = node.Encoding; - const NodeIdEncoding enc = node.GetEncodingValue(); - switch (enc) - { - case EV_TWO_BYTE: - { - TwoByteData.Identifier = node.TwoByteData.Identifier; - break; - } - case EV_FOUR_BYTE: - { - FourByteData.NamespaceIndex = node.FourByteData.NamespaceIndex; - FourByteData.Identifier = node.FourByteData.Identifier; - break; - } - case EV_NUMERIC: - { - NumericData.NamespaceIndex = node.NumericData.NamespaceIndex; - NumericData.Identifier = node.NumericData.Identifier; - break; - } - case EV_STRING: - { - StringData.NamespaceIndex = node.StringData.NamespaceIndex; - StringData.Identifier = node.StringData.Identifier; - break; - } - case EV_GUId: - { - GuidData.NamespaceIndex = node.GuidData.NamespaceIndex; - GuidData.Identifier = node.GuidData.Identifier; - break; - } - case EV_BYTE_STRING: - { - BinaryData.NamespaceIndex = node.BinaryData.NamespaceIndex; - BinaryData.Identifier = node.BinaryData.Identifier; - break; - } - default: - { - throw std::logic_error("Invalid Node Id encoding value."); - } - } - - if (node.HasServerIndex()) + + throw std::logic_error("Node id is not in String format."); +} + +uint32_t NodeId::GetIntegerIdentifier() const +{ + switch (GetEncodingValue()) + { + case EV_TWO_BYTE: + { + return TwoByteData.Identifier; + } + + case EV_FOUR_BYTE: + { + return FourByteData.Identifier; + } + + case EV_NUMERIC: + { + return NumericData.Identifier; + } + + default: + { + throw std::logic_error("Cannot get integer identifier from NodeId - it is not in numeric format."); + } + } +} + +uint32_t NodeId::GetNamespaceIndex() const +{ + switch (GetEncodingValue()) + { + case EV_FOUR_BYTE: + return FourByteData.NamespaceIndex; + + case EV_NUMERIC: + return NumericData.NamespaceIndex; + + case EV_STRING: + return StringData.NamespaceIndex; + + case EV_GUId: + return GuidData.NamespaceIndex; + + case EV_BYTE_STRING: + return BinaryData.NamespaceIndex; + + default: + return 0; + } +} + +void NodeId::SetNamespaceIndex(uint32_t ns) +{ + switch (GetEncodingValue()) + { + case EV_FOUR_BYTE: + FourByteData.NamespaceIndex = ns; + return; + + case EV_NUMERIC: + NumericData.NamespaceIndex = ns; + return; + + case EV_STRING: + StringData.NamespaceIndex = ns; + return; + + case EV_GUId: + GuidData.NamespaceIndex = ns; + return; + + case EV_BYTE_STRING: + BinaryData.NamespaceIndex = ns; + return; + + default: + return; + } +} + +NodeId::NodeId() + : Encoding(EV_TWO_BYTE) + , ServerIndex(0) +{ +} + +void NodeId::CopyNodeId(const NodeId & node) +{ + Encoding = node.Encoding; + const NodeIdEncoding enc = node.GetEncodingValue(); + + switch (enc) + { + case EV_TWO_BYTE: + { + TwoByteData.Identifier = node.TwoByteData.Identifier; + break; + } + + case EV_FOUR_BYTE: + { + FourByteData.NamespaceIndex = node.FourByteData.NamespaceIndex; + FourByteData.Identifier = node.FourByteData.Identifier; + break; + } + + case EV_NUMERIC: + { + NumericData.NamespaceIndex = node.NumericData.NamespaceIndex; + NumericData.Identifier = node.NumericData.Identifier; + break; + } + + case EV_STRING: + { + StringData.NamespaceIndex = node.StringData.NamespaceIndex; + StringData.Identifier = node.StringData.Identifier; + break; + } + + case EV_GUId: + { + GuidData.NamespaceIndex = node.GuidData.NamespaceIndex; + GuidData.Identifier = node.GuidData.Identifier; + break; + } + + case EV_BYTE_STRING: + { + BinaryData.NamespaceIndex = node.BinaryData.NamespaceIndex; + BinaryData.Identifier = node.BinaryData.Identifier; + break; + } + + default: + { + throw std::logic_error("Invalid Node Id encoding value."); + } + } + + if (node.HasServerIndex()) { ServerIndex = node.ServerIndex; } - if (node.HasNamespaceURI()) + + if (node.HasNamespaceURI()) { NamespaceURI = node.NamespaceURI; } - } - - NodeId::NodeId(const NodeId& node) - { - CopyNodeId(node); - } - - NodeId::NodeId(const ExpandedNodeId& node) - { - CopyNodeId(node); - } - - NodeId::operator ExpandedNodeId() - { - ExpandedNodeId node; - node.CopyNodeId(*this); - - return node; - } - - NodeId& NodeId::operator=(const NodeId& node) - { - CopyNodeId(node); - return *this; - } - - NodeId& NodeId::operator=(const ExpandedNodeId& node) - { - CopyNodeId(node); - return *this; - } - - NodeId::NodeId(MessageId messageId) - : Encoding(EV_FOUR_BYTE) - , ServerIndex(0) - { - FourByteData.Identifier = messageId; - } - - NodeId::NodeId(ReferenceId referenceId) - : Encoding(EV_NUMERIC) - , ServerIndex(0) - { - NumericData.Identifier = static_cast(referenceId); - } - - NodeId::NodeId(ObjectId objectId) - : Encoding(EV_NUMERIC) - , ServerIndex(0) - { - NumericData.Identifier = static_cast(objectId); - } - - NodeId::NodeId(ExpandedObjectId objectId) - : Encoding(EV_FOUR_BYTE) - , ServerIndex(0) - { - FourByteData.Identifier = static_cast(objectId); - } - - MessageId GetMessageId(const NodeId& id) - { - return static_cast(id.GetIntegerIdentifier()); - } - - - bool NodeId::operator== (const NodeId& node) const - { - if (GetNamespaceIndex() != node.GetNamespaceIndex()) +} + +NodeId::NodeId(const NodeId & node) +{ + CopyNodeId(node); +} + +NodeId::NodeId(const ExpandedNodeId & node) +{ + CopyNodeId(node); +} + +NodeId::operator ExpandedNodeId() +{ + ExpandedNodeId node; + node.CopyNodeId(*this); + + return node; +} + +NodeId & NodeId::operator=(const NodeId & node) +{ + CopyNodeId(node); + return *this; +} + +NodeId & NodeId::operator=(const ExpandedNodeId & node) +{ + CopyNodeId(node); + return *this; +} + +NodeId::NodeId(MessageId messageId) + : Encoding(EV_FOUR_BYTE) + , ServerIndex(0) +{ + FourByteData.Identifier = messageId; +} + +NodeId::NodeId(ReferenceId referenceId) + : Encoding(EV_NUMERIC) + , ServerIndex(0) +{ + NumericData.Identifier = static_cast(referenceId); +} + +NodeId::NodeId(ObjectId objectId) + : Encoding(EV_NUMERIC) + , ServerIndex(0) +{ + NumericData.Identifier = static_cast(objectId); +} + +NodeId::NodeId(ExpandedObjectId objectId) + : Encoding(EV_FOUR_BYTE) + , ServerIndex(0) +{ + FourByteData.Identifier = static_cast(objectId); +} + +MessageId GetMessageId(const NodeId & id) +{ + return static_cast(id.GetIntegerIdentifier()); +} + + +bool NodeId::operator== (const NodeId & node) const +{ + if (GetNamespaceIndex() != node.GetNamespaceIndex()) { return false; } - if (IsInteger() && node.IsInteger()) + + if (IsInteger() && node.IsInteger()) { return GetIntegerIdentifier() == node.GetIntegerIdentifier(); } - if (IsString() && node.IsString()) + + if (IsString() && node.IsString()) { return GetStringIdentifier() == node.GetStringIdentifier(); } - if (IsBinary() && node.IsBinary()) + + if (IsBinary() && node.IsBinary()) { return GetBinaryIdentifier() == node.GetBinaryIdentifier(); } - if (IsGuid() && node.IsGuid()) + + if (IsGuid() && node.IsGuid()) { return GetGuidIdentifier() == node.GetGuidIdentifier(); } - return false; - } - bool NodeId::operator < (const NodeId& node) const - { - if (GetNamespaceIndex() != node.GetNamespaceIndex()) + return false; +} + +bool NodeId::operator < (const NodeId & node) const +{ + if (GetNamespaceIndex() != node.GetNamespaceIndex()) { return GetNamespaceIndex() < node.GetNamespaceIndex(); } - if (IsInteger() && node.IsInteger()) + + if (IsInteger() && node.IsInteger()) { return GetIntegerIdentifier() < node.GetIntegerIdentifier(); } - if (IsString() && node.IsString()) + + if (IsString() && node.IsString()) { return GetStringIdentifier() < node.GetStringIdentifier(); } - if (IsBinary() && node.IsBinary()) + + if (IsBinary() && node.IsBinary()) { - const std::vector& l = GetBinaryIdentifier(); - const std::vector& r = node.GetBinaryIdentifier(); + const std::vector & l = GetBinaryIdentifier(); + const std::vector & r = node.GetBinaryIdentifier(); return std::lexicographical_compare(l.cbegin(), l.cend(), r.cbegin(), r.cend()); } - if (IsGuid() && node.IsGuid()) + + if (IsGuid() && node.IsGuid()) { return GetGuidIdentifier() < node.GetGuidIdentifier(); } - return Encoding < node.Encoding; //FIXME Can we get there? and should we? - - } - - NodeIdEncoding NodeId::GetEncodingValue() const - { - return static_cast(Encoding & EV_VALUE_MASK); - } - - bool NodeId::IsNull() const - { - switch (GetEncodingValue()) - { - case EV_FOUR_BYTE: - if (FourByteData.NamespaceIndex != 0) - return false; - break; - case EV_NUMERIC: - if (NumericData.NamespaceIndex != 0) - return false; - break; - case EV_STRING: - if (StringData.NamespaceIndex != 0) - return false; - break; - case EV_GUId: - if (GuidData.NamespaceIndex != 0) - return false; - break; - case EV_BYTE_STRING: - if (BinaryData.NamespaceIndex != 0) - return false; - break; - default: - { - throw std::logic_error("Invalid Node Id encoding value."); - } - } - return HasNullIdentifier(); - } - - bool NodeId::HasNullIdentifier() const - { - switch (GetEncodingValue()) - { - case EV_FOUR_BYTE: - if (FourByteData.Identifier != 0) - return false; - break; - case EV_NUMERIC: - if (NumericData.Identifier != 0) - return false; - break; - case EV_STRING: - if (! StringData.Identifier.empty()) - return false; - break; - case EV_GUId: - if (! (GuidData.Identifier == Guid())) - return false; - break; - case EV_BYTE_STRING: - if (! BinaryData.Identifier.empty()) - return false; - break; - default: - { - throw std::logic_error("Invalid Node Id encoding value."); - } - } - return true; - } - - bool NodeId::HasNamespaceURI() const - { - return (Encoding & EV_NAMESPACE_URI_FLAG) != 0; - } - - bool NodeId::HasServerIndex() const - { - return (Encoding & EV_Server_INDEX_FLAG) != 0; - } - - void NodeId::SetNamespaceURI(const std::string& uri) - { - Encoding = static_cast(Encoding | EV_NAMESPACE_URI_FLAG); - NamespaceURI = uri; - } - - void NodeId::SetServerIndex(uint32_t index) - { - Encoding = static_cast(Encoding | EV_Server_INDEX_FLAG); - ServerIndex = index; - } - - bool NodeId::operator!= (const NodeId& node) const - { - return !(*this == node); - } - - bool NodeId::operator!= (MessageId messageId) const - { - return !(*this == messageId); - } - - bool NodeId::operator!= (ReferenceId referenceId) const - { - return !(*this == referenceId); - } - - bool NodeId::operator!= (ObjectId objectId) const - { - return !(*this == objectId); - } - - bool NodeId::operator!= (ExpandedObjectId objectId) const - { - return !(*this == objectId); - } - - - - bool NodeId::operator== (MessageId messageId) const - { - return *this == NodeId(messageId); - } - - bool NodeId::operator== (ReferenceId referenceId) const - { - return *this == NodeId(referenceId); - } - - bool NodeId::operator== (ObjectId messageId) const - { - return *this == NodeId(messageId); - } - - bool NodeId::operator== (ExpandedObjectId messageId) const - { - return *this == NodeId(messageId); - } - - - ///ExpandednNdeId - ExpandedNodeId::ExpandedNodeId() - { - Encoding = EV_TWO_BYTE; - ServerIndex = 0; - } - - ExpandedNodeId::ExpandedNodeId(uint32_t integerId, uint16_t index) - { - Encoding = EV_NUMERIC; - NumericData.Identifier = integerId; - NumericData.NamespaceIndex = index; - } - - ExpandedNodeId::ExpandedNodeId(std::string stringId, uint16_t index) - { - Encoding = EV_STRING; - StringData.Identifier = stringId; - StringData.NamespaceIndex = index; - } - - ExpandedNodeId::ExpandedNodeId(const NodeId& node) - { - CopyNodeId(node); - } - - ExpandedNodeId::ExpandedNodeId(const ExpandedNodeId& node) - { - CopyNodeId(node); - } - - - ExpandedNodeId::ExpandedNodeId(MessageId messageId) - { - Encoding = EV_FOUR_BYTE; - ServerIndex = 0; - FourByteData.Identifier = messageId; - } - - ExpandedNodeId::ExpandedNodeId(ReferenceId referenceId) - { - Encoding = EV_NUMERIC; - ServerIndex = 0; - NumericData.Identifier = static_cast(referenceId); - } - - ExpandedNodeId::ExpandedNodeId(ObjectId objectId) - { - Encoding = EV_NUMERIC; - ServerIndex = 0; - NumericData.Identifier = static_cast(objectId); - } - - ExpandedNodeId::ExpandedNodeId(ExpandedObjectId objectId) - { - Encoding = EV_FOUR_BYTE; - ServerIndex = 0; - FourByteData.Identifier = static_cast(objectId); - } - - - namespace Binary - { - template<> - std::size_t RawSize(const NodeIdEncoding&) - { - return 1; - } - - template<> - void DataSerializer::Serialize(const NodeIdEncoding& value) - { - *this << static_cast(value); - } - - template<> - void DataDeserializer::Deserialize(NodeIdEncoding& value) - { - uint8_t tmp = 0; - *this >> tmp; - value = static_cast(tmp); - } - - template<> - std::size_t RawSize(const NodeId& id) - { - std::size_t size = 0; - - switch (id.GetEncodingValue()) - { - case EV_TWO_BYTE: - { - size = 2; - break; - } - case EV_FOUR_BYTE: - { - size = 4; - break; - } - case EV_NUMERIC: - { - const std::size_t sizeofEncoding = 1; - const std::size_t sizeofNamespace = 2; - const std::size_t sizeofIdentifier = 4; - size = sizeofEncoding + sizeofNamespace + sizeofIdentifier; - break; - } - case EV_STRING: - { - const std::size_t sizeofEncoding = 1; - const std::size_t sizeofSize = 4; - const std::size_t sizeofNamespace = 2; - size = sizeofEncoding + sizeofNamespace + sizeofSize + id.StringData.Identifier.size(); - break; - } - case EV_BYTE_STRING: - { - const std::size_t sizeofEncoding = 1; - const std::size_t sizeofSize = 4; - const std::size_t sizeofNamespace = 2; - size = sizeofEncoding + sizeofNamespace + sizeofSize + id.BinaryData.Identifier.size(); - break; - } - case EV_GUId: - { - const std::size_t sizeofEncoding = 1; - const std::size_t sizeofNamespace = 2; - const std::size_t sizeofGuid = 16; - size = sizeofEncoding + sizeofNamespace + sizeofGuid; - break; - } - - default: - throw std::logic_error("Unable serialize NodeId. Unknown encoding type."); - }; - - return size; - } - - template<> - void DataSerializer::Serialize(const OpcUa::NodeId& id) - { - //unset server and namespace flags in encoding, they should only be used in ExpandedNode Id - uint8_t nodeid_encoding = id.Encoding; - nodeid_encoding &= ~EV_Server_INDEX_FLAG; - nodeid_encoding &= ~EV_NAMESPACE_URI_FLAG; - - *this << nodeid_encoding; - - switch (id.GetEncodingValue()) - { - case EV_TWO_BYTE: - { - *this << id.TwoByteData.Identifier; - break; - } - case EV_FOUR_BYTE: - { - *this << id.FourByteData.NamespaceIndex; - *this << id.FourByteData.Identifier; - break; - } - case EV_NUMERIC: - { - *this << id.NumericData.NamespaceIndex; - *this << id.NumericData.Identifier; - break; - } - case EV_STRING: - { - *this << id.StringData.NamespaceIndex; - *this << id.StringData.Identifier; - break; - } - case EV_BYTE_STRING: - { - *this << id.BinaryData.NamespaceIndex; - *this << id.BinaryData.Identifier; - break; - } - case EV_GUId: - { - *this << id.GuidData.NamespaceIndex; - *this << id.GuidData.Identifier; - break; - } - - default: - throw std::logic_error("Unable serialize NodeId. Unknown encoding type."); - }; - - } - - template<> - void DataDeserializer::Deserialize(OpcUa::NodeId& id) - { - *this >> id.Encoding; - - switch (id.GetEncodingValue()) - { - case EV_TWO_BYTE: - { - *this >> id.TwoByteData.Identifier; - break; - } - case EV_FOUR_BYTE: - { - *this >> id.FourByteData.NamespaceIndex; - *this >> id.FourByteData.Identifier; - break; - } - case EV_NUMERIC: - { - *this >> id.NumericData.NamespaceIndex; - *this >> id.NumericData.Identifier; - break; - } - case EV_STRING: - { - *this >> id.StringData.NamespaceIndex; - *this >> id.StringData.Identifier; - break; - } - case EV_BYTE_STRING: - { - *this >> id.BinaryData.NamespaceIndex; - *this >> id.BinaryData.Identifier; - break; - } - case EV_GUId: - { - *this >> id.GuidData.NamespaceIndex; - *this >> id.GuidData.Identifier; - break; - } - - default: - { - throw std::logic_error("Unable to deserialize NodeId. Unknown encoding type received."); - } - }; - - if (id.HasNamespaceURI()) - { - *this >> id.NamespaceURI; - } - if (id.HasServerIndex()) - { - *this >> id.ServerIndex; - } - } - - template<> - std::size_t RawSize(const ExpandedNodeId& id) - { - std::size_t size = RawSize((NodeId)id); - - if (id.HasNamespaceURI()) - { - const std::size_t sizeofSize = 4; - size += sizeofSize + id.NamespaceURI.size(); - } - if (id.HasServerIndex()) - { - const std::size_t sizeofServerIndex = 4; - size += sizeofServerIndex; - } - return size; - } - - template<> - void DataSerializer::Serialize(const OpcUa::ExpandedNodeId& id) - { - *this << id.Encoding; - - switch (id.GetEncodingValue()) - { - case EV_TWO_BYTE: - { - *this << id.TwoByteData.Identifier; - break; - } - case EV_FOUR_BYTE: - { - *this << id.FourByteData.NamespaceIndex; - *this << id.FourByteData.Identifier; - break; - } - case EV_NUMERIC: - { - *this << id.NumericData.NamespaceIndex; - *this << id.NumericData.Identifier; - break; - } - case EV_STRING: - { - *this << id.StringData.NamespaceIndex; - *this << id.StringData.Identifier; - break; - } - case EV_BYTE_STRING: - { - *this << id.BinaryData.NamespaceIndex; - *this << id.BinaryData.Identifier; - break; - } - case EV_GUId: - { - *this << id.GuidData.NamespaceIndex; - *this << id.GuidData.Identifier; - break; - } - - default: - throw std::logic_error("Unable serialize ExpandedNodeId. Unknown encoding type."); - }; - - if (id.HasNamespaceURI()) - { - *this << id.NamespaceURI; - } - if (id.HasServerIndex()) - { - *this << id.ServerIndex; - } - } - - template<> - void DataDeserializer::Deserialize(OpcUa::ExpandedNodeId& id) - { - *this >> *(NodeId*) &id; - } - - - } // namespace Binary + + return Encoding < node.Encoding; //FIXME Can we get there? and should we? + +} + +NodeIdEncoding NodeId::GetEncodingValue() const +{ + return static_cast(Encoding & EV_VALUE_MASK); +} + +bool NodeId::IsNull() const +{ + switch (GetEncodingValue()) + { + case EV_FOUR_BYTE: + if (FourByteData.NamespaceIndex != 0) + { return false; } + + break; + + case EV_NUMERIC: + if (NumericData.NamespaceIndex != 0) + { return false; } + + break; + + case EV_STRING: + if (StringData.NamespaceIndex != 0) + { return false; } + + break; + + case EV_GUId: + if (GuidData.NamespaceIndex != 0) + { return false; } + + break; + + case EV_BYTE_STRING: + if (BinaryData.NamespaceIndex != 0) + { return false; } + + break; + + default: + { + throw std::logic_error("Invalid Node Id encoding value."); + } + } + + return HasNullIdentifier(); +} + +bool NodeId::HasNullIdentifier() const +{ + switch (GetEncodingValue()) + { + case EV_FOUR_BYTE: + if (FourByteData.Identifier != 0) + { return false; } + + break; + + case EV_NUMERIC: + if (NumericData.Identifier != 0) + { return false; } + + break; + + case EV_STRING: + if (! StringData.Identifier.empty()) + { return false; } + + break; + + case EV_GUId: + if (!(GuidData.Identifier == Guid())) + { return false; } + + break; + + case EV_BYTE_STRING: + if (! BinaryData.Identifier.empty()) + { return false; } + + break; + + default: + { + throw std::logic_error("Invalid Node Id encoding value."); + } + } + + return true; +} + +bool NodeId::HasNamespaceURI() const +{ + return (Encoding & EV_NAMESPACE_URI_FLAG) != 0; +} + +bool NodeId::HasServerIndex() const +{ + return (Encoding & EV_Server_INDEX_FLAG) != 0; +} + +void NodeId::SetNamespaceURI(const std::string & uri) +{ + Encoding = static_cast(Encoding | EV_NAMESPACE_URI_FLAG); + NamespaceURI = uri; +} + +void NodeId::SetServerIndex(uint32_t index) +{ + Encoding = static_cast(Encoding | EV_Server_INDEX_FLAG); + ServerIndex = index; +} + +bool NodeId::operator!= (const NodeId & node) const +{ + return !(*this == node); +} + +bool NodeId::operator!= (MessageId messageId) const +{ + return !(*this == messageId); +} + +bool NodeId::operator!= (ReferenceId referenceId) const +{ + return !(*this == referenceId); +} + +bool NodeId::operator!= (ObjectId objectId) const +{ + return !(*this == objectId); +} + +bool NodeId::operator!= (ExpandedObjectId objectId) const +{ + return !(*this == objectId); +} + + + +bool NodeId::operator== (MessageId messageId) const +{ + return *this == NodeId(messageId); +} + +bool NodeId::operator== (ReferenceId referenceId) const +{ + return *this == NodeId(referenceId); +} + +bool NodeId::operator== (ObjectId messageId) const +{ + return *this == NodeId(messageId); +} + +bool NodeId::operator== (ExpandedObjectId messageId) const +{ + return *this == NodeId(messageId); +} + + +///ExpandednNdeId +ExpandedNodeId::ExpandedNodeId() +{ + Encoding = EV_TWO_BYTE; + ServerIndex = 0; +} + +ExpandedNodeId::ExpandedNodeId(uint32_t integerId, uint16_t index) +{ + Encoding = EV_NUMERIC; + NumericData.Identifier = integerId; + NumericData.NamespaceIndex = index; +} + +ExpandedNodeId::ExpandedNodeId(std::string stringId, uint16_t index) +{ + Encoding = EV_STRING; + StringData.Identifier = stringId; + StringData.NamespaceIndex = index; +} + +ExpandedNodeId::ExpandedNodeId(const NodeId & node) +{ + CopyNodeId(node); +} + +ExpandedNodeId::ExpandedNodeId(const ExpandedNodeId & node) +{ + CopyNodeId(node); +} + + +ExpandedNodeId::ExpandedNodeId(MessageId messageId) +{ + Encoding = EV_FOUR_BYTE; + ServerIndex = 0; + FourByteData.Identifier = messageId; +} + +ExpandedNodeId::ExpandedNodeId(ReferenceId referenceId) +{ + Encoding = EV_NUMERIC; + ServerIndex = 0; + NumericData.Identifier = static_cast(referenceId); +} + +ExpandedNodeId::ExpandedNodeId(ObjectId objectId) +{ + Encoding = EV_NUMERIC; + ServerIndex = 0; + NumericData.Identifier = static_cast(objectId); +} + +ExpandedNodeId::ExpandedNodeId(ExpandedObjectId objectId) +{ + Encoding = EV_FOUR_BYTE; + ServerIndex = 0; + FourByteData.Identifier = static_cast(objectId); +} + + +namespace Binary +{ +template<> +std::size_t RawSize(const NodeIdEncoding &) +{ + return 1; +} + +template<> +void DataSerializer::Serialize(const NodeIdEncoding & value) +{ + *this << static_cast(value); +} + +template<> +void DataDeserializer::Deserialize(NodeIdEncoding & value) +{ + uint8_t tmp = 0; + *this >> tmp; + value = static_cast(tmp); +} + +template<> +std::size_t RawSize(const NodeId & id) +{ + std::size_t size = 0; + + switch (id.GetEncodingValue()) + { + case EV_TWO_BYTE: + { + size = 2; + break; + } + + case EV_FOUR_BYTE: + { + size = 4; + break; + } + + case EV_NUMERIC: + { + const std::size_t sizeofEncoding = 1; + const std::size_t sizeofNamespace = 2; + const std::size_t sizeofIdentifier = 4; + size = sizeofEncoding + sizeofNamespace + sizeofIdentifier; + break; + } + + case EV_STRING: + { + const std::size_t sizeofEncoding = 1; + const std::size_t sizeofSize = 4; + const std::size_t sizeofNamespace = 2; + size = sizeofEncoding + sizeofNamespace + sizeofSize + id.StringData.Identifier.size(); + break; + } + + case EV_BYTE_STRING: + { + const std::size_t sizeofEncoding = 1; + const std::size_t sizeofSize = 4; + const std::size_t sizeofNamespace = 2; + size = sizeofEncoding + sizeofNamespace + sizeofSize + id.BinaryData.Identifier.size(); + break; + } + + case EV_GUId: + { + const std::size_t sizeofEncoding = 1; + const std::size_t sizeofNamespace = 2; + const std::size_t sizeofGuid = 16; + size = sizeofEncoding + sizeofNamespace + sizeofGuid; + break; + } + + default: + throw std::logic_error("Unable serialize NodeId. Unknown encoding type."); + }; + + return size; +} + +template<> +void DataSerializer::Serialize(const OpcUa::NodeId & id) +{ + //unset server and namespace flags in encoding, they should only be used in ExpandedNode Id + uint8_t nodeid_encoding = id.Encoding; + nodeid_encoding &= ~EV_Server_INDEX_FLAG; + nodeid_encoding &= ~EV_NAMESPACE_URI_FLAG; + + *this << nodeid_encoding; + + switch (id.GetEncodingValue()) + { + case EV_TWO_BYTE: + { + *this << id.TwoByteData.Identifier; + break; + } + + case EV_FOUR_BYTE: + { + *this << id.FourByteData.NamespaceIndex; + *this << id.FourByteData.Identifier; + break; + } + + case EV_NUMERIC: + { + *this << id.NumericData.NamespaceIndex; + *this << id.NumericData.Identifier; + break; + } + + case EV_STRING: + { + *this << id.StringData.NamespaceIndex; + *this << id.StringData.Identifier; + break; + } + + case EV_BYTE_STRING: + { + *this << id.BinaryData.NamespaceIndex; + *this << id.BinaryData.Identifier; + break; + } + + case EV_GUId: + { + *this << id.GuidData.NamespaceIndex; + *this << id.GuidData.Identifier; + break; + } + + default: + throw std::logic_error("Unable serialize NodeId. Unknown encoding type."); + }; + +} + +template<> +void DataDeserializer::Deserialize(OpcUa::NodeId & id) +{ + *this >> id.Encoding; + + switch (id.GetEncodingValue()) + { + case EV_TWO_BYTE: + { + *this >> id.TwoByteData.Identifier; + break; + } + + case EV_FOUR_BYTE: + { + *this >> id.FourByteData.NamespaceIndex; + *this >> id.FourByteData.Identifier; + break; + } + + case EV_NUMERIC: + { + *this >> id.NumericData.NamespaceIndex; + *this >> id.NumericData.Identifier; + break; + } + + case EV_STRING: + { + *this >> id.StringData.NamespaceIndex; + *this >> id.StringData.Identifier; + break; + } + + case EV_BYTE_STRING: + { + *this >> id.BinaryData.NamespaceIndex; + *this >> id.BinaryData.Identifier; + break; + } + + case EV_GUId: + { + *this >> id.GuidData.NamespaceIndex; + *this >> id.GuidData.Identifier; + break; + } + + default: + { + throw std::logic_error("Unable to deserialize NodeId. Unknown encoding type received."); + } + }; + + if (id.HasNamespaceURI()) + { + *this >> id.NamespaceURI; + } + + if (id.HasServerIndex()) + { + *this >> id.ServerIndex; + } +} + +template<> +std::size_t RawSize(const ExpandedNodeId & id) +{ + std::size_t size = RawSize((NodeId)id); + + if (id.HasNamespaceURI()) + { + const std::size_t sizeofSize = 4; + size += sizeofSize + id.NamespaceURI.size(); + } + + if (id.HasServerIndex()) + { + const std::size_t sizeofServerIndex = 4; + size += sizeofServerIndex; + } + + return size; +} + +template<> +void DataSerializer::Serialize(const OpcUa::ExpandedNodeId & id) +{ + *this << id.Encoding; + + switch (id.GetEncodingValue()) + { + case EV_TWO_BYTE: + { + *this << id.TwoByteData.Identifier; + break; + } + + case EV_FOUR_BYTE: + { + *this << id.FourByteData.NamespaceIndex; + *this << id.FourByteData.Identifier; + break; + } + + case EV_NUMERIC: + { + *this << id.NumericData.NamespaceIndex; + *this << id.NumericData.Identifier; + break; + } + + case EV_STRING: + { + *this << id.StringData.NamespaceIndex; + *this << id.StringData.Identifier; + break; + } + + case EV_BYTE_STRING: + { + *this << id.BinaryData.NamespaceIndex; + *this << id.BinaryData.Identifier; + break; + } + + case EV_GUId: + { + *this << id.GuidData.NamespaceIndex; + *this << id.GuidData.Identifier; + break; + } + + default: + throw std::logic_error("Unable serialize ExpandedNodeId. Unknown encoding type."); + }; + + if (id.HasNamespaceURI()) + { + *this << id.NamespaceURI; + } + + if (id.HasServerIndex()) + { + *this << id.ServerIndex; + } +} + +template<> +void DataDeserializer::Deserialize(OpcUa::ExpandedNodeId & id) +{ + *this >> *(NodeId *) &id; +} + + +} // namespace Binary } // namespace OpcUa diff --git a/src/protocol/protocol.cpp b/src/protocol/protocol.cpp index 39f7d548..19b952d8 100644 --- a/src/protocol/protocol.cpp +++ b/src/protocol/protocol.cpp @@ -4,12 +4,12 @@ namespace OpcUa { - ReadParameters::ReadParameters() - : MaxAge(0) - , TimestampsToReturn(OpcUa::TimestampsToReturn::Neither) - { +ReadParameters::ReadParameters() + : MaxAge(0) + , TimestampsToReturn(OpcUa::TimestampsToReturn::Neither) +{ - } +} } diff --git a/src/protocol/rawsize_auto.cpp b/src/protocol/rawsize_auto.cpp index 814c8225..9cfa45ba 100644 --- a/src/protocol/rawsize_auto.cpp +++ b/src/protocol/rawsize_auto.cpp @@ -19,185 +19,185 @@ namespace OpcUa { - namespace Binary - { +namespace Binary +{ - template<> - std::size_t RawSize(const OpenFileMode& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const OpenFileMode & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const NodeClass& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const NodeClass & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const ApplicationType& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const ApplicationType & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const MessageSecurityMode& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const MessageSecurityMode & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const UserTokenType& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const UserTokenType & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const SecurityTokenRequestType& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const SecurityTokenRequestType & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const NodeAttributesMask& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const NodeAttributesMask & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const AttributeWriteMask& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const AttributeWriteMask & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const BrowseDirection& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const BrowseDirection & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const BrowseResultMask& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const BrowseResultMask & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const ComplianceLevel& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const ComplianceLevel & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const FilterOperator& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const FilterOperator & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const TimestampsToReturn& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const TimestampsToReturn & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const HistoryUpdateType& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const HistoryUpdateType & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const PerformUpdateType& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const PerformUpdateType & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const MonitoringMode& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const MonitoringMode & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const DataChangeTrigger& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const DataChangeTrigger & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const DeadbandType& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const DeadbandType & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const EnumeratedTestType& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const EnumeratedTestType & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const RedundancySupport& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const RedundancySupport & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const ServerState& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const ServerState & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const ModelChangeStructureVerbMask& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const ModelChangeStructureVerbMask & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const AxisScaleEnumeration& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const AxisScaleEnumeration & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const ExceptionDeviationFormat& data) - { - return sizeof(uint32_t); - } +template<> +std::size_t RawSize(const ExceptionDeviationFormat & data) +{ + return sizeof(uint32_t); +} - template<> - std::size_t RawSize(const XmlElement& data) - { - size_t size = 0; - size += RawSize(data.Length); - size += RawSizeContainer(data.Value); - return size; - } +template<> +std::size_t RawSize(const XmlElement & data) +{ + size_t size = 0; + size += RawSize(data.Length); + size += RawSizeContainer(data.Value); + return size; +} /* DISABLED @@ -295,15 +295,17 @@ namespace OpcUa */ - template<> - std::size_t RawSize(const ExtensionObject& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Encoding); - if ((data.Encoding) & (1<<(0))) size += RawSize(data.Body); - return size; - } +template<> +std::size_t RawSize(const ExtensionObject & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Encoding); + + if ((data.Encoding) & (1 << (0))) { size += RawSize(data.Body); } + + return size; +} /* DISABLED @@ -716,19 +718,19 @@ namespace OpcUa */ - template<> - std::size_t RawSize(const ApplicationDescription& data) - { - size_t size = 0; - size += RawSize(data.ApplicationUri); - size += RawSize(data.ProductUri); - size += RawSize(data.ApplicationName); - size += RawSize(data.ApplicationType); - size += RawSize(data.GatewayServerUri); - size += RawSize(data.DiscoveryProfileUri); - size += RawSizeContainer(data.DiscoveryUrls); - return size; - } +template<> +std::size_t RawSize(const ApplicationDescription & data) +{ + size_t size = 0; + size += RawSize(data.ApplicationUri); + size += RawSize(data.ProductUri); + size += RawSize(data.ApplicationName); + size += RawSize(data.ApplicationType); + size += RawSize(data.GatewayServerUri); + size += RawSize(data.DiscoveryProfileUri); + size += RawSizeContainer(data.DiscoveryUrls); + return size; +} /* DISABLED @@ -833,66 +835,66 @@ namespace OpcUa */ - template<> - std::size_t RawSize(const UserTokenPolicy& data) - { - size_t size = 0; - size += RawSize(data.PolicyId); - size += RawSize(data.TokenType); - size += RawSize(data.IssuedTokenType); - size += RawSize(data.IssuerEndpointUrl); - size += RawSize(data.SecurityPolicyUri); - return size; - } - - - template<> - std::size_t RawSize(const EndpointDescription& data) - { - size_t size = 0; - size += RawSize(data.EndpointUrl); - size += RawSize(data.Server); - size += RawSize(data.ServerCertificate); - size += RawSize(data.SecurityMode); - size += RawSize(data.SecurityPolicyUri); - size += RawSizeContainer(data.UserIdentityTokens); - size += RawSize(data.TransportProfileUri); - size += RawSize(data.SecurityLevel); - return size; - } - - - template<> - std::size_t RawSize(const GetEndpointsParameters& data) - { - size_t size = 0; - size += RawSize(data.EndpointUrl); - size += RawSizeContainer(data.LocaleIds); - size += RawSizeContainer(data.ProfileUris); - return size; - } +template<> +std::size_t RawSize(const UserTokenPolicy & data) +{ + size_t size = 0; + size += RawSize(data.PolicyId); + size += RawSize(data.TokenType); + size += RawSize(data.IssuedTokenType); + size += RawSize(data.IssuerEndpointUrl); + size += RawSize(data.SecurityPolicyUri); + return size; +} + + +template<> +std::size_t RawSize(const EndpointDescription & data) +{ + size_t size = 0; + size += RawSize(data.EndpointUrl); + size += RawSize(data.Server); + size += RawSize(data.ServerCertificate); + size += RawSize(data.SecurityMode); + size += RawSize(data.SecurityPolicyUri); + size += RawSizeContainer(data.UserIdentityTokens); + size += RawSize(data.TransportProfileUri); + size += RawSize(data.SecurityLevel); + return size; +} + + +template<> +std::size_t RawSize(const GetEndpointsParameters & data) +{ + size_t size = 0; + size += RawSize(data.EndpointUrl); + size += RawSizeContainer(data.LocaleIds); + size += RawSizeContainer(data.ProfileUris); + return size; +} - template<> - std::size_t RawSize(const GetEndpointsRequest& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); - return size; - } +template<> +std::size_t RawSize(const GetEndpointsRequest & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} - template<> - std::size_t RawSize(const GetEndpointsResponse& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSizeContainer(data.Endpoints); - return size; - } +template<> +std::size_t RawSize(const GetEndpointsResponse & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSizeContainer(data.Endpoints); + return size; +} /* DISABLED @@ -1052,79 +1054,79 @@ namespace OpcUa */ - template<> - std::size_t RawSize(const SignedSoftwareCertificate& data) - { - size_t size = 0; - size += RawSize(data.CertificateData); - size += RawSize(data.Signature); - return size; - } - - - template<> - std::size_t RawSize(const SignatureData& data) - { - size_t size = 0; - size += RawSize(data.Algorithm); - size += RawSize(data.Signature); - return size; - } - - - template<> - std::size_t RawSize(const CreateSessionParameters& data) - { - size_t size = 0; - size += RawSize(data.ClientDescription); - size += RawSize(data.ServerUri); - size += RawSize(data.EndpointUrl); - size += RawSize(data.SessionName); - size += RawSize(data.ClientNonce); - size += RawSize(data.ClientCertificate); - size += RawSize(data.RequestedSessionTimeout); - size += RawSize(data.MaxResponseMessageSize); - return size; - } +template<> +std::size_t RawSize(const SignedSoftwareCertificate & data) +{ + size_t size = 0; + size += RawSize(data.CertificateData); + size += RawSize(data.Signature); + return size; +} - template<> - std::size_t RawSize(const CreateSessionRequest& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); - return size; - } +template<> +std::size_t RawSize(const SignatureData & data) +{ + size_t size = 0; + size += RawSize(data.Algorithm); + size += RawSize(data.Signature); + return size; +} - template<> - std::size_t RawSize(const CreateSessionResult& data) - { - size_t size = 0; - size += RawSize(data.SessionId); - size += RawSize(data.AuthenticationToken); - size += RawSize(data.RevisedSessionTimeout); - size += RawSize(data.ServerNonce); - size += RawSize(data.ServerCertificate); - size += RawSizeContainer(data.ServerEndpoints); - size += RawSizeContainer(data.ServerSoftwareCertificates); - size += RawSize(data.ServerSignature); - size += RawSize(data.MaxRequestMessageSize); - return size; - } +template<> +std::size_t RawSize(const CreateSessionParameters & data) +{ + size_t size = 0; + size += RawSize(data.ClientDescription); + size += RawSize(data.ServerUri); + size += RawSize(data.EndpointUrl); + size += RawSize(data.SessionName); + size += RawSize(data.ClientNonce); + size += RawSize(data.ClientCertificate); + size += RawSize(data.RequestedSessionTimeout); + size += RawSize(data.MaxResponseMessageSize); + return size; +} + + +template<> +std::size_t RawSize(const CreateSessionRequest & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} - template<> - std::size_t RawSize(const CreateSessionResponse& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); - return size; - } +template<> +std::size_t RawSize(const CreateSessionResult & data) +{ + size_t size = 0; + size += RawSize(data.SessionId); + size += RawSize(data.AuthenticationToken); + size += RawSize(data.RevisedSessionTimeout); + size += RawSize(data.ServerNonce); + size += RawSize(data.ServerCertificate); + size += RawSizeContainer(data.ServerEndpoints); + size += RawSizeContainer(data.ServerSoftwareCertificates); + size += RawSize(data.ServerSignature); + size += RawSize(data.MaxRequestMessageSize); + return size; +} + + +template<> +std::size_t RawSize(const CreateSessionResponse & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} /* DISABLED @@ -1208,50 +1210,50 @@ namespace OpcUa */ - template<> - std::size_t RawSize(const ActivateSessionParameters& data) - { - size_t size = 0; - size += RawSize(data.ClientSignature); - size += RawSizeContainer(data.ClientSoftwareCertificates); - size += RawSizeContainer(data.LocaleIds); - size += RawSize(data.UserIdentityToken); - size += RawSize(data.UserTokenSignature); - return size; - } - - - template<> - std::size_t RawSize(const ActivateSessionRequest& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); - return size; - } +template<> +std::size_t RawSize(const ActivateSessionParameters & data) +{ + size_t size = 0; + size += RawSize(data.ClientSignature); + size += RawSizeContainer(data.ClientSoftwareCertificates); + size += RawSizeContainer(data.LocaleIds); + size += RawSize(data.UserIdentityToken); + size += RawSize(data.UserTokenSignature); + return size; +} + + +template<> +std::size_t RawSize(const ActivateSessionRequest & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} - template<> - std::size_t RawSize(const ActivateSessionResult& data) - { - size_t size = 0; - size += RawSize(data.ServerNonce); - size += RawSizeContainer(data.Results); - size += RawSizeContainer(data.DiagnosticInfos); - return size; - } +template<> +std::size_t RawSize(const ActivateSessionResult & data) +{ + size_t size = 0; + size += RawSize(data.ServerNonce); + size += RawSizeContainer(data.Results); + size += RawSizeContainer(data.DiagnosticInfos); + return size; +} - template<> - std::size_t RawSize(const ActivateSessionResponse& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); - return size; - } +template<> +std::size_t RawSize(const ActivateSessionResponse & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} /* DISABLED @@ -1645,37 +1647,37 @@ namespace OpcUa */ - template<> - std::size_t RawSize(const DeleteNodesItem& data) - { - size_t size = 0; - size += RawSize(data.NodeId); - size += RawSize(data.DeleteTargetReferences); - return size; - } +template<> +std::size_t RawSize(const DeleteNodesItem & data) +{ + size_t size = 0; + size += RawSize(data.NodeId); + size += RawSize(data.DeleteTargetReferences); + return size; +} - template<> - std::size_t RawSize(const DeleteNodesRequest& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSizeContainer(data.NodesToDelete); - return size; - } +template<> +std::size_t RawSize(const DeleteNodesRequest & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSizeContainer(data.NodesToDelete); + return size; +} - template<> - std::size_t RawSize(const DeleteNodesResponse& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSizeContainer(data.Results); - size += RawSizeContainer(data.DiagnosticInfos); - return size; - } +template<> +std::size_t RawSize(const DeleteNodesResponse & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSizeContainer(data.Results); + size += RawSizeContainer(data.DiagnosticInfos); + return size; +} /* DISABLED @@ -2481,50 +2483,50 @@ namespace OpcUa */ - template<> - std::size_t RawSize(const ReadValueId& data) - { - size_t size = 0; - size += RawSize(data.NodeId); - size += RawSize(data.AttributeId); - size += RawSize(data.IndexRange); - size += RawSize(data.DataEncoding); - return size; - } +template<> +std::size_t RawSize(const ReadValueId & data) +{ + size_t size = 0; + size += RawSize(data.NodeId); + size += RawSize(data.AttributeId); + size += RawSize(data.IndexRange); + size += RawSize(data.DataEncoding); + return size; +} - template<> - std::size_t RawSize(const ReadParameters& data) - { - size_t size = 0; - size += RawSize(data.MaxAge); - size += RawSize(data.TimestampsToReturn); - size += RawSizeContainer(data.AttributesToRead); - return size; - } +template<> +std::size_t RawSize(const ReadParameters & data) +{ + size_t size = 0; + size += RawSize(data.MaxAge); + size += RawSize(data.TimestampsToReturn); + size += RawSizeContainer(data.AttributesToRead); + return size; +} - template<> - std::size_t RawSize(const ReadRequest& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); - return size; - } +template<> +std::size_t RawSize(const ReadRequest & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} - template<> - std::size_t RawSize(const ReadResponse& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSizeContainer(data.Results); - size += RawSizeContainer(data.DiagnosticInfos); - return size; - } +template<> +std::size_t RawSize(const ReadResponse & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSizeContainer(data.Results); + size += RawSizeContainer(data.DiagnosticInfos); + return size; +} /* DISABLED @@ -2688,48 +2690,48 @@ namespace OpcUa */ - template<> - std::size_t RawSize(const WriteValue& data) - { - size_t size = 0; - size += RawSize(data.NodeId); - size += RawSize(data.AttributeId); - size += RawSize(data.IndexRange); - size += RawSize(data.Value); - return size; - } +template<> +std::size_t RawSize(const WriteValue & data) +{ + size_t size = 0; + size += RawSize(data.NodeId); + size += RawSize(data.AttributeId); + size += RawSize(data.IndexRange); + size += RawSize(data.Value); + return size; +} - template<> - std::size_t RawSize(const WriteParameters& data) - { - size_t size = 0; - size += RawSizeContainer(data.NodesToWrite); - return size; - } +template<> +std::size_t RawSize(const WriteParameters & data) +{ + size_t size = 0; + size += RawSizeContainer(data.NodesToWrite); + return size; +} - template<> - std::size_t RawSize(const WriteRequest& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); - return size; - } +template<> +std::size_t RawSize(const WriteRequest & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} - template<> - std::size_t RawSize(const WriteResponse& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSizeContainer(data.Results); - size += RawSizeContainer(data.DiagnosticInfos); - return size; - } +template<> +std::size_t RawSize(const WriteResponse & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSizeContainer(data.Results); + size += RawSizeContainer(data.DiagnosticInfos); + return size; +} /* DISABLED @@ -2868,59 +2870,59 @@ namespace OpcUa */ - template<> - std::size_t RawSize(const CallMethodRequest& data) - { - size_t size = 0; - size += RawSize(data.ObjectId); - size += RawSize(data.MethodId); - size += RawSizeContainer(data.InputArguments); - return size; - } +template<> +std::size_t RawSize(const CallMethodRequest & data) +{ + size_t size = 0; + size += RawSize(data.ObjectId); + size += RawSize(data.MethodId); + size += RawSizeContainer(data.InputArguments); + return size; +} - template<> - std::size_t RawSize(const CallMethodResult& data) - { - size_t size = 0; - size += RawSize(data.Status); - size += RawSizeContainer(data.InputArgumentResults); - size += RawSizeContainer(data.InputArgumentDiagnosticInfos); - size += RawSizeContainer(data.OutputArguments); - return size; - } +template<> +std::size_t RawSize(const CallMethodResult & data) +{ + size_t size = 0; + size += RawSize(data.Status); + size += RawSizeContainer(data.InputArgumentResults); + size += RawSizeContainer(data.InputArgumentDiagnosticInfos); + size += RawSizeContainer(data.OutputArguments); + return size; +} - template<> - std::size_t RawSize(const CallParameters& data) - { - size_t size = 0; - size += RawSizeContainer(data.MethodsToCall); - return size; - } +template<> +std::size_t RawSize(const CallParameters & data) +{ + size_t size = 0; + size += RawSizeContainer(data.MethodsToCall); + return size; +} - template<> - std::size_t RawSize(const CallRequest& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); - return size; - } +template<> +std::size_t RawSize(const CallRequest & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} - template<> - std::size_t RawSize(const CallResponse& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSizeContainer(data.Results); - size += RawSizeContainer(data.DiagnosticInfos); - return size; - } +template<> +std::size_t RawSize(const CallResponse & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSizeContainer(data.Results); + size += RawSizeContainer(data.DiagnosticInfos); + return size; +} /* DISABLED @@ -3075,103 +3077,103 @@ namespace OpcUa /* DISABLED template<> - std::size_t RawSize(const HistoryUpdateEventResult& data) - { - size_t size = 0; - size += RawSize(data.Status); - size += RawSize(data.EventFilterResult); - return size; - } - -*/ - -/* DISABLED - - template<> - std::size_t RawSize(const AggregateFilterResult& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Encoding); - size += RawSize(data.BodyLength); - size += RawSize(data.RevisedStartTime); - size += RawSize(data.RevisedProcessingInterval); - size += RawSize(data.RevisedAggregateConfiguration); - return size; - } - -*/ - - template<> - std::size_t RawSize(const MonitoringParameters& data) - { - size_t size = 0; - size += RawSize(data.ClientHandle); - size += RawSize(data.SamplingInterval); - size += RawSize(data.Filter); - size += RawSize(data.QueueSize); - size += RawSize(data.DiscardOldest); - return size; - } - - - template<> - std::size_t RawSize(const MonitoredItemCreateRequest& data) - { - size_t size = 0; - size += RawSize(data.ItemToMonitor); - size += RawSize(data.MonitoringMode); - size += RawSize(data.RequestedParameters); - return size; - } - - - template<> - std::size_t RawSize(const MonitoredItemCreateResult& data) - { - size_t size = 0; - size += RawSize(data.Status); - size += RawSize(data.MonitoredItemId); - size += RawSize(data.RevisedSamplingInterval); - size += RawSize(data.RevisedQueueSize); - size += RawSize(data.FilterResult); - return size; - } - - - template<> - std::size_t RawSize(const MonitoredItemsParameters& data) - { - size_t size = 0; - size += RawSize(data.SubscriptionId); - size += RawSize(data.TimestampsToReturn); - size += RawSizeContainer(data.ItemsToCreate); - return size; - } - - - template<> - std::size_t RawSize(const CreateMonitoredItemsRequest& data) + std::size_t RawSize(const HistoryUpdateEventResult& data) { size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); + size += RawSize(data.Status); + size += RawSize(data.EventFilterResult); return size; } +*/ + +/* DISABLED template<> - std::size_t RawSize(const CreateMonitoredItemsResponse& data) + std::size_t RawSize(const AggregateFilterResult& data) { size_t size = 0; size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSizeContainer(data.Results); - size += RawSizeContainer(data.DiagnosticInfos); + size += RawSize(data.Encoding); + size += RawSize(data.BodyLength); + size += RawSize(data.RevisedStartTime); + size += RawSize(data.RevisedProcessingInterval); + size += RawSize(data.RevisedAggregateConfiguration); return size; } +*/ + +template<> +std::size_t RawSize(const MonitoringParameters & data) +{ + size_t size = 0; + size += RawSize(data.ClientHandle); + size += RawSize(data.SamplingInterval); + size += RawSize(data.Filter); + size += RawSize(data.QueueSize); + size += RawSize(data.DiscardOldest); + return size; +} + + +template<> +std::size_t RawSize(const MonitoredItemCreateRequest & data) +{ + size_t size = 0; + size += RawSize(data.ItemToMonitor); + size += RawSize(data.MonitoringMode); + size += RawSize(data.RequestedParameters); + return size; +} + + +template<> +std::size_t RawSize(const MonitoredItemCreateResult & data) +{ + size_t size = 0; + size += RawSize(data.Status); + size += RawSize(data.MonitoredItemId); + size += RawSize(data.RevisedSamplingInterval); + size += RawSize(data.RevisedQueueSize); + size += RawSize(data.FilterResult); + return size; +} + + +template<> +std::size_t RawSize(const MonitoredItemsParameters & data) +{ + size_t size = 0; + size += RawSize(data.SubscriptionId); + size += RawSize(data.TimestampsToReturn); + size += RawSizeContainer(data.ItemsToCreate); + return size; +} + + +template<> +std::size_t RawSize(const CreateMonitoredItemsRequest & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} + + +template<> +std::size_t RawSize(const CreateMonitoredItemsResponse & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSizeContainer(data.Results); + size += RawSizeContainer(data.DiagnosticInfos); + return size; +} + /* DISABLED @@ -3357,185 +3359,185 @@ namespace OpcUa */ - template<> - std::size_t RawSize(const DeleteMonitoredItemsParameters& data) - { - size_t size = 0; - size += RawSize(data.SubscriptionId); - size += RawSizeContainer(data.MonitoredItemIds); - return size; - } - - - template<> - std::size_t RawSize(const DeleteMonitoredItemsRequest& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); - return size; - } - - - template<> - std::size_t RawSize(const DeleteMonitoredItemsResponse& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSizeContainer(data.Results); - size += RawSizeContainer(data.DiagnosticInfos); - return size; - } +template<> +std::size_t RawSize(const DeleteMonitoredItemsParameters & data) +{ + size_t size = 0; + size += RawSize(data.SubscriptionId); + size += RawSizeContainer(data.MonitoredItemIds); + return size; +} - template<> - std::size_t RawSize(const CreateSubscriptionParameters& data) - { - size_t size = 0; - size += RawSize(data.RequestedPublishingInterval); - size += RawSize(data.RequestedLifetimeCount); - size += RawSize(data.RequestedMaxKeepAliveCount); - size += RawSize(data.MaxNotificationsPerPublish); - size += RawSize(data.PublishingEnabled); - size += RawSize(data.Priority); - return size; - } +template<> +std::size_t RawSize(const DeleteMonitoredItemsRequest & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} - template<> - std::size_t RawSize(const CreateSubscriptionRequest& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); - return size; - } +template<> +std::size_t RawSize(const DeleteMonitoredItemsResponse & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSizeContainer(data.Results); + size += RawSizeContainer(data.DiagnosticInfos); + return size; +} - template<> - std::size_t RawSize(const SubscriptionData& data) - { - size_t size = 0; - size += RawSize(data.SubscriptionId); - size += RawSize(data.RevisedPublishingInterval); - size += RawSize(data.RevisedLifetimeCount); - size += RawSize(data.RevisedMaxKeepAliveCount); - return size; - } +template<> +std::size_t RawSize(const CreateSubscriptionParameters & data) +{ + size_t size = 0; + size += RawSize(data.RequestedPublishingInterval); + size += RawSize(data.RequestedLifetimeCount); + size += RawSize(data.RequestedMaxKeepAliveCount); + size += RawSize(data.MaxNotificationsPerPublish); + size += RawSize(data.PublishingEnabled); + size += RawSize(data.Priority); + return size; +} + + +template<> +std::size_t RawSize(const CreateSubscriptionRequest & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} - template<> - std::size_t RawSize(const CreateSubscriptionResponse& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Data); - return size; - } +template<> +std::size_t RawSize(const SubscriptionData & data) +{ + size_t size = 0; + size += RawSize(data.SubscriptionId); + size += RawSize(data.RevisedPublishingInterval); + size += RawSize(data.RevisedLifetimeCount); + size += RawSize(data.RevisedMaxKeepAliveCount); + return size; +} - template<> - std::size_t RawSize(const ModifySubscriptionParameters& data) - { - size_t size = 0; - size += RawSize(data.SubscriptionId); - size += RawSize(data.RequestedPublishingInterval); - size += RawSize(data.RequestedLifetimeCount); - size += RawSize(data.RequestedMaxKeepAliveCount); - size += RawSize(data.MaxNotificationsPerPublish); - size += RawSize(data.Priority); - return size; - } +template<> +std::size_t RawSize(const CreateSubscriptionResponse & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Data); + return size; +} - template<> - std::size_t RawSize(const ModifySubscriptionRequest& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); - return size; - } +template<> +std::size_t RawSize(const ModifySubscriptionParameters & data) +{ + size_t size = 0; + size += RawSize(data.SubscriptionId); + size += RawSize(data.RequestedPublishingInterval); + size += RawSize(data.RequestedLifetimeCount); + size += RawSize(data.RequestedMaxKeepAliveCount); + size += RawSize(data.MaxNotificationsPerPublish); + size += RawSize(data.Priority); + return size; +} + + +template<> +std::size_t RawSize(const ModifySubscriptionRequest & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} - template<> - std::size_t RawSize(const ModifySubscriptionResult& data) - { - size_t size = 0; - size += RawSize(data.RevisedPublishingInterval); - size += RawSize(data.RevisedLifetimeCount); - size += RawSize(data.RevisedMaxKeepAliveCount); - return size; - } +template<> +std::size_t RawSize(const ModifySubscriptionResult & data) +{ + size_t size = 0; + size += RawSize(data.RevisedPublishingInterval); + size += RawSize(data.RevisedLifetimeCount); + size += RawSize(data.RevisedMaxKeepAliveCount); + return size; +} - template<> - std::size_t RawSize(const ModifySubscriptionResponse& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); - return size; - } +template<> +std::size_t RawSize(const ModifySubscriptionResponse & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} - template<> - std::size_t RawSize(const PublishingModeParameters& data) - { - size_t size = 0; - size += RawSize(data.PublishingEnabled); - size += RawSizeContainer(data.SubscriptionIds); - return size; - } +template<> +std::size_t RawSize(const PublishingModeParameters & data) +{ + size_t size = 0; + size += RawSize(data.PublishingEnabled); + size += RawSizeContainer(data.SubscriptionIds); + return size; +} - template<> - std::size_t RawSize(const SetPublishingModeRequest& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); - return size; - } +template<> +std::size_t RawSize(const SetPublishingModeRequest & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} - template<> - std::size_t RawSize(const PublishingModeResult& data) - { - size_t size = 0; - size += RawSizeContainer(data.Results); - size += RawSizeContainer(data.DiagnosticInfos); - return size; - } +template<> +std::size_t RawSize(const PublishingModeResult & data) +{ + size_t size = 0; + size += RawSizeContainer(data.Results); + size += RawSizeContainer(data.DiagnosticInfos); + return size; +} - template<> - std::size_t RawSize(const SetPublishingModeResponse& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Result); - return size; - } +template<> +std::size_t RawSize(const SetPublishingModeResponse & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Result); + return size; +} - template<> - std::size_t RawSize(const NotificationMessage& data) - { - size_t size = 0; - size += RawSize(data.SequenceNumber); - size += RawSize(data.PublishTime); - size += RawSizeContainer(data.NotificationData); - return size; - } +template<> +std::size_t RawSize(const NotificationMessage & data) +{ + size_t size = 0; + size += RawSize(data.SequenceNumber); + size += RawSize(data.PublishTime); + size += RawSizeContainer(data.NotificationData); + return size; +} /* DISABLED @@ -3664,82 +3666,82 @@ namespace OpcUa */ - template<> - std::size_t RawSize(const SubscriptionAcknowledgement& data) - { - size_t size = 0; - size += RawSize(data.SubscriptionId); - size += RawSize(data.SequenceNumber); - return size; - } - - - template<> - std::size_t RawSize(const PublishRequest& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSizeContainer(data.SubscriptionAcknowledgements); - return size; - } +template<> +std::size_t RawSize(const SubscriptionAcknowledgement & data) +{ + size_t size = 0; + size += RawSize(data.SubscriptionId); + size += RawSize(data.SequenceNumber); + return size; +} - template<> - std::size_t RawSize(const PublishResult& data) - { - size_t size = 0; - size += RawSize(data.SubscriptionId); - size += RawSizeContainer(data.AvailableSequenceNumbers); - size += RawSize(data.MoreNotifications); - size += RawSize(data.NotificationMessage); - size += RawSizeContainer(data.Results); - size += RawSizeContainer(data.DiagnosticInfos); - return size; - } +template<> +std::size_t RawSize(const PublishRequest & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSizeContainer(data.SubscriptionAcknowledgements); + return size; +} - template<> - std::size_t RawSize(const PublishResponse& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); - return size; - } +template<> +std::size_t RawSize(const PublishResult & data) +{ + size_t size = 0; + size += RawSize(data.SubscriptionId); + size += RawSizeContainer(data.AvailableSequenceNumbers); + size += RawSize(data.MoreNotifications); + size += RawSize(data.NotificationMessage); + size += RawSizeContainer(data.Results); + size += RawSizeContainer(data.DiagnosticInfos); + return size; +} + + +template<> +std::size_t RawSize(const PublishResponse & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} - template<> - std::size_t RawSize(const RepublishParameters& data) - { - size_t size = 0; - size += RawSize(data.SubscriptionId); - size += RawSize(data.RetransmitSequenceNumber); - return size; - } +template<> +std::size_t RawSize(const RepublishParameters & data) +{ + size_t size = 0; + size += RawSize(data.SubscriptionId); + size += RawSize(data.RetransmitSequenceNumber); + return size; +} - template<> - std::size_t RawSize(const RepublishRequest& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.Parameters); - return size; - } +template<> +std::size_t RawSize(const RepublishRequest & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.Parameters); + return size; +} - template<> - std::size_t RawSize(const RepublishResponse& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSize(data.NotificationMessage); - return size; - } +template<> +std::size_t RawSize(const RepublishResponse & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSize(data.NotificationMessage); + return size; +} /* DISABLED @@ -3809,27 +3811,27 @@ namespace OpcUa */ - template<> - std::size_t RawSize(const DeleteSubscriptionsRequest& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSizeContainer(data.SubscriptionIds); - return size; - } +template<> +std::size_t RawSize(const DeleteSubscriptionsRequest & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSizeContainer(data.SubscriptionIds); + return size; +} - template<> - std::size_t RawSize(const DeleteSubscriptionsResponse& data) - { - size_t size = 0; - size += RawSize(data.TypeId); - size += RawSize(data.Header); - size += RawSizeContainer(data.Results); - size += RawSizeContainer(data.DiagnosticInfos); - return size; - } +template<> +std::size_t RawSize(const DeleteSubscriptionsResponse & data) +{ + size_t size = 0; + size += RawSize(data.TypeId); + size += RawSize(data.Header); + size += RawSizeContainer(data.Results); + size += RawSizeContainer(data.DiagnosticInfos); + return size; +} /* DISABLED @@ -4409,18 +4411,18 @@ namespace OpcUa */ - template<> - std::size_t RawSize(const Annotation& data) - { - size_t size = 0; - size += RawSize(data.Message); - size += RawSize(data.UserName); - size += RawSize(data.AnnotationTime); - return size; - } +template<> +std::size_t RawSize(const Annotation & data) +{ + size_t size = 0; + size += RawSize(data.Message); + size += RawSize(data.UserName); + size += RawSize(data.AnnotationTime); + return size; +} - } +} } // namespace - + diff --git a/src/protocol/serialize_auto.cpp b/src/protocol/serialize_auto.cpp index facb9476..049ea030 100644 --- a/src/protocol/serialize_auto.cpp +++ b/src/protocol/serialize_auto.cpp @@ -19,183 +19,183 @@ namespace OpcUa { - namespace Binary - { +namespace Binary +{ - template<> - void DataSerializer::Serialize(const OpenFileMode& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const OpenFileMode & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const NodeClass& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const NodeClass & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const ApplicationType& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const ApplicationType & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const MessageSecurityMode& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const MessageSecurityMode & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const UserTokenType& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const UserTokenType & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const SecurityTokenRequestType& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const SecurityTokenRequestType & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const NodeAttributesMask& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const NodeAttributesMask & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const AttributeWriteMask& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const AttributeWriteMask & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const BrowseDirection& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const BrowseDirection & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const BrowseResultMask& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const BrowseResultMask & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const ComplianceLevel& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const ComplianceLevel & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const FilterOperator& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const FilterOperator & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const TimestampsToReturn& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const TimestampsToReturn & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const HistoryUpdateType& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const HistoryUpdateType & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const PerformUpdateType& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const PerformUpdateType & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const MonitoringMode& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const MonitoringMode & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const DataChangeTrigger& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const DataChangeTrigger & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const DeadbandType& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const DeadbandType & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const EnumeratedTestType& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const EnumeratedTestType & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const RedundancySupport& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const RedundancySupport & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const ServerState& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const ServerState & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const ModelChangeStructureVerbMask& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const ModelChangeStructureVerbMask & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const AxisScaleEnumeration& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const AxisScaleEnumeration & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const ExceptionDeviationFormat& data) - { - *this << static_cast(data); - } +template<> +void DataSerializer::Serialize(const ExceptionDeviationFormat & data) +{ + *this << static_cast(data); +} - template<> - void DataSerializer::Serialize(const XmlElement& data) - { - *this << data.Length; - SerializeContainer(*this, data.Value); - } +template<> +void DataSerializer::Serialize(const XmlElement & data) +{ + *this << data.Length; + SerializeContainer(*this, data.Value); +} /* DISABLED @@ -279,13 +279,14 @@ namespace OpcUa */ - template<> - void DataSerializer::Serialize(const ExtensionObject& data) - { - *this << data.TypeId; - *this << data.Encoding; - if ((data.Encoding) & (1<<(0))) *this << data.Body; - } +template<> +void DataSerializer::Serialize(const ExtensionObject & data) +{ + *this << data.TypeId; + *this << data.Encoding; + + if ((data.Encoding) & (1 << (0))) { *this << data.Body; } +} /* DISABLED @@ -656,17 +657,17 @@ namespace OpcUa */ - template<> - void DataSerializer::Serialize(const ApplicationDescription& data) - { - *this << data.ApplicationUri; - *this << data.ProductUri; - *this << data.ApplicationName; - *this << data.ApplicationType; - *this << data.GatewayServerUri; - *this << data.DiscoveryProfileUri; - SerializeContainer(*this, data.DiscoveryUrls); - } +template<> +void DataSerializer::Serialize(const ApplicationDescription & data) +{ + *this << data.ApplicationUri; + *this << data.ProductUri; + *this << data.ApplicationName; + *this << data.ApplicationType; + *this << data.GatewayServerUri; + *this << data.DiscoveryProfileUri; + SerializeContainer(*this, data.DiscoveryUrls); +} /* DISABLED @@ -757,56 +758,56 @@ namespace OpcUa */ - template<> - void DataSerializer::Serialize(const UserTokenPolicy& data) - { - *this << data.PolicyId; - *this << data.TokenType; - *this << data.IssuedTokenType; - *this << data.IssuerEndpointUrl; - *this << data.SecurityPolicyUri; - } - - - template<> - void DataSerializer::Serialize(const EndpointDescription& data) - { - *this << data.EndpointUrl; - *this << data.Server; - *this << data.ServerCertificate; - *this << data.SecurityMode; - *this << data.SecurityPolicyUri; - SerializeContainer(*this, data.UserIdentityTokens); - *this << data.TransportProfileUri; - *this << data.SecurityLevel; - } +template<> +void DataSerializer::Serialize(const UserTokenPolicy & data) +{ + *this << data.PolicyId; + *this << data.TokenType; + *this << data.IssuedTokenType; + *this << data.IssuerEndpointUrl; + *this << data.SecurityPolicyUri; +} - template<> - void DataSerializer::Serialize(const GetEndpointsParameters& data) - { - *this << data.EndpointUrl; - SerializeContainer(*this, data.LocaleIds); - SerializeContainer(*this, data.ProfileUris); - } +template<> +void DataSerializer::Serialize(const EndpointDescription & data) +{ + *this << data.EndpointUrl; + *this << data.Server; + *this << data.ServerCertificate; + *this << data.SecurityMode; + *this << data.SecurityPolicyUri; + SerializeContainer(*this, data.UserIdentityTokens); + *this << data.TransportProfileUri; + *this << data.SecurityLevel; +} + + +template<> +void DataSerializer::Serialize(const GetEndpointsParameters & data) +{ + *this << data.EndpointUrl; + SerializeContainer(*this, data.LocaleIds); + SerializeContainer(*this, data.ProfileUris); +} - template<> - void DataSerializer::Serialize(const GetEndpointsRequest& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const GetEndpointsRequest & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} - template<> - void DataSerializer::Serialize(const GetEndpointsResponse& data) - { - *this << data.TypeId; - *this << data.Header; - SerializeContainer(*this, data.Endpoints); - } +template<> +void DataSerializer::Serialize(const GetEndpointsResponse & data) +{ + *this << data.TypeId; + *this << data.Header; + SerializeContainer(*this, data.Endpoints); +} /* DISABLED @@ -944,67 +945,67 @@ namespace OpcUa */ - template<> - void DataSerializer::Serialize(const SignedSoftwareCertificate& data) - { - *this << data.CertificateData; - *this << data.Signature; - } - - - template<> - void DataSerializer::Serialize(const SignatureData& data) - { - *this << data.Algorithm; - *this << data.Signature; - } - - - template<> - void DataSerializer::Serialize(const CreateSessionParameters& data) - { - *this << data.ClientDescription; - *this << data.ServerUri; - *this << data.EndpointUrl; - *this << data.SessionName; - *this << data.ClientNonce; - *this << data.ClientCertificate; - *this << data.RequestedSessionTimeout; - *this << data.MaxResponseMessageSize; - } +template<> +void DataSerializer::Serialize(const SignedSoftwareCertificate & data) +{ + *this << data.CertificateData; + *this << data.Signature; +} - template<> - void DataSerializer::Serialize(const CreateSessionRequest& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const SignatureData & data) +{ + *this << data.Algorithm; + *this << data.Signature; +} - template<> - void DataSerializer::Serialize(const CreateSessionResult& data) - { - *this << data.SessionId; - *this << data.AuthenticationToken; - *this << data.RevisedSessionTimeout; - *this << data.ServerNonce; - *this << data.ServerCertificate; - SerializeContainer(*this, data.ServerEndpoints); - SerializeContainer(*this, data.ServerSoftwareCertificates); - *this << data.ServerSignature; - *this << data.MaxRequestMessageSize; - } +template<> +void DataSerializer::Serialize(const CreateSessionParameters & data) +{ + *this << data.ClientDescription; + *this << data.ServerUri; + *this << data.EndpointUrl; + *this << data.SessionName; + *this << data.ClientNonce; + *this << data.ClientCertificate; + *this << data.RequestedSessionTimeout; + *this << data.MaxResponseMessageSize; +} + + +template<> +void DataSerializer::Serialize(const CreateSessionRequest & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} - template<> - void DataSerializer::Serialize(const CreateSessionResponse& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const CreateSessionResult & data) +{ + *this << data.SessionId; + *this << data.AuthenticationToken; + *this << data.RevisedSessionTimeout; + *this << data.ServerNonce; + *this << data.ServerCertificate; + SerializeContainer(*this, data.ServerEndpoints); + SerializeContainer(*this, data.ServerSoftwareCertificates); + *this << data.ServerSignature; + *this << data.MaxRequestMessageSize; +} + + +template<> +void DataSerializer::Serialize(const CreateSessionResponse & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} /* DISABLED @@ -1078,42 +1079,42 @@ namespace OpcUa */ - template<> - void DataSerializer::Serialize(const ActivateSessionParameters& data) - { - *this << data.ClientSignature; - SerializeContainer(*this, data.ClientSoftwareCertificates); - SerializeContainer(*this, data.LocaleIds); - *this << data.UserIdentityToken; - *this << data.UserTokenSignature; - } +template<> +void DataSerializer::Serialize(const ActivateSessionParameters & data) +{ + *this << data.ClientSignature; + SerializeContainer(*this, data.ClientSoftwareCertificates); + SerializeContainer(*this, data.LocaleIds); + *this << data.UserIdentityToken; + *this << data.UserTokenSignature; +} - template<> - void DataSerializer::Serialize(const ActivateSessionRequest& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const ActivateSessionRequest & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} - template<> - void DataSerializer::Serialize(const ActivateSessionResult& data) - { - *this << data.ServerNonce; - SerializeContainer(*this, data.Results); - SerializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataSerializer::Serialize(const ActivateSessionResult & data) +{ + *this << data.ServerNonce; + SerializeContainer(*this, data.Results); + SerializeContainer(*this, data.DiagnosticInfos); +} - template<> - void DataSerializer::Serialize(const ActivateSessionResponse& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const ActivateSessionResponse & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} /* DISABLED @@ -1461,31 +1462,31 @@ namespace OpcUa */ - template<> - void DataSerializer::Serialize(const DeleteNodesItem& data) - { - *this << data.NodeId; - *this << data.DeleteTargetReferences; - } +template<> +void DataSerializer::Serialize(const DeleteNodesItem & data) +{ + *this << data.NodeId; + *this << data.DeleteTargetReferences; +} - template<> - void DataSerializer::Serialize(const DeleteNodesRequest& data) - { - *this << data.TypeId; - *this << data.Header; - SerializeContainer(*this, data.NodesToDelete); - } +template<> +void DataSerializer::Serialize(const DeleteNodesRequest & data) +{ + *this << data.TypeId; + *this << data.Header; + SerializeContainer(*this, data.NodesToDelete); +} - template<> - void DataSerializer::Serialize(const DeleteNodesResponse& data) - { - *this << data.TypeId; - *this << data.Header; - SerializeContainer(*this, data.Results); - SerializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataSerializer::Serialize(const DeleteNodesResponse & data) +{ + *this << data.TypeId; + *this << data.Header; + SerializeContainer(*this, data.Results); + SerializeContainer(*this, data.DiagnosticInfos); +} /* DISABLED @@ -2179,42 +2180,42 @@ namespace OpcUa */ - template<> - void DataSerializer::Serialize(const ReadValueId& data) - { - *this << data.NodeId; - *this << data.AttributeId; - *this << data.IndexRange; - *this << data.DataEncoding; - } +template<> +void DataSerializer::Serialize(const ReadValueId & data) +{ + *this << data.NodeId; + *this << data.AttributeId; + *this << data.IndexRange; + *this << data.DataEncoding; +} - template<> - void DataSerializer::Serialize(const ReadParameters& data) - { - *this << data.MaxAge; - *this << data.TimestampsToReturn; - SerializeContainer(*this, data.AttributesToRead); - } +template<> +void DataSerializer::Serialize(const ReadParameters & data) +{ + *this << data.MaxAge; + *this << data.TimestampsToReturn; + SerializeContainer(*this, data.AttributesToRead); +} - template<> - void DataSerializer::Serialize(const ReadRequest& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const ReadRequest & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} - template<> - void DataSerializer::Serialize(const ReadResponse& data) - { - *this << data.TypeId; - *this << data.Header; - SerializeContainer(*this, data.Results); - SerializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataSerializer::Serialize(const ReadResponse & data) +{ + *this << data.TypeId; + *this << data.Header; + SerializeContainer(*this, data.Results); + SerializeContainer(*this, data.DiagnosticInfos); +} /* DISABLED @@ -2356,40 +2357,40 @@ namespace OpcUa */ - template<> - void DataSerializer::Serialize(const WriteValue& data) - { - *this << data.NodeId; - *this << data.AttributeId; - *this << data.IndexRange; - *this << data.Value; - } +template<> +void DataSerializer::Serialize(const WriteValue & data) +{ + *this << data.NodeId; + *this << data.AttributeId; + *this << data.IndexRange; + *this << data.Value; +} - template<> - void DataSerializer::Serialize(const WriteParameters& data) - { - SerializeContainer(*this, data.NodesToWrite); - } +template<> +void DataSerializer::Serialize(const WriteParameters & data) +{ + SerializeContainer(*this, data.NodesToWrite); +} - template<> - void DataSerializer::Serialize(const WriteRequest& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const WriteRequest & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} - template<> - void DataSerializer::Serialize(const WriteResponse& data) - { - *this << data.TypeId; - *this << data.Header; - SerializeContainer(*this, data.Results); - SerializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataSerializer::Serialize(const WriteResponse & data) +{ + *this << data.TypeId; + *this << data.Header; + SerializeContainer(*this, data.Results); + SerializeContainer(*this, data.DiagnosticInfos); +} /* DISABLED @@ -2508,49 +2509,49 @@ namespace OpcUa */ - template<> - void DataSerializer::Serialize(const CallMethodRequest& data) - { - *this << data.ObjectId; - *this << data.MethodId; - SerializeContainer(*this, data.InputArguments); - } +template<> +void DataSerializer::Serialize(const CallMethodRequest & data) +{ + *this << data.ObjectId; + *this << data.MethodId; + SerializeContainer(*this, data.InputArguments); +} - template<> - void DataSerializer::Serialize(const CallMethodResult& data) - { - *this << data.Status; - SerializeContainer(*this, data.InputArgumentResults); - SerializeContainer(*this, data.InputArgumentDiagnosticInfos); - SerializeContainer(*this, data.OutputArguments); - } +template<> +void DataSerializer::Serialize(const CallMethodResult & data) +{ + *this << data.Status; + SerializeContainer(*this, data.InputArgumentResults); + SerializeContainer(*this, data.InputArgumentDiagnosticInfos); + SerializeContainer(*this, data.OutputArguments); +} - template<> - void DataSerializer::Serialize(const CallParameters& data) - { - SerializeContainer(*this, data.MethodsToCall); - } +template<> +void DataSerializer::Serialize(const CallParameters & data) +{ + SerializeContainer(*this, data.MethodsToCall); +} - template<> - void DataSerializer::Serialize(const CallRequest& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const CallRequest & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} - template<> - void DataSerializer::Serialize(const CallResponse& data) - { - *this << data.TypeId; - *this << data.Header; - SerializeContainer(*this, data.Results); - SerializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataSerializer::Serialize(const CallResponse & data) +{ + *this << data.TypeId; + *this << data.Header; + SerializeContainer(*this, data.Results); + SerializeContainer(*this, data.DiagnosticInfos); +} /* DISABLED @@ -2710,63 +2711,63 @@ namespace OpcUa */ - template<> - void DataSerializer::Serialize(const MonitoringParameters& data) - { - *this << data.ClientHandle; - *this << data.SamplingInterval; - *this << data.Filter; - *this << data.QueueSize; - *this << data.DiscardOldest; - } +template<> +void DataSerializer::Serialize(const MonitoringParameters & data) +{ + *this << data.ClientHandle; + *this << data.SamplingInterval; + *this << data.Filter; + *this << data.QueueSize; + *this << data.DiscardOldest; +} - template<> - void DataSerializer::Serialize(const MonitoredItemCreateRequest& data) - { - *this << data.ItemToMonitor; - *this << data.MonitoringMode; - *this << data.RequestedParameters; - } +template<> +void DataSerializer::Serialize(const MonitoredItemCreateRequest & data) +{ + *this << data.ItemToMonitor; + *this << data.MonitoringMode; + *this << data.RequestedParameters; +} - template<> - void DataSerializer::Serialize(const MonitoredItemCreateResult& data) - { - *this << data.Status; - *this << data.MonitoredItemId; - *this << data.RevisedSamplingInterval; - *this << data.RevisedQueueSize; - *this << data.FilterResult; - } +template<> +void DataSerializer::Serialize(const MonitoredItemCreateResult & data) +{ + *this << data.Status; + *this << data.MonitoredItemId; + *this << data.RevisedSamplingInterval; + *this << data.RevisedQueueSize; + *this << data.FilterResult; +} - template<> - void DataSerializer::Serialize(const MonitoredItemsParameters& data) - { - *this << data.SubscriptionId; - *this << data.TimestampsToReturn; - SerializeContainer(*this, data.ItemsToCreate); - } +template<> +void DataSerializer::Serialize(const MonitoredItemsParameters & data) +{ + *this << data.SubscriptionId; + *this << data.TimestampsToReturn; + SerializeContainer(*this, data.ItemsToCreate); +} - template<> - void DataSerializer::Serialize(const CreateMonitoredItemsRequest& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const CreateMonitoredItemsRequest & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} - template<> - void DataSerializer::Serialize(const CreateMonitoredItemsResponse& data) - { - *this << data.TypeId; - *this << data.Header; - SerializeContainer(*this, data.Results); - SerializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataSerializer::Serialize(const CreateMonitoredItemsResponse & data) +{ + *this << data.TypeId; + *this << data.Header; + SerializeContainer(*this, data.Results); + SerializeContainer(*this, data.DiagnosticInfos); +} /* DISABLED @@ -2927,153 +2928,153 @@ namespace OpcUa */ - template<> - void DataSerializer::Serialize(const DeleteMonitoredItemsParameters& data) - { - *this << data.SubscriptionId; - SerializeContainer(*this, data.MonitoredItemIds); - } +template<> +void DataSerializer::Serialize(const DeleteMonitoredItemsParameters & data) +{ + *this << data.SubscriptionId; + SerializeContainer(*this, data.MonitoredItemIds); +} - template<> - void DataSerializer::Serialize(const DeleteMonitoredItemsRequest& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const DeleteMonitoredItemsRequest & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} - template<> - void DataSerializer::Serialize(const DeleteMonitoredItemsResponse& data) - { - *this << data.TypeId; - *this << data.Header; - SerializeContainer(*this, data.Results); - SerializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataSerializer::Serialize(const DeleteMonitoredItemsResponse & data) +{ + *this << data.TypeId; + *this << data.Header; + SerializeContainer(*this, data.Results); + SerializeContainer(*this, data.DiagnosticInfos); +} - template<> - void DataSerializer::Serialize(const CreateSubscriptionParameters& data) - { - *this << data.RequestedPublishingInterval; - *this << data.RequestedLifetimeCount; - *this << data.RequestedMaxKeepAliveCount; - *this << data.MaxNotificationsPerPublish; - *this << data.PublishingEnabled; - *this << data.Priority; - } +template<> +void DataSerializer::Serialize(const CreateSubscriptionParameters & data) +{ + *this << data.RequestedPublishingInterval; + *this << data.RequestedLifetimeCount; + *this << data.RequestedMaxKeepAliveCount; + *this << data.MaxNotificationsPerPublish; + *this << data.PublishingEnabled; + *this << data.Priority; +} - template<> - void DataSerializer::Serialize(const CreateSubscriptionRequest& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const CreateSubscriptionRequest & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} - template<> - void DataSerializer::Serialize(const SubscriptionData& data) - { - *this << data.SubscriptionId; - *this << data.RevisedPublishingInterval; - *this << data.RevisedLifetimeCount; - *this << data.RevisedMaxKeepAliveCount; - } +template<> +void DataSerializer::Serialize(const SubscriptionData & data) +{ + *this << data.SubscriptionId; + *this << data.RevisedPublishingInterval; + *this << data.RevisedLifetimeCount; + *this << data.RevisedMaxKeepAliveCount; +} - template<> - void DataSerializer::Serialize(const CreateSubscriptionResponse& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Data; - } +template<> +void DataSerializer::Serialize(const CreateSubscriptionResponse & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Data; +} - template<> - void DataSerializer::Serialize(const ModifySubscriptionParameters& data) - { - *this << data.SubscriptionId; - *this << data.RequestedPublishingInterval; - *this << data.RequestedLifetimeCount; - *this << data.RequestedMaxKeepAliveCount; - *this << data.MaxNotificationsPerPublish; - *this << data.Priority; - } +template<> +void DataSerializer::Serialize(const ModifySubscriptionParameters & data) +{ + *this << data.SubscriptionId; + *this << data.RequestedPublishingInterval; + *this << data.RequestedLifetimeCount; + *this << data.RequestedMaxKeepAliveCount; + *this << data.MaxNotificationsPerPublish; + *this << data.Priority; +} - template<> - void DataSerializer::Serialize(const ModifySubscriptionRequest& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const ModifySubscriptionRequest & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} - template<> - void DataSerializer::Serialize(const ModifySubscriptionResult& data) - { - *this << data.RevisedPublishingInterval; - *this << data.RevisedLifetimeCount; - *this << data.RevisedMaxKeepAliveCount; - } +template<> +void DataSerializer::Serialize(const ModifySubscriptionResult & data) +{ + *this << data.RevisedPublishingInterval; + *this << data.RevisedLifetimeCount; + *this << data.RevisedMaxKeepAliveCount; +} - template<> - void DataSerializer::Serialize(const ModifySubscriptionResponse& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const ModifySubscriptionResponse & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} - template<> - void DataSerializer::Serialize(const PublishingModeParameters& data) - { - *this << data.PublishingEnabled; - SerializeContainer(*this, data.SubscriptionIds); - } +template<> +void DataSerializer::Serialize(const PublishingModeParameters & data) +{ + *this << data.PublishingEnabled; + SerializeContainer(*this, data.SubscriptionIds); +} - template<> - void DataSerializer::Serialize(const SetPublishingModeRequest& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const SetPublishingModeRequest & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} - template<> - void DataSerializer::Serialize(const PublishingModeResult& data) - { - SerializeContainer(*this, data.Results); - SerializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataSerializer::Serialize(const PublishingModeResult & data) +{ + SerializeContainer(*this, data.Results); + SerializeContainer(*this, data.DiagnosticInfos); +} - template<> - void DataSerializer::Serialize(const SetPublishingModeResponse& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Result; - } +template<> +void DataSerializer::Serialize(const SetPublishingModeResponse & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Result; +} - template<> - void DataSerializer::Serialize(const NotificationMessage& data) - { - *this << data.SequenceNumber; - *this << data.PublishTime; - SerializeContainer(*this, data.NotificationData); - } +template<> +void DataSerializer::Serialize(const NotificationMessage & data) +{ + *this << data.SequenceNumber; + *this << data.PublishTime; + SerializeContainer(*this, data.NotificationData); +} /* DISABLED @@ -3184,68 +3185,68 @@ namespace OpcUa */ - template<> - void DataSerializer::Serialize(const SubscriptionAcknowledgement& data) - { - *this << data.SubscriptionId; - *this << data.SequenceNumber; - } +template<> +void DataSerializer::Serialize(const SubscriptionAcknowledgement & data) +{ + *this << data.SubscriptionId; + *this << data.SequenceNumber; +} - template<> - void DataSerializer::Serialize(const PublishRequest& data) - { - *this << data.TypeId; - *this << data.Header; - SerializeContainer(*this, data.SubscriptionAcknowledgements); - } +template<> +void DataSerializer::Serialize(const PublishRequest & data) +{ + *this << data.TypeId; + *this << data.Header; + SerializeContainer(*this, data.SubscriptionAcknowledgements); +} - template<> - void DataSerializer::Serialize(const PublishResult& data) - { - *this << data.SubscriptionId; - SerializeContainer(*this, data.AvailableSequenceNumbers); - *this << data.MoreNotifications; - *this << data.NotificationMessage; - SerializeContainer(*this, data.Results); - SerializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataSerializer::Serialize(const PublishResult & data) +{ + *this << data.SubscriptionId; + SerializeContainer(*this, data.AvailableSequenceNumbers); + *this << data.MoreNotifications; + *this << data.NotificationMessage; + SerializeContainer(*this, data.Results); + SerializeContainer(*this, data.DiagnosticInfos); +} - template<> - void DataSerializer::Serialize(const PublishResponse& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const PublishResponse & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} - template<> - void DataSerializer::Serialize(const RepublishParameters& data) - { - *this << data.SubscriptionId; - *this << data.RetransmitSequenceNumber; - } +template<> +void DataSerializer::Serialize(const RepublishParameters & data) +{ + *this << data.SubscriptionId; + *this << data.RetransmitSequenceNumber; +} - template<> - void DataSerializer::Serialize(const RepublishRequest& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.Parameters; - } +template<> +void DataSerializer::Serialize(const RepublishRequest & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.Parameters; +} - template<> - void DataSerializer::Serialize(const RepublishResponse& data) - { - *this << data.TypeId; - *this << data.Header; - *this << data.NotificationMessage; - } +template<> +void DataSerializer::Serialize(const RepublishResponse & data) +{ + *this << data.TypeId; + *this << data.Header; + *this << data.NotificationMessage; +} /* DISABLED @@ -3305,23 +3306,23 @@ namespace OpcUa */ - template<> - void DataSerializer::Serialize(const DeleteSubscriptionsRequest& data) - { - *this << data.TypeId; - *this << data.Header; - SerializeContainer(*this, data.SubscriptionIds); - } +template<> +void DataSerializer::Serialize(const DeleteSubscriptionsRequest & data) +{ + *this << data.TypeId; + *this << data.Header; + SerializeContainer(*this, data.SubscriptionIds); +} - template<> - void DataSerializer::Serialize(const DeleteSubscriptionsResponse& data) - { - *this << data.TypeId; - *this << data.Header; - SerializeContainer(*this, data.Results); - SerializeContainer(*this, data.DiagnosticInfos); - } +template<> +void DataSerializer::Serialize(const DeleteSubscriptionsResponse & data) +{ + *this << data.TypeId; + *this << data.Header; + SerializeContainer(*this, data.Results); + SerializeContainer(*this, data.DiagnosticInfos); +} /* DISABLED @@ -3837,16 +3838,16 @@ namespace OpcUa */ - template<> - void DataSerializer::Serialize(const Annotation& data) - { - *this << data.Message; - *this << data.UserName; - *this << data.AnnotationTime; - } +template<> +void DataSerializer::Serialize(const Annotation & data) +{ + *this << data.Message; + *this << data.UserName; + *this << data.AnnotationTime; +} - } +} } // namespace - + diff --git a/src/protocol/session.cpp b/src/protocol/session.cpp index 14495046..3bdfa432 100644 --- a/src/protocol/session.cpp +++ b/src/protocol/session.cpp @@ -2,12 +2,12 @@ namespace OpcUa { - ExpandedNodeId GenerateSessionId() - { - static uint32_t sessionId; - return ExpandedNodeId(NumericNodeId(++sessionId + 5, 0)); - } +ExpandedNodeId GenerateSessionId() +{ + static uint32_t sessionId; + return ExpandedNodeId(NumericNodeId(++sessionId + 5, 0)); +} } - + diff --git a/src/protocol/status_codes.cpp b/src/protocol/status_codes.cpp index 9a59a8b0..30eb1fd0 100644 --- a/src/protocol/status_codes.cpp +++ b/src/protocol/status_codes.cpp @@ -17,7 +17,7 @@ void OpcUa::CheckStatusCode(StatusCode code) { if (code == StatusCode::Good) - return; + { return; } throw std::runtime_error(OpcUa::ToString(code)); } diff --git a/src/protocol/string_utils.cpp b/src/protocol/string_utils.cpp index 0d3d6386..fd25414d 100644 --- a/src/protocol/string_utils.cpp +++ b/src/protocol/string_utils.cpp @@ -27,52 +27,59 @@ #include -std::string OpcUa::ToString(const NodeId& id) +std::string OpcUa::ToString(const NodeId & id) { std::stringstream stream; if (id.HasServerIndex()) + { + stream << "srv=" << id.ServerIndex << ";"; + } + { - stream << "srv=" << id.ServerIndex << ";"; - } - { - if (id.HasNamespaceURI()) - stream << "nsu=" << id.NamespaceURI << ";"; + if (id.HasNamespaceURI()) + { stream << "nsu=" << id.NamespaceURI << ";"; } } stream << "ns=" << id.GetNamespaceIndex() << ";"; + if (id.IsInteger()) - { - stream << "i=" << id.GetIntegerIdentifier() << ";"; - } + { + stream << "i=" << id.GetIntegerIdentifier() << ";"; + } + #ifndef __ENABLE_EMBEDDED_PROFILE__ - else if(id.IsString()) - { - stream << "s=" << id.GetStringIdentifier() << ";"; - } + + else if (id.IsString()) + { + stream << "s=" << id.GetStringIdentifier() << ";"; + } + else if (id.IsGuid()) - { - stream << "g=" << ToString(id.GetGuidIdentifier()) << ";"; - } + { + stream << "g=" << ToString(id.GetGuidIdentifier()) << ";"; + } + #endif return stream.str(); } -std::string OpcUa::ToString(const OpcUa::Guid& guid) +std::string OpcUa::ToString(const OpcUa::Guid & guid) { char buf[36] = {0}; sprintf(buf, "%08X-%04X-%04X-%02X%02X%02X%02X%02X%02X%02X%02X", guid.Data1, guid.Data2, guid.Data3, guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]); return buf; } -OpcUa::Guid OpcUa::ToGuid(const std::string& str) +OpcUa::Guid OpcUa::ToGuid(const std::string & str) { if (str.size() != 35) - { - return OpcUa::Guid(); - } + { + return OpcUa::Guid(); + } + Guid guid; unsigned data1 = 0; @@ -87,7 +94,7 @@ OpcUa::Guid OpcUa::ToGuid(const std::string& str) unsigned data10 = 0; unsigned data11 = 0; const int parts = sscanf(str.c_str(), "%08X-%04X-%04X-%02X%02X%02X%02X%02X%02X%02X%02X", - &data1, &data2, &data3, &data4, &data5, &data6, &data7, &data8, &data9, &data10, &data11); + &data1, &data2, &data3, &data4, &data5, &data6, &data7, &data8, &data9, &data10, &data11); guid.Data1 = static_cast(data1); guid.Data2 = static_cast(data2); @@ -102,154 +109,173 @@ OpcUa::Guid OpcUa::ToGuid(const std::string& str) guid.Data4[7] = static_cast(data11); if (parts != 11) - { - return OpcUa::Guid(); - } + { + return OpcUa::Guid(); + } + return guid; } namespace { - std::string GetNodeField(const std::string& data, const char* field) - { - std::size_t colon = 0; - do +std::string GetNodeField(const std::string & data, const char * field) +{ + std::size_t colon = 0; + + do { // if something found at previous cycle if (colon) - { - ++colon; - } + { + ++colon; + } + // find field string colon = data.find(field, colon); // if found nothing if (colon == std::string::npos) - { - return std::string(); - } + { + return std::string(); + } + // if found at the begin if (colon == 0) - { - break; - } + { + break; + } } - // if finding 's=' in the 'ns=1;i-3;' will be found field 'ns=1;' - // check that previous character is the ';' if not then search next. - while(data[colon - 1] != ';'); - colon += std::strlen(field); - const std::size_t semicolon = data.find(";", colon); - if (semicolon == std::string::npos) + // if finding 's=' in the 'ns=1;i-3;' will be found field 'ns=1;' + // check that previous character is the ';' if not then search next. + while (data[colon - 1] != ';'); + + colon += std::strlen(field); + const std::size_t semicolon = data.find(";", colon); + + if (semicolon == std::string::npos) { data.substr(colon); } - return data.substr(colon, semicolon - colon); - } - uint32_t GetInteger(const std::string&value) - { - if (value.empty()) + return data.substr(colon, semicolon - colon); +} + +uint32_t GetInteger(const std::string & value) +{ + if (value.empty()) { return 0; } - return std::stoul(value); - } + + return std::stoul(value); +} } -OpcUa::NodeId OpcUa::ToNodeId(const std::string& data, uint32_t defaultNamespace) +OpcUa::NodeId OpcUa::ToNodeId(const std::string & data, uint32_t defaultNamespace) { OpcUa::NodeId result; uint32_t ns = defaultNamespace; const std::string nsString = GetNodeField(data, "ns="); + if (nsString.empty()) - { - if (ns == std::numeric_limits::max() ) { - throw(std::runtime_error("Namespace index coult not be parsed from string and not default index specified in string: " + data)); + if (ns == std::numeric_limits::max()) + { + throw (std::runtime_error("Namespace index coult not be parsed from string and not default index specified in string: " + data)); + } } - } + else - { - ns = GetInteger(nsString); - } + { + ns = GetInteger(nsString); + } const std::string srv = GetNodeField(data, "srv="); + if (!srv.empty()) - { - result.SetServerIndex(GetInteger(srv)); - } + { + result.SetServerIndex(GetInteger(srv)); + } const std::string nsu = GetNodeField(data, "nsu="); + if (!nsu.empty()) - { - result.SetNamespaceURI(nsu); - } + { + result.SetNamespaceURI(nsu); + } const std::string integer = GetNodeField(data, "i="); + if (!integer.empty()) - { - return OpcUa::NumericNodeId(GetInteger(integer), ns); - } + { + return OpcUa::NumericNodeId(GetInteger(integer), ns); + } const std::string str = GetNodeField(data, "s="); + if (!str.empty()) - { - return OpcUa::StringNodeId(str, ns); - } + { + return OpcUa::StringNodeId(str, ns); + } const std::string g = GetNodeField(data, "g="); + if (!g.empty()) - { - return OpcUa::GuidNodeId(ToGuid(g), ns); - } + { + return OpcUa::GuidNodeId(ToGuid(g), ns); + } - throw(std::runtime_error("No identifier found in string: '" + data +"'")); + throw (std::runtime_error("No identifier found in string: '" + data + "'")); } -OpcUa::QualifiedName OpcUa::ToQualifiedName(const std::string& str, uint32_t default_ns) +OpcUa::QualifiedName OpcUa::ToQualifiedName(const std::string & str, uint32_t default_ns) { std::size_t found = str.find(":"); + if (found != std::string::npos) - { - uint16_t ns = std::stoi(str.substr(0, found)); - std::string name = str.substr(found+1, str.length() - found); - return QualifiedName(ns, name); - } - - if (default_ns == std::numeric_limits::max() ) - { - throw(std::runtime_error("Namespace index coult not be parsed from string and not default index specified in string: " + str)); - } + { + uint16_t ns = std::stoi(str.substr(0, found)); + std::string name = str.substr(found + 1, str.length() - found); + return QualifiedName(ns, name); + } + + if (default_ns == std::numeric_limits::max()) + { + throw (std::runtime_error("Namespace index coult not be parsed from string and not default index specified in string: " + str)); + } return QualifiedName(default_ns, str); } -std::string OpcUa::ToString(const OpcUa::BrowseDirection& direction) +std::string OpcUa::ToString(const OpcUa::BrowseDirection & direction) { switch (direction) - { + { case OpcUa::BrowseDirection::Forward: return "forward"; + case OpcUa::BrowseDirection::Inverse: return "inverse"; + case OpcUa::BrowseDirection::Both: return "both"; + default: return "unknown"; - } + } } -std::string OpcUa::ToString(const OpcUa::DateTime& t) +std::string OpcUa::ToString(const OpcUa::DateTime & t) { std::time_t st = OpcUa::DateTime::ToTimeT(t); return std::ctime(&st); } -std::string OpcUa::ToString(const OpcUa::LocalizedText& t) +std::string OpcUa::ToString(const OpcUa::LocalizedText & t) { return t.Text; } diff --git a/src/protocol/string_utils_statuscode_tostring.cpp b/src/protocol/string_utils_statuscode_tostring.cpp index c403a852..d4b4e34d 100644 --- a/src/protocol/string_utils_statuscode_tostring.cpp +++ b/src/protocol/string_utils_statuscode_tostring.cpp @@ -12,668 +12,885 @@ namespace OpcUa { -std::string ToString(const StatusCode& code) +std::string ToString(const StatusCode & code) { if (code == StatusCode::Good) - { - return std::string(); - } + { + return std::string(); + } std::stringstream stream; + switch (code) - { + { case StatusCode::BadUnexpectedError: stream << "An unexpected error occurred."; break; + case StatusCode::BadInternalError: stream << "An internal error occurred as a result of a programming or configuration error."; break; + case StatusCode::BadOutOfMemory: stream << "Not enough memory to complete the operation."; break; + case StatusCode::BadResourceUnavailable: stream << "An operating system resource is not available."; break; + case StatusCode::BadCommunicationError: stream << "A low level communication error occurred."; break; + case StatusCode::BadEncodingError: stream << "Encoding halted because of invalid data in the objects being serialized."; break; + case StatusCode::BadDecodingError: stream << "Decoding halted because of invalid data in the stream."; break; + case StatusCode::BadEncodingLimitsExceeded: stream << "The message encoding/decoding limits imposed by the stack have been exceeded."; break; + case StatusCode::BadRequestTooLarge: stream << "The request message size exceeds limits set by the server."; break; + case StatusCode::BadResponseTooLarge: stream << "The response message size exceeds limits set by the client."; break; + case StatusCode::BadUnknownResponse: stream << "An unrecognized response was received from the server."; break; + case StatusCode::BadTimeout: stream << "The operation timed out."; break; + case StatusCode::BadServiceUnsupported: stream << "The server does not support the requested service."; break; + case StatusCode::BadShutdown: stream << "The operation was cancelled because the application is shutting down."; break; + case StatusCode::BadServerNotConnected: stream << "The operation could not complete because the client is not connected to the server."; break; + case StatusCode::BadServerHalted: stream << "The server has stopped and cannot process any requests."; break; + case StatusCode::BadNothingToDo: stream << "There was nothing to do because the client passed a list of operations with no elements."; break; + case StatusCode::BadTooManyOperations: stream << "The request could not be processed because it specified too many operations."; break; + case StatusCode::BadTooManyMonitoredItems: stream << "The request could not be processed because there are too many monitored items in the subscription."; break; + case StatusCode::BadDataTypeIdUnknown: stream << "The extension object cannot be (de)serialized because the data type id is not recognized."; break; + case StatusCode::BadCertificateInvalid: stream << "The certificate provided as a parameter is not valid."; break; + case StatusCode::BadSecurityChecksFailed: stream << "An error occurred verifying security."; break; + case StatusCode::BadCertificateTimeInvalid: stream << "The Certificate has expired or is not yet valid."; break; + case StatusCode::BadCertificateIssuerTimeInvalid: stream << "An Issuer Certificate has expired or is not yet valid."; break; + case StatusCode::BadCertificateHostNameInvalid: stream << "The HostName used to connect to a Server does not match a HostName in the Certificate."; break; + case StatusCode::BadCertificateUriInvalid: stream << "The URI specified in the ApplicationDescription does not match the URI in the Certificate."; break; + case StatusCode::BadCertificateUseNotAllowed: stream << "The Certificate may not be used for the requested operation."; break; + case StatusCode::BadCertificateIssuerUseNotAllowed: stream << "The Issuer Certificate may not be used for the requested operation."; break; + case StatusCode::BadCertificateUntrusted: stream << "The Certificate is not trusted."; break; + case StatusCode::BadCertificateRevocationUnknown: stream << "It was not possible to determine if the Certificate has been revoked."; break; + case StatusCode::BadCertificateIssuerRevocationUnknown: stream << "It was not possible to determine if the Issuer Certificate has been revoked."; break; + case StatusCode::BadCertificateRevoked: stream << "The Certificate has been revoked."; break; + case StatusCode::BadCertificateIssuerRevoked: stream << "The Issuer Certificate has been revoked."; break; + case StatusCode::BadUserAccessDenied: stream << "User does not have permission to perform the requested operation."; break; + case StatusCode::BadIdentityTokenInvalid: stream << "The user identity token is not valid."; break; + case StatusCode::BadIdentityTokenRejected: stream << "The user identity token is valid but the server has rejected it."; break; + case StatusCode::BadSecureChannelIdInvalid: stream << "The specified secure channel is no longer valid."; break; + case StatusCode::BadInvalidTimestamp: stream << "The timestamp is outside the range allowed by the server."; break; + case StatusCode::BadNonceInvalid: stream << "The nonce does appear to be not a random value or it is not the correct length."; break; + case StatusCode::BadSessionIdInvalid: stream << "The session id is not valid."; break; + case StatusCode::BadSessionClosed: stream << "The session was closed by the client."; break; + case StatusCode::BadSessionNotActivated: stream << "The session cannot be used because ActivateSession has not been called."; break; + case StatusCode::BadSubscriptionIdInvalid: stream << "The subscription id is not valid."; break; + case StatusCode::BadRequestHeaderInvalid: stream << "The header for the request is missing or invalid."; break; + case StatusCode::BadTimestampsToReturnInvalid: stream << "The timestamps to return parameter is invalid."; break; + case StatusCode::BadRequestCancelledByClient: stream << "The request was cancelled by the client."; break; + case StatusCode::GoodSubscriptionTransferred: stream << "The subscription was transferred to another session."; break; + case StatusCode::GoodCompletesAsynchronously: stream << "The processing will complete asynchronously."; break; + case StatusCode::GoodOverload: stream << "Sampling has slowed down due to resource limitations."; break; + case StatusCode::GoodClamped: stream << "The value written was accepted but was clamped."; break; + case StatusCode::BadNoCommunication: stream << "Communication with the data source is defined"; break; + case StatusCode::BadWaitingForInitialData: stream << "Waiting for the server to obtain values from the underlying data source."; break; + case StatusCode::BadNodeIdInvalid: stream << "The syntax of the node id is not valid."; break; + case StatusCode::BadNodeIdUnknown: stream << "The node id refers to a node that does not exist in the server address space."; break; + case StatusCode::BadAttributeIdInvalid: stream << "The attribute is not supported for the specified Node."; break; + case StatusCode::BadIndexRangeInvalid: stream << "The syntax of the index range parameter is invalid."; break; + case StatusCode::BadIndexRangeNoData: stream << "No data exists within the range of indexes specified."; break; + case StatusCode::BadDataEncodingInvalid: stream << "The data encoding is invalid."; break; + case StatusCode::BadDataEncodingUnsupported: stream << "The server does not support the requested data encoding for the node."; break; + case StatusCode::BadNotReadable: stream << "The access level does not allow reading or subscribing to the Node."; break; + case StatusCode::BadNotWritable: stream << "The access level does not allow writing to the Node."; break; + case StatusCode::BadOutOfRange: stream << "The value was out of range."; break; + case StatusCode::BadNotSupported: stream << "The requested operation is not supported."; break; + case StatusCode::BadNotFound: stream << "A requested item was not found or a search operation ended without success."; break; + case StatusCode::BadObjectDeleted: stream << "The object cannot be used because it has been deleted."; break; + case StatusCode::BadNotImplemented: stream << "Requested operation is not implemented."; break; + case StatusCode::BadMonitoringModeInvalid: stream << "The monitoring mode is invalid."; break; + case StatusCode::BadMonitoredItemIdInvalid: stream << "The monitoring item id does not refer to a valid monitored item."; break; + case StatusCode::BadMonitoredItemFilterInvalid: stream << "The monitored item filter parameter is not valid."; break; + case StatusCode::BadMonitoredItemFilterUnsupported: stream << "The server does not support the requested monitored item filter."; break; + case StatusCode::BadFilterNotAllowed: stream << "A monitoring filter cannot be used in combination with the attribute specified."; break; + case StatusCode::BadStructureMissing: stream << "A mandatory structured parameter was missing or null."; break; + case StatusCode::BadEventFilterInvalid: stream << "The event filter is not valid."; break; + case StatusCode::BadContentFilterInvalid: stream << "The content filter is not valid."; break; + case StatusCode::BadFilterOperatorInvalid: stream << "An unregognized operator was provided in a filter."; break; + case StatusCode::BadFilterOperatorUnsupported: stream << "A valid operator was provided"; break; + case StatusCode::BadFilterOperandCountMismatch: stream << "The number of operands provided for the filter operator was less then expected for the operand provided."; break; + case StatusCode::BadFilterOperandInvalid: stream << "The operand used in a content filter is not valid."; break; + case StatusCode::BadFilterElementInvalid: stream << "The referenced element is not a valid element in the content filter."; break; + case StatusCode::BadFilterLiteralInvalid: stream << "The referenced literal is not a valid value."; break; + case StatusCode::BadContinuationPointInvalid: stream << "The continuation point provide is longer valid."; break; + case StatusCode::BadNoContinuationPoints: stream << "The operation could not be processed because all continuation points have been allocated."; break; + case StatusCode::BadReferenceTypeIdInvalid: stream << "The operation could not be processed because all continuation points have been allocated."; break; + case StatusCode::BadBrowseDirectionInvalid: stream << "The browse direction is not valid."; break; + case StatusCode::BadNodeNotInView: stream << "The node is not part of the view."; break; + case StatusCode::BadServerUriInvalid: stream << "The ServerUri is not a valid URI."; break; + case StatusCode::BadServerNameMissing: stream << "No ServerName was specified."; break; + case StatusCode::BadDiscoveryUrlMissing: stream << "No DiscoveryUrl was specified."; break; + case StatusCode::BadSempahoreFileMissing: stream << "The semaphore file specified by the client is not valid."; break; + case StatusCode::BadRequestTypeInvalid: stream << "The security token request type is not valid."; break; + case StatusCode::BadSecurityModeRejected: stream << "The security mode does not meet the requirements set by the Server."; break; + case StatusCode::BadSecurityPolicyRejected: stream << "The security policy does not meet the requirements set by the Server."; break; + case StatusCode::BadTooManySessions: stream << "The server has reached its maximum number of sessions."; break; + case StatusCode::BadUserSignatureInvalid: stream << "The user token signature is missing or invalid."; break; + case StatusCode::BadApplicationSignatureInvalid: stream << "The signature generated with the client certificate is missing or invalid."; break; + case StatusCode::BadNoValidCertificates: stream << "The client did not provide at least one software certificate that is valid and meets the profile requirements for the server."; break; + case StatusCode::BadIdentityChangeNotSupported: stream << "The Server does not support changing the user identity assigned to the session."; break; + case StatusCode::BadRequestCancelledByRequest: stream << "The request was cancelled by the client with the Cancel service."; break; + case StatusCode::BadParentNodeIdInvalid: stream << "The parent node id does not to refer to a valid node."; break; + case StatusCode::BadReferenceNotAllowed: stream << "The reference could not be created because it violates constraints imposed by the data model."; break; + case StatusCode::BadNodeIdRejected: stream << "The requested node id was reject because it was either invalid or server does not allow node ids to be specified by the client."; break; + case StatusCode::BadNodeIdExists: stream << "The requested node id is already used by another node."; break; + case StatusCode::BadNodeClassInvalid: stream << "The node class is not valid."; break; + case StatusCode::BadBrowseNameInvalid: stream << "The browse name is invalid."; break; + case StatusCode::BadBrowseNameDuplicated: stream << "The browse name is not unique among nodes that share the same relationship with the parent."; break; + case StatusCode::BadNodeAttributesInvalid: stream << "The node attributes are not valid for the node class."; break; + case StatusCode::BadTypeDefinitionInvalid: stream << "The type definition node id does not reference an appropriate type node."; break; + case StatusCode::BadSourceNodeIdInvalid: stream << "The source node id does not reference a valid node."; break; + case StatusCode::BadTargetNodeIdInvalid: stream << "The target node id does not reference a valid node."; break; + case StatusCode::BadDuplicateReferenceNotAllowed: stream << "The reference type between the nodes is already defined."; break; + case StatusCode::BadInvalidSelfReference: stream << "The server does not allow this type of self reference on this node."; break; + case StatusCode::BadReferenceLocalOnly: stream << "The reference type is not valid for a reference to a remote server."; break; + case StatusCode::BadNoDeleteRights: stream << "The server will not allow the node to be deleted."; break; + case StatusCode::UncertainReferenceNotDeleted: stream << "The server was not able to delete all target references."; break; + case StatusCode::BadServerIndexInvalid: stream << "The server index is not valid."; break; + case StatusCode::BadViewIdUnknown: stream << "The view id does not refer to a valid view node."; break; + case StatusCode::BadViewTimestampInvalid: stream << "The view timestamp is not available or not supported."; break; + case StatusCode::BadViewParameterMismatch: stream << "The view parameters are not consistent with each other."; break; + case StatusCode::BadViewVersionInvalid: stream << "The view version is not available or not supported."; break; + case StatusCode::UncertainNotAllNodesAvailable: stream << "The list of references may not be complete because the underlying system is not available."; break; + case StatusCode::GoodResultsMayBeIncomplete: stream << "The server should have followed a reference to a node in a remote server but did not. The result set may be incomplete."; break; + case StatusCode::BadNotTypeDefinition: stream << "The provided Nodeid was not a type definition nodeid."; break; + case StatusCode::UncertainReferenceOutOfServer: stream << "One of the references to follow in the relative path references to a node in the address space in another server."; break; + case StatusCode::BadTooManyMatches: stream << "The requested operation has too many matches to return."; break; + case StatusCode::BadQueryTooComplex: stream << "The requested operation requires too many resources in the server."; break; + case StatusCode::BadNoMatch: stream << "The requested operation has no match to return."; break; + case StatusCode::BadMaxAgeInvalid: stream << "The max age parameter is invalid."; break; + case StatusCode::BadHistoryOperationInvalid: stream << "The history details parameter is not valid."; break; + case StatusCode::BadHistoryOperationUnsupported: stream << "The server does not support the requested operation."; break; + case StatusCode::BadInvalidTimestampArgument: stream << "The defined timestamp to return was invalid."; break; + case StatusCode::BadWriteNotSupported: stream << "The server not does support writing the combination of value"; break; + case StatusCode::BadTypeMismatch: stream << "The value supplied for the attribute is not of the same type as the attribute's value."; break; + case StatusCode::BadMethodInvalid: stream << "The method id does not refer to a method for the specified object."; break; + case StatusCode::BadArgumentsMissing: stream << "The client did not specify all of the input arguments for the method."; break; + case StatusCode::BadTooManySubscriptions: stream << "The server has reached its maximum number of subscriptions."; break; + case StatusCode::BadTooManyPublishRequests: stream << "The server has reached the maximum number of queued publish requests."; break; + case StatusCode::BadNoSubscription: stream << "There is no subscription available for this session."; break; + case StatusCode::BadSequenceNumberUnknown: stream << "The sequence number is unknown to the server."; break; + case StatusCode::BadMessageNotAvailable: stream << "The requested notification message is no longer available."; break; + case StatusCode::BadInsufficientClientProfile: stream << "The Client of the current Session does not support one or more Profiles that are necessary for the Subscription."; break; + case StatusCode::BadStateNotActive: stream << "The sub-state machine is not currently active."; break; + case StatusCode::BadTcpServerTooBusy: stream << "The server cannot process the request because it is too busy."; break; + case StatusCode::BadTcpMessageTypeInvalid: stream << "The type of the message specified in the header invalid."; break; + case StatusCode::BadTcpSecureChannelUnknown: stream << "The SecureChannelId and/or TokenId are not currently in use."; break; + case StatusCode::BadTcpMessageTooLarge: stream << "The size of the message specified in the header is too large."; break; + case StatusCode::BadTcpNotEnoughResources: stream << "There are not enough resources to process the request."; break; + case StatusCode::BadTcpInternalError: stream << "An internal error occurred."; break; + case StatusCode::BadTcpEndpointUrlInvalid: stream << "The Server does not recognize the QueryString specified."; break; + case StatusCode::BadRequestInterrupted: stream << "The request could not be sent because of a network interruption."; break; + case StatusCode::BadRequestTimeout: stream << "Timeout occurred while processing the request."; break; + case StatusCode::BadSecureChannelClosed: stream << "The secure channel has been closed."; break; + case StatusCode::BadSecureChannelTokenUnknown: stream << "The token has expired or is not recognized."; break; + case StatusCode::BadSequenceNumberInvalid: stream << "The sequence number is not valid."; break; + case StatusCode::BadProtocolVersionUnsupported: stream << "The applications do not have compatible protocol versions."; break; + case StatusCode::BadConfigurationError: stream << "There is a problem with the configuration that affects the usefulness of the value."; break; + case StatusCode::BadNotConnected: stream << "The variable should receive its value from another variable"; break; + case StatusCode::BadDeviceFailure: stream << "There has been a failure in the device/data source that generates the value that has affected the value."; break; + case StatusCode::BadSensorFailure: stream << "There has been a failure in the sensor from which the value is derived by the device/data source."; break; + case StatusCode::BadOutOfService: stream << "The source of the data is not operational."; break; + case StatusCode::BadDeadbandFilterInvalid: stream << "The deadband filter is not valid."; break; + case StatusCode::UncertainNoCommunicationLastUsableValue: stream << "Communication to the data source has failed. The variable value is the last value that had a good quality."; break; + case StatusCode::UncertainLastUsableValue: stream << "Whatever was updating this value has stopped doing so."; break; + case StatusCode::UncertainSubstituteValue: stream << "The value is an operational value that was manually overwritten."; break; + case StatusCode::UncertainInitialValue: stream << "The value is an initial value for a variable that normally receives its value from another variable."; break; + case StatusCode::UncertainSensorNotAccurate: stream << "The value is at one of the sensor limits."; break; + case StatusCode::UncertainEngineeringUnitsExceeded: stream << "The value is outside of the range of values defined for this parameter."; break; + case StatusCode::UncertainSubNormal: stream << "The value is derived from multiple sources and has less than the required number of Good sources."; break; + case StatusCode::GoodLocalOverride: stream << "The value has been overridden."; break; + case StatusCode::BadRefreshInProgress: stream << "This Condition refresh failed"; break; + case StatusCode::BadConditionAlreadyDisabled: stream << "This condition has already been disabled."; break; + case StatusCode::BadConditionAlreadyEnabled: stream << "This condition has already been enabled."; break; + case StatusCode::BadConditionDisabled: stream << "Property not available"; break; + case StatusCode::BadEventIdUnknown: stream << "The specified event id is not recognized."; break; + case StatusCode::BadEventNotAcknowledgeable: stream << "The event cannot be acknowledged."; break; + case StatusCode::BadDialogNotActive: stream << "The dialog condition is not active."; break; + case StatusCode::BadDialogResponseInvalid: stream << "The response is not valid for the dialog."; break; + case StatusCode::BadConditionBranchAlreadyAcked: stream << "The condition branch has already been acknowledged."; break; + case StatusCode::BadConditionBranchAlreadyConfirmed: stream << "The condition branch has already been confirmed."; break; + case StatusCode::BadConditionAlreadyShelved: stream << "The condition has already been shelved."; break; + case StatusCode::BadConditionNotShelved: stream << "The condition is not currently shelved."; break; + case StatusCode::BadShelvingTimeOutOfRange: stream << "The shelving time not within an acceptable range."; break; + case StatusCode::BadNoData: stream << "No data exists for the requested time range or event filter."; break; + case StatusCode::BadBoundNotFound: stream << "No data found to provide upper or lower bound value."; break; + case StatusCode::BadBoundNotSupported: stream << "The server cannot retrieve a bound for the variable."; break; + case StatusCode::BadDataLost: stream << "Data is missing due to collection started/stopped/lost."; break; + case StatusCode::BadDataUnavailable: stream << "Expected data is unavailable for the requested time range due to an un-mounted volume"; break; + case StatusCode::BadEntryExists: stream << "The data or event was not successfully inserted because a matching entry exists."; break; + case StatusCode::BadNoEntryExists: stream << "The data or event was not successfully updated because no matching entry exists."; break; + case StatusCode::BadTimestampNotSupported: stream << "The client requested history using a timestamp format the server does not support (i.e requested ServerTimestamp when server only supports SourceTimestamp)."; break; + case StatusCode::GoodEntryInserted: stream << "The data or event was successfully inserted into the historical database."; break; + case StatusCode::GoodEntryReplaced: stream << "The data or event field was successfully replaced in the historical database."; break; + case StatusCode::UncertainDataSubNormal: stream << "The value is derived from multiple values and has less than the required number of Good values."; break; + case StatusCode::GoodNoData: stream << "No data exists for the requested time range or event filter."; break; + case StatusCode::GoodMoreData: stream << "The data or event field was successfully replaced in the historical database."; break; + case StatusCode::BadAggregateListMismatch: stream << "The requested number of Aggregates does not match the requested number of NodeIds."; break; + case StatusCode::BadAggregateNotSupported: stream << "The requested Aggregate is not support by the server."; break; + case StatusCode::BadAggregateInvalidInputs: stream << "The aggregate value could not be derived due to invalid data inputs."; break; + case StatusCode::BadAggregateConfigurationRejected: stream << "The aggregate configuration is not valid for specified node."; break; + case StatusCode::GoodDataIgnored: stream << "The request pecifies fields which are not valid for the EventType or cannot be saved by the historian."; break; + case StatusCode::GoodCommunicationEvent: stream << "The communication layer has raised an event."; break; + case StatusCode::GoodShutdownEvent: stream << "The system is shutting down."; break; + case StatusCode::GoodCallAgain: stream << "The operation is not finished and needs to be called again."; break; + case StatusCode::GoodNonCriticalTimeout: stream << "A non-critical timeout occurred."; break; + case StatusCode::BadInvalidArgument: stream << "One or more arguments are invalid."; break; + case StatusCode::BadConnectionRejected: stream << "Could not establish a network connection to remote server."; break; + case StatusCode::BadDisconnect: stream << "The server has disconnected from the client."; break; + case StatusCode::BadConnectionClosed: stream << "The network connection has been closed."; break; + case StatusCode::BadInvalidState: stream << "The operation cannot be completed because the object is closed"; break; + case StatusCode::BadEndOfStream: stream << "Cannot move beyond end of the stream."; break; + case StatusCode::BadNoDataAvailable: stream << "No data is currently available for reading from a non-blocking stream."; break; + case StatusCode::BadWaitingForResponse: stream << "The asynchronous operation is waiting for a response."; break; + case StatusCode::BadOperationAbandoned: stream << "The asynchronous operation was abandoned by the caller."; break; + case StatusCode::BadExpectedStreamToBlock: stream << "The stream did not return all data requested (possibly because it is a non-blocking stream)."; break; + case StatusCode::BadWouldBlock: stream << "Non blocking behaviour is required and the operation would block."; break; + case StatusCode::BadSyntaxError: stream << "A value had an invalid syntax."; break; + case StatusCode::BadMaxConnectionsReached: stream << "The operation could not be finished because all available connections are in use."; break; + default: stream << "Unknown StatusCode?"; break; - } + } stream << " (0x" << std::setfill('0') << std::setw(8) << std::hex << (unsigned)code << ")"; diff --git a/src/protocol/subscriptions.cpp b/src/protocol/subscriptions.cpp index 313c8c80..5441cfff 100644 --- a/src/protocol/subscriptions.cpp +++ b/src/protocol/subscriptions.cpp @@ -16,327 +16,340 @@ namespace OpcUa { - //////////////////////////////////////////////////////// - // SubscriptionData - //////////////////////////////////////////////////////// - - SubscriptionData::SubscriptionData() - : RevisedPublishingInterval(100) - , RevisedLifetimeCount(30) //Should be 3 times keepalive - , RevisedMaxKeepAliveCount(10) - { - } - - //////////////////////////////////////////////////////// - // SubscriptionParameters - //////////////////////////////////////////////////////// - - CreateSubscriptionParameters::CreateSubscriptionParameters() - : RequestedPublishingInterval(500) - , RequestedLifetimeCount(3000) - , RequestedMaxKeepAliveCount(10000) - , MaxNotificationsPerPublish(0) - , PublishingEnabled(true) - , Priority(0) - { - } - - //////////////////////////////////////////////////////// - // PublishResult - //////////////////////////////////////////////////////// - - PublishResult::PublishResult() - : MoreNotifications(false) - { - } - - //////////////////////////////////////////////////////// - // NotificationData - //////////////////////////////////////////////////////// - - NotificationData::NotificationData(DataChangeNotification notification) : DataChange(notification) - { - //Header.TypeId = ObjectId::DataChangeNotification; - Header.TypeId = ExpandedObjectId::DataChangeNotification; - Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); - } +//////////////////////////////////////////////////////// +// SubscriptionData +//////////////////////////////////////////////////////// + +SubscriptionData::SubscriptionData() + : RevisedPublishingInterval(100) + , RevisedLifetimeCount(30) //Should be 3 times keepalive + , RevisedMaxKeepAliveCount(10) +{ +} + +//////////////////////////////////////////////////////// +// SubscriptionParameters +//////////////////////////////////////////////////////// + +CreateSubscriptionParameters::CreateSubscriptionParameters() + : RequestedPublishingInterval(500) + , RequestedLifetimeCount(3000) + , RequestedMaxKeepAliveCount(10000) + , MaxNotificationsPerPublish(0) + , PublishingEnabled(true) + , Priority(0) +{ +} - NotificationData::NotificationData(EventNotificationList notification) : Events(notification) - { - Header.TypeId = ExpandedObjectId::EventNotificationList; - Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); - } +//////////////////////////////////////////////////////// +// PublishResult +//////////////////////////////////////////////////////// - NotificationData::NotificationData(StatusChangeNotification notification) : StatusChange(notification) - { - Header.TypeId = ExpandedObjectId::StatusChangeNotification; - Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); - } +PublishResult::PublishResult() + : MoreNotifications(false) +{ +} +//////////////////////////////////////////////////////// +// NotificationData +//////////////////////////////////////////////////////// - //////////////////////////////////////////////////////// - // NotificationMessage - //////////////////////////////////////////////////////// +NotificationData::NotificationData(DataChangeNotification notification) : DataChange(notification) +{ + //Header.TypeId = ObjectId::DataChangeNotification; + Header.TypeId = ExpandedObjectId::DataChangeNotification; + Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); +} - NotificationMessage::NotificationMessage() - : SequenceNumber(0) - , PublishTime(DateTime::Current()) - { - } +NotificationData::NotificationData(EventNotificationList notification) : Events(notification) +{ + Header.TypeId = ExpandedObjectId::EventNotificationList; + Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); +} - //////////////////////////////////////////////////////// +NotificationData::NotificationData(StatusChangeNotification notification) : StatusChange(notification) +{ + Header.TypeId = ExpandedObjectId::StatusChangeNotification; + Header.Encoding = static_cast(Header.Encoding | ExtensionObjectEncoding::HAS_BINARY_BODY); +} - namespace Binary - { - //////////////////////////////////////////////////////// - // SubscriptionAcknowledgement -- to be removed - //////////////////////////////////////////////////////// - template<> - std::size_t RawSize(const std::vector& ack) - { - return RawSizeContainer(ack); - } +//////////////////////////////////////////////////////// +// NotificationMessage +//////////////////////////////////////////////////////// - template<> - void DataDeserializer::Deserialize>(std::vector& ack) - { - DeserializeContainer(*this, ack); - } +NotificationMessage::NotificationMessage() + : SequenceNumber(0) + , PublishTime(DateTime::Current()) +{ +} - template<> - void DataSerializer::Serialize>(const std::vector& ack) - { - SerializeContainer(*this, ack); - } +//////////////////////////////////////////////////////// +namespace Binary +{ +//////////////////////////////////////////////////////// +// SubscriptionAcknowledgement -- to be removed +//////////////////////////////////////////////////////// - //////////////////////////////////////////////////////// - // MonitoredItems - //////////////////////////////////////////////////////// +template<> +std::size_t RawSize(const std::vector & ack) +{ + return RawSizeContainer(ack); +} - template<> - std::size_t RawSize(const MonitoredItems& request) - { - return RawSize(request.ClientHandle) + RawSize(request.Value); - } +template<> +void DataDeserializer::Deserialize>(std::vector & ack) +{ + DeserializeContainer(*this, ack); +} - template<> - void DataDeserializer::Deserialize(MonitoredItems& request) - { - *this >> request.ClientHandle; - *this >> request.Value; - } +template<> +void DataSerializer::Serialize>(const std::vector & ack) +{ + SerializeContainer(*this, ack); +} - template<> - void DataSerializer::Serialize(const MonitoredItems& request) - { - *this << request.ClientHandle; - *this << request.Value; - } - template<> - void DataSerializer::Serialize>(const std::vector& targets) - { - SerializeContainer(*this, targets); - } +//////////////////////////////////////////////////////// +// MonitoredItems +//////////////////////////////////////////////////////// - template<> - void DataDeserializer::Deserialize>(std::vector& targets) - { - DeserializeContainer(*this, targets); - } +template<> +std::size_t RawSize(const MonitoredItems & request) +{ + return RawSize(request.ClientHandle) + RawSize(request.Value); +} - //////////////////////////////////////////////////////// - // StatusChangeNotification - //////////////////////////////////////////////////////// +template<> +void DataDeserializer::Deserialize(MonitoredItems & request) +{ + *this >> request.ClientHandle; + *this >> request.Value; +} - template<> - std::size_t RawSize(const StatusChangeNotification& request) - { - return 4 + RawSize(request.Status) + RawSize(request.Diagnostic); - } +template<> +void DataSerializer::Serialize(const MonitoredItems & request) +{ + *this << request.ClientHandle; + *this << request.Value; +} - template<> - void DataDeserializer::Deserialize(StatusChangeNotification& request) - { - uint32_t tmp; - *this >> tmp; //it seems we do not need the size - *this >> request.Status; - *this >> request.Diagnostic; - } +template<> +void DataSerializer::Serialize>(const std::vector & targets) +{ + SerializeContainer(*this, targets); +} - template<> - void DataSerializer::Serialize(const StatusChangeNotification& request) - { - *this << (uint32_t) RawSize(request); - *this << request.Status; - *this << request.Diagnostic; - } +template<> +void DataDeserializer::Deserialize>(std::vector & targets) +{ + DeserializeContainer(*this, targets); +} + +//////////////////////////////////////////////////////// +// StatusChangeNotification +//////////////////////////////////////////////////////// +template<> +std::size_t RawSize(const StatusChangeNotification & request) +{ + return 4 + RawSize(request.Status) + RawSize(request.Diagnostic); +} - //////////////////////////////////////////////////////// - // EventNotificationList - //////////////////////////////////////////////////////// +template<> +void DataDeserializer::Deserialize(StatusChangeNotification & request) +{ + uint32_t tmp; + *this >> tmp; //it seems we do not need the size + *this >> request.Status; + *this >> request.Diagnostic; +} + +template<> +void DataSerializer::Serialize(const StatusChangeNotification & request) +{ + *this << (uint32_t) RawSize(request); + *this << request.Status; + *this << request.Diagnostic; +} - template<> - void DataSerializer::Serialize>(const std::vector& targets) - { - SerializeContainer(*this, targets); - } - template<> - void DataDeserializer::Deserialize>(std::vector& targets) - { - DeserializeContainer(*this, targets); - } +//////////////////////////////////////////////////////// +// EventNotificationList +//////////////////////////////////////////////////////// - template<> - std::size_t RawSize(const EventFieldList& request) - { - return RawSize(request.ClientHandle) + RawSizeContainer(request.EventFields); - } +template<> +void DataSerializer::Serialize>(const std::vector & targets) +{ + SerializeContainer(*this, targets); +} - template<> - void DataDeserializer::Deserialize(EventFieldList& request) - { - *this >> request.ClientHandle; - *this >> request.EventFields; - } +template<> +void DataDeserializer::Deserialize>(std::vector & targets) +{ + DeserializeContainer(*this, targets); +} + +template<> +std::size_t RawSize(const EventFieldList & request) +{ + return RawSize(request.ClientHandle) + RawSizeContainer(request.EventFields); +} + +template<> +void DataDeserializer::Deserialize(EventFieldList & request) +{ + *this >> request.ClientHandle; + *this >> request.EventFields; +} + +template<> +void DataSerializer::Serialize(const EventFieldList & request) +{ + *this << request.ClientHandle; + *this << request.EventFields; +} + +template<> +std::size_t RawSize(const EventNotificationList & request) +{ + return 4 + RawSizeContainer(request.Events); +} + +template<> +void DataDeserializer::Deserialize(EventNotificationList & request) +{ + uint32_t tmp; + *this >> tmp; //it seems we do not need the size + *this >> request.Events; +} - template<> - void DataSerializer::Serialize(const EventFieldList& request) +template<> +void DataSerializer::Serialize(const EventNotificationList & request) +{ + *this << (uint32_t) RawSize(request); + *this << request.Events; +} + + + +//////////////////////////////////////////////////////// +// DataChangeNotification +//////////////////////////////////////////////////////// + +template<> +std::size_t RawSize(const DataChangeNotification & request) +{ + return 4 + RawSizeContainer(request.Notification) + RawSize(request.Diagnostic); +} + +template<> +void DataDeserializer::Deserialize(DataChangeNotification & request) +{ + uint32_t tmp; + *this >> tmp; //it seems we do not need the size + *this >> request.Notification; + *this >> request.Diagnostic; +} + +template<> +void DataSerializer::Serialize(const DataChangeNotification & request) +{ + *this << (uint32_t) RawSize(request); + *this << request.Notification; + *this << request.Diagnostic; +} + + +//////////////////////////////////////////////////////// +// NotificationData +//////////////////////////////////////////////////////// + + +template<> +std::size_t RawSize(const NotificationData & data) +{ + size_t total = 0; + total += RawSize(data.Header); + + if (data.Header.TypeId == ExpandedObjectId::DataChangeNotification) { - *this << request.ClientHandle; - *this << request.EventFields; + total += RawSize(data.DataChange); } - template<> - std::size_t RawSize(const EventNotificationList& request) + else if (data.Header.TypeId == ExpandedObjectId::EventNotificationList) { - return 4 + RawSizeContainer(request.Events); + total += RawSize(data.Events); } - template<> - void DataDeserializer::Deserialize(EventNotificationList& request) + else if (data.Header.TypeId == ExpandedObjectId::StatusChangeNotification) { - uint32_t tmp; - *this >> tmp; //it seems we do not need the size - *this >> request.Events; + total += RawSize(data.StatusChange); } - template<> - void DataSerializer::Serialize(const EventNotificationList& request) + else { - *this << (uint32_t) RawSize(request); - *this << request.Events; + //Unknown type, we just ignore it + //throw std::runtime_error("Uknown notificationData type" ); } + return total; +} +template<> +void DataDeserializer::Deserialize(NotificationData & data) +{ + *this >> data.Header; - //////////////////////////////////////////////////////// - // DataChangeNotification - //////////////////////////////////////////////////////// - - template<> - std::size_t RawSize(const DataChangeNotification& request) + if (data.Header.TypeId == ExpandedObjectId::DataChangeNotification) { - return 4 + RawSizeContainer(request.Notification) + RawSize(request.Diagnostic); + *this >> data.DataChange; } - template<> - void DataDeserializer::Deserialize(DataChangeNotification& request) + else if (data.Header.TypeId == ExpandedObjectId::EventNotificationList) { - uint32_t tmp; - *this >> tmp; //it seems we do not need the size - *this >> request.Notification; - *this >> request.Diagnostic; + *this >> data.Events; } - template<> - void DataSerializer::Serialize(const DataChangeNotification& request) + else if (data.Header.TypeId == ExpandedObjectId::StatusChangeNotification) { - *this << (uint32_t) RawSize(request); - *this << request.Notification; - *this << request.Diagnostic; + *this >> data.StatusChange; } + else + { + //Unknown type, we just ignore it + //throw std::runtime_error("Uknown notification data type found in NotificationData"); + } +} - //////////////////////////////////////////////////////// - // NotificationData - //////////////////////////////////////////////////////// +template<> +void DataSerializer::Serialize(const NotificationData & data) +{ + *this << data.Header; + if (data.Header.TypeId == ExpandedObjectId::DataChangeNotification) + { + *this << data.DataChange; + } - template<> - std::size_t RawSize(const NotificationData& data) + else if (data.Header.TypeId == ExpandedObjectId::EventNotificationList) { - size_t total = 0; - total += RawSize(data.Header); - if ( data.Header.TypeId == ExpandedObjectId::DataChangeNotification) - { - total += RawSize(data.DataChange); - } - else if ( data.Header.TypeId == ExpandedObjectId::EventNotificationList) - { - total += RawSize(data.Events); - } - else if ( data.Header.TypeId == ExpandedObjectId::StatusChangeNotification) - { - total += RawSize(data.StatusChange); - } - else - { - //Unknown type, we just ignore it - //throw std::runtime_error("Uknown notificationData type" ); - } - return total; + *this << data.Events; } - template<> - void DataDeserializer::Deserialize(NotificationData& data) + else if (data.Header.TypeId == ExpandedObjectId::StatusChangeNotification) { - *this >> data.Header; - if ( data.Header.TypeId == ExpandedObjectId::DataChangeNotification ) - { - *this >> data.DataChange; - } - else if ( data.Header.TypeId == ExpandedObjectId::EventNotificationList ) - { - *this >> data.Events; - } - else if ( data.Header.TypeId == ExpandedObjectId::StatusChangeNotification ) - { - *this >> data.StatusChange; - } - else - { - //Unknown type, we just ignore it - //throw std::runtime_error("Uknown notification data type found in NotificationData"); - } + *this << data.StatusChange; } - template<> - void DataSerializer::Serialize(const NotificationData& data) + else { - *this << data.Header; - if ( data.Header.TypeId == ExpandedObjectId::DataChangeNotification ) - { - *this << data.DataChange; - } - else if ( data.Header.TypeId == ExpandedObjectId::EventNotificationList ) - { - *this << data.Events; - } - else if ( data.Header.TypeId == ExpandedObjectId::StatusChangeNotification ) - { - *this << data.StatusChange; - } - else - { - //Unknown type, we just ignore it - //throw std::runtime_error("Uknown notification data type found in NotificationData");// + itos(data.Header.TypeId.FourByteData.Identifier) ); - } + //Unknown type, we just ignore it + //throw std::runtime_error("Uknown notification data type found in NotificationData");// + itos(data.Header.TypeId.FourByteData.Identifier) ); } +} - } // namespace Binary +} // namespace Binary } // namespace OpcUa diff --git a/src/server/address_space_addon.cpp b/src/server/address_space_addon.cpp index 268271b7..1238e852 100644 --- a/src/server/address_space_addon.cpp +++ b/src/server/address_space_addon.cpp @@ -19,123 +19,125 @@ namespace OpcUa { - namespace Internal - { - AddressSpaceAddon::AddressSpaceAddon() - { - } +namespace Internal +{ +AddressSpaceAddon::AddressSpaceAddon() +{ +} - AddressSpaceAddon::~AddressSpaceAddon() - { - } +AddressSpaceAddon::~AddressSpaceAddon() +{ +} - AddressSpaceAddon::Options AddressSpaceAddon::GetOptions(const Common::AddonParameters& addonParams) +AddressSpaceAddon::Options AddressSpaceAddon::GetOptions(const Common::AddonParameters & addonParams) +{ + AddressSpaceAddon::Options options; + + for (const Common::Parameter & param : addonParams.Parameters) { - AddressSpaceAddon::Options options; - for (const Common::Parameter& param : addonParams.Parameters) - { - if (param.Name == "debug" && !param.Value.empty() && param.Value != "0") + if (param.Name == "debug" && !param.Value.empty() && param.Value != "0") { std::cout << "Enabled debug mode for address space addon." << std::endl; options.Debug = true; } - } - return options; } - void AddressSpaceAddon::Initialize(Common::AddonsManager& addons, const Common::AddonParameters& params) - { - Options options = GetOptions(params); - Registry = Server::CreateAddressSpace(options.Debug); - InternalServer = addons.GetAddon(OpcUa::Server::ServicesRegistryAddonId); - InternalServer->RegisterViewServices(Registry); - InternalServer->RegisterAttributeServices(Registry); - InternalServer->RegisterNodeManagementServices(Registry); - InternalServer->RegisterMethodServices(Registry); - } + return options; +} - void AddressSpaceAddon::Stop() - { - InternalServer->UnregisterViewServices(); - InternalServer->UnregisterAttributeServices(); - InternalServer->UnregisterNodeManagementServices(); - InternalServer->UnregisterMethodServices(); - InternalServer.reset(); - Registry.reset(); - } +void AddressSpaceAddon::Initialize(Common::AddonsManager & addons, const Common::AddonParameters & params) +{ + Options options = GetOptions(params); + Registry = Server::CreateAddressSpace(options.Debug); + InternalServer = addons.GetAddon(OpcUa::Server::ServicesRegistryAddonId); + InternalServer->RegisterViewServices(Registry); + InternalServer->RegisterAttributeServices(Registry); + InternalServer->RegisterNodeManagementServices(Registry); + InternalServer->RegisterMethodServices(Registry); +} - std::vector AddressSpaceAddon::AddNodes(const std::vector& items) - { - return Registry->AddNodes(items); - } +void AddressSpaceAddon::Stop() +{ + InternalServer->UnregisterViewServices(); + InternalServer->UnregisterAttributeServices(); + InternalServer->UnregisterNodeManagementServices(); + InternalServer->UnregisterMethodServices(); + InternalServer.reset(); + Registry.reset(); +} - std::vector AddressSpaceAddon::AddReferences(const std::vector& items) - { - return Registry->AddReferences(items); - } +std::vector AddressSpaceAddon::AddNodes(const std::vector & items) +{ + return Registry->AddNodes(items); +} - std::vector AddressSpaceAddon::Browse(const OpcUa::NodesQuery& query) const - { - return Registry->Browse(query); - } - std::vector AddressSpaceAddon::BrowseNext() const - { - return Registry->BrowseNext(); - } +std::vector AddressSpaceAddon::AddReferences(const std::vector & items) +{ + return Registry->AddReferences(items); +} - std::vector AddressSpaceAddon::TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters& params) const - { - return Registry->TranslateBrowsePathsToNodeIds(params); - } +std::vector AddressSpaceAddon::Browse(const OpcUa::NodesQuery & query) const +{ + return Registry->Browse(query); +} +std::vector AddressSpaceAddon::BrowseNext() const +{ + return Registry->BrowseNext(); +} - std::vector AddressSpaceAddon::RegisterNodes(const std::vector& params) const - { - return Registry->RegisterNodes(params); - } +std::vector AddressSpaceAddon::TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters & params) const +{ + return Registry->TranslateBrowsePathsToNodeIds(params); +} - void AddressSpaceAddon::UnregisterNodes(const std::vector& params) const - { - return Registry->UnregisterNodes(params); - } +std::vector AddressSpaceAddon::RegisterNodes(const std::vector & params) const +{ + return Registry->RegisterNodes(params); +} - std::vector AddressSpaceAddon::Read(const OpcUa::ReadParameters& filter) const - { - return Registry->Read(filter); - } +void AddressSpaceAddon::UnregisterNodes(const std::vector & params) const +{ + return Registry->UnregisterNodes(params); +} - std::vector AddressSpaceAddon::Write(const std::vector& filter) - { - return Registry->Write(filter); - } +std::vector AddressSpaceAddon::Read(const OpcUa::ReadParameters & filter) const +{ + return Registry->Read(filter); +} - uint32_t AddressSpaceAddon::AddDataChangeCallback(const NodeId& node, AttributeId attribute, std::function callback) - { - return Registry->AddDataChangeCallback(node, attribute, callback); - } +std::vector AddressSpaceAddon::Write(const std::vector & filter) +{ + return Registry->Write(filter); +} - void AddressSpaceAddon::DeleteDataChangeCallback(uint32_t clienthandle) - { - return Registry->DeleteDataChangeCallback(clienthandle); - } +uint32_t AddressSpaceAddon::AddDataChangeCallback(const NodeId & node, AttributeId attribute, std::function callback) +{ + return Registry->AddDataChangeCallback(node, attribute, callback); +} - StatusCode AddressSpaceAddon::SetValueCallback(const NodeId& node, AttributeId attribute, std::function callback) - { - return Registry->SetValueCallback(node, attribute, callback); - } +void AddressSpaceAddon::DeleteDataChangeCallback(uint32_t clienthandle) +{ + return Registry->DeleteDataChangeCallback(clienthandle); +} - void AddressSpaceAddon::SetMethod(const NodeId& node, std::function (NodeId context, std::vector arguments)> callback) - { - Registry->SetMethod(node, callback); - return; - } +StatusCode AddressSpaceAddon::SetValueCallback(const NodeId & node, AttributeId attribute, std::function callback) +{ + return Registry->SetValueCallback(node, attribute, callback); +} + +void AddressSpaceAddon::SetMethod(const NodeId & node, std::function (NodeId context, std::vector arguments)> callback) +{ + Registry->SetMethod(node, callback); + return; +} + +std::vector AddressSpaceAddon::Call(const std::vector & methodsToCall) +{ + return Registry->Call(methodsToCall); +} - std::vector AddressSpaceAddon::Call(const std::vector& methodsToCall) - { - return Registry->Call(methodsToCall); - } - - } // namespace Internal +} // namespace Internal } // namespace OpcUa Common::Addon::UniquePtr OpcUa::Server::AddressSpaceAddonFactory::CreateAddon() diff --git a/src/server/address_space_addon.h b/src/server/address_space_addon.h index 21898f7d..cb78573c 100644 --- a/src/server/address_space_addon.h +++ b/src/server/address_space_addon.h @@ -20,60 +20,60 @@ namespace OpcUa { - namespace Internal +namespace Internal +{ + +class AddressSpaceAddon + : public Common::Addon + , public Server::AddressSpace +{ +public: + DEFINE_CLASS_POINTERS(AddressSpaceAddon) + + AddressSpaceAddon(); + virtual ~AddressSpaceAddon(); + +public: + virtual void Initialize(Common::AddonsManager & addons, const Common::AddonParameters & params); + virtual void Stop(); + +public: // NodeManagementServices + virtual std::vector AddNodes(const std::vector & items); + virtual std::vector AddReferences(const std::vector & items); + +public: // ViewServices + virtual std::vector Browse(const OpcUa::NodesQuery & query) const; + virtual std::vector BrowseNext() const; + virtual std::vector TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters & params) const; + virtual std::vector RegisterNodes(const std::vector & params) const; + virtual void UnregisterNodes(const std::vector & params) const; + +public: // AttribueServices + virtual std::vector Read(const OpcUa::ReadParameters & filter) const; + virtual std::vector Write(const std::vector & filter); + +public: // MethodServices + virtual std::vector Call(const std::vector & methodsToCall); + +public: // Server internal methods + virtual uint32_t AddDataChangeCallback(const NodeId & node, AttributeId attribute, std::function callback); + virtual void DeleteDataChangeCallback(uint32_t clienthandle); + virtual StatusCode SetValueCallback(const NodeId & node, AttributeId attribute, std::function callback); + virtual void SetMethod(const NodeId & node, std::function (NodeId context, std::vector arguments)> callback); + +private: + struct Options { + bool Debug = false; + }; + +private: + Options GetOptions(const Common::AddonParameters & addonParams); + +private: + OpcUa::Server::AddressSpace::SharedPtr Registry; + std::shared_ptr InternalServer; +}; - class AddressSpaceAddon - : public Common::Addon - , public Server::AddressSpace - { - public: - DEFINE_CLASS_POINTERS(AddressSpaceAddon) - - AddressSpaceAddon(); - virtual ~AddressSpaceAddon(); - - public: - virtual void Initialize(Common::AddonsManager& addons, const Common::AddonParameters& params); - virtual void Stop(); - - public: // NodeManagementServices - virtual std::vector AddNodes(const std::vector& items); - virtual std::vector AddReferences(const std::vector& items); - - public: // ViewServices - virtual std::vector Browse(const OpcUa::NodesQuery& query) const; - virtual std::vector BrowseNext() const; - virtual std::vector TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters& params) const; - virtual std::vector RegisterNodes(const std::vector& params) const; - virtual void UnregisterNodes(const std::vector& params) const; - - public: // AttribueServices - virtual std::vector Read(const OpcUa::ReadParameters& filter) const; - virtual std::vector Write(const std::vector& filter); - - public: // MethodServices - virtual std::vector Call(const std::vector& methodsToCall); - - public: // Server internal methods - virtual uint32_t AddDataChangeCallback(const NodeId& node, AttributeId attribute, std::function callback); - virtual void DeleteDataChangeCallback(uint32_t clienthandle); - virtual StatusCode SetValueCallback(const NodeId& node, AttributeId attribute, std::function callback); - virtual void SetMethod(const NodeId& node, std::function (NodeId context, std::vector arguments)> callback); - - private: - struct Options - { - bool Debug = false; - }; - - private: - Options GetOptions(const Common::AddonParameters& addonParams); - - private: - OpcUa::Server::AddressSpace::SharedPtr Registry; - std::shared_ptr InternalServer; - }; - - } // namespace UaServer +} // namespace UaServer } // namespace OpcUa diff --git a/src/server/address_space_internal.cpp b/src/server/address_space_internal.cpp index 79a62e55..8b41c419 100644 --- a/src/server/address_space_internal.cpp +++ b/src/server/address_space_internal.cpp @@ -13,88 +13,97 @@ namespace OpcUa { - namespace Internal - { - typedef std::map > SubscriptionsIdMap; // Map SubscptioinId, SubscriptionData +namespace Internal +{ +typedef std::map > SubscriptionsIdMap; // Map SubscptioinId, SubscriptionData - //store subscription for one attribute - struct AttSubscription - { - IntegerId SubscriptionId; - IntegerId MonitoredItemId; - MonitoringParameters Parameters; - }; +//store subscription for one attribute +struct AttSubscription +{ + IntegerId SubscriptionId; + IntegerId MonitoredItemId; + MonitoringParameters Parameters; +}; + +AddressSpaceInMemory::AddressSpaceInMemory(bool debug) + : Debug(debug) + , DataChangeCallbackHandle(0) +{ + /* + ObjectAttributes attrs; + attrs.Description = LocalizedText(OpcUa::Names::Root); + attrs.DisplayName = LocalizedText(OpcUa::Names::Root); + + AddNodesItem rootNode; + rootNode.BrowseName = QualifiedName(0, OpcUa::Names::Root); + rootNode.Class = NodeClass::Object; + rootNode.RequestedNewNodeId = ObjectId::RootFolder; + rootNode.TypeDefinition = ObjectId::FolderType; + rootNode.Attributes = attrs; + AddNode(rootNode); + */ +} - AddressSpaceInMemory::AddressSpaceInMemory(bool debug) - : Debug(debug) - , DataChangeCallbackHandle(0) - { - /* - ObjectAttributes attrs; - attrs.Description = LocalizedText(OpcUa::Names::Root); - attrs.DisplayName = LocalizedText(OpcUa::Names::Root); +AddressSpaceInMemory::~AddressSpaceInMemory() +{ +} - AddNodesItem rootNode; - rootNode.BrowseName = QualifiedName(0, OpcUa::Names::Root); - rootNode.Class = NodeClass::Object; - rootNode.RequestedNewNodeId = ObjectId::RootFolder; - rootNode.TypeDefinition = ObjectId::FolderType; - rootNode.Attributes = attrs; - AddNode(rootNode); - */ - } +std::vector AddressSpaceInMemory::AddNodes(const std::vector & items) +{ + boost::unique_lock lock(DbMutex); + + std::vector results; - AddressSpaceInMemory::~AddressSpaceInMemory() + for (const AddNodesItem & item : items) { + results.push_back(AddNode(item)); } - std::vector AddressSpaceInMemory::AddNodes(const std::vector& items) - { - boost::unique_lock lock(DbMutex); + return results; +} - std::vector results; - for (const AddNodesItem& item: items) - { - results.push_back(AddNode(item)); - } - return results; - } +std::vector AddressSpaceInMemory::AddReferences(const std::vector & items) +{ + boost::unique_lock lock(DbMutex); - std::vector AddressSpaceInMemory::AddReferences(const std::vector& items) - { - boost::unique_lock lock(DbMutex); + std::vector results; - std::vector results; - for (const auto& item : items) - { - results.push_back(AddReference(item)); - } - return results; + for (const auto & item : items) + { + results.push_back(AddReference(item)); } - std::vector AddressSpaceInMemory::TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters& params) const - { - boost::shared_lock lock(DbMutex); + return results; +} + +std::vector AddressSpaceInMemory::TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters & params) const +{ + boost::shared_lock lock(DbMutex); + + std::vector results; - std::vector results; - for (BrowsePath browsepath : params.BrowsePaths ) - { - BrowsePathResult result = TranslateBrowsePath(browsepath); - results.push_back(result); - } - return results; + for (BrowsePath browsepath : params.BrowsePaths) + { + BrowsePathResult result = TranslateBrowsePath(browsepath); + results.push_back(result); } - std::vector AddressSpaceInMemory::Browse(const OpcUa::NodesQuery& query) const + return results; +} + +std::vector AddressSpaceInMemory::Browse(const OpcUa::NodesQuery & query) const +{ + boost::shared_lock lock(DbMutex); + + if (Debug) { std::cout << "AddressSpaceInternal | Browsing." << std::endl; } + + std::vector results; + + for (BrowseDescription browseDescription : query.NodesToBrowse) { - boost::shared_lock lock(DbMutex); + BrowseResult result; - if (Debug) std::cout << "AddressSpaceInternal | Browsing." << std::endl; - std::vector results; - for ( BrowseDescription browseDescription: query.NodesToBrowse) - { - BrowseResult result; - if(Debug) + if (Debug) { std::cout << "AddressSpaceInternal | Browsing "; std::cout << " NodeId: '" << browseDescription.NodeToBrowse << "'"; @@ -104,511 +113,601 @@ namespace OpcUa std::cout << ", ResultMask: '0x" << std::hex << (unsigned)browseDescription.ResultMask << std::endl; } - NodesMap::const_iterator node_it = Nodes.find(browseDescription.NodeToBrowse); - if ( node_it == Nodes.end() ) + NodesMap::const_iterator node_it = Nodes.find(browseDescription.NodeToBrowse); + + if (node_it == Nodes.end()) { - if (Debug) std::cout << "AddressSpaceInternal | Node '" << OpcUa::ToString(browseDescription.NodeToBrowse) << "' not found in the address space." << std::endl; + if (Debug) { std::cout << "AddressSpaceInternal | Node '" << OpcUa::ToString(browseDescription.NodeToBrowse) << "' not found in the address space." << std::endl; } + continue; } - std::copy_if(node_it->second.References.begin(), node_it->second.References.end(), std::back_inserter(result.Referencies), - std::bind(&AddressSpaceInMemory::IsSuitableReference, this, std::cref(browseDescription), std::placeholders::_1) - ); - results.push_back(result); - } - return results; + std::copy_if(node_it->second.References.begin(), node_it->second.References.end(), std::back_inserter(result.Referencies), + std::bind(&AddressSpaceInMemory::IsSuitableReference, this, std::cref(browseDescription), std::placeholders::_1) + ); + results.push_back(result); } - std::vector AddressSpaceInMemory::BrowseNext() const - { - boost::shared_lock lock(DbMutex); + return results; +} - return std::vector(); - } +std::vector AddressSpaceInMemory::BrowseNext() const +{ + boost::shared_lock lock(DbMutex); - std::vector AddressSpaceInMemory::RegisterNodes(const std::vector& params) const - { - boost::shared_lock lock(DbMutex); + return std::vector(); +} - return params; - } +std::vector AddressSpaceInMemory::RegisterNodes(const std::vector & params) const +{ + boost::shared_lock lock(DbMutex); - void AddressSpaceInMemory::UnregisterNodes(const std::vector& params) const - { - boost::shared_lock lock(DbMutex); + return params; +} - return; - } +void AddressSpaceInMemory::UnregisterNodes(const std::vector & params) const +{ + boost::shared_lock lock(DbMutex); - std::vector AddressSpaceInMemory::Read(const ReadParameters& params) const - { - boost::shared_lock lock(DbMutex); + return; +} - std::vector values; - for (const ReadValueId& attribute : params.AttributesToRead) - { - values.push_back(GetValue(attribute.NodeId, attribute.AttributeId)); - } - return values; - } +std::vector AddressSpaceInMemory::Read(const ReadParameters & params) const +{ + boost::shared_lock lock(DbMutex); - std::vector AddressSpaceInMemory::Write(const std::vector& values) + std::vector values; + + for (const ReadValueId & attribute : params.AttributesToRead) { - boost::unique_lock lock(DbMutex); + values.push_back(GetValue(attribute.NodeId, attribute.AttributeId)); + } + + return values; +} - std::vector statuses; - for (WriteValue value : values) - { - if (value.Value.Encoding & DATA_VALUE) +std::vector AddressSpaceInMemory::Write(const std::vector & values) +{ + boost::unique_lock lock(DbMutex); + + std::vector statuses; + + for (WriteValue value : values) + { + if (value.Value.Encoding & DATA_VALUE) { statuses.push_back(SetValue(value.NodeId, value.AttributeId, value.Value)); continue; } - statuses.push_back(StatusCode::BadNotWritable); - } - return statuses; + + statuses.push_back(StatusCode::BadNotWritable); } - std::tuple AddressSpaceInMemory::FindElementInNode(const NodeId& nodeid, const RelativePathElement& element) const + return statuses; +} + +std::tuple AddressSpaceInMemory::FindElementInNode(const NodeId & nodeid, const RelativePathElement & element) const +{ + NodesMap::const_iterator nodeit = Nodes.find(nodeid); + + if (nodeit != Nodes.end()) { - NodesMap::const_iterator nodeit = Nodes.find(nodeid); - if ( nodeit != Nodes.end() ) - { - for (auto reference : nodeit->second.References) + for (auto reference : nodeit->second.References) { //if (reference.first == current) { std::cout << reference.second.BrowseName.NamespaceIndex << reference.second.BrowseName.Name << " to " << element.TargetName.NamespaceIndex << element.TargetName.Name <(res) == false ) + if (std::get<0>(res) == false) { result.Status = OpcUa::StatusCode::BadNoMatch; return result; } - current = std::get<1>(res); - } - - result.Status = OpcUa::StatusCode::Good; - std::vector targets; - BrowsePathTarget target; - target.Node = current; - target.RemainingPathIndex = std::numeric_limits::max(); - targets.push_back(target); - result.Targets = targets; - return result; + + current = std::get<1>(res); } - DataValue AddressSpaceInMemory::GetValue(const NodeId& node, AttributeId attribute) const + result.Status = OpcUa::StatusCode::Good; + std::vector targets; + BrowsePathTarget target; + target.Node = current; + target.RemainingPathIndex = std::numeric_limits::max(); + targets.push_back(target); + result.Targets = targets; + return result; +} + +DataValue AddressSpaceInMemory::GetValue(const NodeId & node, AttributeId attribute) const +{ + NodesMap::const_iterator nodeit = Nodes.find(node); + + if (nodeit == Nodes.end()) { - NodesMap::const_iterator nodeit = Nodes.find(node); - if ( nodeit == Nodes.end() ) - { - if (Debug) std::cout << "AddressSpaceInternal | Bad node not found: " << node << std::endl; - } - else - { - AttributesMap::const_iterator attrit = nodeit->second.Attributes.find(attribute); - if ( attrit == nodeit->second.Attributes.end() ) + if (Debug) { std::cout << "AddressSpaceInternal | Bad node not found: " << node << std::endl; } + } + + else + { + AttributesMap::const_iterator attrit = nodeit->second.Attributes.find(attribute); + + if (attrit == nodeit->second.Attributes.end()) { - if (Debug) std::cout << "AddressSpaceInternal | node " << node << " has not attribute: " << (uint32_t)attribute << std::endl; + if (Debug) { std::cout << "AddressSpaceInternal | node " << node << " has not attribute: " << (uint32_t)attribute << std::endl; } } - else + + else { - if ( attrit->second.GetValueCallback ) - { - if (Debug) std::cout << "AddressSpaceInternal | A callback is set for this value, calling callback" << std::endl; - return attrit->second.GetValueCallback(); - } - if (Debug) std::cout << "AddressSpaceInternal | No callback is set for this value returning stored value" << std::endl; + if (attrit->second.GetValueCallback) + { + if (Debug) { std::cout << "AddressSpaceInternal | A callback is set for this value, calling callback" << std::endl; } + + return attrit->second.GetValueCallback(); + } + + if (Debug) { std::cout << "AddressSpaceInternal | No callback is set for this value returning stored value" << std::endl; } + return attrit->second.Value; } - } - DataValue value; - value.Encoding = DATA_VALUE_STATUS_CODE; - value.Status = StatusCode::BadNotReadable; - return value; - } - - uint32_t AddressSpaceInMemory::AddDataChangeCallback(const NodeId& node, AttributeId attribute, std::function callback) - { - if (Debug) std::cout << "AddressSpaceInternal| Set data changes callback for node " << node - << " and attribute " << (unsigned)attribute << std::endl; - NodesMap::iterator it = Nodes.find(node); - if ( it == Nodes.end() ) - { - if (Debug) std::cout << "AddressSpaceInternal| Node '" << node << "' not found." << std::endl; - throw std::runtime_error("AddressSpaceInternal | NodeId not found"); - } - AttributesMap::iterator ait = it->second.Attributes.find(attribute); - if ( ait == it->second.Attributes.end() ) - { - if (Debug) std::cout << "address_space| Attribute " << (unsigned)attribute << " of node '" << node << "' not found." << std::endl; - throw std::runtime_error("Attribute not found"); - } - - uint32_t handle = ++DataChangeCallbackHandle; - DataChangeCallbackData data; - data.Callback = callback; - ait->second.DataChangeCallbacks[handle] = data; - ClientIdToAttributeMap[handle] = NodeAttribute(node, attribute); - return handle; - } - - void AddressSpaceInMemory::DeleteDataChangeCallback(uint32_t serverhandle ) - { - if (Debug) std::cout << "AddressSpaceInternal | Deleting callback with client id. " << serverhandle << std::endl; - - ClientIdToAttributeMapType::iterator it = ClientIdToAttributeMap.find(serverhandle); - if ( it == ClientIdToAttributeMap.end() ) - { - std::cout << "AddressSpaceInternal | Error, request to delete a callback using unknown handle: " << serverhandle << std::endl; - return; - } - - NodesMap::iterator nodeit = Nodes.find(it->second.Node); - if ( nodeit != Nodes.end() ) - { - AttributesMap::iterator ait = nodeit->second.Attributes.find(it->second.Attribute); - if ( ait != nodeit->second.Attributes.end() ) + } + + DataValue value; + value.Encoding = DATA_VALUE_STATUS_CODE; + value.Status = StatusCode::BadNotReadable; + return value; +} + +uint32_t AddressSpaceInMemory::AddDataChangeCallback(const NodeId & node, AttributeId attribute, std::function callback) +{ + if (Debug) std::cout << "AddressSpaceInternal| Set data changes callback for node " << node + << " and attribute " << (unsigned)attribute << std::endl; + + NodesMap::iterator it = Nodes.find(node); + + if (it == Nodes.end()) + { + if (Debug) { std::cout << "AddressSpaceInternal| Node '" << node << "' not found." << std::endl; } + + throw std::runtime_error("AddressSpaceInternal | NodeId not found"); + } + + AttributesMap::iterator ait = it->second.Attributes.find(attribute); + + if (ait == it->second.Attributes.end()) + { + if (Debug) { std::cout << "address_space| Attribute " << (unsigned)attribute << " of node '" << node << "' not found." << std::endl; } + + throw std::runtime_error("Attribute not found"); + } + + uint32_t handle = ++DataChangeCallbackHandle; + DataChangeCallbackData data; + data.Callback = callback; + ait->second.DataChangeCallbacks[handle] = data; + ClientIdToAttributeMap[handle] = NodeAttribute(node, attribute); + return handle; +} + +void AddressSpaceInMemory::DeleteDataChangeCallback(uint32_t serverhandle) +{ + if (Debug) { std::cout << "AddressSpaceInternal | Deleting callback with client id. " << serverhandle << std::endl; } + + ClientIdToAttributeMapType::iterator it = ClientIdToAttributeMap.find(serverhandle); + + if (it == ClientIdToAttributeMap.end()) + { + std::cout << "AddressSpaceInternal | Error, request to delete a callback using unknown handle: " << serverhandle << std::endl; + return; + } + + NodesMap::iterator nodeit = Nodes.find(it->second.Node); + + if (nodeit != Nodes.end()) + { + AttributesMap::iterator ait = nodeit->second.Attributes.find(it->second.Attribute); + + if (ait != nodeit->second.Attributes.end()) { size_t nb = ait->second.DataChangeCallbacks.erase(serverhandle); - if (Debug) std::cout << "AddressSpaceInternal | deleted " << nb << " callbacks" << std::endl; + + if (Debug) { std::cout << "AddressSpaceInternal | deleted " << nb << " callbacks" << std::endl; } + ClientIdToAttributeMap.erase(serverhandle); return; } - } - throw std::runtime_error("AddressSpaceInternal | NodeId or attribute nor found"); } - StatusCode AddressSpaceInMemory::SetValueCallback(const NodeId& node, AttributeId attribute, std::function callback) + throw std::runtime_error("AddressSpaceInternal | NodeId or attribute nor found"); +} + +StatusCode AddressSpaceInMemory::SetValueCallback(const NodeId & node, AttributeId attribute, std::function callback) +{ + NodesMap::iterator it = Nodes.find(node); + + if (it != Nodes.end()) { - NodesMap::iterator it = Nodes.find(node); - if ( it != Nodes.end() ) - { - AttributesMap::iterator ait = it->second.Attributes.find(attribute); - if ( ait != it->second.Attributes.end() ) + AttributesMap::iterator ait = it->second.Attributes.find(attribute); + + if (ait != it->second.Attributes.end()) { ait->second.GetValueCallback = callback; return StatusCode::Good; } - } - return StatusCode::BadAttributeIdInvalid; } - void AddressSpaceInMemory::SetMethod(const NodeId& node, std::function (NodeId context, std::vector arguments)> callback) + return StatusCode::BadAttributeIdInvalid; +} + +void AddressSpaceInMemory::SetMethod(const NodeId & node, std::function (NodeId context, std::vector arguments)> callback) +{ + boost::shared_lock lock(DbMutex); + + NodesMap::iterator it = Nodes.find(node); + + if (it != Nodes.end()) + { + it->second.Method = callback; + } + + else + { throw std::runtime_error("While setting node callback: node does not exist."); } +} + +std::vector AddressSpaceInMemory::Call(const std::vector & methodsToCall) +{ + std::vector results; + + for (auto method : methodsToCall) { - boost::shared_lock lock(DbMutex); + results.push_back(CallMethod(method)); + } - NodesMap::iterator it = Nodes.find(node); - if ( it != Nodes.end() ) - { - it->second.Method = callback; - } - else - throw std::runtime_error("While setting node callback: node does not exist."); - } - - std::vector AddressSpaceInMemory::Call(const std::vector& methodsToCall) - { - std::vector results; - for (auto method : methodsToCall) - { - results.push_back(CallMethod(method)); - } - return results; - } - - CallMethodResult AddressSpaceInMemory::CallMethod(CallMethodRequest request) - { - boost::shared_lock lock(DbMutex); - - CallMethodResult result; - NodesMap::iterator node_it = Nodes.find(request.ObjectId); - if ( node_it == Nodes.end() ) - { - result.Status = StatusCode::BadNodeIdUnknown; - return result; - } - NodesMap::iterator method_it = Nodes.find(request.MethodId); - if ( method_it == Nodes.end() ) - { - result.Status = StatusCode::BadNodeIdUnknown; - return result; - } - if ( ! method_it->second.Method ) - { - result.Status = StatusCode::BadNothingToDo; - return result; - } - //FIXME: find a way to return more information about failure to client - try - { - result.OutputArguments = method_it->second.Method(node_it->first, request.InputArguments); - } - catch (std::exception& ex) - { - std::cout << "Exception whil calling method" << request.MethodId << ": " << ex.what() << std::endl; - result.Status = StatusCode::BadUnexpectedError; - return result; - } - for (auto var : request.InputArguments) - { - result.InputArgumentResults.push_back(StatusCode::Good); - } - result.Status = StatusCode::Good; + return results; +} + +CallMethodResult AddressSpaceInMemory::CallMethod(CallMethodRequest request) +{ + boost::shared_lock lock(DbMutex); + + CallMethodResult result; + NodesMap::iterator node_it = Nodes.find(request.ObjectId); + + if (node_it == Nodes.end()) + { + result.Status = StatusCode::BadNodeIdUnknown; return result; } - StatusCode AddressSpaceInMemory::SetValue(const NodeId& node, AttributeId attribute, const DataValue& data) + NodesMap::iterator method_it = Nodes.find(request.MethodId); + + if (method_it == Nodes.end()) { - NodesMap::iterator it = Nodes.find(node); - if ( it != Nodes.end() ) - { - AttributesMap::iterator ait = it->second.Attributes.find(attribute); - if ( ait != it->second.Attributes.end() ) + result.Status = StatusCode::BadNodeIdUnknown; + return result; + } + + if (! method_it->second.Method) + { + result.Status = StatusCode::BadNothingToDo; + return result; + } + + //FIXME: find a way to return more information about failure to client + try + { + result.OutputArguments = method_it->second.Method(node_it->first, request.InputArguments); + } + + catch (std::exception & ex) + { + std::cout << "Exception whil calling method" << request.MethodId << ": " << ex.what() << std::endl; + result.Status = StatusCode::BadUnexpectedError; + return result; + } + + for (auto var : request.InputArguments) + { + result.InputArgumentResults.push_back(StatusCode::Good); + } + + result.Status = StatusCode::Good; + return result; +} + +StatusCode AddressSpaceInMemory::SetValue(const NodeId & node, AttributeId attribute, const DataValue & data) +{ + NodesMap::iterator it = Nodes.find(node); + + if (it != Nodes.end()) + { + AttributesMap::iterator ait = it->second.Attributes.find(attribute); + + if (ait != it->second.Attributes.end()) { DataValue value(data); value.SetServerTimestamp(DateTime::Current()); ait->second.Value = value; + //call registered callback for (auto pair : ait->second.DataChangeCallbacks) - { - pair.second.Callback(it->first, ait->first, ait->second.Value); - } + { + pair.second.Callback(it->first, ait->first, ait->second.Value); + } + return StatusCode::Good; } - } - return StatusCode::BadAttributeIdInvalid; - } - - bool AddressSpaceInMemory::IsSuitableReference(const BrowseDescription& desc, const ReferenceDescription& reference) const - { - if (Debug) std::cout << "AddressSpaceInternal | Checking reference '" << reference.ReferenceTypeId << "' to the node '" << reference.TargetNodeId << "' (" << reference.BrowseName << ") which must fit ref: " << desc.ReferenceTypeId << " with include subtype: " << desc.IncludeSubtypes << std::endl; - - if ((desc.Direction == BrowseDirection::Forward && !reference.IsForward) || (desc.Direction == BrowseDirection::Inverse && reference.IsForward)) - { - if (Debug) std::cout << "AddressSpaceInternal | Reference in different direction." << std::endl; - return false; - } - if (desc.ReferenceTypeId != ObjectId::Null && !IsSuitableReferenceType(reference, desc.ReferenceTypeId, desc.IncludeSubtypes)) - { - if (Debug) std::cout << "AddressSpaceInternal | Reference has wrong type." << std::endl; - return false; - } - if (desc.NodeClasses != NodeClass::Unspecified && (desc.NodeClasses & reference.TargetNodeClass) == NodeClass::Unspecified) - { - if (Debug) std::cout << "AddressSpaceInternal | Reference has wrong class." << std::endl; - return false; - } - if (Debug) std::cout << "AddressSpaceInternal | Reference suitable." << std::endl; - return true; - } - - bool AddressSpaceInMemory::IsSuitableReferenceType(const ReferenceDescription& reference, const NodeId& typeId, bool includeSubtypes) const - { - if (!includeSubtypes) - { - return reference.ReferenceTypeId == typeId; - } - const std::vector suitableTypes = SelectNodesHierarchy(std::vector(1, typeId)); - const auto resultIt = std::find(suitableTypes.begin(), suitableTypes.end(), reference.ReferenceTypeId);\ - return resultIt != suitableTypes.end(); - } - - std::vector AddressSpaceInMemory::SelectNodesHierarchy(std::vector sourceNodes) const - { - std::vector subNodes; - for ( NodeId nodeid: sourceNodes ) - { - NodesMap::const_iterator node_it = Nodes.find(nodeid); - if ( node_it != Nodes.end() ) - { - for (auto& ref: node_it->second.References ) + } + + return StatusCode::BadAttributeIdInvalid; +} + +bool AddressSpaceInMemory::IsSuitableReference(const BrowseDescription & desc, const ReferenceDescription & reference) const +{ + if (Debug) { std::cout << "AddressSpaceInternal | Checking reference '" << reference.ReferenceTypeId << "' to the node '" << reference.TargetNodeId << "' (" << reference.BrowseName << ") which must fit ref: " << desc.ReferenceTypeId << " with include subtype: " << desc.IncludeSubtypes << std::endl; } + + if ((desc.Direction == BrowseDirection::Forward && !reference.IsForward) || (desc.Direction == BrowseDirection::Inverse && reference.IsForward)) + { + if (Debug) { std::cout << "AddressSpaceInternal | Reference in different direction." << std::endl; } + + return false; + } + + if (desc.ReferenceTypeId != ObjectId::Null && !IsSuitableReferenceType(reference, desc.ReferenceTypeId, desc.IncludeSubtypes)) + { + if (Debug) { std::cout << "AddressSpaceInternal | Reference has wrong type." << std::endl; } + + return false; + } + + if (desc.NodeClasses != NodeClass::Unspecified && (desc.NodeClasses & reference.TargetNodeClass) == NodeClass::Unspecified) + { + if (Debug) { std::cout << "AddressSpaceInternal | Reference has wrong class." << std::endl; } + + return false; + } + + if (Debug) { std::cout << "AddressSpaceInternal | Reference suitable." << std::endl; } + + return true; +} + +bool AddressSpaceInMemory::IsSuitableReferenceType(const ReferenceDescription & reference, const NodeId & typeId, bool includeSubtypes) const +{ + if (!includeSubtypes) + { + return reference.ReferenceTypeId == typeId; + } + + const std::vector suitableTypes = SelectNodesHierarchy(std::vector(1, typeId)); + const auto resultIt = std::find(suitableTypes.begin(), suitableTypes.end(), reference.ReferenceTypeId); + \ + return resultIt != suitableTypes.end(); +} + +std::vector AddressSpaceInMemory::SelectNodesHierarchy(std::vector sourceNodes) const +{ + std::vector subNodes; + + for (NodeId nodeid : sourceNodes) + { + NodesMap::const_iterator node_it = Nodes.find(nodeid); + + if (node_it != Nodes.end()) + { + for (auto & ref : node_it->second.References) { subNodes.push_back(ref.TargetNodeId); - } + } } - } - if (subNodes.empty()) - { - return sourceNodes; - } - - const std::vector allChilds = SelectNodesHierarchy(subNodes); - sourceNodes.insert(sourceNodes.end(), allChilds.begin(), allChilds.end()); + } + + if (subNodes.empty()) + { return sourceNodes; } - AddNodesResult AddressSpaceInMemory::AddNode( const AddNodesItem& item ) + const std::vector allChilds = SelectNodesHierarchy(subNodes); + sourceNodes.insert(sourceNodes.end(), allChilds.begin(), allChilds.end()); + return sourceNodes; +} + +AddNodesResult AddressSpaceInMemory::AddNode(const AddNodesItem & item) +{ + AddNodesResult result; + + if (Debug) { std::cout << "AddressSpaceInternal | address_space| Adding new node id='" << item.RequestedNewNodeId << "' name=" << item.BrowseName.Name << std::endl; } + + const NodeId resultId = GetNewNodeId(item.RequestedNewNodeId); + + if (!Nodes.empty() && resultId != ObjectId::Null && Nodes.find(resultId) != Nodes.end()) { - AddNodesResult result; - if (Debug) std::cout << "AddressSpaceInternal | address_space| Adding new node id='" << item.RequestedNewNodeId << "' name=" << item.BrowseName.Name << std::endl; + std::cerr << "AddressSpaceInternal | Error: NodeId '" << resultId << "' allready exist: " << std::endl; + result.Status = StatusCode::BadNodeIdExists; + return result; + } - const NodeId resultId = GetNewNodeId(item.RequestedNewNodeId); + NodesMap::iterator parent_node_it = Nodes.end(); - if (!Nodes.empty() && resultId != ObjectId::Null && Nodes.find(resultId) != Nodes.end()) - { - std::cerr << "AddressSpaceInternal | Error: NodeId '"<< resultId << "' allready exist: " << std::endl; - result.Status = StatusCode::BadNodeIdExists; - return result; - } + if (item.ParentNodeId != NodeId()) + { + parent_node_it = Nodes.find(item.ParentNodeId); - NodesMap::iterator parent_node_it = Nodes.end(); - if (item.ParentNodeId != NodeId()) - { - parent_node_it = Nodes.find(item.ParentNodeId); - if ( parent_node_it == Nodes.end() ) + if (parent_node_it == Nodes.end()) { - if (Debug) std::cout << "AddressSpaceInternal | Error: Parent node '"<< item.ParentNodeId << "'does not exist" << std::endl; + if (Debug) { std::cout << "AddressSpaceInternal | Error: Parent node '" << item.ParentNodeId << "'does not exist" << std::endl; } + result.Status = StatusCode::BadParentNodeIdInvalid; return result; } - } - - NodeStruct nodestruct; - //Add Common attributes - nodestruct.Attributes[AttributeId::NodeId].Value = resultId; - nodestruct.Attributes[AttributeId::BrowseName].Value = item.BrowseName; - nodestruct.Attributes[AttributeId::NodeClass].Value = static_cast(item.Class); - - // Add requested attributes - for (const auto& attr: item.Attributes.Attributes) - { - AttributeValue attval; - attval.Value = attr.second; - - nodestruct.Attributes.insert(std::make_pair(attr.first, attval)); - } - - Nodes.insert(std::make_pair(resultId, nodestruct)); - - if (parent_node_it != Nodes.end()) - { - // Link to parent - ReferenceDescription desc; - desc.ReferenceTypeId = item.ReferenceTypeId; - desc.TargetNodeId = resultId; - desc.TargetNodeClass = item.Class; - desc.BrowseName = item.BrowseName; - desc.DisplayName = LocalizedText(item.BrowseName.Name); - desc.TargetNodeTypeDefinition = item.TypeDefinition; - desc.IsForward = true; // should this be in constructor? - - parent_node_it->second.References.push_back(desc); - } - - if (item.TypeDefinition != ObjectId::Null) - { - // Link to parent - AddReferencesItem typeRef; - typeRef.SourceNodeId = resultId; - typeRef.IsForward = true; - typeRef.ReferenceTypeId = ObjectId::HasTypeDefinition; - typeRef.TargetNodeId = item.TypeDefinition; - typeRef.TargetNodeClass = NodeClass::DataType; - AddReference(typeRef); - } - - result.Status = StatusCode::Good; - result.AddedNodeId = resultId; - if (Debug) std::cout << "AddressSpaceInternal | node added." << std::endl; - return result; } - StatusCode AddressSpaceInMemory::AddReference(const AddReferencesItem& item) + NodeStruct nodestruct; + //Add Common attributes + nodestruct.Attributes[AttributeId::NodeId].Value = resultId; + nodestruct.Attributes[AttributeId::BrowseName].Value = item.BrowseName; + nodestruct.Attributes[AttributeId::NodeClass].Value = static_cast(item.Class); + + // Add requested attributes + for (const auto & attr : item.Attributes.Attributes) { - NodesMap::iterator node_it = Nodes.find(item.SourceNodeId); - if ( node_it == Nodes.end() ) - { - return StatusCode::BadSourceNodeIdInvalid; - } - NodesMap::iterator targetnode_it = Nodes.find(item.TargetNodeId); - if ( targetnode_it == Nodes.end() ) - { - return StatusCode::BadTargetNodeIdInvalid; - } + AttributeValue attval; + attval.Value = attr.second; + + nodestruct.Attributes.insert(std::make_pair(attr.first, attval)); + } + + Nodes.insert(std::make_pair(resultId, nodestruct)); + + if (parent_node_it != Nodes.end()) + { + // Link to parent ReferenceDescription desc; desc.ReferenceTypeId = item.ReferenceTypeId; - desc.IsForward = item.IsForward; - desc.TargetNodeId = item.TargetNodeId; - desc.TargetNodeClass = item.TargetNodeClass; - DataValue dv = GetValue(item.TargetNodeId, AttributeId::BrowseName); - if (dv.Status == StatusCode::Good) - { - desc.BrowseName = dv.Value.As(); - } - else - { - desc.BrowseName = QualifiedName("NONAME", 0); - } - dv = GetValue(item.TargetNodeId, AttributeId::DisplayName); - if (dv.Status == StatusCode::Good) - { - desc.DisplayName = dv.Value.As(); - } - else - { - desc.DisplayName = LocalizedText(desc.BrowseName.Name); - } - node_it->second.References.push_back(desc); - return StatusCode::Good; + desc.TargetNodeId = resultId; + desc.TargetNodeClass = item.Class; + desc.BrowseName = item.BrowseName; + desc.DisplayName = LocalizedText(item.BrowseName.Name); + desc.TargetNodeTypeDefinition = item.TypeDefinition; + desc.IsForward = true; // should this be in constructor? + + parent_node_it->second.References.push_back(desc); + } + + if (item.TypeDefinition != ObjectId::Null) + { + // Link to parent + AddReferencesItem typeRef; + typeRef.SourceNodeId = resultId; + typeRef.IsForward = true; + typeRef.ReferenceTypeId = ObjectId::HasTypeDefinition; + typeRef.TargetNodeId = item.TypeDefinition; + typeRef.TargetNodeClass = NodeClass::DataType; + AddReference(typeRef); + } + + result.Status = StatusCode::Good; + result.AddedNodeId = resultId; + + if (Debug) { std::cout << "AddressSpaceInternal | node added." << std::endl; } + + return result; +} + +StatusCode AddressSpaceInMemory::AddReference(const AddReferencesItem & item) +{ + NodesMap::iterator node_it = Nodes.find(item.SourceNodeId); + + if (node_it == Nodes.end()) + { + return StatusCode::BadSourceNodeIdInvalid; } - NodeId AddressSpaceInMemory::GetNewNodeId(const NodeId& id) + NodesMap::iterator targetnode_it = Nodes.find(item.TargetNodeId); + + if (targetnode_it == Nodes.end()) { - uint32_t idx; - if (id == ObjectId::Null || id.IsNull()) - { - idx = DefaultIdx; - } else { - if (id.HasNullIdentifier()) + return StatusCode::BadTargetNodeIdInvalid; + } + + ReferenceDescription desc; + desc.ReferenceTypeId = item.ReferenceTypeId; + desc.IsForward = item.IsForward; + desc.TargetNodeId = item.TargetNodeId; + desc.TargetNodeClass = item.TargetNodeClass; + DataValue dv = GetValue(item.TargetNodeId, AttributeId::BrowseName); + + if (dv.Status == StatusCode::Good) + { + desc.BrowseName = dv.Value.As(); + } + + else + { + desc.BrowseName = QualifiedName("NONAME", 0); + } + + dv = GetValue(item.TargetNodeId, AttributeId::DisplayName); + + if (dv.Status == StatusCode::Good) + { + desc.DisplayName = dv.Value.As(); + } + + else + { + desc.DisplayName = LocalizedText(desc.BrowseName.Name); + } + + node_it->second.References.push_back(desc); + return StatusCode::Good; +} + +NodeId AddressSpaceInMemory::GetNewNodeId(const NodeId & id) +{ + uint32_t idx; + + if (id == ObjectId::Null || id.IsNull()) + { + idx = DefaultIdx; + } + + else + { + if (id.HasNullIdentifier()) { idx = id.GetNamespaceIndex(); - } else { + } + + else + { return id; } - } - - // skip over already assigned node id's - // this should be a very seldom operation - it only happens when - // we actively assign static node id's to some nodes and after that - // create nodes using automatic id allocation and even then it - // only happens once. So we don't care about optimiziation here. - for (;;) - { - NodeId result = OpcUa::NumericNodeId(++MaxNodeIdNum, idx); - if (Nodes.find(result) == Nodes.end()) + } + + // skip over already assigned node id's + // this should be a very seldom operation - it only happens when + // we actively assign static node id's to some nodes and after that + // create nodes using automatic id allocation and even then it + // only happens once. So we don't care about optimiziation here. + for (;;) + { + NodeId result = OpcUa::NumericNodeId(++MaxNodeIdNum, idx); + + if (Nodes.find(result) == Nodes.end()) { return result; } - // completly unlikly - we would have to allocate 4gig nodes to - // fullfill this condition - if (MaxNodeIdNum == std::numeric_limits::max()) { + + // completly unlikly - we would have to allocate 4gig nodes to + // fullfill this condition + if (MaxNodeIdNum == std::numeric_limits::max()) + { throw std::runtime_error("AddressSpaceInternal | unable to assign new NodeId: range exceeded"); } - } } - } +} +} - namespace Server - { - AddressSpace::UniquePtr CreateAddressSpace(bool debug) - { - return AddressSpace::UniquePtr(new Internal::AddressSpaceInMemory(debug)); - } - } +namespace Server +{ +AddressSpace::UniquePtr CreateAddressSpace(bool debug) +{ + return AddressSpace::UniquePtr(new Internal::AddressSpaceInMemory(debug)); +} +} } diff --git a/src/server/address_space_internal.h b/src/server/address_space_internal.h index 590b1006..304822c9 100644 --- a/src/server/address_space_internal.h +++ b/src/server/address_space_internal.h @@ -33,111 +33,111 @@ namespace OpcUa { - namespace Internal - { - - class InternalSubscription; - - struct NodeAttribute - { - NodeId Node; - AttributeId Attribute; - NodeAttribute(NodeId node, AttributeId attribute) : Node(node), Attribute(attribute) {} - NodeAttribute() {} //seems compiler wants this one - }; - - typedef std::map ClientIdToAttributeMapType; - - struct DataChangeCallbackData - { - std::function Callback; - IntegerId ClientHandle; - }; - - typedef std::map DataChangeCallbackMap; - - //Store an attribute value together with a link to all its suscriptions - struct AttributeValue - { - DataValue Value; - DataChangeCallbackMap DataChangeCallbacks; - std::function GetValueCallback; - }; - - typedef std::map AttributesMap; - - //Store all data related to a Node - struct NodeStruct - { - AttributesMap Attributes; - std::vector References; - std::function (NodeId, std::vector)> Method; - }; - - typedef std::map NodesMap; - - //In memory storage of server opc-ua data model - class AddressSpaceInMemory : public Server::AddressSpace - { - public: - AddressSpaceInMemory(bool debug); - - ~AddressSpaceInMemory(); - - //Services implementation - virtual std::vector AddNodes(const std::vector& items); - virtual std::vector AddReferences(const std::vector& items); - virtual std::vector TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters& params) const; - virtual std::vector Browse(const OpcUa::NodesQuery& query) const; - virtual std::vector BrowseNext() const; - virtual std::vector RegisterNodes(const std::vector& params) const; - virtual void UnregisterNodes(const std::vector& params) const; - virtual std::vector Read(const ReadParameters& params) const; - virtual std::vector Write(const std::vector& values); - virtual std::vector Call(const std::vector& methodsToCall); - - //Server side methods - - /// @brief Add callback which will be called when values of attribute is changed. - /// @return handle of a callback which should be passed to the DeletDataChangeCallabck - uint32_t AddDataChangeCallback(const NodeId& node, AttributeId attribute, std::function callback); - - /// @bried Delete data change callback assosioated with handle. - void DeleteDataChangeCallback(uint32_t serverhandle); - - /// @brief Set callback which will be called to read new value of the attribue. - StatusCode SetValueCallback(const NodeId& node, AttributeId attribute, std::function callback); - - /// @brief Set method function for a method node. - void SetMethod(const NodeId& node, std::function (NodeId context, std::vector arguments)> callback); - - private: - std::tuple FindElementInNode(const NodeId& nodeid, const RelativePathElement& element) const; - BrowsePathResult TranslateBrowsePath(const BrowsePath& browsepath) const; - DataValue GetValue(const NodeId& node, AttributeId attribute) const; - StatusCode SetValue(const NodeId& node, AttributeId attribute, const DataValue& data); - bool IsSuitableReference(const BrowseDescription& desc, const ReferenceDescription& reference) const; - bool IsSuitableReferenceType(const ReferenceDescription& reference, const NodeId& typeId, bool includeSubtypes) const; - std::vector SelectNodesHierarchy(std::vector sourceNodes) const; - AddNodesResult AddNode( const AddNodesItem& item ); - StatusCode AddReference(const AddReferencesItem& item); - NodeId GetNewNodeId(const NodeId& id); - CallMethodResult CallMethod(CallMethodRequest method); - - private: - bool Debug = false; - mutable boost::shared_mutex DbMutex; - NodesMap Nodes; - ClientIdToAttributeMapType ClientIdToAttributeMap; //Use to find callback using callback subcsriptionid - uint32_t MaxNodeIdNum = 2000; - uint32_t DefaultIdx = 2; - std::atomic DataChangeCallbackHandle; - }; - } - - namespace Server - { - AddressSpace::UniquePtr CreateAddressSpace(bool debug); - } +namespace Internal +{ + +class InternalSubscription; + +struct NodeAttribute +{ + NodeId Node; + AttributeId Attribute; + NodeAttribute(NodeId node, AttributeId attribute) : Node(node), Attribute(attribute) {} + NodeAttribute() {} //seems compiler wants this one +}; + +typedef std::map ClientIdToAttributeMapType; + +struct DataChangeCallbackData +{ + std::function Callback; + IntegerId ClientHandle; +}; + +typedef std::map DataChangeCallbackMap; + +//Store an attribute value together with a link to all its suscriptions +struct AttributeValue +{ + DataValue Value; + DataChangeCallbackMap DataChangeCallbacks; + std::function GetValueCallback; +}; + +typedef std::map AttributesMap; + +//Store all data related to a Node +struct NodeStruct +{ + AttributesMap Attributes; + std::vector References; + std::function (NodeId, std::vector)> Method; +}; + +typedef std::map NodesMap; + +//In memory storage of server opc-ua data model +class AddressSpaceInMemory : public Server::AddressSpace +{ +public: + AddressSpaceInMemory(bool debug); + + ~AddressSpaceInMemory(); + + //Services implementation + virtual std::vector AddNodes(const std::vector & items); + virtual std::vector AddReferences(const std::vector & items); + virtual std::vector TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters & params) const; + virtual std::vector Browse(const OpcUa::NodesQuery & query) const; + virtual std::vector BrowseNext() const; + virtual std::vector RegisterNodes(const std::vector & params) const; + virtual void UnregisterNodes(const std::vector & params) const; + virtual std::vector Read(const ReadParameters & params) const; + virtual std::vector Write(const std::vector & values); + virtual std::vector Call(const std::vector & methodsToCall); + + //Server side methods + + /// @brief Add callback which will be called when values of attribute is changed. + /// @return handle of a callback which should be passed to the DeletDataChangeCallabck + uint32_t AddDataChangeCallback(const NodeId & node, AttributeId attribute, std::function callback); + + /// @bried Delete data change callback assosioated with handle. + void DeleteDataChangeCallback(uint32_t serverhandle); + + /// @brief Set callback which will be called to read new value of the attribue. + StatusCode SetValueCallback(const NodeId & node, AttributeId attribute, std::function callback); + + /// @brief Set method function for a method node. + void SetMethod(const NodeId & node, std::function (NodeId context, std::vector arguments)> callback); + +private: + std::tuple FindElementInNode(const NodeId & nodeid, const RelativePathElement & element) const; + BrowsePathResult TranslateBrowsePath(const BrowsePath & browsepath) const; + DataValue GetValue(const NodeId & node, AttributeId attribute) const; + StatusCode SetValue(const NodeId & node, AttributeId attribute, const DataValue & data); + bool IsSuitableReference(const BrowseDescription & desc, const ReferenceDescription & reference) const; + bool IsSuitableReferenceType(const ReferenceDescription & reference, const NodeId & typeId, bool includeSubtypes) const; + std::vector SelectNodesHierarchy(std::vector sourceNodes) const; + AddNodesResult AddNode(const AddNodesItem & item); + StatusCode AddReference(const AddReferencesItem & item); + NodeId GetNewNodeId(const NodeId & id); + CallMethodResult CallMethod(CallMethodRequest method); + +private: + bool Debug = false; + mutable boost::shared_mutex DbMutex; + NodesMap Nodes; + ClientIdToAttributeMapType ClientIdToAttributeMap; //Use to find callback using callback subcsriptionid + uint32_t MaxNodeIdNum = 2000; + uint32_t DefaultIdx = 2; + std::atomic DataChangeCallbackHandle; +}; +} + +namespace Server +{ +AddressSpace::UniquePtr CreateAddressSpace(bool debug); +} } diff --git a/src/server/asio_addon.cpp b/src/server/asio_addon.cpp index 81bd8e1a..795a6b2c 100644 --- a/src/server/asio_addon.cpp +++ b/src/server/asio_addon.cpp @@ -25,75 +25,80 @@ namespace { - class AsioAddonImpl : public OpcUa::Server::AsioAddon +class AsioAddonImpl : public OpcUa::Server::AsioAddon +{ +public: + AsioAddonImpl() + : Work(IoService) { - public: - AsioAddonImpl() - : Work(IoService) - { - } + } - void Initialize(Common::AddonsManager&, const Common::AddonParameters& params) override - { - const unsigned threadsNumber = GetThreadsNumber(params); - //std::cout << "asio| Starting " << threadsNumber << "threads." << std::endl; - for (unsigned i = 0; i < threadsNumber; ++i) + void Initialize(Common::AddonsManager &, const Common::AddonParameters & params) override + { + const unsigned threadsNumber = GetThreadsNumber(params); + + //std::cout << "asio| Starting " << threadsNumber << "threads." << std::endl; + for (unsigned i = 0; i < threadsNumber; ++i) { - Threads.emplace_back([this, i](){ + Threads.emplace_back([this, i]() + { //std::cout << "asio| Starting thread " << i << "." << std::endl; IoService.run(); //std::cout << "asio| Thread " << i << "exited." << std::endl; }); } - } + } - void Stop() override - { - //std::cout << "asio| stopping io service." << std::endl; - IoService.stop(); - //std::cout << "asio| joining threads." << std::endl; - std::for_each(Threads.begin(), Threads.end(), [](std::thread& thread){ - thread.join(); - }); - } - - virtual boost::asio::io_service& GetIoService() override + void Stop() override + { + //std::cout << "asio| stopping io service." << std::endl; + IoService.stop(); + //std::cout << "asio| joining threads." << std::endl; + std::for_each(Threads.begin(), Threads.end(), [](std::thread & thread) { - return IoService; - } + thread.join(); + }); + } - unsigned GetThreadsNumber(const Common::AddonParameters& params) const + virtual boost::asio::io_service & GetIoService() override + { + return IoService; + } + + unsigned GetThreadsNumber(const Common::AddonParameters & params) const { unsigned num = 1; + for (auto paramIt : params.Parameters) - { - if (paramIt.Name == "threads") { - num = std::stoi(paramIt.Value); - break; + if (paramIt.Name == "threads") + { + num = std::stoi(paramIt.Value); + break; + } } - } + return num; } - private: - boost::asio::io_service IoService; - boost::asio::io_service::work Work; - std::vector Threads; - }; +private: + boost::asio::io_service IoService; + boost::asio::io_service::work Work; + std::vector Threads; +}; } namespace OpcUa { - namespace Server - { +namespace Server +{ - Common::Addon::UniquePtr AsioAddonFactory::CreateAddon() - { - return Common::Addon::UniquePtr(new AsioAddonImpl); - } +Common::Addon::UniquePtr AsioAddonFactory::CreateAddon() +{ + return Common::Addon::UniquePtr(new AsioAddonImpl); +} - } +} } diff --git a/src/server/common_addons.cpp b/src/server/common_addons.cpp index c225b43f..15c4ef46 100644 --- a/src/server/common_addons.cpp +++ b/src/server/common_addons.cpp @@ -36,148 +36,154 @@ namespace { - using namespace OpcUa; +using namespace OpcUa; - void AddParameters(Common::AddonInformation& info, const Common::ParametersGroup& params) - { - info.Parameters.Groups = params.Groups; - info.Parameters.Parameters = params.Parameters; - } +void AddParameters(Common::AddonInformation & info, const Common::ParametersGroup & params) +{ + info.Parameters.Groups = params.Groups; + info.Parameters.Parameters = params.Parameters; +} - void CreateCommonAddonsConfiguration(const Common::AddonParameters& params, std::vector& addons) - { - Common::AddonInformation endpointsRegistry = Server::CreateEndpointsRegistryAddon(); - Common::AddonInformation addressSpaceRegistry = Server::CreateAddressSpaceAddon(); - Common::AddonInformation asioAddon = Server::CreateAsioAddon(); - Common::AddonInformation subscriptionService = Server::CreateSubscriptionServiceAddon(); - Common::AddonInformation serverObject = Server::CreateServerObjectAddon(); +void CreateCommonAddonsConfiguration(const Common::AddonParameters & params, std::vector & addons) +{ + Common::AddonInformation endpointsRegistry = Server::CreateEndpointsRegistryAddon(); + Common::AddonInformation addressSpaceRegistry = Server::CreateAddressSpaceAddon(); + Common::AddonInformation asioAddon = Server::CreateAsioAddon(); + Common::AddonInformation subscriptionService = Server::CreateSubscriptionServiceAddon(); + Common::AddonInformation serverObject = Server::CreateServerObjectAddon(); - for (const Common::ParametersGroup& group : params.Groups) + for (const Common::ParametersGroup & group : params.Groups) { if (group.Name == OpcUa::Server::EndpointsRegistryAddonId) - { - AddParameters(endpointsRegistry, group); - } -/* - else if (group.Name == OpcUa::Server::OpcUaProtocolAddonId) - { - Common::AddonInformation binaryProtocol = Server::CreateBinaryServerAddon(); - AddParameters(binaryProtocol, group); - addons.push_back(binaryProtocol); - } -*/ + { + AddParameters(endpointsRegistry, group); + } + + /* + else if (group.Name == OpcUa::Server::OpcUaProtocolAddonId) + { + Common::AddonInformation binaryProtocol = Server::CreateBinaryServerAddon(); + AddParameters(binaryProtocol, group); + addons.push_back(binaryProtocol); + } + */ else if (group.Name == OpcUa::Server::AddressSpaceRegistryAddonId) - { - AddParameters(addressSpaceRegistry, group); - } + { + AddParameters(addressSpaceRegistry, group); + } + else if (group.Name == OpcUa::Server::AsyncOpcTcpAddonId) - { - Common::AddonInformation opcTcpAsync = Server::CreateOpcTcpAsyncAddon(); - AddParameters(opcTcpAsync, group); - addons.push_back(opcTcpAsync); - } + { + Common::AddonInformation opcTcpAsync = Server::CreateOpcTcpAsyncAddon(); + AddParameters(opcTcpAsync, group); + addons.push_back(opcTcpAsync); + } + else if (group.Name == OpcUa::Server::AsioAddonId) - { - AddParameters(asioAddon, group); - } + { + AddParameters(asioAddon, group); + } + else if (group.Name == OpcUa::Server::SubscriptionServiceAddonId) - { - AddParameters(subscriptionService, group); - } + { + AddParameters(subscriptionService, group); + } + else if (group.Name == OpcUa::Server::ServerObjectAddonId) - { - AddParameters(serverObject, group); - } + { + AddParameters(serverObject, group); + } } - addons.push_back(endpointsRegistry); - addons.push_back(addressSpaceRegistry); - addons.push_back(asioAddon); - addons.push_back(subscriptionService); - addons.push_back(Server::CreateServicesRegistryAddon()); - addons.push_back(Server::CreateStandardNamespaceAddon()); - addons.push_back(serverObject); - } + addons.push_back(endpointsRegistry); + addons.push_back(addressSpaceRegistry); + addons.push_back(asioAddon); + addons.push_back(subscriptionService); + addons.push_back(Server::CreateServicesRegistryAddon()); + addons.push_back(Server::CreateStandardNamespaceAddon()); + addons.push_back(serverObject); +} - inline void RegisterAddons(std::vector addons, Common::AddonsManager& manager) +inline void RegisterAddons(std::vector addons, Common::AddonsManager & manager) +{ + std::for_each(std::begin(addons), std::end(addons), [&manager](const Common::AddonInformation & addonConfig) { - std::for_each(std::begin(addons), std::end(addons), [&manager](const Common::AddonInformation& addonConfig){ - manager.Register(addonConfig); - }); - } + manager.Register(addonConfig); + }); +} - Common::AddonParameters CreateAddonsParameters(const OpcUa::Server::Parameters& serverParams) - { - Common::Parameter debugMode("debug", std::to_string(serverParams.Debug)); +Common::AddonParameters CreateAddonsParameters(const OpcUa::Server::Parameters & serverParams) +{ + Common::Parameter debugMode("debug", std::to_string(serverParams.Debug)); - Common::AddonParameters addons; + Common::AddonParameters addons; - Common::ParametersGroup async("async"); - async.Parameters.push_back(Common::Parameter("threads", std::to_string(serverParams.ThreadsCount))); - async.Parameters.push_back(debugMode); - addons.Groups.push_back(async); + Common::ParametersGroup async("async"); + async.Parameters.push_back(Common::Parameter("threads", std::to_string(serverParams.ThreadsCount))); + async.Parameters.push_back(debugMode); + addons.Groups.push_back(async); - Common::ParametersGroup addressSpace(OpcUa::Server::AddressSpaceRegistryAddonId); - addressSpace.Parameters.push_back(debugMode); - addons.Groups.push_back(addressSpace); + Common::ParametersGroup addressSpace(OpcUa::Server::AddressSpaceRegistryAddonId); + addressSpace.Parameters.push_back(debugMode); + addons.Groups.push_back(addressSpace); - Common::ParametersGroup endpointServices(OpcUa::Server::EndpointsRegistryAddonId); - endpointServices.Parameters.push_back(debugMode); - addons.Groups.push_back(endpointServices); + Common::ParametersGroup endpointServices(OpcUa::Server::EndpointsRegistryAddonId); + endpointServices.Parameters.push_back(debugMode); + addons.Groups.push_back(endpointServices); - Common::ParametersGroup subscriptionServices(OpcUa::Server::SubscriptionServiceAddonId); - subscriptionServices.Parameters.push_back(debugMode); - addons.Groups.push_back(subscriptionServices); + Common::ParametersGroup subscriptionServices(OpcUa::Server::SubscriptionServiceAddonId); + subscriptionServices.Parameters.push_back(debugMode); + addons.Groups.push_back(subscriptionServices); - Common::ParametersGroup opc_tcp(OpcUa::Server::AsyncOpcTcpAddonId); - opc_tcp.Parameters.push_back(debugMode); - OpcUa::Server::ApplicationData applicationData; - applicationData.Application = serverParams.Endpoint.Server; - applicationData.Endpoints.push_back(serverParams.Endpoint); - opc_tcp.Groups = OpcUa::CreateCommonParameters({applicationData}, serverParams.Debug); - addons.Groups.push_back(opc_tcp); + Common::ParametersGroup opc_tcp(OpcUa::Server::AsyncOpcTcpAddonId); + opc_tcp.Parameters.push_back(debugMode); + OpcUa::Server::ApplicationData applicationData; + applicationData.Application = serverParams.Endpoint.Server; + applicationData.Endpoints.push_back(serverParams.Endpoint); + opc_tcp.Groups = OpcUa::CreateCommonParameters({applicationData}, serverParams.Debug); + addons.Groups.push_back(opc_tcp); - return addons; - } + return addons; +} } // namespace namespace OpcUa { - Common::AddonInformation Server::CreateServicesRegistryAddon() - { - Common::AddonInformation services; - services.Factory = std::make_shared(); - services.Id = OpcUa::Server::ServicesRegistryAddonId; - return services; - } +Common::AddonInformation Server::CreateServicesRegistryAddon() +{ + Common::AddonInformation services; + services.Factory = std::make_shared(); + services.Id = OpcUa::Server::ServicesRegistryAddonId; + return services; +} - Common::AddonInformation Server::CreateAddressSpaceAddon() - { - Common::AddonInformation config; - config.Factory = std::make_shared(); - config.Id = OpcUa::Server::AddressSpaceRegistryAddonId; - config.Dependencies.push_back(OpcUa::Server::ServicesRegistryAddonId); - return config; - } +Common::AddonInformation Server::CreateAddressSpaceAddon() +{ + Common::AddonInformation config; + config.Factory = std::make_shared(); + config.Id = OpcUa::Server::AddressSpaceRegistryAddonId; + config.Dependencies.push_back(OpcUa::Server::ServicesRegistryAddonId); + return config; +} - Common::AddonInformation Server::CreateStandardNamespaceAddon() - { - Common::AddonInformation config; - config.Factory = std::make_shared(); - config.Id = OpcUa::Server::StandardNamespaceAddonId; - config.Dependencies.push_back(OpcUa::Server::AddressSpaceRegistryAddonId); - return config; - } +Common::AddonInformation Server::CreateStandardNamespaceAddon() +{ + Common::AddonInformation config; + config.Factory = std::make_shared(); + config.Id = OpcUa::Server::StandardNamespaceAddonId; + config.Dependencies.push_back(OpcUa::Server::AddressSpaceRegistryAddonId); + return config; +} - Common::AddonInformation Server::CreateEndpointsRegistryAddon() - { - Common::AddonInformation endpoints; - endpoints.Factory = std::make_shared(); - endpoints.Id = OpcUa::Server::EndpointsRegistryAddonId; - endpoints.Dependencies.push_back(OpcUa::Server::ServicesRegistryAddonId); - return endpoints; - } +Common::AddonInformation Server::CreateEndpointsRegistryAddon() +{ + Common::AddonInformation endpoints; + endpoints.Factory = std::make_shared(); + endpoints.Id = OpcUa::Server::EndpointsRegistryAddonId; + endpoints.Dependencies.push_back(OpcUa::Server::ServicesRegistryAddonId); + return endpoints; +} /* Common::AddonInformation Server::CreateBinaryServerAddon() { @@ -189,65 +195,66 @@ namespace OpcUa return opcTcp; } */ - Common::AddonInformation Server::CreateOpcTcpAsyncAddon() - { - Common::AddonInformation opcTcp; - opcTcp.Factory = std::make_shared(); - opcTcp.Id = OpcUa::Server::AsyncOpcTcpAddonId; - opcTcp.Dependencies.push_back(OpcUa::Server::AsioAddonId); - opcTcp.Dependencies.push_back(OpcUa::Server::EndpointsRegistryAddonId); - opcTcp.Dependencies.push_back(OpcUa::Server::SubscriptionServiceAddonId); - return opcTcp; - } +Common::AddonInformation Server::CreateOpcTcpAsyncAddon() +{ + Common::AddonInformation opcTcp; + opcTcp.Factory = std::make_shared(); + opcTcp.Id = OpcUa::Server::AsyncOpcTcpAddonId; + opcTcp.Dependencies.push_back(OpcUa::Server::AsioAddonId); + opcTcp.Dependencies.push_back(OpcUa::Server::EndpointsRegistryAddonId); + opcTcp.Dependencies.push_back(OpcUa::Server::SubscriptionServiceAddonId); + return opcTcp; +} - Common::AddonInformation Server::CreateServerObjectAddon() - { - Common::AddonInformation serverObjectAddon; - serverObjectAddon.Factory = std::make_shared(); - serverObjectAddon.Id = OpcUa::Server::ServerObjectAddonId; - serverObjectAddon.Dependencies.push_back(OpcUa::Server::StandardNamespaceAddonId); - serverObjectAddon.Dependencies.push_back(OpcUa::Server::ServicesRegistryAddonId); - serverObjectAddon.Dependencies.push_back(OpcUa::Server::AsioAddonId); - return serverObjectAddon; - } +Common::AddonInformation Server::CreateServerObjectAddon() +{ + Common::AddonInformation serverObjectAddon; + serverObjectAddon.Factory = std::make_shared(); + serverObjectAddon.Id = OpcUa::Server::ServerObjectAddonId; + serverObjectAddon.Dependencies.push_back(OpcUa::Server::StandardNamespaceAddonId); + serverObjectAddon.Dependencies.push_back(OpcUa::Server::ServicesRegistryAddonId); + serverObjectAddon.Dependencies.push_back(OpcUa::Server::AsioAddonId); + return serverObjectAddon; +} - Common::AddonInformation Server::CreateAsioAddon() - { - Common::AddonInformation asioAddon; - asioAddon.Factory = std::make_shared(); - asioAddon.Id = OpcUa::Server::AsioAddonId; - return asioAddon; - } +Common::AddonInformation Server::CreateAsioAddon() +{ + Common::AddonInformation asioAddon; + asioAddon.Factory = std::make_shared(); + asioAddon.Id = OpcUa::Server::AsioAddonId; + return asioAddon; +} - Common::AddonInformation Server::CreateSubscriptionServiceAddon() - { - Common::AddonInformation subscriptionAddon; - subscriptionAddon.Factory = std::make_shared(); - subscriptionAddon.Id = OpcUa::Server::SubscriptionServiceAddonId; - subscriptionAddon.Dependencies.push_back(OpcUa::Server::AsioAddonId); - subscriptionAddon.Dependencies.push_back(OpcUa::Server::AddressSpaceRegistryAddonId); - subscriptionAddon.Dependencies.push_back(OpcUa::Server::ServicesRegistryAddonId); - return subscriptionAddon; - } +Common::AddonInformation Server::CreateSubscriptionServiceAddon() +{ + Common::AddonInformation subscriptionAddon; + subscriptionAddon.Factory = std::make_shared(); + subscriptionAddon.Id = OpcUa::Server::SubscriptionServiceAddonId; + subscriptionAddon.Dependencies.push_back(OpcUa::Server::AsioAddonId); + subscriptionAddon.Dependencies.push_back(OpcUa::Server::AddressSpaceRegistryAddonId); + subscriptionAddon.Dependencies.push_back(OpcUa::Server::ServicesRegistryAddonId); + return subscriptionAddon; +} - void Server::RegisterCommonAddons(const Parameters& serverParams, Common::AddonsManager& manager) - { - std::vector addons; - Common::AddonParameters addonParameters = CreateAddonsParameters(serverParams); - CreateCommonAddonsConfiguration(addonParameters, addons); - RegisterAddons(addons, manager); - } +void Server::RegisterCommonAddons(const Parameters & serverParams, Common::AddonsManager & manager) +{ + std::vector addons; + Common::AddonParameters addonParameters = CreateAddonsParameters(serverParams); + CreateCommonAddonsConfiguration(addonParameters, addons); + RegisterAddons(addons, manager); +} - void Server::LoadConfiguration(const std::string& configDirectoryPath, Common::AddonsManager& manager) +void Server::LoadConfiguration(const std::string & configDirectoryPath, Common::AddonsManager & manager) +{ + const Common::Configuration & configuration = Common::ParseConfigurationFiles(configDirectoryPath); + std::vector addons(configuration.Modules.size()); + // modules are dynamic addons. + std::transform(configuration.Modules.begin(), configuration.Modules.end(), addons.begin(), [](const Common::ModuleConfiguration & module) { - const Common::Configuration& configuration = Common::ParseConfigurationFiles(configDirectoryPath); - std::vector addons(configuration.Modules.size()); - // modules are dynamic addons. - std::transform(configuration.Modules.begin(), configuration.Modules.end(), addons.begin(), [] (const Common::ModuleConfiguration& module){ - return Common::GetAddonInfomation(module); - }); - CreateCommonAddonsConfiguration(configuration.Parameters, addons); - RegisterAddons(addons, manager); - } + return Common::GetAddonInfomation(module); + }); + CreateCommonAddonsConfiguration(configuration.Parameters, addons); + RegisterAddons(addons, manager); +} } diff --git a/src/server/endpoints_parameters.cpp b/src/server/endpoints_parameters.cpp index e4461d01..2a4bf4ef 100644 --- a/src/server/endpoints_parameters.cpp +++ b/src/server/endpoints_parameters.cpp @@ -17,334 +17,388 @@ namespace { - using namespace OpcUa; - using namespace OpcUa::Server; +using namespace OpcUa; +using namespace OpcUa::Server; - class OpcUaParameters +class OpcUaParameters +{ +public: + OpcUaParameters(bool debug) + : Debug(debug) { - public: - OpcUaParameters(bool debug) - : Debug(debug) - { - } + } - std::vector GetApplications(const std::vector& applicationGroups) const - { - std::vector applications; - for (const Common::ParametersGroup subGroup : applicationGroups) + std::vector GetApplications(const std::vector & applicationGroups) const + { + std::vector applications; + + for (const Common::ParametersGroup subGroup : applicationGroups) { Log("Found group : ", subGroup.Name); + if (subGroup.Name == "application") - { - const ApplicationData application = GetApplicationData(subGroup); - applications.push_back(application); - } + { + const ApplicationData application = GetApplicationData(subGroup); + applications.push_back(application); + } + else - { - Log("Unknown parameters group: ", subGroup.Name); - } + { + Log("Unknown parameters group: ", subGroup.Name); + } } - return applications; - } - std::vector GetAddonParameters(const std::vector& endpoints) const - { - std::vector result(endpoints.size()); - std::transform(endpoints.begin(), endpoints.end(), result.begin(), [this](const ApplicationData& app){ - return ApplicationToParametersGroup(app); - }); - return result; - } - - private: - UserTokenType GetTokenType(const std::string& typeName) const - { - if (typeName == "anonymous" || typeName.empty()) - return UserTokenType::Anonymous; - else if (typeName == "user_name") - return UserTokenType::UserName; - else if (typeName == "certificate") - return UserTokenType::Certificate; - else if (typeName == "issued_token") - return UserTokenType::IssuedToken; - - throw std::logic_error("Unknown token type '" + typeName + "'"); - } - - std::string GetTokenType(OpcUa::UserTokenType type) const + return applications; + } + + std::vector GetAddonParameters(const std::vector & endpoints) const + { + std::vector result(endpoints.size()); + std::transform(endpoints.begin(), endpoints.end(), result.begin(), [this](const ApplicationData & app) { - switch (type) + return ApplicationToParametersGroup(app); + }); + return result; + } + +private: + UserTokenType GetTokenType(const std::string & typeName) const + { + if (typeName == "anonymous" || typeName.empty()) + { return UserTokenType::Anonymous; } + + else if (typeName == "user_name") + { return UserTokenType::UserName; } + + else if (typeName == "certificate") + { return UserTokenType::Certificate; } + + else if (typeName == "issued_token") + { return UserTokenType::IssuedToken; } + + throw std::logic_error("Unknown token type '" + typeName + "'"); + } + + std::string GetTokenType(OpcUa::UserTokenType type) const + { + switch (type) { case UserTokenType::Anonymous: return "anonymous"; + case UserTokenType::UserName: return "user_name"; + case UserTokenType::Certificate: return "certificate"; + case UserTokenType::IssuedToken: return "issued_token"; + default: throw std::logic_error("Unknown token type '" + std::to_string((unsigned)type) + "'"); } - } + } - ApplicationType GetApplicationType(const std::string& typeName) const - { - if (typeName == "client" || typeName.empty()) - return ApplicationType::Client; - else if (typeName == "server") - return ApplicationType::Server; - else if (typeName == "client_and_server") - return ApplicationType::ClientAndServer; - else if (typeName == "discovery_server") - return ApplicationType::DiscoveryServer; - - throw std::logic_error("Invalid name of type application type: " + typeName); - } - - std::string GetApplicationType(ApplicationType type) const - { - switch (type) + ApplicationType GetApplicationType(const std::string & typeName) const + { + if (typeName == "client" || typeName.empty()) + { return ApplicationType::Client; } + + else if (typeName == "server") + { return ApplicationType::Server; } + + else if (typeName == "client_and_server") + { return ApplicationType::ClientAndServer; } + + else if (typeName == "discovery_server") + { return ApplicationType::DiscoveryServer; } + + throw std::logic_error("Invalid name of type application type: " + typeName); + } + + std::string GetApplicationType(ApplicationType type) const + { + switch (type) { case ApplicationType::Server: return "server"; + case ApplicationType::Client: return "client"; + case ApplicationType::ClientAndServer: return "client_and_server"; + case ApplicationType::DiscoveryServer: return "discovery_server"; + default: throw std::logic_error("Unknown application type: " + std::to_string((unsigned)type)); } - } + } - MessageSecurityMode GetSecurityMode(const std::string& modeName) const - { - if (modeName == "none" || modeName.empty()) - return MessageSecurityMode::None; - else if (modeName == "sign") - return MessageSecurityMode::Sign; - else if (modeName == "sign_encrypt") - return MessageSecurityMode::SignAndEncrypt; + MessageSecurityMode GetSecurityMode(const std::string & modeName) const + { + if (modeName == "none" || modeName.empty()) + { return MessageSecurityMode::None; } - throw std::logic_error("Unknown security mode name: " + modeName); - } + else if (modeName == "sign") + { return MessageSecurityMode::Sign; } - std::string GetSecurityMode(MessageSecurityMode mode) const - { - switch (mode) + else if (modeName == "sign_encrypt") + { return MessageSecurityMode::SignAndEncrypt; } + + throw std::logic_error("Unknown security mode name: " + modeName); + } + + std::string GetSecurityMode(MessageSecurityMode mode) const + { + switch (mode) { case MessageSecurityMode::None: return "none"; + case MessageSecurityMode::Sign: return "sign"; + case MessageSecurityMode::SignAndEncrypt: return "sign_encrypt"; + default: throw std::logic_error("Unknown security mode: " + std::to_string((unsigned)mode)); } - } + } - UserTokenPolicy GetUserTokenPolicy(const std::vector& params) const - { - Log("Parsing user token policy."); - UserTokenPolicy tokenPolicy; - for (const Common::Parameter& param : params) + UserTokenPolicy GetUserTokenPolicy(const std::vector & params) const + { + Log("Parsing user token policy."); + UserTokenPolicy tokenPolicy; + + for (const Common::Parameter & param : params) { if (param.Name == "id") - tokenPolicy.PolicyId = param.Value;//"Anonymous"; + { tokenPolicy.PolicyId = param.Value; }//"Anonymous"; + else if (param.Name == "type") - tokenPolicy.TokenType = GetTokenType(param.Value); + { tokenPolicy.TokenType = GetTokenType(param.Value); } + else if (param.Name == "uri") - tokenPolicy.SecurityPolicyUri = param.Value; //"http://opcfoundation.org/UA/SecurityPolicy#None"; + { tokenPolicy.SecurityPolicyUri = param.Value; } //"http://opcfoundation.org/UA/SecurityPolicy#None"; + else if (param.Name == "issued_token_type") - tokenPolicy.IssuedTokenType = param.Value; + { tokenPolicy.IssuedTokenType = param.Value; } + else if (param.Name == "issuer_endpoint_url") - tokenPolicy.IssuerEndpointUrl = param.Value; + { tokenPolicy.IssuerEndpointUrl = param.Value; } + else - Log("Unknown policy token field", param.Name, param.Value); + { Log("Unknown policy token field", param.Name, param.Value); } } - return tokenPolicy; - } - Common::ParametersGroup GetUserTokenPolicy(const UserTokenPolicy& policy) const - { - Log("Parsing user token policy."); - Common::ParametersGroup policyGroup("user_token_policy"); - policyGroup.Parameters.push_back(Common::Parameter("id", policy.PolicyId)); - policyGroup.Parameters.push_back(Common::Parameter("type", GetTokenType(policy.TokenType))); - policyGroup.Parameters.push_back(Common::Parameter("uri", policy.SecurityPolicyUri)); - policyGroup.Parameters.push_back(Common::Parameter("issuer_endpoint_url", policy.IssuerEndpointUrl)); - policyGroup.Parameters.push_back(Common::Parameter("issued_token_type", policy.IssuedTokenType)); - return policyGroup; - } - - EndpointDescription GetEndpointDescription(const Common::ParametersGroup& group) const - { - Log("Parsing endpoint parameters."); - EndpointDescription endpoint; - for (const Common::Parameter param : group.Parameters) + return tokenPolicy; + } + + Common::ParametersGroup GetUserTokenPolicy(const UserTokenPolicy & policy) const + { + Log("Parsing user token policy."); + Common::ParametersGroup policyGroup("user_token_policy"); + policyGroup.Parameters.push_back(Common::Parameter("id", policy.PolicyId)); + policyGroup.Parameters.push_back(Common::Parameter("type", GetTokenType(policy.TokenType))); + policyGroup.Parameters.push_back(Common::Parameter("uri", policy.SecurityPolicyUri)); + policyGroup.Parameters.push_back(Common::Parameter("issuer_endpoint_url", policy.IssuerEndpointUrl)); + policyGroup.Parameters.push_back(Common::Parameter("issued_token_type", policy.IssuedTokenType)); + return policyGroup; + } + + EndpointDescription GetEndpointDescription(const Common::ParametersGroup & group) const + { + Log("Parsing endpoint parameters."); + EndpointDescription endpoint; + + for (const Common::Parameter param : group.Parameters) { Log("Param is: ", param.Name, " = ", param.Value); + if (param.Name == "security_mode") - endpoint.SecurityMode = GetSecurityMode(param.Value); + { endpoint.SecurityMode = GetSecurityMode(param.Value); } + if (param.Name == "security_level") - endpoint.SecurityLevel = std::stoi(param.Value); + { endpoint.SecurityLevel = std::stoi(param.Value); } + else if (param.Name == "security_policy_uri") - endpoint.SecurityPolicyUri = param.Value; + { endpoint.SecurityPolicyUri = param.Value; } + else if (param.Name == "transport_profile_uri") - endpoint.TransportProfileUri = param.Value;//"http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary"; + { endpoint.TransportProfileUri = param.Value; }//"http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary"; + else if (param.Name == "url") - endpoint.EndpointUrl = param.Value; + { endpoint.EndpointUrl = param.Value; } + else - Log("Unknown endpoint parameter: ", param.Name, "=", param.Value); + { Log("Unknown endpoint parameter: ", param.Name, "=", param.Value); } } - for (const Common::ParametersGroup subGroup : group.Groups) + for (const Common::ParametersGroup subGroup : group.Groups) { if (subGroup.Name == "user_token_policy") - { - const UserTokenPolicy tokenPolicy = GetUserTokenPolicy(subGroup.Parameters); - endpoint.UserIdentityTokens.push_back(tokenPolicy); - } + { + const UserTokenPolicy tokenPolicy = GetUserTokenPolicy(subGroup.Parameters); + endpoint.UserIdentityTokens.push_back(tokenPolicy); + } + else - { - Log("Unknown group of endpoint parameters: ", subGroup.Name); - } + { + Log("Unknown group of endpoint parameters: ", subGroup.Name); + } } - return endpoint; - } - Common::ParametersGroup GetEndpointDescription(const EndpointDescription& endpoint) const - { - Common::ParametersGroup ed("endpoint"); - ed.Parameters.push_back(Common::Parameter("security_level", std::to_string(endpoint.SecurityLevel))); - ed.Parameters.push_back(Common::Parameter("security_mode", GetSecurityMode(endpoint.SecurityMode))); - ed.Parameters.push_back(Common::Parameter("security_policy_uri", endpoint.SecurityPolicyUri)); - ed.Parameters.push_back(Common::Parameter("transport_profile_uri", endpoint.TransportProfileUri)); //"http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary" - ed.Parameters.push_back(Common::Parameter("url", endpoint.EndpointUrl)); - - for (const UserTokenPolicy& policy : endpoint.UserIdentityTokens) + return endpoint; + } + + Common::ParametersGroup GetEndpointDescription(const EndpointDescription & endpoint) const + { + Common::ParametersGroup ed("endpoint"); + ed.Parameters.push_back(Common::Parameter("security_level", std::to_string(endpoint.SecurityLevel))); + ed.Parameters.push_back(Common::Parameter("security_mode", GetSecurityMode(endpoint.SecurityMode))); + ed.Parameters.push_back(Common::Parameter("security_policy_uri", endpoint.SecurityPolicyUri)); + ed.Parameters.push_back(Common::Parameter("transport_profile_uri", endpoint.TransportProfileUri)); //"http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary" + ed.Parameters.push_back(Common::Parameter("url", endpoint.EndpointUrl)); + + for (const UserTokenPolicy & policy : endpoint.UserIdentityTokens) { ed.Groups.push_back(GetUserTokenPolicy(policy)); } - return ed; - } - ApplicationData GetApplicationData(const Common::ParametersGroup& applicationGroup) const - { - Log("Parsing application parameters."); - ApplicationData data; - for (const Common::Parameter param : applicationGroup.Parameters) + return ed; + } + + ApplicationData GetApplicationData(const Common::ParametersGroup & applicationGroup) const + { + Log("Parsing application parameters."); + ApplicationData data; + + for (const Common::Parameter param : applicationGroup.Parameters) { Log("Parsing app paramter ", param.Name, " = ", param.Value); + if (param.Name == "uri") - { - data.Application.ApplicationUri = param.Value; - } + { + data.Application.ApplicationUri = param.Value; + } + else if (param.Name == "product_uri") - { - data.Application.ProductUri = param.Value; - } + { + data.Application.ProductUri = param.Value; + } + else if (param.Name == "gateway_server_uri") - { - data.Application.GatewayServerUri = param.Value; - } + { + data.Application.GatewayServerUri = param.Value; + } + else if (param.Name == "discovery_profile") - { - data.Application.DiscoveryProfileUri = param.Value; - } + { + data.Application.DiscoveryProfileUri = param.Value; + } + else if (param.Name == "name") - { - data.Application.ApplicationName = LocalizedText(param.Value); - } + { + data.Application.ApplicationName = LocalizedText(param.Value); + } + else if (param.Name == "type") - { - data.Application.ApplicationType = GetApplicationType(param.Value); - } + { + data.Application.ApplicationType = GetApplicationType(param.Value); + } + else - { - Log("Unknown application parameter: ", param.Name, "=", param.Value); - } + { + Log("Unknown application parameter: ", param.Name, "=", param.Value); + } } - for (const Common::ParametersGroup group : applicationGroup.Groups) + for (const Common::ParametersGroup group : applicationGroup.Groups) { Log("parsing group ", group.Name); + if (group.Name == "endpoint") - { - EndpointDescription endpoint = GetEndpointDescription(group); - data.Application.DiscoveryUrls.push_back(endpoint.EndpointUrl); - data.Endpoints.push_back(endpoint); - } + { + EndpointDescription endpoint = GetEndpointDescription(group); + data.Application.DiscoveryUrls.push_back(endpoint.EndpointUrl); + data.Endpoints.push_back(endpoint); + } + else - { - Log("Unknown group in the applications parameters: ", group.Name); - } + { + Log("Unknown group in the applications parameters: ", group.Name); + } } - for (EndpointDescription& endpoint : data.Endpoints) + for (EndpointDescription & endpoint : data.Endpoints) { endpoint.Server = data.Application; } - return data; - } + return data; + } - Common::ParametersGroup ApplicationToParametersGroup(const ApplicationData& app) const - { - Common::ParametersGroup result("application"); - result.Parameters.push_back(Common::Parameter("discovery_profile", app.Application.DiscoveryProfileUri)); - result.Parameters.push_back(Common::Parameter("uri", app.Application.ApplicationUri)); - result.Parameters.push_back(Common::Parameter("gateway_server_uri", app.Application.GatewayServerUri)); - result.Parameters.push_back(Common::Parameter("product_uri", app.Application.ProductUri)); - result.Parameters.push_back(Common::Parameter("name", app.Application.ApplicationName.Text)); - result.Parameters.push_back(Common::Parameter("type", GetApplicationType(app.Application.ApplicationType))); - - for (const EndpointDescription& endpoint : app.Endpoints) + Common::ParametersGroup ApplicationToParametersGroup(const ApplicationData & app) const + { + Common::ParametersGroup result("application"); + result.Parameters.push_back(Common::Parameter("discovery_profile", app.Application.DiscoveryProfileUri)); + result.Parameters.push_back(Common::Parameter("uri", app.Application.ApplicationUri)); + result.Parameters.push_back(Common::Parameter("gateway_server_uri", app.Application.GatewayServerUri)); + result.Parameters.push_back(Common::Parameter("product_uri", app.Application.ProductUri)); + result.Parameters.push_back(Common::Parameter("name", app.Application.ApplicationName.Text)); + result.Parameters.push_back(Common::Parameter("type", GetApplicationType(app.Application.ApplicationType))); + + for (const EndpointDescription & endpoint : app.Endpoints) { result.Groups.push_back(GetEndpointDescription(endpoint)); } - return result; - } - private: - template - void Log(T&& msg, Args... args) const - { - if (!Debug) + return result; + } + +private: + template + void Log(T && msg, Args... args) const + { + if (!Debug) { return; } - std::clog << msg; - Log(args...); - } - void Log() const - { - if (!Debug) + std::clog << msg; + Log(args...); + } + + void Log() const + { + if (!Debug) { return; } - std::clog << std::endl; - } - private: - const bool Debug; - }; + std::clog << std::endl; + } + +private: + const bool Debug; +}; } -std::vector OpcUa::ParseEndpointsParameters(const std::vector& applicationGroups, bool debug) +std::vector OpcUa::ParseEndpointsParameters(const std::vector & applicationGroups, bool debug) { OpcUaParameters parser(debug); - const std::vector& data = parser.GetApplications(applicationGroups); + const std::vector & data = parser.GetApplications(applicationGroups); return data; } -std::vector OpcUa::CreateCommonParameters(const std::vector& endpoints, bool debug) +std::vector OpcUa::CreateCommonParameters(const std::vector & endpoints, bool debug) { OpcUaParameters parser(debug); - const std::vector& result = parser.GetAddonParameters(endpoints); + const std::vector & result = parser.GetAddonParameters(endpoints); return result; } diff --git a/src/server/endpoints_parameters.h b/src/server/endpoints_parameters.h index 6e8a477e..19a4ece5 100644 --- a/src/server/endpoints_parameters.h +++ b/src/server/endpoints_parameters.h @@ -18,7 +18,7 @@ namespace OpcUa { - std::vector ParseEndpointsParameters(const std::vector& rootGroup, bool debug); - std::vector CreateCommonParameters(const std::vector& endpoints, bool debug); +std::vector ParseEndpointsParameters(const std::vector & rootGroup, bool debug); +std::vector CreateCommonParameters(const std::vector & endpoints, bool debug); } diff --git a/src/server/endpoints_registry.cpp b/src/server/endpoints_registry.cpp index 41669177..e4bed86d 100644 --- a/src/server/endpoints_registry.cpp +++ b/src/server/endpoints_registry.cpp @@ -22,54 +22,54 @@ using namespace OpcUa::Server; namespace { - class EndpointServicesRegistry : public OpcUa::Server::EndpointsRegistry +class EndpointServicesRegistry : public OpcUa::Server::EndpointsRegistry +{ +public: + DEFINE_CLASS_POINTERS(EndpointServices) + +public: + virtual std::vector FindServers(const FindServersParameters & params) const override + { + // TODO apply filter + return Applications; + } + + virtual std::vector GetEndpoints(const GetEndpointsParameters & filter) const override { - public: - DEFINE_CLASS_POINTERS(EndpointServices) - - public: - virtual std::vector FindServers(const FindServersParameters& params) const override - { - // TODO apply filter - return Applications; - } - - virtual std::vector GetEndpoints(const GetEndpointsParameters& filter) const override - { - // TODO apply filter. - return Endpoints; - } - - virtual void RegisterServer(const OpcUa::ServerParameters& parameters) override - { - } - - public: - virtual void AddEndpoints(const std::vector& endpoints) override - { - Endpoints.insert(Endpoints.begin(), endpoints.begin(), endpoints.end()); - } - - void AddApplications(const std::vector& applications) override - { - Applications.insert(Applications.begin(), applications.begin(), applications.end()); - } - - private: - Server::ServicesRegistry::SharedPtr InternalServer; - - std::vector Endpoints; - std::vector Applications; - }; + // TODO apply filter. + return Endpoints; + } + + virtual void RegisterServer(const OpcUa::ServerParameters & parameters) override + { + } + +public: + virtual void AddEndpoints(const std::vector & endpoints) override + { + Endpoints.insert(Endpoints.begin(), endpoints.begin(), endpoints.end()); + } + + void AddApplications(const std::vector & applications) override + { + Applications.insert(Applications.begin(), applications.begin(), applications.end()); + } + +private: + Server::ServicesRegistry::SharedPtr InternalServer; + + std::vector Endpoints; + std::vector Applications; +}; } // namespace namespace OpcUa { - Server::EndpointsRegistry::UniquePtr Server::CreateEndpointsRegistry() - { - return Server::EndpointsRegistry::UniquePtr(new EndpointServicesRegistry); - } +Server::EndpointsRegistry::UniquePtr Server::CreateEndpointsRegistry() +{ + return Server::EndpointsRegistry::UniquePtr(new EndpointServicesRegistry); +} } diff --git a/src/server/endpoints_services_addon.cpp b/src/server/endpoints_services_addon.cpp index 5b7b224b..a384fb13 100644 --- a/src/server/endpoints_services_addon.cpp +++ b/src/server/endpoints_services_addon.cpp @@ -23,87 +23,88 @@ using namespace OpcUa::Server; namespace { - class EndpointsAddon : public Common::Addon, public EndpointsRegistry +class EndpointsAddon : public Common::Addon, public EndpointsRegistry +{ +public: + virtual void Initialize(Common::AddonsManager & addons, const Common::AddonParameters & params) override { - public: - virtual void Initialize(Common::AddonsManager& addons, const Common::AddonParameters& params) override - { - ApplyAddonParameters(params); + ApplyAddonParameters(params); + + Endpoints = OpcUa::Server::CreateEndpointsRegistry(); + InternalServer = addons.GetAddon(ServicesRegistryAddonId); + InternalServer->RegisterEndpointsServices(Endpoints); - Endpoints = OpcUa::Server::CreateEndpointsRegistry(); - InternalServer = addons.GetAddon(ServicesRegistryAddonId); - InternalServer->RegisterEndpointsServices(Endpoints); + const std::vector & data = OpcUa::ParseEndpointsParameters(params.Groups, Debug); - const std::vector& data = OpcUa::ParseEndpointsParameters(params.Groups, Debug); - for (const OpcUa::Server::ApplicationData& application : data) + for (const OpcUa::Server::ApplicationData & application : data) { Endpoints->AddApplications(std::vector(1, application.Application)); Endpoints->AddEndpoints(application.Endpoints); } - } - - virtual void Stop() override - { - InternalServer->UnregisterEndpointsServices(); - InternalServer.reset(); - Endpoints.reset(); - } - - virtual void AddEndpoints(const std::vector& endpoints) override - { - Endpoints->AddEndpoints(endpoints); - } - - virtual void AddApplications(const std::vector& applications) override - { - Endpoints->AddApplications(applications); - } - - - virtual std::vector FindServers(const FindServersParameters& params) const override - { - return Endpoints->FindServers(params); - } - - virtual std::vector GetEndpoints(const GetEndpointsParameters& filter) const override - { - return Endpoints->GetEndpoints(filter); - } - - virtual void RegisterServer(const ServerParameters& parameters) override - { - Endpoints->RegisterServer(parameters); - } - - private: - void ApplyAddonParameters(const Common::AddonParameters& addons) - { - for (const Common::Parameter parameter : addons.Parameters) + } + + virtual void Stop() override + { + InternalServer->UnregisterEndpointsServices(); + InternalServer.reset(); + Endpoints.reset(); + } + + virtual void AddEndpoints(const std::vector & endpoints) override + { + Endpoints->AddEndpoints(endpoints); + } + + virtual void AddApplications(const std::vector & applications) override + { + Endpoints->AddApplications(applications); + } + + + virtual std::vector FindServers(const FindServersParameters & params) const override + { + return Endpoints->FindServers(params); + } + + virtual std::vector GetEndpoints(const GetEndpointsParameters & filter) const override + { + return Endpoints->GetEndpoints(filter); + } + + virtual void RegisterServer(const ServerParameters & parameters) override + { + Endpoints->RegisterServer(parameters); + } + +private: + void ApplyAddonParameters(const Common::AddonParameters & addons) + { + for (const Common::Parameter parameter : addons.Parameters) { if (parameter.Name == "debug" && !parameter.Value.empty() && parameter.Value != "0") - { - Debug = true; - } + { + Debug = true; + } } - } + } - private: - EndpointsRegistry::SharedPtr Endpoints; - ServicesRegistry::SharedPtr InternalServer; - bool Debug = false; - }; +private: + EndpointsRegistry::SharedPtr Endpoints; + ServicesRegistry::SharedPtr InternalServer; + bool Debug = false; +}; } // namespace namespace OpcUa { - namespace Server - { - Common::Addon::UniquePtr EndpointsRegistryAddonFactory::CreateAddon() - { - return Common::Addon::UniquePtr(new ::EndpointsAddon()); - } - } +namespace Server +{ +Common::Addon::UniquePtr EndpointsRegistryAddonFactory::CreateAddon() +{ + return Common::Addon::UniquePtr(new ::EndpointsAddon()); +} +} } diff --git a/src/server/internal_subscription.cpp b/src/server/internal_subscription.cpp index 8993a5a1..c46127fe 100644 --- a/src/server/internal_subscription.cpp +++ b/src/server/internal_subscription.cpp @@ -4,502 +4,585 @@ namespace OpcUa { - namespace Internal - { - - InternalSubscription::InternalSubscription(SubscriptionServiceInternal& service, const SubscriptionData& data, const NodeId& SessionAuthenticationToken, std::function callback, bool debug) - : Service(service) - , AddressSpace(Service.GetAddressSpace()) - , Data(data) - , CurrentSession(SessionAuthenticationToken) - , Callback(callback) - , io(service.GetIOService()) - , Timer(io, boost::posix_time::milliseconds(data.RevisedPublishingInterval)) - , LifeTimeCount(data.RevisedLifetimeCount) - , Debug(debug) - { - } +namespace Internal +{ - void InternalSubscription::Start() - { - std::shared_ptr self = shared_from_this(); - Timer.async_wait([self](const boost::system::error_code& error){ self->PublishResults(error); }); - } +InternalSubscription::InternalSubscription(SubscriptionServiceInternal & service, const SubscriptionData & data, const NodeId & SessionAuthenticationToken, std::function callback, bool debug) + : Service(service) + , AddressSpace(Service.GetAddressSpace()) + , Data(data) + , CurrentSession(SessionAuthenticationToken) + , Callback(callback) + , io(service.GetIOService()) + , Timer(io, boost::posix_time::milliseconds(data.RevisedPublishingInterval)) + , LifeTimeCount(data.RevisedLifetimeCount) + , Debug(debug) +{ +} + +void InternalSubscription::Start() +{ + std::shared_ptr self = shared_from_this(); + Timer.async_wait([self](const boost::system::error_code & error) { self->PublishResults(error); }); +} + +InternalSubscription::~InternalSubscription() +{ + //Stop(); +} + +void InternalSubscription::Stop() +{ + DeleteAllMonitoredItems(); + Timer.cancel(); +} + +void InternalSubscription::DeleteAllMonitoredItems() +{ + if (Debug) { std::cout << "InternalSubscription | Deleting all monitoreditems" << std::endl; } - InternalSubscription::~InternalSubscription() + boost::shared_lock lock(DbMutex); + + std::vector handles; + + for (auto pair : MonitoredDataChanges) { - //Stop(); + handles.push_back(pair.first); } - void InternalSubscription::Stop() + lock.unlock(); + DeleteMonitoredItemsIds(handles); +} + +bool InternalSubscription::HasExpired() +{ + bool expired = KeepAliveCount > LifeTimeCount ; + + if (expired) { - DeleteAllMonitoredItems(); - Timer.cancel(); + if (Debug) { std::cout << "InternalSubscription | Subscription has expired " << KeepAliveCount << " " << LifeTimeCount << std::endl; } } - void InternalSubscription::DeleteAllMonitoredItems() + return expired; +} + +void InternalSubscription::PublishResults(const boost::system::error_code & error) +{ + if (error) { - if (Debug) std::cout << "InternalSubscription | Deleting all monitoreditems" << std::endl; - boost::shared_lock lock(DbMutex); + if (Debug) { std::cout << "InternalSubscription | Stopping subscription timer" << std::endl; } - std::vector handles; - for (auto pair : MonitoredDataChanges) - { - handles.push_back(pair.first); - } - lock.unlock(); - DeleteMonitoredItemsIds(handles); + return; } - bool InternalSubscription::HasExpired() + if (HasExpired()) { - bool expired = KeepAliveCount > LifeTimeCount ; - if ( expired ) - { - if (Debug) { std::cout << "InternalSubscription | Subscription has expired " << KeepAliveCount << " " << LifeTimeCount << std::endl; } - } - return expired; + if (Debug) { std::cout << "InternalSubscription | Subscription has expired" << std::endl; } + + return; } - void InternalSubscription::PublishResults(const boost::system::error_code& error) + if (HasPublishResult() && Service.PopPublishRequest(CurrentSession)) //Check we received a publishrequest before sening respomse { - if ( error ) - { - if (Debug) std::cout << "InternalSubscription | Stopping subscription timer" << std::endl; - return; - } - if ( HasExpired() ) - { - if (Debug) { std::cout << "InternalSubscription | Subscription has expired" << std::endl; } - return; - } - if ( HasPublishResult() && Service.PopPublishRequest(CurrentSession) ) //Check we received a publishrequest before sening respomse - { + std::vector results = PopPublishResult(); - std::vector results = PopPublishResult(); - if (results.size() > 0 ) + if (results.size() > 0) { if (Debug) { std::cout << "InternalSubscription | Subscription has " << results.size() << " results, calling callback" << std::endl; } - if ( Callback ) - { - Callback(results[0]); - } + + if (Callback) + { + Callback(results[0]); + } + else - { - if (Debug) std::cout << "InternalSubcsription | No callback defined for this subscription" << std::endl; - } - } - } - TimerStopped = false; - Timer.expires_at(Timer.expires_at() + boost::posix_time::milliseconds(Data.RevisedPublishingInterval)); - std::shared_ptr self = shared_from_this(); - Timer.async_wait([self](const boost::system::error_code& error){ self->PublishResults(error); }); + { + if (Debug) { std::cout << "InternalSubcsription | No callback defined for this subscription" << std::endl; } + } + } } + TimerStopped = false; + Timer.expires_at(Timer.expires_at() + boost::posix_time::milliseconds(Data.RevisedPublishingInterval)); + std::shared_ptr self = shared_from_this(); + Timer.async_wait([self](const boost::system::error_code & error) { self->PublishResults(error); }); +} + - bool InternalSubscription::HasPublishResult() +bool InternalSubscription::HasPublishResult() +{ + boost::unique_lock lock(DbMutex); + + if (Startup || ! TriggeredDataChangeEvents.empty() || ! TriggeredEvents.empty()) { - boost::unique_lock lock(DbMutex); - - if ( Startup || ! TriggeredDataChangeEvents.empty() || ! TriggeredEvents.empty() ) - { - return true; - } - if ( KeepAliveCount > Data.RevisedMaxKeepAliveCount ) //we need to send keepalive notification - { - if (Debug) std::cout << "InternalSubscription | KeepAliveCount " << KeepAliveCount << " is > than MaxKeepAliveCount " << Data.RevisedMaxKeepAliveCount << " sending publish event" << std::endl; - return true; - } - ++KeepAliveCount; - return false; + return true; + } + + if (KeepAliveCount > Data.RevisedMaxKeepAliveCount) //we need to send keepalive notification + { + if (Debug) { std::cout << "InternalSubscription | KeepAliveCount " << KeepAliveCount << " is > than MaxKeepAliveCount " << Data.RevisedMaxKeepAliveCount << " sending publish event" << std::endl; } + + return true; + } + + ++KeepAliveCount; + return false; +} + +std::vector InternalSubscription::PopPublishResult() +{ + boost::unique_lock lock(DbMutex); + + //std::cout << "PopPublishresult for subscription: " << Data.SubscriptionId << " with " << TriggeredDataChangeEvents.size() << " triggered items in queue" << std::endl; + PublishResult result; + result.SubscriptionId = Data.SubscriptionId; + result.NotificationMessage.PublishTime = DateTime::Current(); + + if (! TriggeredDataChangeEvents.empty()) + { + NotificationData data = GetNotificationData(); + result.NotificationMessage.NotificationData.push_back(data); + result.Results.push_back(StatusCode::Good); } - std::vector InternalSubscription::PopPublishResult() + if (! TriggeredEvents.empty()) { - boost::unique_lock lock(DbMutex); + if (Debug) { std::cout << "InternalSubcsription | Subscription " << Data.SubscriptionId << " has " << TriggeredEvents.size() << " events to send to client" << std::endl; } - //std::cout << "PopPublishresult for subscription: " << Data.SubscriptionId << " with " << TriggeredDataChangeEvents.size() << " triggered items in queue" << std::endl; - PublishResult result; - result.SubscriptionId = Data.SubscriptionId; - result.NotificationMessage.PublishTime = DateTime::Current(); + EventNotificationList notif; - if ( ! TriggeredDataChangeEvents.empty() ) - { - NotificationData data = GetNotificationData(); - result.NotificationMessage.NotificationData.push_back(data); - result.Results.push_back(StatusCode::Good); - } - - if ( ! TriggeredEvents.empty() ) - { - if (Debug) { std::cout << "InternalSubcsription | Subscription " << Data.SubscriptionId << " has " << TriggeredEvents.size() << " events to send to client" << std::endl; } - EventNotificationList notif; - for ( TriggeredEvent ev: TriggeredEvents ) + for (TriggeredEvent ev : TriggeredEvents) { notif.Events.push_back(ev.Data); } - TriggeredEvents.clear(); - NotificationData data(notif); - result.NotificationMessage.NotificationData.push_back(data); - result.Results.push_back(StatusCode::Good); - } - - - // FIXME: also add statuschange notification since they can be send in same result - - KeepAliveCount = 0; - Startup = false; - - result.NotificationMessage.SequenceNumber = NotificationSequence; - ++NotificationSequence; - result.MoreNotifications = false; - for (const PublishResult& res: NotAcknowledgedResults) - { - result.AvailableSequenceNumbers.push_back(res.NotificationMessage.SequenceNumber); - } - NotAcknowledgedResults.push_back(result); - if (Debug) { std::cout << "InternalSubcsription | Sending Notification with " << result.NotificationMessage.NotificationData.size() << " notifications" << std::endl; } - std::vector resultlist; - resultlist.push_back(result); - - return resultlist; + + TriggeredEvents.clear(); + NotificationData data(notif); + result.NotificationMessage.NotificationData.push_back(data); + result.Results.push_back(StatusCode::Good); } - RepublishResponse InternalSubscription::Republish(const RepublishParameters& params) + + // FIXME: also add statuschange notification since they can be send in same result + + KeepAliveCount = 0; + Startup = false; + + result.NotificationMessage.SequenceNumber = NotificationSequence; + ++NotificationSequence; + result.MoreNotifications = false; + + for (const PublishResult & res : NotAcknowledgedResults) { - if (Debug) std::cout << "SubscriptionService| RepublishRequest for sequence: " << params.RetransmitSequenceNumber << std::endl; - boost::unique_lock lock(DbMutex); + result.AvailableSequenceNumbers.push_back(res.NotificationMessage.SequenceNumber); + } - RepublishResponse response; - for (const PublishResult& res: NotAcknowledgedResults) - { - if (res.NotificationMessage.SequenceNumber == params.RetransmitSequenceNumber) + NotAcknowledgedResults.push_back(result); + + if (Debug) { std::cout << "InternalSubcsription | Sending Notification with " << result.NotificationMessage.NotificationData.size() << " notifications" << std::endl; } + + std::vector resultlist; + resultlist.push_back(result); + + return resultlist; +} + +RepublishResponse InternalSubscription::Republish(const RepublishParameters & params) +{ + if (Debug) { std::cout << "SubscriptionService| RepublishRequest for sequence: " << params.RetransmitSequenceNumber << std::endl; } + + boost::unique_lock lock(DbMutex); + + RepublishResponse response; + + for (const PublishResult & res : NotAcknowledgedResults) + { + if (res.NotificationMessage.SequenceNumber == params.RetransmitSequenceNumber) { response.NotificationMessage = res.NotificationMessage; return response; } - } - response.Header.ServiceResult = StatusCode::BadMessageNotAvailable; - return response; } - ModifySubscriptionResult InternalSubscription::ModifySubscription(const ModifySubscriptionParameters& data) + response.Header.ServiceResult = StatusCode::BadMessageNotAvailable; + return response; +} + +ModifySubscriptionResult InternalSubscription::ModifySubscription(const ModifySubscriptionParameters & data) +{ + ModifySubscriptionResult result; + + if (data.RequestedLifetimeCount) { - ModifySubscriptionResult result; + Data.RevisedLifetimeCount = data.RequestedLifetimeCount; + } - if (data.RequestedLifetimeCount) { - Data.RevisedLifetimeCount = data.RequestedLifetimeCount; - } - LifeTimeCount = result.RevisedLifetimeCount = Data.RevisedLifetimeCount; + LifeTimeCount = result.RevisedLifetimeCount = Data.RevisedLifetimeCount; - if (data.RequestedPublishingInterval) { - Data.RevisedPublishingInterval = data.RequestedPublishingInterval; - } - result.RevisedPublishingInterval = Data.RevisedPublishingInterval; + if (data.RequestedPublishingInterval) + { + Data.RevisedPublishingInterval = data.RequestedPublishingInterval; + } - if (data.RequestedMaxKeepAliveCount) { - Data.RevisedMaxKeepAliveCount = data.RequestedMaxKeepAliveCount; - } - result.RevisedMaxKeepAliveCount = Data.RevisedMaxKeepAliveCount; + result.RevisedPublishingInterval = Data.RevisedPublishingInterval; - return result; + if (data.RequestedMaxKeepAliveCount) + { + Data.RevisedMaxKeepAliveCount = data.RequestedMaxKeepAliveCount; } - NotificationData InternalSubscription::GetNotificationData() + result.RevisedMaxKeepAliveCount = Data.RevisedMaxKeepAliveCount; + + return result; +} + +NotificationData InternalSubscription::GetNotificationData() +{ + DataChangeNotification notification; + + for (const TriggeredDataChange & event : TriggeredDataChangeEvents) { - DataChangeNotification notification; - for ( const TriggeredDataChange& event: TriggeredDataChangeEvents) - { - notification.Notification.push_back(event.Data); - } - TriggeredDataChangeEvents.clear(); - NotificationData data(notification); - return data; + notification.Notification.push_back(event.Data); } - void InternalSubscription::NewAcknowlegment(const SubscriptionAcknowledgement& ack) + TriggeredDataChangeEvents.clear(); + NotificationData data(notification); + return data; +} + +void InternalSubscription::NewAcknowlegment(const SubscriptionAcknowledgement & ack) +{ + boost::unique_lock lock(DbMutex); + + NotAcknowledgedResults.remove_if([&](PublishResult res) { return ack.SequenceNumber == res.NotificationMessage.SequenceNumber; }); +} + + +MonitoredItemCreateResult InternalSubscription::CreateMonitoredItem(const MonitoredItemCreateRequest & request) +{ + if (Debug) { std::cout << "SubscriptionService| Creating monitored item." << std::endl; } + + boost::unique_lock lock(DbMutex); + + MonitoredItemCreateResult result; + uint32_t callbackHandle = 0; + result.MonitoredItemId = ++LastMonitoredItemId; + + if (request.ItemToMonitor.AttributeId == AttributeId::EventNotifier) { - boost::unique_lock lock(DbMutex); + if (Debug) { std::cout << "SubscriptionService| Subscribed o event notifier " << std::endl; } - NotAcknowledgedResults.remove_if([&](PublishResult res){ return ack.SequenceNumber == res.NotificationMessage.SequenceNumber; }); + //client want to subscribe to events + //FIXME: check attribute EVENT notifier is set for the node + MonitoredEvents[request.ItemToMonitor.NodeId] = result.MonitoredItemId; } - - MonitoredItemCreateResult InternalSubscription::CreateMonitoredItem(const MonitoredItemCreateRequest& request) + else { - if (Debug) std::cout << "SubscriptionService| Creating monitored item." << std::endl; - boost::unique_lock lock(DbMutex); + if (Debug) { std::cout << "SubscriptionService| Subscribing to data chanes in the address space." << std::endl; } - MonitoredItemCreateResult result; - uint32_t callbackHandle = 0; - result.MonitoredItemId = ++LastMonitoredItemId; - if (request.ItemToMonitor.AttributeId == AttributeId::EventNotifier ) - { - if (Debug) std::cout << "SubscriptionService| Subscribed o event notifier " << std::endl; - //client want to subscribe to events - //FIXME: check attribute EVENT notifier is set for the node - MonitoredEvents[request.ItemToMonitor.NodeId] = result.MonitoredItemId; - } - else + uint32_t id = result.MonitoredItemId; + callbackHandle = AddressSpace.AddDataChangeCallback(request.ItemToMonitor.NodeId, request.ItemToMonitor.AttributeId, [this, id](const OpcUa::NodeId & nodeId, OpcUa::AttributeId attr, const DataValue & value) { - if (Debug) std::cout << "SubscriptionService| Subscribing to data chanes in the address space." << std::endl; - uint32_t id = result.MonitoredItemId; - callbackHandle = AddressSpace.AddDataChangeCallback(request.ItemToMonitor.NodeId, request.ItemToMonitor.AttributeId, [this, id] (const OpcUa::NodeId& nodeId, OpcUa::AttributeId attr, const DataValue& value) - { - this->DataChangeCallback(id, value); - }); - - if (callbackHandle == 0) + this->DataChangeCallback(id, value); + }); + + if (callbackHandle == 0) { - if (Debug) std::cout << "SubscriptionService| ERROR: address returned zero handle." << std::endl; - --LastMonitoredItemId; //revert increment + if (Debug) { std::cout << "SubscriptionService| ERROR: address returned zero handle." << std::endl; } + + --LastMonitoredItemId; //revert increment result.Status = OpcUa::StatusCode::BadNodeAttributesInvalid; return result; } - } - result.Status = OpcUa::StatusCode::Good; - result.RevisedSamplingInterval = Data.RevisedPublishingInterval; //Force our own rate - result.RevisedQueueSize = request.RequestedParameters.QueueSize; // We should check that value, maybe set to a default... - result.FilterResult = request.RequestedParameters.Filter; //We can omit that one if we do not change anything in filter - MonitoredDataChange mdata; - mdata.Parameters = result; - mdata.Mode = request.MonitoringMode; - mdata.ClientHandle = request.RequestedParameters.ClientHandle; - mdata.CallbackHandle = callbackHandle; - mdata.MonitoredItemId = result.MonitoredItemId; - MonitoredDataChanges[result.MonitoredItemId] = mdata; - if (Debug) std::cout << "Created MonitoredItem with id: " << result.MonitoredItemId << " and client handle " << mdata.ClientHandle << std::endl; - //Forcing event, - if (request.ItemToMonitor.AttributeId != AttributeId::EventNotifier ) - { - TriggerDataChangeEvent(mdata, request.ItemToMonitor); - } - - return result; } - void InternalSubscription::TriggerDataChangeEvent(MonitoredDataChange monitoreditems, ReadValueId attrval) + result.Status = OpcUa::StatusCode::Good; + result.RevisedSamplingInterval = Data.RevisedPublishingInterval; //Force our own rate + result.RevisedQueueSize = request.RequestedParameters.QueueSize; // We should check that value, maybe set to a default... + result.FilterResult = request.RequestedParameters.Filter; //We can omit that one if we do not change anything in filter + MonitoredDataChange mdata; + mdata.Parameters = result; + mdata.Mode = request.MonitoringMode; + mdata.ClientHandle = request.RequestedParameters.ClientHandle; + mdata.CallbackHandle = callbackHandle; + mdata.MonitoredItemId = result.MonitoredItemId; + MonitoredDataChanges[result.MonitoredItemId] = mdata; + + if (Debug) { std::cout << "Created MonitoredItem with id: " << result.MonitoredItemId << " and client handle " << mdata.ClientHandle << std::endl; } + + //Forcing event, + if (request.ItemToMonitor.AttributeId != AttributeId::EventNotifier) { - if (Debug) { std::cout << "InternalSubcsription | Manual Trigger of DataChangeEvent for sub: " << Data.SubscriptionId << " and clienthandle: " << monitoreditems.ClientHandle << std::endl; } - ReadParameters params; - params.AttributesToRead.push_back(attrval); - std::vector vals = AddressSpace.Read(params); - - TriggeredDataChange event; - event.MonitoredItemId = monitoreditems.MonitoredItemId; - event.Data.ClientHandle = monitoreditems.ClientHandle; - event.Data.Value = vals[0]; - TriggeredDataChangeEvents.push_back(event); + TriggerDataChangeEvent(mdata, request.ItemToMonitor); } - std::vector InternalSubscription::DeleteMonitoredItemsIds(const std::vector& monitoreditemsids) - { - boost::unique_lock lock(DbMutex); + return result; +} - std::vector results; - for (const uint32_t& handle: monitoreditemsids) - { - if (Debug) std::cout << "InternalSubcsription | Deleting Monitoreditemsid: " << handle << std::endl; +void InternalSubscription::TriggerDataChangeEvent(MonitoredDataChange monitoreditems, ReadValueId attrval) +{ + if (Debug) { std::cout << "InternalSubcsription | Manual Trigger of DataChangeEvent for sub: " << Data.SubscriptionId << " and clienthandle: " << monitoreditems.ClientHandle << std::endl; } + + ReadParameters params; + params.AttributesToRead.push_back(attrval); + std::vector vals = AddressSpace.Read(params); + + TriggeredDataChange event; + event.MonitoredItemId = monitoreditems.MonitoredItemId; + event.Data.ClientHandle = monitoreditems.ClientHandle; + event.Data.Value = vals[0]; + TriggeredDataChangeEvents.push_back(event); +} + +std::vector InternalSubscription::DeleteMonitoredItemsIds(const std::vector & monitoreditemsids) +{ + boost::unique_lock lock(DbMutex); + + std::vector results; + + for (const uint32_t & handle : monitoreditemsids) + { + if (Debug) { std::cout << "InternalSubcsription | Deleting Monitoreditemsid: " << handle << std::endl; } - if ( DeleteMonitoredEvent(handle) ) + if (DeleteMonitoredEvent(handle)) { results.push_back(StatusCode::Good); continue; } - if ( DeleteMonitoredDataChange(handle) ) + if (DeleteMonitoredDataChange(handle)) { results.push_back(StatusCode::Good); continue; } - results.push_back(StatusCode::BadMonitoredItemIdInvalid); + results.push_back(StatusCode::BadMonitoredItemIdInvalid); - } - return results; } - bool InternalSubscription::DeleteMonitoredDataChange(uint32_t handle) + return results; +} + +bool InternalSubscription::DeleteMonitoredDataChange(uint32_t handle) +{ + MonitoredDataChangeMap::iterator it = MonitoredDataChanges.find(handle); + + if (it == MonitoredDataChanges.end()) + { + return false; + } + + else { - MonitoredDataChangeMap::iterator it = MonitoredDataChanges.find(handle); - if ( it == MonitoredDataChanges.end() ) + if (it->second.CallbackHandle != 0) //if 0 this monitoreditem did not use callbacks { - return false; + AddressSpace.DeleteDataChangeCallback(it->second.CallbackHandle); } - else + + MonitoredDataChanges.erase(handle); + + //We remove you our monitoreditem, now empty events which are already triggered + for (auto ev = TriggeredDataChangeEvents.begin(); ev != TriggeredDataChangeEvents.end();) { - if (it->second.CallbackHandle != 0){ //if 0 this monitoreditem did not use callbacks - AddressSpace.DeleteDataChangeCallback(it->second.CallbackHandle); - } - MonitoredDataChanges.erase(handle); - //We remove you our monitoreditem, now empty events which are already triggered - for(auto ev = TriggeredDataChangeEvents.begin(); ev != TriggeredDataChangeEvents.end();) - { - if(ev->MonitoredItemId == handle) + if (ev->MonitoredItemId == handle) { - if (Debug) std::cout << "InternalSubscription | Remove triggeredEvent for monitoreditemid " << handle << std::endl; + if (Debug) { std::cout << "InternalSubscription | Remove triggeredEvent for monitoreditemid " << handle << std::endl; } + ev = TriggeredDataChangeEvents.erase(ev); } - else + + else { ++ev; } - } - return true; } + + return true; } +} - bool InternalSubscription::DeleteMonitoredEvent(uint32_t handle) +bool InternalSubscription::DeleteMonitoredEvent(uint32_t handle) +{ + for (auto pair : MonitoredEvents) { - for (auto pair : MonitoredEvents) + if (pair.second == handle) { - if ( pair.second == handle ) - { - MonitoredEvents.erase(pair.first); - //We remove you our monitoreditem, now empty events which are already triggered - for(auto ev = TriggeredEvents.begin(); ev != TriggeredEvents.end();) + MonitoredEvents.erase(pair.first); + + //We remove you our monitoreditem, now empty events which are already triggered + for (auto ev = TriggeredEvents.begin(); ev != TriggeredEvents.end();) { - if(ev->MonitoredItemId == handle) - { - if (Debug) std::cout << "InternalSubscription | Remove triggeredEvent for monitoreditemid " << handle << std::endl; - ev = TriggeredEvents.erase(ev); - } + if (ev->MonitoredItemId == handle) + { + if (Debug) { std::cout << "InternalSubscription | Remove triggeredEvent for monitoreditemid " << handle << std::endl; } + + ev = TriggeredEvents.erase(ev); + } + else - { - ++ev; - } + { + ++ev; + } } - return true; - } + + return true; } - return false; } - void InternalSubscription::DataChangeCallback(const uint32_t& m_id, const DataValue& value) - { - boost::unique_lock lock(DbMutex); + return false; +} - TriggeredDataChange event; - MonitoredDataChangeMap::iterator it_monitoreditem = MonitoredDataChanges.find(m_id); - if ( it_monitoreditem == MonitoredDataChanges.end()) - { - std::cout << "InternalSubcsription | DataChangeCallback called for unknown item" << std::endl; - return ; - } - - event.MonitoredItemId = it_monitoreditem->first; - event.Data.ClientHandle = it_monitoreditem->second.ClientHandle; - event.Data.Value = value; - if (Debug) { std::cout << "InternalSubcsription | Enqueued DataChange triggered item for sub: " << Data.SubscriptionId << " and clienthandle: " << event.Data.ClientHandle << std::endl; } - TriggeredDataChangeEvents.push_back(event); +void InternalSubscription::DataChangeCallback(const uint32_t & m_id, const DataValue & value) +{ + boost::unique_lock lock(DbMutex); + + TriggeredDataChange event; + MonitoredDataChangeMap::iterator it_monitoreditem = MonitoredDataChanges.find(m_id); + + if (it_monitoreditem == MonitoredDataChanges.end()) + { + std::cout << "InternalSubcsription | DataChangeCallback called for unknown item" << std::endl; + return ; } - void InternalSubscription::TriggerEvent(NodeId node, Event event) + event.MonitoredItemId = it_monitoreditem->first; + event.Data.ClientHandle = it_monitoreditem->second.ClientHandle; + event.Data.Value = value; + + if (Debug) { std::cout << "InternalSubcsription | Enqueued DataChange triggered item for sub: " << Data.SubscriptionId << " and clienthandle: " << event.Data.ClientHandle << std::endl; } + + TriggeredDataChangeEvents.push_back(event); +} + +void InternalSubscription::TriggerEvent(NodeId node, Event event) +{ + boost::shared_lock lock(DbMutex); + + MonitoredEventsMap::iterator it = MonitoredEvents.find(node); + + if (it == MonitoredEvents.end()) { - boost::shared_lock lock(DbMutex); + if (Debug) { std::cout << "InternalSubcsription | Subscription: " << Data.SubscriptionId << " has no subcsription for this event" << std::endl; } - MonitoredEventsMap::iterator it = MonitoredEvents.find(node); - if ( it == MonitoredEvents.end() ) - { - if (Debug) std::cout << "InternalSubcsription | Subscription: " << Data.SubscriptionId << " has no subcsription for this event" << std::endl; - return; - } - lock.unlock();//Enqueue vill need to set a unique lock - EnqueueEvent(it->second, event); + return; } - bool InternalSubscription::EnqueueEvent(uint32_t monitoreditemid, const Event& event) - { - if (Debug) { std::cout << "InternalSubcsription | Enqueing event to be send" << std::endl; } - boost::unique_lock lock(DbMutex); + lock.unlock();//Enqueue vill need to set a unique lock + EnqueueEvent(it->second, event); +} - if (Debug) { std::cout << "enqueueing event: " << event << std::endl;} +bool InternalSubscription::EnqueueEvent(uint32_t monitoreditemid, const Event & event) +{ + if (Debug) { std::cout << "InternalSubcsription | Enqueing event to be send" << std::endl; } - //Find monitoredItem - std::map::iterator mii_it = MonitoredDataChanges.find( monitoreditemid ); - if (mii_it == MonitoredDataChanges.end() ) - { - if (Debug) std::cout << "InternalSubcsription | monitoreditem " << monitoreditemid << " is already deleted" << std::endl; - return false; - } - - //Check filter against event data and create EventFieldList to send - //FIXME: Here we should also check event agains WhereClause of filter - EventFieldList fieldlist; - fieldlist.ClientHandle = mii_it->second.ClientHandle; - fieldlist.EventFields = GetEventFields(mii_it->second.Parameters.FilterResult.Event, event); - TriggeredEvent ev; - ev.Data = fieldlist; - ev.MonitoredItemId = monitoreditemid; - TriggeredEvents.push_back(ev); - return true; + boost::unique_lock lock(DbMutex); + + if (Debug) { std::cout << "enqueueing event: " << event << std::endl;} + + //Find monitoredItem + std::map::iterator mii_it = MonitoredDataChanges.find(monitoreditemid); + + if (mii_it == MonitoredDataChanges.end()) + { + if (Debug) { std::cout << "InternalSubcsription | monitoreditem " << monitoreditemid << " is already deleted" << std::endl; } + + return false; } - std::vector InternalSubscription::GetEventFields(const EventFilter& filter, const Event& event) + //Check filter against event data and create EventFieldList to send + //FIXME: Here we should also check event agains WhereClause of filter + EventFieldList fieldlist; + fieldlist.ClientHandle = mii_it->second.ClientHandle; + fieldlist.EventFields = GetEventFields(mii_it->second.Parameters.FilterResult.Event, event); + TriggeredEvent ev; + ev.Data = fieldlist; + ev.MonitoredItemId = monitoreditemid; + TriggeredEvents.push_back(ev); + return true; +} + +std::vector InternalSubscription::GetEventFields(const EventFilter & filter, const Event & event) +{ + //Go through filter and add value og matches as in spec + std::vector fields; + + if (Debug) { std::cout << "InternalSubscription | InternalGetEventField " << filter.SelectClauses.size() << std::endl; } + + for (SimpleAttributeOperand sattr : filter.SelectClauses) { - //Go through filter and add value og matches as in spec - std::vector fields; - if(Debug) std::cout << "InternalSubscription | InternalGetEventField " << filter.SelectClauses.size() << std::endl; - for (SimpleAttributeOperand sattr : filter.SelectClauses) - { - if(Debug) std::cout << "InternalSubscription | BrowsePath size " << sattr.BrowsePath.size() << std::endl; - if ( sattr.BrowsePath.size() == 0 ) + if (Debug) { std::cout << "InternalSubscription | BrowsePath size " << sattr.BrowsePath.size() << std::endl; } + + if (sattr.BrowsePath.size() == 0) { fields.push_back(event.GetValue(sattr.Attribute)); } - else + + else { - if(Debug) std::cout << "InternalSubscription | sending value for : " << sattr.BrowsePath[0] << std::endl; - if ( sattr.BrowsePath[0] == QualifiedName("EventId", 0) ) - { - fields.push_back(event.EventId); - } - else if ( sattr.BrowsePath[0] == QualifiedName("EventType", 0) ) - { - fields.push_back(event.EventType); - } - else if ( sattr.BrowsePath[0] == QualifiedName("SourceNode", 0) ) - { - fields.push_back(event.SourceNode); - } - else if ( sattr.BrowsePath[0] == QualifiedName("SourceName", 0) ) - { - fields.push_back(event.SourceName); - } - else if ( sattr.BrowsePath[0] == QualifiedName("Message", 0) ) - { - if (Debug) std::cout << "msg is: " << event.Message << std::endl; - fields.push_back(event.Message); - } - else if ( sattr.BrowsePath[0] == QualifiedName("Severity", 0) ) - { - fields.push_back(event.Severity); - } - else if ( sattr.BrowsePath[0] == QualifiedName("LocalTime", 0) ) - { - fields.push_back(event.LocalTime); - } - else if ( sattr.BrowsePath[0] == QualifiedName("ReceiveTime", 0) ) - { - fields.push_back(event.ReceiveTime); - } - else if ( sattr.BrowsePath[0] == QualifiedName("Time", 0) ) - { - fields.push_back(event.Time); - } + if (Debug) { std::cout << "InternalSubscription | sending value for : " << sattr.BrowsePath[0] << std::endl; } + + if (sattr.BrowsePath[0] == QualifiedName("EventId", 0)) + { + fields.push_back(event.EventId); + } + + else if (sattr.BrowsePath[0] == QualifiedName("EventType", 0)) + { + fields.push_back(event.EventType); + } + + else if (sattr.BrowsePath[0] == QualifiedName("SourceNode", 0)) + { + fields.push_back(event.SourceNode); + } + + else if (sattr.BrowsePath[0] == QualifiedName("SourceName", 0)) + { + fields.push_back(event.SourceName); + } + + else if (sattr.BrowsePath[0] == QualifiedName("Message", 0)) + { + if (Debug) { std::cout << "msg is: " << event.Message << std::endl; } + + fields.push_back(event.Message); + } + + else if (sattr.BrowsePath[0] == QualifiedName("Severity", 0)) + { + fields.push_back(event.Severity); + } + + else if (sattr.BrowsePath[0] == QualifiedName("LocalTime", 0)) + { + fields.push_back(event.LocalTime); + } + + else if (sattr.BrowsePath[0] == QualifiedName("ReceiveTime", 0)) + { + fields.push_back(event.ReceiveTime); + } + + else if (sattr.BrowsePath[0] == QualifiedName("Time", 0)) + { + fields.push_back(event.Time); + } + else - { - fields.push_back(event.GetValue(sattr.BrowsePath)); - } + { + fields.push_back(event.GetValue(sattr.BrowsePath)); + } } - } - return fields; } + return fields; +} + - } +} } diff --git a/src/server/internal_subscription.h b/src/server/internal_subscription.h index c130355c..52dd6b7b 100644 --- a/src/server/internal_subscription.h +++ b/src/server/internal_subscription.h @@ -21,98 +21,98 @@ namespace OpcUa { - namespace Internal - { - - class SubscriptionServiceInternal; - - //Structure to store description of a MonitoredItems - struct MonitoredDataChange - { - uint32_t MonitoredItemId; - MonitoringMode Mode; - time_t LastTrigger; - MonitoredItemCreateResult Parameters; - uint32_t ClientHandle; - uint32_t CallbackHandle; - }; - - struct TriggeredDataChange - { - uint32_t MonitoredItemId; - MonitoredItems Data; - }; - - struct TriggeredEvent - { - uint32_t MonitoredItemId; - EventFieldList Data; - }; - - //typedef std::pair MonitoredItemsIndex; - typedef std::map MonitoredDataChangeMap; - typedef std::map MonitoredEventsMap; - - class AddressSpaceInMemory; //pre-declaration - - - class InternalSubscription : public std::enable_shared_from_this - { - public: - InternalSubscription(SubscriptionServiceInternal& service, const SubscriptionData& data, const NodeId& SessionAuthenticationToken, std::function Callback, bool debug=false); - ~InternalSubscription(); - void Start(); - void Stop(); - - void NewAcknowlegment(const SubscriptionAcknowledgement& ack); - std::vector DeleteMonitoredItemsIds(const std::vector& ids); - bool EnqueueEvent(uint32_t monitoreditemid, const Event& event); - bool EnqueueDataChange(uint32_t monitoreditemid, const DataValue& value); - MonitoredItemCreateResult CreateMonitoredItem(const MonitoredItemCreateRequest& request); - void DataChangeCallback(const uint32_t&, const DataValue& value); - bool HasExpired(); - void TriggerEvent(NodeId node, Event event); - RepublishResponse Republish(const RepublishParameters& params); - ModifySubscriptionResult ModifySubscription(const ModifySubscriptionParameters& data); - - private: - void DeleteAllMonitoredItems(); - bool DeleteMonitoredEvent(uint32_t handle); - bool DeleteMonitoredDataChange(uint32_t handle); - std::vector PopPublishResult(); - bool HasPublishResult(); - NotificationData GetNotificationData(); - void PublishResults(const boost::system::error_code& error); - std::vector GetEventFields(const EventFilter& filter, const Event& event); - void TriggerDataChangeEvent(MonitoredDataChange monitoreditems, ReadValueId attrval); - - private: - SubscriptionServiceInternal& Service; - Server::AddressSpace& AddressSpace; - mutable boost::shared_mutex DbMutex; - SubscriptionData Data; - const NodeId CurrentSession; - std::function Callback; - - uint32_t NotificationSequence = 1; //NotificationSequence start at 1! not 0 - uint32_t KeepAliveCount = 0; - bool Startup = true; //To force specific behaviour at startup - uint32_t LastMonitoredItemId = 100; - MonitoredDataChangeMap MonitoredDataChanges; - MonitoredEventsMap MonitoredEvents; - std::list NotAcknowledgedResults; //result that have not be acknowledeged and may have to be resent - std::list TriggeredDataChangeEvents; - std::list TriggeredEvents; - boost::asio::io_service& io; - boost::asio::deadline_timer Timer; - bool TimerStopped = false; - uint32_t LifeTimeCount; - bool Debug = false; - - }; - - - } +namespace Internal +{ + +class SubscriptionServiceInternal; + +//Structure to store description of a MonitoredItems +struct MonitoredDataChange +{ + uint32_t MonitoredItemId; + MonitoringMode Mode; + time_t LastTrigger; + MonitoredItemCreateResult Parameters; + uint32_t ClientHandle; + uint32_t CallbackHandle; +}; + +struct TriggeredDataChange +{ + uint32_t MonitoredItemId; + MonitoredItems Data; +}; + +struct TriggeredEvent +{ + uint32_t MonitoredItemId; + EventFieldList Data; +}; + +//typedef std::pair MonitoredItemsIndex; +typedef std::map MonitoredDataChangeMap; +typedef std::map MonitoredEventsMap; + +class AddressSpaceInMemory; //pre-declaration + + +class InternalSubscription : public std::enable_shared_from_this +{ +public: + InternalSubscription(SubscriptionServiceInternal & service, const SubscriptionData & data, const NodeId & SessionAuthenticationToken, std::function Callback, bool debug = false); + ~InternalSubscription(); + void Start(); + void Stop(); + + void NewAcknowlegment(const SubscriptionAcknowledgement & ack); + std::vector DeleteMonitoredItemsIds(const std::vector & ids); + bool EnqueueEvent(uint32_t monitoreditemid, const Event & event); + bool EnqueueDataChange(uint32_t monitoreditemid, const DataValue & value); + MonitoredItemCreateResult CreateMonitoredItem(const MonitoredItemCreateRequest & request); + void DataChangeCallback(const uint32_t &, const DataValue & value); + bool HasExpired(); + void TriggerEvent(NodeId node, Event event); + RepublishResponse Republish(const RepublishParameters & params); + ModifySubscriptionResult ModifySubscription(const ModifySubscriptionParameters & data); + +private: + void DeleteAllMonitoredItems(); + bool DeleteMonitoredEvent(uint32_t handle); + bool DeleteMonitoredDataChange(uint32_t handle); + std::vector PopPublishResult(); + bool HasPublishResult(); + NotificationData GetNotificationData(); + void PublishResults(const boost::system::error_code & error); + std::vector GetEventFields(const EventFilter & filter, const Event & event); + void TriggerDataChangeEvent(MonitoredDataChange monitoreditems, ReadValueId attrval); + +private: + SubscriptionServiceInternal & Service; + Server::AddressSpace & AddressSpace; + mutable boost::shared_mutex DbMutex; + SubscriptionData Data; + const NodeId CurrentSession; + std::function Callback; + + uint32_t NotificationSequence = 1; //NotificationSequence start at 1! not 0 + uint32_t KeepAliveCount = 0; + bool Startup = true; //To force specific behaviour at startup + uint32_t LastMonitoredItemId = 100; + MonitoredDataChangeMap MonitoredDataChanges; + MonitoredEventsMap MonitoredEvents; + std::list NotAcknowledgedResults; //result that have not be acknowledeged and may have to be resent + std::list TriggeredDataChangeEvents; + std::list TriggeredEvents; + boost::asio::io_service & io; + boost::asio::deadline_timer Timer; + bool TimerStopped = false; + uint32_t LifeTimeCount; + bool Debug = false; + +}; + + } +} + - diff --git a/src/server/opc_tcp_async.cpp b/src/server/opc_tcp_async.cpp index 0b2d045d..39376d20 100644 --- a/src/server/opc_tcp_async.cpp +++ b/src/server/opc_tcp_async.cpp @@ -39,152 +39,153 @@ namespace { - using namespace OpcUa; - using namespace OpcUa::Binary; - using namespace OpcUa; +using namespace OpcUa; +using namespace OpcUa::Binary; +using namespace OpcUa; - using namespace boost::asio; - using namespace boost::asio::ip; +using namespace boost::asio; +using namespace boost::asio::ip; - class OpcTcpConnection; +class OpcTcpConnection; - class OpcTcpServer : public OpcUa::Server::AsyncOpcTcp - { - public: - DEFINE_CLASS_POINTERS(OpcTcpServer) - - public: - OpcTcpServer(const AsyncOpcTcp::Parameters& params, Services::SharedPtr server, boost::asio::io_service& ioService); - - virtual void Listen() override; - virtual void Shutdown() override; +class OpcTcpServer : public OpcUa::Server::AsyncOpcTcp +{ +public: + DEFINE_CLASS_POINTERS(OpcTcpServer) - private: - void Accept(); +public: + OpcTcpServer(const AsyncOpcTcp::Parameters & params, Services::SharedPtr server, boost::asio::io_service & ioService); - private:// OpcTcpClient interface; - friend class OpcTcpConnection; - void RemoveClient(std::shared_ptr client); + virtual void Listen() override; + virtual void Shutdown() override; - private: - Parameters Params; - Services::SharedPtr Server; - std::mutex Mutex; - std::set> Clients; +private: + void Accept(); - tcp::socket socket; - tcp::acceptor acceptor; - }; +private:// OpcTcpClient interface; + friend class OpcTcpConnection; + void RemoveClient(std::shared_ptr client); +private: + Parameters Params; + Services::SharedPtr Server; + std::mutex Mutex; + std::set> Clients; - class OpcTcpConnection : public std::enable_shared_from_this, private OpcUa::OutputChannel - { - public: - DEFINE_CLASS_POINTERS(OpcTcpConnection) + tcp::socket socket; + tcp::acceptor acceptor; +}; - public: - OpcTcpConnection(tcp::socket socket, OpcTcpServer& tcpServer, Services::SharedPtr uaServer, bool debug); - ~OpcTcpConnection(); - void Start(); +class OpcTcpConnection : public std::enable_shared_from_this, private OpcUa::OutputChannel +{ +public: + DEFINE_CLASS_POINTERS(OpcTcpConnection) - virtual void Stop() - { - Socket.close(); - - /* queue a dummy operation to io_service to make sure we do not return - * until all existing async io requests of this instance are actually - * processed - */ - typedef std::promise Promise; - Promise promise; - Socket.get_io_service().post(bind(&Promise::set_value, &promise)); - promise.get_future().wait(); - } +public: + OpcTcpConnection(tcp::socket socket, OpcTcpServer & tcpServer, Services::SharedPtr uaServer, bool debug); + ~OpcTcpConnection(); + void Start(); - private: - void ReadNextData(); - void ProcessHeader(const boost::system::error_code& error, std::size_t bytes_transferred); - void ProcessMessage(OpcUa::Binary::MessageType type, const boost::system::error_code& error, std::size_t bytesTransferred); - void GoodBye(); - - std::size_t GetHeaderSize() const; - - private: - virtual void Send(const char* message, std::size_t size); - void FillResponseHeader(const RequestHeader& requestHeader, ResponseHeader& responseHeader) const; - - private: - tcp::socket Socket; - OpcTcpServer& TcpServer; - Server::OpcTcpMessages MessageProcessor; - OStreamBinary OStream; - const bool Debug = false; - std::vector Buffer; - }; - - OpcTcpConnection::OpcTcpConnection(tcp::socket socket, OpcTcpServer& tcpServer, Services::SharedPtr uaServer, bool debug) - : Socket(std::move(socket)) - , TcpServer(tcpServer) - , MessageProcessor(uaServer, *this, debug) - , OStream(*this) - , Debug(debug) - , Buffer(8192) + virtual void Stop() { - } + Socket.close(); - OpcTcpConnection::~OpcTcpConnection() - { + /* queue a dummy operation to io_service to make sure we do not return + * until all existing async io requests of this instance are actually + * processed + */ + typedef std::promise Promise; + Promise promise; + Socket.get_io_service().post(bind(&Promise::set_value, &promise)); + promise.get_future().wait(); } - void OpcTcpConnection::Start() - { - ReadNextData(); - } - void OpcTcpConnection::ReadNextData() +private: + void ReadNextData(); + void ProcessHeader(const boost::system::error_code & error, std::size_t bytes_transferred); + void ProcessMessage(OpcUa::Binary::MessageType type, const boost::system::error_code & error, std::size_t bytesTransferred); + void GoodBye(); + + std::size_t GetHeaderSize() const; + +private: + virtual void Send(const char * message, std::size_t size); + void FillResponseHeader(const RequestHeader & requestHeader, ResponseHeader & responseHeader) const; + +private: + tcp::socket Socket; + OpcTcpServer & TcpServer; + Server::OpcTcpMessages MessageProcessor; + OStreamBinary OStream; + const bool Debug = false; + std::vector Buffer; +}; + +OpcTcpConnection::OpcTcpConnection(tcp::socket socket, OpcTcpServer & tcpServer, Services::SharedPtr uaServer, bool debug) + : Socket(std::move(socket)) + , TcpServer(tcpServer) + , MessageProcessor(uaServer, *this, debug) + , OStream(*this) + , Debug(debug) + , Buffer(8192) +{ +} + +OpcTcpConnection::~OpcTcpConnection() +{ +} + +void OpcTcpConnection::Start() +{ + ReadNextData(); +} + +void OpcTcpConnection::ReadNextData() +{ + async_read(Socket, buffer(Buffer), transfer_exactly(GetHeaderSize()), + [this](const boost::system::error_code & error, std::size_t bytes_transferred) { - async_read(Socket, buffer(Buffer), transfer_exactly(GetHeaderSize()), - [this](const boost::system::error_code& error, std::size_t bytes_transferred) + try { - try - { - ProcessHeader(error, bytes_transferred); - } - catch (const std::exception& exc) - { - std::cerr << "opc_tcp_async| Failed to process message header: " << exc.what() << std::endl; - } + ProcessHeader(error, bytes_transferred); } - ); - } - std::size_t OpcTcpConnection::GetHeaderSize() const - { - return OpcUa::Binary::RawSize(OpcUa::Binary::Header()); + catch (const std::exception & exc) + { + std::cerr << "opc_tcp_async| Failed to process message header: " << exc.what() << std::endl; + } } + ); +} - void OpcTcpConnection::ProcessHeader(const boost::system::error_code& error, std::size_t bytes_transferred) - { - if (error) +std::size_t OpcTcpConnection::GetHeaderSize() const +{ + return OpcUa::Binary::RawSize(OpcUa::Binary::Header()); +} + +void OpcTcpConnection::ProcessHeader(const boost::system::error_code & error, std::size_t bytes_transferred) +{ + if (error) { std::cerr << "opc_tcp_async| Error during receiving message header: " << error.message() << std::endl; GoodBye(); return; } - if (Debug) std::cout << "opc_tcp_async| Received message header with size " << bytes_transferred << std::endl; + if (Debug) { std::cout << "opc_tcp_async| Received message header with size " << bytes_transferred << std::endl; } - OpcUa::InputFromBuffer messageChannel(&Buffer[0], bytes_transferred); - IStreamBinary messageStream(messageChannel); - OpcUa::Binary::Header header; - messageStream >> header; + OpcUa::InputFromBuffer messageChannel(&Buffer[0], bytes_transferred); + IStreamBinary messageStream(messageChannel); + OpcUa::Binary::Header header; + messageStream >> header; - const std::size_t messageSize = header.Size - GetHeaderSize(); + const std::size_t messageSize = header.Size - GetHeaderSize(); - if (Debug) + if (Debug) { std::cout << "opc_tcp_async| Message type: " << header.Type << std::endl; std::cout << "opc_tcp_async| Chunk type: " << header.Chunk << std::endl; @@ -192,213 +193,232 @@ namespace std::cout << "opc_tcp_async| Waiting " << messageSize << " bytes from client." << std::endl; } - async_read(Socket, buffer(Buffer), transfer_exactly(messageSize), - [this, header](const boost::system::error_code& error, std::size_t bytesTransferred) - { - if (error) - { - if (Debug) std::cerr << "opc_tcp_async| Error during receiving message body." << std::endl; - return; - } - ProcessMessage(header.Type, error, bytesTransferred); - } - ); + async_read(Socket, buffer(Buffer), transfer_exactly(messageSize), + [this, header](const boost::system::error_code & error, std::size_t bytesTransferred) + { + if (error) + { + if (Debug) { std::cerr << "opc_tcp_async| Error during receiving message body." << std::endl; } + + return; + } + ProcessMessage(header.Type, error, bytesTransferred); } + ); - void OpcTcpConnection::ProcessMessage(OpcUa::Binary::MessageType type, const boost::system::error_code& error, std::size_t bytesTransferred) - { - if (error) +} + +void OpcTcpConnection::ProcessMessage(OpcUa::Binary::MessageType type, const boost::system::error_code & error, std::size_t bytesTransferred) +{ + if (error) { std::cerr << "opc_tcp_async| Error during receiving message body: " << error.message() << std::endl; GoodBye(); return; } - if (Debug) + if (Debug) { - if (Debug) std::cout << "opc_tcp_async| Received " << bytesTransferred << " bytes from client:" << std::endl; + if (Debug) { std::cout << "opc_tcp_async| Received " << bytesTransferred << " bytes from client:" << std::endl; } + PrintBlob(Buffer, bytesTransferred); } - // restrict server size code only with current message. - OpcUa::InputFromBuffer messageChannel(&Buffer[0], bytesTransferred); - IStreamBinary messageStream(messageChannel); + // restrict server size code only with current message. + OpcUa::InputFromBuffer messageChannel(&Buffer[0], bytesTransferred); + IStreamBinary messageStream(messageChannel); - bool cont = true; + bool cont = true; - try + try { cont = MessageProcessor.ProcessMessage(type, messageStream); } - catch(const std::exception& exc) + + catch (const std::exception & exc) { std::cerr << "opc_tcp_async| Failed to process message. " << exc.what() << std::endl; GoodBye(); return; } - if (messageChannel.GetRemainSize()) + if (messageChannel.GetRemainSize()) { std::cerr << "opc_tcp_async| ERROR!!! Message from client has been processed partially." << std::endl; } - if (!cont) + if (!cont) { GoodBye(); return; } - ReadNextData(); - } + ReadNextData(); +} - void OpcTcpConnection::GoodBye() - { - TcpServer.RemoveClient(shared_from_this()); - // valgrind complains that Debug cannot be read at that point, so do not use it - //if (Debug) std::cout << "opc_tcp_async| Good bye." << std::endl; - } +void OpcTcpConnection::GoodBye() +{ + TcpServer.RemoveClient(shared_from_this()); + // valgrind complains that Debug cannot be read at that point, so do not use it + //if (Debug) std::cout << "opc_tcp_async| Good bye." << std::endl; +} - void OpcTcpConnection::Send(const char* message, std::size_t size) - { - std::shared_ptr> data = std::make_shared>(message, message + size); +void OpcTcpConnection::Send(const char * message, std::size_t size) +{ + std::shared_ptr> data = std::make_shared>(message, message + size); - if (Debug) + if (Debug) { std::cout << "opc_tcp_async| Sending next data to the client:" << std::endl; PrintBlob(*data); } - async_write(Socket, buffer(&(*data)[0], data->size()), [this, data](const boost::system::error_code & err, size_t bytes){ - if (err) + async_write(Socket, buffer(&(*data)[0], data->size()), [this, data](const boost::system::error_code & err, size_t bytes) + { + if (err) { std::cerr << "opc_tcp_async| Failed to send data to the client. " << err.message() << std::endl; GoodBye(); return; } - if (Debug) + if (Debug) { std::cout << "opc_tcp_async| Response sent to the client." << std::endl; } - }); - } + }); +} - OpcTcpServer::OpcTcpServer(const AsyncOpcTcp::Parameters& params, Services::SharedPtr server, boost::asio::io_service& ioService) - : Params(params) - , Server(server) - , socket(ioService) - , acceptor(ioService) - { - tcp::endpoint ep; - if (params.Host.empty()) +OpcTcpServer::OpcTcpServer(const AsyncOpcTcp::Parameters & params, Services::SharedPtr server, boost::asio::io_service & ioService) + : Params(params) + , Server(server) + , socket(ioService) + , acceptor(ioService) +{ + tcp::endpoint ep; + + if (params.Host.empty()) { ep = tcp::endpoint(tcp::v4(), params.Port); } - else if (params.Host == "localhost") + + else if (params.Host == "localhost") { ep = tcp::endpoint(ip::address::from_string("127.0.0.1"), params.Port); } - else + + else { ep = tcp::endpoint(ip::address::from_string(params.Host), params.Port); } - acceptor.open(ep.protocol()); - acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true)); - acceptor.bind(ep); - } - void OpcTcpServer::Listen() - { - std::clog << "opc_tcp_async| Running server." << std::endl; + acceptor.open(ep.protocol()); + acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true)); + acceptor.bind(ep); +} + +void OpcTcpServer::Listen() +{ + std::clog << "opc_tcp_async| Running server." << std::endl; - std::cout << "opc_tcp_async| Waiting for client connection at: " << acceptor.local_endpoint().address() << ":" << acceptor.local_endpoint().port() << std::endl; - acceptor.listen(); + std::cout << "opc_tcp_async| Waiting for client connection at: " << acceptor.local_endpoint().address() << ":" << acceptor.local_endpoint().port() << std::endl; + acceptor.listen(); - Accept(); - } + Accept(); +} - void OpcTcpServer::Shutdown() +void OpcTcpServer::Shutdown() +{ + std::clog << "opc_tcp_async| Shutting down server." << std::endl; + acceptor.close(); + + // Actively shutdown OpcTcpConnections to clear open async requests from worker + // thread. + // Warning: the Clients container may be modified by OpcTcpConnections::GoodBye + // when calling Stop() which makes the iterator used in our for loop invalid. + // So have a copy of this container to have a stable iterator. + + // guard copy operation + typedef std::set> OpcTcpConnectionSet; + OpcTcpConnectionSet tmp; { - std::clog << "opc_tcp_async| Shutting down server." << std::endl; - acceptor.close(); - - // Actively shutdown OpcTcpConnections to clear open async requests from worker - // thread. - // Warning: the Clients container may be modified by OpcTcpConnections::GoodBye - // when calling Stop() which makes the iterator used in our for loop invalid. - // So have a copy of this container to have a stable iterator. - - // guard copy operation - typedef std::set> OpcTcpConnectionSet; - OpcTcpConnectionSet tmp; - { std::unique_lock lock(Mutex); - tmp = OpcTcpConnectionSet(Clients); - } + std::unique_lock lock(Mutex); + tmp = OpcTcpConnectionSet(Clients); + } - // Unlock before client->Stop() because stop will interrupt all pending - // async read/write operations, which may then call OpcTcpConnection::GoodBye(), - // which needs access to OpcTcpServer::Clients. Otherwise we run into a deadlock - // because stop waits for completion of pending operations. - for (auto client : tmp) { + // Unlock before client->Stop() because stop will interrupt all pending + // async read/write operations, which may then call OpcTcpConnection::GoodBye(), + // which needs access to OpcTcpServer::Clients. Otherwise we run into a deadlock + // because stop waits for completion of pending operations. + for (auto client : tmp) + { client->Stop(); } - // clear possibly remaining Client's - { std::unique_lock lock(Mutex); - Clients.clear(); - } - - /* queue a dummy operation to io_service to make sure we do not return - * until all existing async io requests of this instance are actually - * processed - */ - typedef std::promise Promise; - Promise promise; - acceptor.get_io_service().post(bind(&Promise::set_value, &promise)); - promise.get_future().wait(); + // clear possibly remaining Client's + { + std::unique_lock lock(Mutex); + Clients.clear(); } - void OpcTcpServer::Accept() - { - try + /* queue a dummy operation to io_service to make sure we do not return + * until all existing async io requests of this instance are actually + * processed + */ + typedef std::promise Promise; + Promise promise; + acceptor.get_io_service().post(bind(&Promise::set_value, &promise)); + promise.get_future().wait(); +} + +void OpcTcpServer::Accept() +{ + try { - acceptor.async_accept(socket, [this](boost::system::error_code errorCode) { - if (!acceptor.is_open()) { - return; - } + acceptor.async_accept(socket, [this](boost::system::error_code errorCode) + { + if (!acceptor.is_open()) + { + return; + } + if (!errorCode) - { - std::cout << "opc_tcp_async| Accepted new client connection." << std::endl; - std::shared_ptr connection = std::make_shared(std::move(socket), *this, Server, Params.DebugMode); - { std::unique_lock lock(Mutex); - Clients.insert(connection); + { + std::cout << "opc_tcp_async| Accepted new client connection." << std::endl; + std::shared_ptr connection = std::make_shared(std::move(socket), *this, Server, Params.DebugMode); + { + std::unique_lock lock(Mutex); + Clients.insert(connection); + } + connection->Start(); } - connection->Start(); - } + else - { - std::cout << "opc_tcp_async| Error during client connection: "<< errorCode.message() << std::endl; - } + { + std::cout << "opc_tcp_async| Error during client connection: " << errorCode.message() << std::endl; + } + Accept(); }); } - catch (const std::exception& exc) + + catch (const std::exception & exc) { - std::cout << "opc_tcp_async| Error accepting client connection: "<< exc.what() << std::endl; + std::cout << "opc_tcp_async| Error accepting client connection: " << exc.what() << std::endl; } - } +} - void OpcTcpServer::RemoveClient(OpcTcpConnection::SharedPtr client) - { - std::unique_lock lock(Mutex); - Clients.erase(client); - } +void OpcTcpServer::RemoveClient(OpcTcpConnection::SharedPtr client) +{ + std::unique_lock lock(Mutex); + Clients.erase(client); +} } // namespace -OpcUa::Server::AsyncOpcTcp::UniquePtr OpcUa::Server::CreateAsyncOpcTcp(const OpcUa::Server::AsyncOpcTcp::Parameters& params, Services::SharedPtr server, boost::asio::io_service& io) +OpcUa::Server::AsyncOpcTcp::UniquePtr OpcUa::Server::CreateAsyncOpcTcp(const OpcUa::Server::AsyncOpcTcp::Parameters & params, Services::SharedPtr server, boost::asio::io_service & io) { return AsyncOpcTcp::UniquePtr(new OpcTcpServer(params, server, io)); } diff --git a/src/server/opc_tcp_async_addon.cpp b/src/server/opc_tcp_async_addon.cpp index 643ae1eb..83f568e0 100644 --- a/src/server/opc_tcp_async_addon.cpp +++ b/src/server/opc_tcp_async_addon.cpp @@ -33,99 +33,106 @@ namespace { - using namespace OpcUa::Server; +using namespace OpcUa::Server; - class AsyncOpcTcpAddon : public Common::Addon - { - public: - DEFINE_CLASS_POINTERS(AsyncOpcTcpAddon) +class AsyncOpcTcpAddon : public Common::Addon +{ +public: + DEFINE_CLASS_POINTERS(AsyncOpcTcpAddon) + +public: + virtual void Initialize(Common::AddonsManager & addons, const Common::AddonParameters & params) override; + virtual void Stop() override; - public: - virtual void Initialize(Common::AddonsManager& addons, const Common::AddonParameters& params) override; - virtual void Stop() override; +public: + void PublishApplicationsInformation(std::vector applications, std::vector endpoints, const Common::AddonsManager & addons) const; - public: - void PublishApplicationsInformation(std::vector applications, std::vector endpoints, const Common::AddonsManager& addons) const; +private: + AsyncOpcTcp::SharedPtr Endpoint; +}; - private: - AsyncOpcTcp::SharedPtr Endpoint; - }; +void AsyncOpcTcpAddon::Initialize(Common::AddonsManager & addons, const Common::AddonParameters & addonParams) +{ + AsyncOpcTcp::Parameters params = GetOpcTcpParameters(addonParams); - void AsyncOpcTcpAddon::Initialize(Common::AddonsManager& addons, const Common::AddonParameters& addonParams) - { - AsyncOpcTcp::Parameters params = GetOpcTcpParameters(addonParams); - if (params.DebugMode) + if (params.DebugMode) { std::cout << "opc_tcp_async| Parameters:" << std::endl; std::cout << "opc_tcp_async| Debug mode: " << params.DebugMode << std::endl; } - const std::vector applications = OpcUa::ParseEndpointsParameters(addonParams.Groups, params.DebugMode); - if (params.DebugMode) + + const std::vector applications = OpcUa::ParseEndpointsParameters(addonParams.Groups, params.DebugMode); + + if (params.DebugMode) { - for (OpcUa::Server::ApplicationData d: applications) - { - std::cout << "opc_tcp_async| Endpoint is: " << d.Endpoints.front().EndpointUrl << std::endl; - } + for (OpcUa::Server::ApplicationData d : applications) + { + std::cout << "opc_tcp_async| Endpoint is: " << d.Endpoints.front().EndpointUrl << std::endl; + } } - std::vector applicationDescriptions; - std::vector endpointDescriptions; - for (const OpcUa::Server::ApplicationData application : applications) + std::vector applicationDescriptions; + std::vector endpointDescriptions; + + for (const OpcUa::Server::ApplicationData application : applications) { applicationDescriptions.push_back(application.Application); endpointDescriptions.insert(endpointDescriptions.end(), application.Endpoints.begin(), application.Endpoints.end()); } - if (endpointDescriptions.empty()) + if (endpointDescriptions.empty()) { std::cerr << "opc_tcp_async| Endpoints parameters does not present in the configuration file." << std::endl; return; } - if (endpointDescriptions.size() > 1) + + if (endpointDescriptions.size() > 1) { std::cerr << "opc_tcp_async| Too many endpoints specified in the configuration file." << std::endl; return; } - PublishApplicationsInformation(applicationDescriptions, endpointDescriptions, addons); - OpcUa::Server::ServicesRegistry::SharedPtr internalServer = addons.GetAddon(OpcUa::Server::ServicesRegistryAddonId); - OpcUa::Server::AsioAddon::SharedPtr asio = addons.GetAddon(OpcUa::Server::AsioAddonId); + PublishApplicationsInformation(applicationDescriptions, endpointDescriptions, addons); + OpcUa::Server::ServicesRegistry::SharedPtr internalServer = addons.GetAddon(OpcUa::Server::ServicesRegistryAddonId); + OpcUa::Server::AsioAddon::SharedPtr asio = addons.GetAddon(OpcUa::Server::AsioAddonId); - params.Port = Common::Uri(endpointDescriptions[0].EndpointUrl).Port(); - Endpoint = CreateAsyncOpcTcp(params, internalServer->GetServer(), asio->GetIoService()); - Endpoint->Listen(); - } + params.Port = Common::Uri(endpointDescriptions[0].EndpointUrl).Port(); + Endpoint = CreateAsyncOpcTcp(params, internalServer->GetServer(), asio->GetIoService()); + Endpoint->Listen(); +} + +void AsyncOpcTcpAddon::PublishApplicationsInformation(std::vector applications, std::vector endpoints, const Common::AddonsManager & addons) const +{ + OpcUa::Server::EndpointsRegistry::SharedPtr endpointsAddon = addons.GetAddon(OpcUa::Server::EndpointsRegistryAddonId); - void AsyncOpcTcpAddon::PublishApplicationsInformation(std::vector applications, std::vector endpoints, const Common::AddonsManager& addons) const - { - OpcUa::Server::EndpointsRegistry::SharedPtr endpointsAddon = addons.GetAddon(OpcUa::Server::EndpointsRegistryAddonId); - if (!endpointsAddon) + if (!endpointsAddon) { std::cerr << "Cannot publish information about endpoints. Endpoints services addon didn't' registered." << std::endl; return; } - endpointsAddon->AddEndpoints(endpoints); - endpointsAddon->AddApplications(applications); - } - void AsyncOpcTcpAddon::Stop() - { - Endpoint->Shutdown(); - Endpoint.reset(); - } + endpointsAddon->AddEndpoints(endpoints); + endpointsAddon->AddApplications(applications); +} + +void AsyncOpcTcpAddon::Stop() +{ + Endpoint->Shutdown(); + Endpoint.reset(); +} } namespace OpcUa { - namespace Server - { +namespace Server +{ - Common::Addon::UniquePtr AsyncOpcTcpAddonFactory::CreateAddon() - { - return Common::Addon::UniquePtr(new AsyncOpcTcpAddon()); - } +Common::Addon::UniquePtr AsyncOpcTcpAddonFactory::CreateAddon() +{ + return Common::Addon::UniquePtr(new AsyncOpcTcpAddon()); +} - } +} } diff --git a/src/server/opc_tcp_async_parameters.cpp b/src/server/opc_tcp_async_parameters.cpp index 1807c410..48ffaa8b 100644 --- a/src/server/opc_tcp_async_parameters.cpp +++ b/src/server/opc_tcp_async_parameters.cpp @@ -22,19 +22,21 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ + +AsyncOpcTcp::Parameters GetOpcTcpParameters(const Common::AddonParameters & addonParams) +{ + AsyncOpcTcp::Parameters result; - AsyncOpcTcp::Parameters GetOpcTcpParameters(const Common::AddonParameters& addonParams) + for (const Common::Parameter & param : addonParams.Parameters) { - AsyncOpcTcp::Parameters result; - for (const Common::Parameter& param : addonParams.Parameters) - { - if (param.Name == "debug") - result.DebugMode = param.Value == "false" || param.Value == "0" ? false : true; - } - return result; + if (param.Name == "debug") + { result.DebugMode = param.Value == "false" || param.Value == "0" ? false : true; } } - } // namespace UaServer + return result; +} + +} // namespace UaServer } // namespace OpcUa diff --git a/src/server/opc_tcp_async_parameters.h b/src/server/opc_tcp_async_parameters.h index e4989577..05044fa6 100644 --- a/src/server/opc_tcp_async_parameters.h +++ b/src/server/opc_tcp_async_parameters.h @@ -24,10 +24,10 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - AsyncOpcTcp::Parameters GetOpcTcpParameters(const Common::AddonParameters& addonParams); +AsyncOpcTcp::Parameters GetOpcTcpParameters(const Common::AddonParameters & addonParams); - } +} } diff --git a/src/server/opc_tcp_processor.cpp b/src/server/opc_tcp_processor.cpp index 215e5aca..61fb2b88 100644 --- a/src/server/opc_tcp_processor.cpp +++ b/src/server/opc_tcp_processor.cpp @@ -38,810 +38,883 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ + +using namespace OpcUa::Binary; + +OpcTcpMessages::OpcTcpMessages(std::shared_ptr computer, OpcUa::OutputChannel & outputChannel, bool debug) + : Server(computer) + , OutputStream(outputChannel) + , Debug(debug) + , ChannelId(1) + , TokenId(2) + , SessionId(GenerateSessionId()) + , SequenceNb(0) +{ + std::cout << "opc_tcp_processor| Debug is " << Debug << std::endl; + std::cout << "opc_tcp_processor| SessionId is " << Debug << std::endl; +} + - using namespace OpcUa::Binary; +OpcTcpMessages::~OpcTcpMessages() +{ + // This is a hack, we cannot leave subcsriptoins running since they have a cllback to us + try + { + DeleteAllSubscriptions(); + } - OpcTcpMessages::OpcTcpMessages(std::shared_ptr computer, OpcUa::OutputChannel& outputChannel, bool debug) - : Server(computer) - , OutputStream(outputChannel) - , Debug(debug) - , ChannelId(1) - , TokenId(2) - , SessionId(GenerateSessionId()) - , SequenceNb(0) + catch (const std::exception & exc) { - std::cout << "opc_tcp_processor| Debug is " << Debug << std::endl; - std::cout << "opc_tcp_processor| SessionId is " << Debug << std::endl; + std::cerr << "Error during stopping OpcTcpMessages. " << exc.what() << std::endl; } +} +bool OpcTcpMessages::ProcessMessage(MessageType msgType, IStreamBinary & iStream) +{ + std::lock_guard lock(ProcessMutex); - OpcTcpMessages::~OpcTcpMessages() + switch (msgType) { - // This is a hack, we cannot leave subcsriptoins running since they have a cllback to us - try - { - DeleteAllSubscriptions(); - } - catch (const std::exception& exc) - { - std::cerr << "Error during stopping OpcTcpMessages. " << exc.what() < lock(ProcessMutex); + if (Debug) { std::clog << "opc_tcp_processor| Opening secure channel." << std::endl; } - switch (msgType) - { - case MT_HELLO: - { - if (Debug) std::clog << "opc_tcp_processor| Accepted hello message." << std::endl; - HelloClient(iStream, OutputStream); - break; - } + OpenChannel(iStream, OutputStream); + break; + } + case MT_SECURE_CLOSE: + { + if (Debug) { std::clog << "opc_tcp_processor| Closing secure channel." << std::endl; } - case MT_SECURE_OPEN: - { - if (Debug) std::clog << "opc_tcp_processor| Opening secure channel." << std::endl; - OpenChannel(iStream, OutputStream); - break; - } + CloseChannel(iStream); + return false; + } - case MT_SECURE_CLOSE: - { - if (Debug) std::clog << "opc_tcp_processor| Closing secure channel." << std::endl; - CloseChannel(iStream); - return false; - } + case MT_SECURE_MESSAGE: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing secure message." << std::endl; } - case MT_SECURE_MESSAGE: - { - if (Debug) std::clog << "opc_tcp_processor| Processing secure message." << std::endl; - ProcessRequest(iStream, OutputStream); - break; - } + ProcessRequest(iStream, OutputStream); + break; + } - case MT_ACKNOWLEDGE: - { - if (Debug) std::clog << "opc_tcp_processor| Received acknowledge from client. This should not have happend..." << std::endl; - throw std::logic_error("Thank to client about acknowledge."); - } + case MT_ACKNOWLEDGE: + { + if (Debug) { std::clog << "opc_tcp_processor| Received acknowledge from client. This should not have happend..." << std::endl; } - case MT_ERROR: - { - if (Debug) std::clog << "opc_tcp_processor| There is an error happend in the client!" << std::endl; - throw std::logic_error("It is very nice get to know server about error in the client."); - } + throw std::logic_error("Thank to client about acknowledge."); + } - default: - { - if (Debug) std::clog << "opc_tcp_processor| Unknown message type '" << msgType << "' received!" << std::endl; - throw std::logic_error("Invalid message type received."); - } - } - return true; + case MT_ERROR: + { + if (Debug) { std::clog << "opc_tcp_processor| There is an error happend in the client!" << std::endl; } + + throw std::logic_error("It is very nice get to know server about error in the client."); } - void OpcTcpMessages::ForwardPublishResponse(const PublishResult result) + default: { - std::lock_guard lock(ProcessMutex); + if (Debug) { std::clog << "opc_tcp_processor| Unknown message type '" << msgType << "' received!" << std::endl; } - if (Debug) std::clog << "opc_tcp_processor| Sending PublishResult to client!" << std::endl; - if ( PublishRequestQueue.empty() ) - { - std::cerr << "Error trying to send publish response while we do not have data from a PublishRequest" << std::endl; - return; - } - PublishRequestElement requestData = PublishRequestQueue.front(); - PublishRequestQueue.pop(); + throw std::logic_error("Invalid message type received."); + } + } - PublishResponse response; + return true; +} - FillResponseHeader(requestData.requestHeader, response.Header); - response.Parameters = result; - - requestData.sequence.SequenceNumber = ++SequenceNb; +void OpcTcpMessages::ForwardPublishResponse(const PublishResult result) +{ + std::lock_guard lock(ProcessMutex); - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(requestData.algorithmHeader)); - secureHeader.AddSize(RawSize(requestData.sequence)); - secureHeader.AddSize(RawSize(response)); - if (Debug) { - std::cout << "opc_tcp_processor| Sedning publishResponse with " << response.Parameters.NotificationMessage.NotificationData.size() << " PublishResults" << std::endl; - } - OutputStream << secureHeader << requestData.algorithmHeader << requestData.sequence << response << flush; + if (Debug) { std::clog << "opc_tcp_processor| Sending PublishResult to client!" << std::endl; } + + if (PublishRequestQueue.empty()) + { + std::cerr << "Error trying to send publish response while we do not have data from a PublishRequest" << std::endl; + return; + } + + PublishRequestElement requestData = PublishRequestQueue.front(); + PublishRequestQueue.pop(); + + PublishResponse response; + + FillResponseHeader(requestData.requestHeader, response.Header); + response.Parameters = result; + + requestData.sequence.SequenceNumber = ++SequenceNb; + + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(requestData.algorithmHeader)); + secureHeader.AddSize(RawSize(requestData.sequence)); + secureHeader.AddSize(RawSize(response)); + + if (Debug) + { + std::cout << "opc_tcp_processor| Sedning publishResponse with " << response.Parameters.NotificationMessage.NotificationData.size() << " PublishResults" << std::endl; } - - void OpcTcpMessages::HelloClient(IStreamBinary& istream, OStreamBinary& ostream) + + OutputStream << secureHeader << requestData.algorithmHeader << requestData.sequence << response << flush; +} + +void OpcTcpMessages::HelloClient(IStreamBinary & istream, OStreamBinary & ostream) +{ + using namespace OpcUa::Binary; + + if (Debug) { std::clog << "opc_tcp_processor| Reading hello message." << std::endl; } + + Hello hello; + istream >> hello; + + Acknowledge ack; + ack.ReceiveBufferSize = hello.ReceiveBufferSize; + ack.SendBufferSize = hello.SendBufferSize; + ack.MaxMessageSize = hello.MaxMessageSize; + ack.MaxChunkCount = 1; + + Header ackHeader(MT_ACKNOWLEDGE, CHT_SINGLE); + ackHeader.AddSize(RawSize(ack)); + + if (Debug) { std::clog << "opc_tcp_processor| Sending answer to client." << std::endl; } + + ostream << ackHeader << ack << flush; +} + +void OpcTcpMessages::OpenChannel(IStreamBinary & istream, OStreamBinary & ostream) +{ + uint32_t channelId = 0; + istream >> channelId; + AsymmetricAlgorithmHeader algorithmHeader; + istream >> algorithmHeader; + + if (algorithmHeader.SecurityPolicyUri != "http://opcfoundation.org/UA/SecurityPolicy#None") { - using namespace OpcUa::Binary; + throw std::logic_error(std::string("Client want to create secure channel with unsupported policy '") + algorithmHeader.SecurityPolicyUri + std::string("'")); + } - if (Debug) std::clog << "opc_tcp_processor| Reading hello message." << std::endl; - Hello hello; - istream >> hello; + SequenceHeader sequence; + istream >> sequence; - Acknowledge ack; - ack.ReceiveBufferSize = hello.ReceiveBufferSize; - ack.SendBufferSize = hello.SendBufferSize; - ack.MaxMessageSize = hello.MaxMessageSize; - ack.MaxChunkCount = 1; + OpenSecureChannelRequest request; + istream >> request; - Header ackHeader(MT_ACKNOWLEDGE, CHT_SINGLE); - ackHeader.AddSize(RawSize(ack)); - if (Debug) std::clog << "opc_tcp_processor| Sending answer to client." << std::endl; - ostream << ackHeader << ack << flush; + if (request.Parameters.SecurityMode != MessageSecurityMode::None) + { + throw std::logic_error("Unsupported security mode."); } - void OpcTcpMessages::OpenChannel(IStreamBinary& istream, OStreamBinary& ostream) + if (request.Parameters.RequestType == SecurityTokenRequestType::Renew) { - uint32_t channelId = 0; - istream >> channelId; - AsymmetricAlgorithmHeader algorithmHeader; - istream >> algorithmHeader; + //FIXME:Should check that channel has been issued first + ++TokenId; + } - if (algorithmHeader.SecurityPolicyUri != "http://opcfoundation.org/UA/SecurityPolicy#None") - { - throw std::logic_error(std::string("Client want to create secure channel with unsupported policy '") + algorithmHeader.SecurityPolicyUri + std::string("'")); - } + sequence.SequenceNumber = ++SequenceNb; - SequenceHeader sequence; - istream >> sequence; + OpenSecureChannelResponse response; + FillResponseHeader(request.Header, response.Header); + response.ChannelSecurityToken.SecureChannelId = ChannelId; + response.ChannelSecurityToken.TokenId = TokenId; + response.ChannelSecurityToken.CreatedAt = OpcUa::DateTime::Current(); + response.ChannelSecurityToken.RevisedLifetime = request.Parameters.RequestLifeTime; - OpenSecureChannelRequest request; - istream >> request; + SecureHeader responseHeader(MT_SECURE_OPEN, CHT_SINGLE, ChannelId); + responseHeader.AddSize(RawSize(algorithmHeader)); + responseHeader.AddSize(RawSize(sequence)); + responseHeader.AddSize(RawSize(response)); + ostream << responseHeader << algorithmHeader << sequence << response << flush; +} - if (request.Parameters.SecurityMode != MessageSecurityMode::None) - { - throw std::logic_error("Unsupported security mode."); - } +void OpcTcpMessages::CloseChannel(IStreamBinary & istream) +{ + uint32_t channelId = 0; + istream >> channelId; - if (request.Parameters.RequestType == SecurityTokenRequestType::Renew) - { - //FIXME:Should check that channel has been issued first - ++TokenId; - } + SymmetricAlgorithmHeader algorithmHeader; + istream >> algorithmHeader; - sequence.SequenceNumber = ++SequenceNb; + SequenceHeader sequence; + istream >> sequence; - OpenSecureChannelResponse response; - FillResponseHeader(request.Header, response.Header); - response.ChannelSecurityToken.SecureChannelId = ChannelId; - response.ChannelSecurityToken.TokenId = TokenId; - response.ChannelSecurityToken.CreatedAt = OpcUa::DateTime::Current(); - response.ChannelSecurityToken.RevisedLifetime = request.Parameters.RequestLifeTime; + CloseSecureChannelRequest request; + istream >> request; +} - SecureHeader responseHeader(MT_SECURE_OPEN, CHT_SINGLE, ChannelId); - responseHeader.AddSize(RawSize(algorithmHeader)); - responseHeader.AddSize(RawSize(sequence)); - responseHeader.AddSize(RawSize(response)); - ostream << responseHeader << algorithmHeader << sequence << response << flush; - } +void OpcTcpMessages::ProcessRequest(IStreamBinary & istream, OStreamBinary & ostream) +{ + uint32_t channelId = 0; + istream >> channelId; + + SymmetricAlgorithmHeader algorithmHeader; + istream >> algorithmHeader; + + SequenceHeader sequence; + istream >> sequence; + + NodeId typeId; + istream >> typeId; + + RequestHeader requestHeader; + istream >> requestHeader; + + sequence.SequenceNumber = ++SequenceNb; + /* + const std::size_t receivedSize = + RawSize(channelId) + + RawSize(algorithmHeader) + + RawSize(sequence) + + RawSize(typeId) + + RawSize(requestHeader); + */ + const OpcUa::MessageId message = GetMessageId(typeId); - void OpcTcpMessages::CloseChannel(IStreamBinary& istream) + switch (message) { - uint32_t channelId = 0; - istream >> channelId; + case OpcUa::GET_ENDPOINTS_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing get endpoints request." << std::endl; } - SymmetricAlgorithmHeader algorithmHeader; - istream >> algorithmHeader; + GetEndpointsParameters filter; + istream >> filter; - SequenceHeader sequence; - istream >> sequence; + GetEndpointsResponse response; + FillResponseHeader(requestHeader, response.Header); + response.Endpoints = Server->Endpoints()->GetEndpoints(filter); - CloseSecureChannelRequest request; - istream >> request; + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; } - void OpcTcpMessages::ProcessRequest(IStreamBinary& istream, OStreamBinary& ostream) + case OpcUa::FIND_ServerS_REQUEST: { - uint32_t channelId = 0; - istream >> channelId; + if (Debug) { std::clog << "opc_tcp_processor| Processing 'Find Servers' request." << std::endl; } - SymmetricAlgorithmHeader algorithmHeader; - istream >> algorithmHeader; + FindServersParameters params; + istream >> params; - SequenceHeader sequence; - istream >> sequence; + FindServersResponse response; + FillResponseHeader(requestHeader, response.Header); + response.Data.Descriptions = Server->Endpoints()->FindServers(params); - NodeId typeId; - istream >> typeId; - - RequestHeader requestHeader; - istream >> requestHeader; + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; + } - sequence.SequenceNumber = ++SequenceNb; -/* - const std::size_t receivedSize = - RawSize(channelId) + - RawSize(algorithmHeader) + - RawSize(sequence) + - RawSize(typeId) + - RawSize(requestHeader); -*/ - const OpcUa::MessageId message = GetMessageId(typeId); - switch (message) - { - case OpcUa::GET_ENDPOINTS_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing get endpoints request." << std::endl; - GetEndpointsParameters filter; - istream >> filter; - - GetEndpointsResponse response; - FillResponseHeader(requestHeader, response.Header); - response.Endpoints = Server->Endpoints()->GetEndpoints(filter); - - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; - } + case OpcUa::BROWSE_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing browse request." << std::endl; } - case OpcUa::FIND_ServerS_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing 'Find Servers' request." << std::endl; - FindServersParameters params; - istream >> params; - - FindServersResponse response; - FillResponseHeader(requestHeader, response.Header); - response.Data.Descriptions = Server->Endpoints()->FindServers(params); - - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; - } + NodesQuery query; + istream >> query; - case OpcUa::BROWSE_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing browse request." << std::endl; - NodesQuery query; - istream >> query; + BrowseResponse response; + response.Results = Server->Views()->Browse(query); - BrowseResponse response; - response.Results = Server->Views()->Browse(query); + FillResponseHeader(requestHeader, response.Header); - FillResponseHeader(requestHeader, response.Header); + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; + } - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; - } + case OpcUa::READ_REQUEST: + { + ReadParameters params; + istream >> params; - case OpcUa::READ_REQUEST: + if (Debug) { - ReadParameters params; - istream >> params; + std::clog << "opc_tcp_processor| Processing read request for Node:"; - if (Debug) - { - std::clog << "opc_tcp_processor| Processing read request for Node:"; - for (ReadValueId id : params.AttributesToRead) + for (ReadValueId id : params.AttributesToRead) { std::clog << "opc_tcp_processor| " << id.NodeId; } - std::cout << std::endl; - } - ReadResponse response; - FillResponseHeader(requestHeader, response.Header); - std::vector values; - if (std::shared_ptr service = Server->Attributes()) - { - values = service->Read(params); - } - else - { - for (auto attribId : params.AttributesToRead) + std::cout << std::endl; + } + + ReadResponse response; + FillResponseHeader(requestHeader, response.Header); + std::vector values; + + if (std::shared_ptr service = Server->Attributes()) + { + values = service->Read(params); + } + + else + { + for (auto attribId : params.AttributesToRead) { DataValue value; value.Encoding = DATA_VALUE_STATUS_CODE; value.Status = OpcUa::StatusCode::BadNotImplemented; values.push_back(value); } - } - response.Results = values; + } - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - ostream << secureHeader << algorithmHeader << sequence << response << flush; + response.Results = values; - return; - } + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); + ostream << secureHeader << algorithmHeader << sequence << response << flush; - case OpcUa::WRITE_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing write request." << std::endl; - WriteParameters params; - istream >> params; - - WriteResponse response; - FillResponseHeader(requestHeader, response.Header); - std::vector values; - if (std::shared_ptr service = Server->Attributes()) - { - response.Results = service->Write(params.NodesToWrite); - } - else - { - response.Results = std::vector(params.NodesToWrite.size(), OpcUa::StatusCode::BadNotImplemented); - } + return; + } + + case OpcUa::WRITE_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing write request." << std::endl; } + + WriteParameters params; + istream >> params; - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - ostream << secureHeader << algorithmHeader << sequence << response << flush; + WriteResponse response; + FillResponseHeader(requestHeader, response.Header); + std::vector values; - return; + if (std::shared_ptr service = Server->Attributes()) + { + response.Results = service->Write(params.NodesToWrite); } - case TRANSLATE_BROWSE_PATHS_TO_NODE_IdS_REQUEST: + else { - if (Debug) std::clog << "opc_tcp_processor| Processing 'Translate Browse Paths To Node Ids' request." << std::endl; - TranslateBrowsePathsParameters params; - istream >> params; + response.Results = std::vector(params.NodesToWrite.size(), OpcUa::StatusCode::BadNotImplemented); + } - if (Debug) - { - for ( BrowsePath path : params.BrowsePaths) + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); + ostream << secureHeader << algorithmHeader << sequence << response << flush; + + return; + } + + case TRANSLATE_BROWSE_PATHS_TO_NODE_IdS_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing 'Translate Browse Paths To Node Ids' request." << std::endl; } + + TranslateBrowsePathsParameters params; + istream >> params; + + if (Debug) + { + for (BrowsePath path : params.BrowsePaths) { std::cout << "opc_tcp_processor| Requested path is: " << path.StartingNode << " : " ; - for ( RelativePathElement el : path.Path.Elements) - { - std::cout << "/" << el.TargetName ; - } + + for (RelativePathElement el : path.Path.Elements) + { + std::cout << "/" << el.TargetName ; + } + std::cout << std::endl; } - } + } - std::vector result = Server->Views()->TranslateBrowsePathsToNodeIds(params); + std::vector result = Server->Views()->TranslateBrowsePathsToNodeIds(params); - if (Debug) - { - for (BrowsePathResult res: result) + if (Debug) + { + for (BrowsePathResult res : result) { std::cout << "opc_tcp_processor| Result of browsePath is: " << (uint32_t) res.Status << ". Target is: "; - for ( BrowsePathTarget path : res.Targets) - { - std::cout << path.Node ; - } + + for (BrowsePathTarget path : res.Targets) + { + std::cout << path.Node ; + } + std::cout << std::endl; } - } - - TranslateBrowsePathsToNodeIdsResponse response; - FillResponseHeader(requestHeader, response.Header); - response.Result.Paths = result; - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - - if (Debug) std::clog << "opc_tcp_processor| Sending response to 'Translate Browse Paths To Node Ids' request." << std::endl; - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; } + TranslateBrowsePathsToNodeIdsResponse response; + FillResponseHeader(requestHeader, response.Header); + response.Result.Paths = result; + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); - case CREATE_SESSION_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing create session request." << std::endl; - CreateSessionParameters params; - istream >> params; + if (Debug) { std::clog << "opc_tcp_processor| Sending response to 'Translate Browse Paths To Node Ids' request." << std::endl; } + + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; + } - CreateSessionResponse response; - FillResponseHeader(requestHeader, response.Header); - response.Parameters.SessionId = SessionId; - response.Parameters.AuthenticationToken = SessionId; - response.Parameters.RevisedSessionTimeout = params.RequestedSessionTimeout; - response.Parameters.MaxRequestMessageSize = 65536; - GetEndpointsParameters epf; - response.Parameters.ServerEndpoints = Server->Endpoints()->GetEndpoints(epf); + case CREATE_SESSION_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing create session request." << std::endl; } + CreateSessionParameters params; + istream >> params; - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - ostream << secureHeader << algorithmHeader << sequence << response << flush; + CreateSessionResponse response; + FillResponseHeader(requestHeader, response.Header); - return; - } - case ACTIVATE_SESSION_REQUEST: + response.Parameters.SessionId = SessionId; + response.Parameters.AuthenticationToken = SessionId; + response.Parameters.RevisedSessionTimeout = params.RequestedSessionTimeout; + response.Parameters.MaxRequestMessageSize = 65536; + GetEndpointsParameters epf; + response.Parameters.ServerEndpoints = Server->Endpoints()->GetEndpoints(epf); + + + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); + ostream << secureHeader << algorithmHeader << sequence << response << flush; + + return; + } + + case ACTIVATE_SESSION_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing activate session request." << std::endl; } + + ActivateSessionParameters params; + istream >> params; + + ActivateSessionResponse response; + FillResponseHeader(requestHeader, response.Header); + + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; + } + + case CLOSE_SESSION_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing close session request." << std::endl; } + + bool deleteSubscriptions = false; + istream >> deleteSubscriptions; + + if (deleteSubscriptions) { - if (Debug) std::clog << "opc_tcp_processor| Processing activate session request." << std::endl; - ActivateSessionParameters params; - istream >> params; - - ActivateSessionResponse response; - FillResponseHeader(requestHeader, response.Header); - - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; + DeleteAllSubscriptions(); } - case CLOSE_SESSION_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing close session request." << std::endl; - bool deleteSubscriptions = false; - istream >> deleteSubscriptions; + CloseSessionResponse response; + FillResponseHeader(requestHeader, response.Header); + + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); + ostream << secureHeader << algorithmHeader << sequence << response << flush; - if (deleteSubscriptions) + if (Debug) { std::clog << "opc_tcp_processor| Session Closed " << std::endl; } + + return; + } + + case CREATE_SUBSCRIPTION_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing create subscription request." << std::endl; } + + CreateSubscriptionRequest request; + istream >> request.Parameters; + request.Header = requestHeader; + + CreateSubscriptionResponse response; + FillResponseHeader(requestHeader, response.Header); + + response.Data = Server->Subscriptions()->CreateSubscription(request, [this](PublishResult i) + { + try { - DeleteAllSubscriptions(); + this->ForwardPublishResponse(i); } - CloseSessionResponse response; - FillResponseHeader(requestHeader, response.Header); + catch (std::exception & ex) + { + // TODO Disconnect client! + std::cerr << "Error forwarding publishResult to client: " << ex.what() << std::endl; + } + }); - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - ostream << secureHeader << algorithmHeader << sequence << response << flush; - if (Debug) std::clog << "opc_tcp_processor| Session Closed " << std::endl; - return; - } + Subscriptions.push_back(response.Data.SubscriptionId); //Keep a link to eventually delete subcriptions when exiting - case CREATE_SUBSCRIPTION_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing create subscription request." << std::endl; - CreateSubscriptionRequest request; - istream >> request.Parameters; - request.Header = requestHeader; + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; + } - CreateSubscriptionResponse response; - FillResponseHeader(requestHeader, response.Header); + case MODIFY_SUBSCRIPTION_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing modify subscription request." << std::endl; } - response.Data = Server->Subscriptions()->CreateSubscription(request, [this](PublishResult i){ - try - { - this->ForwardPublishResponse(i); - } - catch (std::exception& ex) - { - // TODO Disconnect client! - std::cerr << "Error forwarding publishResult to client: " << ex.what() << std::endl; - } - }); + ModifySubscriptionRequest request; + istream >> request.Parameters; + request.Header = requestHeader; - Subscriptions.push_back(response.Data.SubscriptionId); //Keep a link to eventually delete subcriptions when exiting + ModifySubscriptionResponse response = Server->Subscriptions()->ModifySubscription(request.Parameters); + FillResponseHeader(requestHeader, response.Header); - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; - } + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); - case MODIFY_SUBSCRIPTION_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing modify subscription request." << std::endl; - ModifySubscriptionRequest request; - istream >> request.Parameters; - request.Header = requestHeader; - - ModifySubscriptionResponse response = Server->Subscriptions()->ModifySubscription(request.Parameters); - FillResponseHeader(requestHeader, response.Header); - - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - if (Debug) std::clog << "opc_tcp_processor| Sending response to Modify Subscription Request." << std::endl; - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; - } + if (Debug) { std::clog << "opc_tcp_processor| Sending response to Modify Subscription Request." << std::endl; } - case DELETE_SUBSCRIPTION_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing delete subscription request." << std::endl; - std::vector ids; - istream >> ids; + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; + } - DeleteSubscriptions(ids); //remove from locale subscription lis + case DELETE_SUBSCRIPTION_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing delete subscription request." << std::endl; } - DeleteSubscriptionsResponse response; - FillResponseHeader(requestHeader, response.Header); + std::vector ids; + istream >> ids; - response.Results = Server->Subscriptions()->DeleteSubscriptions(ids); + DeleteSubscriptions(ids); //remove from locale subscription lis - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); + DeleteSubscriptionsResponse response; + FillResponseHeader(requestHeader, response.Header); - if (Debug) std::clog << "opc_tcp_processor| Sending response to Delete Subscription Request." << std::endl; - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; - } + response.Results = Server->Subscriptions()->DeleteSubscriptions(ids); - case CREATE_MONITORED_ITEMS_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing 'Create Monitored Items' request." << std::endl; - MonitoredItemsParameters params; - istream >> params; + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); - CreateMonitoredItemsResponse response; + if (Debug) { std::clog << "opc_tcp_processor| Sending response to Delete Subscription Request." << std::endl; } - response.Results = Server->Subscriptions()->CreateMonitoredItems(params); + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; + } - FillResponseHeader(requestHeader, response.Header); - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); + case CREATE_MONITORED_ITEMS_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing 'Create Monitored Items' request." << std::endl; } - if (Debug) std::clog << "opc_tcp_processor| Sending response to Create Monitored Items Request." << std::endl; - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; - } + MonitoredItemsParameters params; + istream >> params; - case DELETE_MONITORED_ITEMS_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing 'Delete Monitored Items' request." << std::endl; - DeleteMonitoredItemsParameters params; - istream >> params; + CreateMonitoredItemsResponse response; - DeleteMonitoredItemsResponse response; + response.Results = Server->Subscriptions()->CreateMonitoredItems(params); - response.Results = Server->Subscriptions()->DeleteMonitoredItems(params); + FillResponseHeader(requestHeader, response.Header); + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); - FillResponseHeader(requestHeader, response.Header); - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); + if (Debug) { std::clog << "opc_tcp_processor| Sending response to Create Monitored Items Request." << std::endl; } - if (Debug) std::clog << "opc_tcp_processor| Sending response to Delete Monitored Items Request." << std::endl; - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; - } + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; + } - case PUBLISH_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing 'Publish' request." << std::endl; - PublishRequest request; - request.Header = requestHeader; - istream >> request.SubscriptionAcknowledgements; + case DELETE_MONITORED_ITEMS_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing 'Delete Monitored Items' request." << std::endl; } - PublishRequestElement data; - data.sequence = sequence; - data.algorithmHeader = algorithmHeader; - data.requestHeader = requestHeader; - PublishRequestQueue.push(data); - Server->Subscriptions()->Publish(request); + DeleteMonitoredItemsParameters params; + istream >> params; - --SequenceNb; //We do not send response, so do not increase sequence + DeleteMonitoredItemsResponse response; - return; - } + response.Results = Server->Subscriptions()->DeleteMonitoredItems(params); - case SET_PUBLISHING_MODE_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing 'Set Publishing Mode' request." << std::endl; - PublishingModeParameters params; - istream >> params; - - //FIXME: forward request to internal server!! - SetPublishingModeResponse response; - FillResponseHeader(requestHeader, response.Header); - response.Result.Results.resize(params.SubscriptionIds.size(), StatusCode::Good); - - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - - if (Debug) std::clog << "opc_tcp_processor| Sending response to 'Set Publishing Mode' request." << std::endl; - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; - } + FillResponseHeader(requestHeader, response.Header); + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); - case ADD_NODES_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing 'Add Nodes' request." << std::endl; - AddNodesParameters params; - istream >> params; + if (Debug) { std::clog << "opc_tcp_processor| Sending response to Delete Monitored Items Request." << std::endl; } + + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; + } - std::vector results = Server->NodeManagement()->AddNodes(params.NodesToAdd); + case PUBLISH_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing 'Publish' request." << std::endl; } - AddNodesResponse response; - FillResponseHeader(requestHeader, response.Header); - response.results = results; + PublishRequest request; + request.Header = requestHeader; + istream >> request.SubscriptionAcknowledgements; - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); + PublishRequestElement data; + data.sequence = sequence; + data.algorithmHeader = algorithmHeader; + data.requestHeader = requestHeader; + PublishRequestQueue.push(data); + Server->Subscriptions()->Publish(request); - if (Debug) std::clog << "opc_tcp_processor| Sending response to 'Add Nodes' request." << std::endl; - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; - } + --SequenceNb; //We do not send response, so do not increase sequence - case ADD_REFERENCES_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing 'Add References' request." << std::endl; - AddReferencesParameters params; - istream >> params; + return; + } + + case SET_PUBLISHING_MODE_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing 'Set Publishing Mode' request." << std::endl; } - std::vector results = Server->NodeManagement()->AddReferences(params.ReferencesToAdd); + PublishingModeParameters params; + istream >> params; - AddReferencesResponse response; - FillResponseHeader(requestHeader, response.Header); - response.Results = results; + //FIXME: forward request to internal server!! + SetPublishingModeResponse response; + FillResponseHeader(requestHeader, response.Header); + response.Result.Results.resize(params.SubscriptionIds.size(), StatusCode::Good); - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); - if (Debug) std::clog << "opc_tcp_processor| Sending response to 'Add References' request." << std::endl; - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; - } + if (Debug) { std::clog << "opc_tcp_processor| Sending response to 'Set Publishing Mode' request." << std::endl; } + + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; + } + + case ADD_NODES_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing 'Add Nodes' request." << std::endl; } + + AddNodesParameters params; + istream >> params; + + std::vector results = Server->NodeManagement()->AddNodes(params.NodesToAdd); + + AddNodesResponse response; + FillResponseHeader(requestHeader, response.Header); + response.results = results; + + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); + + if (Debug) { std::clog << "opc_tcp_processor| Sending response to 'Add Nodes' request." << std::endl; } + + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; + } + + case ADD_REFERENCES_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing 'Add References' request." << std::endl; } + + AddReferencesParameters params; + istream >> params; + + std::vector results = Server->NodeManagement()->AddReferences(params.ReferencesToAdd); + + AddReferencesResponse response; + FillResponseHeader(requestHeader, response.Header); + response.Results = results; + + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); - case REPUBLISH_REQUEST: + if (Debug) { std::clog << "opc_tcp_processor| Sending response to 'Add References' request." << std::endl; } + + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; + } + + case REPUBLISH_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing 'Republish' request." << std::endl; } + + RepublishParameters params; + istream >> params; + + //Not implemented so we just say we do not have that notification + RepublishResponse response; + FillResponseHeader(requestHeader, response.Header); + response.Header.ServiceResult = StatusCode::BadMessageNotAvailable; + + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); + + if (Debug) { std::clog << "opc_tcp_processor| Sending response to 'Republish' request." << std::endl; } + + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; + } + + case CALL_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing call request." << std::endl; } + + CallParameters params; + istream >> params; + + CallResponse response; + FillResponseHeader(requestHeader, response.Header); + + if (std::shared_ptr service = Server->Method()) { - if (Debug) std::clog << "opc_tcp_processor| Processing 'Republish' request." << std::endl; - RepublishParameters params; - istream >> params; - - //Not implemented so we just say we do not have that notification - RepublishResponse response; - FillResponseHeader(requestHeader, response.Header); - response.Header.ServiceResult = StatusCode::BadMessageNotAvailable; - - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - - if (Debug) std::clog << "opc_tcp_processor| Sending response to 'Republish' request." << std::endl; - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; + response.Results = service->Call(params.MethodsToCall); } - case CALL_REQUEST: + else { - if (Debug) std::clog << "opc_tcp_processor| Processing call request." << std::endl; - CallParameters params; - istream >> params; - - CallResponse response; - FillResponseHeader(requestHeader, response.Header); - - if (std::shared_ptr service = Server->Method()) - { - response.Results = service->Call(params.MethodsToCall); - } - else - { - for (auto callMethodRequest : params.MethodsToCall) + for (auto callMethodRequest : params.MethodsToCall) { OpcUa::CallMethodResult result; result.Status = OpcUa::StatusCode::BadNotImplemented; response.Results.push_back(result); } - } + } - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - ostream << secureHeader << algorithmHeader << sequence << response << flush; + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); + ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; - } + return; + } - case OpcUa::REGISTER_NODES_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing register nodes request." << std::endl; - RegisterNodesRequest request; + case OpcUa::REGISTER_NODES_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing register nodes request." << std::endl; } - istream >> request.NodesToRegister; + RegisterNodesRequest request; - RegisterNodesResponse response; - response.Result = Server->Views()->RegisterNodes(request.NodesToRegister); + istream >> request.NodesToRegister; - FillResponseHeader(requestHeader, response.Header); + RegisterNodesResponse response; + response.Result = Server->Views()->RegisterNodes(request.NodesToRegister); - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - if (Debug) std::clog << "opc_tcp_processor| Sending response to register nodes request." << std::endl; - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; - } + FillResponseHeader(requestHeader, response.Header); - case OpcUa::UNREGISTER_NODES_REQUEST: - { - if (Debug) std::clog << "opc_tcp_processor| Processing unregister nodes request." << std::endl; - UnregisterNodesRequest request; + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); + + if (Debug) { std::clog << "opc_tcp_processor| Sending response to register nodes request." << std::endl; } - istream >> request.NodesToUnregister; + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; + } - UnregisterNodesResponse response; - Server->Views()->UnregisterNodes(request.NodesToUnregister); + case OpcUa::UNREGISTER_NODES_REQUEST: + { + if (Debug) { std::clog << "opc_tcp_processor| Processing unregister nodes request." << std::endl; } - FillResponseHeader(requestHeader, response.Header); + UnregisterNodesRequest request; - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - if (Debug) std::clog << "opc_tcp_processor| Sending response to unregister nodes request." << std::endl; - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; - } + istream >> request.NodesToUnregister; - default: - { - ServiceFaultResponse response; - FillResponseHeader(requestHeader, response.Header); - response.Header.ServiceResult = StatusCode::BadNotImplemented; - - SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); - secureHeader.AddSize(RawSize(algorithmHeader)); - secureHeader.AddSize(RawSize(sequence)); - secureHeader.AddSize(RawSize(response)); - - if (Debug) std::cerr << "opc_tcp_processor| Sending ServiceFaultResponse to unsupported request of id: " << message << std::endl; - ostream << secureHeader << algorithmHeader << sequence << response << flush; - return; - } - } + UnregisterNodesResponse response; + Server->Views()->UnregisterNodes(request.NodesToUnregister); + + FillResponseHeader(requestHeader, response.Header); + + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); + + if (Debug) { std::clog << "opc_tcp_processor| Sending response to unregister nodes request." << std::endl; } + + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; } - void OpcTcpMessages::FillResponseHeader(const RequestHeader& requestHeader, ResponseHeader& responseHeader) + default: { - //responseHeader.InnerDiagnostics.push_back(DiagnosticInfo()); - responseHeader.Timestamp = DateTime::Current(); - responseHeader.RequestHandle = requestHeader.RequestHandle; + ServiceFaultResponse response; + FillResponseHeader(requestHeader, response.Header); + response.Header.ServiceResult = StatusCode::BadNotImplemented; + + SecureHeader secureHeader(MT_SECURE_MESSAGE, CHT_SINGLE, ChannelId); + secureHeader.AddSize(RawSize(algorithmHeader)); + secureHeader.AddSize(RawSize(sequence)); + secureHeader.AddSize(RawSize(response)); + + if (Debug) { std::cerr << "opc_tcp_processor| Sending ServiceFaultResponse to unsupported request of id: " << message << std::endl; } + + ostream << secureHeader << algorithmHeader << sequence << response << flush; + return; + } } +} + +void OpcTcpMessages::FillResponseHeader(const RequestHeader & requestHeader, ResponseHeader & responseHeader) +{ + //responseHeader.InnerDiagnostics.push_back(DiagnosticInfo()); + responseHeader.Timestamp = DateTime::Current(); + responseHeader.RequestHandle = requestHeader.RequestHandle; +} + +void OpcTcpMessages::DeleteAllSubscriptions() +{ + std::vector subs; - void OpcTcpMessages::DeleteAllSubscriptions() + for (const uint32_t & subid : Subscriptions) { - std::vector subs; - for (const uint32_t& subid: Subscriptions) - { - subs.push_back(subid); - } - Server->Subscriptions()->DeleteSubscriptions(subs); - Subscriptions.clear(); + subs.push_back(subid); } - void OpcTcpMessages::DeleteSubscriptions(const std::vector& ids) + Server->Subscriptions()->DeleteSubscriptions(subs); + Subscriptions.clear(); +} + +void OpcTcpMessages::DeleteSubscriptions(const std::vector & ids) +{ + for (auto id : ids) { - for ( auto id : ids ) - { - Subscriptions.erase(std::remove_if(Subscriptions.begin(), Subscriptions.end(), - [&](const uint32_t d) { return ( d == id) ; }), Subscriptions.end()); - } + Subscriptions.erase(std::remove_if(Subscriptions.begin(), Subscriptions.end(), + [&](const uint32_t d) { return (d == id) ; }), Subscriptions.end()); } +} - } // namespace UaServer +} // namespace UaServer } // namespace OpcUa diff --git a/src/server/opc_tcp_processor.h b/src/server/opc_tcp_processor.h index a45bdae5..23a45933 100644 --- a/src/server/opc_tcp_processor.h +++ b/src/server/opc_tcp_processor.h @@ -19,50 +19,50 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - class OpcTcpMessages - { - public: - OpcTcpMessages(std::shared_ptr computer, OpcUa::OutputChannel& outputChannel, bool debug); - ~OpcTcpMessages(); +class OpcTcpMessages +{ +public: + OpcTcpMessages(std::shared_ptr computer, OpcUa::OutputChannel & outputChannel, bool debug); + ~OpcTcpMessages(); - bool ProcessMessage(Binary::MessageType msgType, Binary::IStreamBinary& iStream); + bool ProcessMessage(Binary::MessageType msgType, Binary::IStreamBinary & iStream); - private: - void HelloClient(Binary::IStreamBinary& istream, Binary::OStreamBinary& ostream); - void OpenChannel(Binary::IStreamBinary& istream, Binary::OStreamBinary& ostream); - void CloseChannel(Binary::IStreamBinary& istream); - void ProcessRequest(Binary::IStreamBinary& istream, Binary::OStreamBinary& ostream); - void FillResponseHeader(const RequestHeader& requestHeader, ResponseHeader& responseHeader); - void DeleteSubscriptions(const std::vector& ids); - void DeleteAllSubscriptions(); - void ForwardPublishResponse(const PublishResult response); +private: + void HelloClient(Binary::IStreamBinary & istream, Binary::OStreamBinary & ostream); + void OpenChannel(Binary::IStreamBinary & istream, Binary::OStreamBinary & ostream); + void CloseChannel(Binary::IStreamBinary & istream); + void ProcessRequest(Binary::IStreamBinary & istream, Binary::OStreamBinary & ostream); + void FillResponseHeader(const RequestHeader & requestHeader, ResponseHeader & responseHeader); + void DeleteSubscriptions(const std::vector & ids); + void DeleteAllSubscriptions(); + void ForwardPublishResponse(const PublishResult response); - private: - std::mutex ProcessMutex; - std::shared_ptr Server; - OpcUa::Binary::OStreamBinary OutputStream; - bool Debug; - uint32_t ChannelId; - uint32_t TokenId; - ExpandedNodeId SessionId; - //ExpandedNodeId AuthenticationToken; - uint32_t SequenceNb; +private: + std::mutex ProcessMutex; + std::shared_ptr Server; + OpcUa::Binary::OStreamBinary OutputStream; + bool Debug; + uint32_t ChannelId; + uint32_t TokenId; + ExpandedNodeId SessionId; + //ExpandedNodeId AuthenticationToken; + uint32_t SequenceNb; - struct PublishRequestElement - { - Binary::SequenceHeader sequence; - RequestHeader requestHeader; - Binary::SymmetricAlgorithmHeader algorithmHeader; - }; + struct PublishRequestElement + { + Binary::SequenceHeader sequence; + RequestHeader requestHeader; + Binary::SymmetricAlgorithmHeader algorithmHeader; + }; - std::list Subscriptions; //Keep a list of subscriptions to query internal server at correct rate - std::mutex PublishRequestQueueMutex; - std::queue PublishRequestQueue; //Keep track of request data to answer them when we have data and - }; + std::list Subscriptions; //Keep a list of subscriptions to query internal server at correct rate + std::mutex PublishRequestQueueMutex; + std::queue PublishRequestQueue; //Keep track of request data to answer them when we have data and +}; - } // namespace UaServer +} // namespace UaServer } // namespace OpcUa diff --git a/src/server/opcua_protocol.h b/src/server/opcua_protocol.h index dfa134e9..29c71428 100644 --- a/src/server/opcua_protocol.h +++ b/src/server/opcua_protocol.h @@ -20,19 +20,19 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - class OpcUaProtocol : public Common::Interface - { - public: - DEFINE_CLASS_POINTERS(OpcUaProtocol) +class OpcUaProtocol : public Common::Interface +{ +public: + DEFINE_CLASS_POINTERS(OpcUaProtocol) - virtual void StartEndpoints(const std::vector& Endpoints, Services::SharedPtr server) = 0; - virtual void StopEndpoints() = 0; - }; + virtual void StartEndpoints(const std::vector & Endpoints, Services::SharedPtr server) = 0; + virtual void StopEndpoints() = 0; +}; - OpcUaProtocol::UniquePtr CreateOpcUaProtocol(TcpServer& tcpServer, bool debug); +OpcUaProtocol::UniquePtr CreateOpcUaProtocol(TcpServer & tcpServer, bool debug); - } // namespace UaServer +} // namespace UaServer } // nmespace OpcUa diff --git a/src/server/opcua_protocol_addon.cpp b/src/server/opcua_protocol_addon.cpp index 27fc30fd..5fa0c9a9 100644 --- a/src/server/opcua_protocol_addon.cpp +++ b/src/server/opcua_protocol_addon.cpp @@ -30,232 +30,244 @@ namespace { - using namespace OpcUa; - using namespace OpcUa::Binary; - using namespace OpcUa::Server; +using namespace OpcUa; +using namespace OpcUa::Binary; +using namespace OpcUa::Server; - class OpcTcp : public OpcUa::Server::IncomingConnectionProcessor +class OpcTcp : public OpcUa::Server::IncomingConnectionProcessor +{ +public: + OpcTcp(OpcUa::Services::SharedPtr services, bool debug) + : Server(services) + , Debug(debug) { - public: - OpcTcp(OpcUa::Services::SharedPtr services, bool debug) - : Server(services) - , Debug(debug) - { - } + } - virtual void Process(OpcUa::IOChannel::SharedPtr clientChannel) - { - if (!clientChannel) + virtual void Process(OpcUa::IOChannel::SharedPtr clientChannel) + { + if (!clientChannel) { - if (Debug) std::cerr << "opc_tcp_processor| Empty channel passed to endpoints opc binary protocol processor." << std::endl; + if (Debug) { std::cerr << "opc_tcp_processor| Empty channel passed to endpoints opc binary protocol processor." << std::endl; } + return; } - if (Debug) std::clog << "opc_tcp_processor| Hello client!" << std::endl; + if (Debug) { std::clog << "opc_tcp_processor| Hello client!" << std::endl; } - std::unique_ptr messageProcessor(new OpcTcpMessages(Server, *clientChannel, Debug)); + std::unique_ptr messageProcessor(new OpcTcpMessages(Server, *clientChannel, Debug)); - for(;;) + for (;;) { ProcessData(*clientChannel, *messageProcessor); } - } + } - virtual void StopProcessing(OpcUa::IOChannel::SharedPtr clientChannel) - { - } + virtual void StopProcessing(OpcUa::IOChannel::SharedPtr clientChannel) + { + } - private: - void ProcessData(OpcUa::IOChannel& clientChannel, OpcUa::Server::OpcTcpMessages& messageProcessor) - { - using namespace OpcUa::Binary; +private: + void ProcessData(OpcUa::IOChannel & clientChannel, OpcUa::Server::OpcTcpMessages & messageProcessor) + { + using namespace OpcUa::Binary; - IStreamBinary iStream(clientChannel); - ProcessChunk(iStream, messageProcessor); - } + IStreamBinary iStream(clientChannel); + ProcessChunk(iStream, messageProcessor); + } - // TODO implement collecting full message from chunks before processing. - void ProcessChunk(IStreamBinary& iStream, OpcTcpMessages& messageProcessor) - { - if (Debug) std::cout << "opc_tcp_processor| Processing new chunk." << std::endl; - Header hdr; - // Receive message header. - iStream >> hdr; - - // Receive full message. - std::vector buffer(hdr.MessageSize()); - OpcUa::Binary::RawBuffer buf(&buffer[0], buffer.size()); - iStream >> buf; - if (Debug) + // TODO implement collecting full message from chunks before processing. + void ProcessChunk(IStreamBinary & iStream, OpcTcpMessages & messageProcessor) + { + if (Debug) { std::cout << "opc_tcp_processor| Processing new chunk." << std::endl; } + + Header hdr; + // Receive message header. + iStream >> hdr; + + // Receive full message. + std::vector buffer(hdr.MessageSize()); + OpcUa::Binary::RawBuffer buf(&buffer[0], buffer.size()); + iStream >> buf; + + if (Debug) { std::clog << "opc_tcp_processor| Received message." << std::endl; PrintBlob(buffer); } - // restrict server size code only with current message. - OpcUa::InputFromBuffer messageChannel(&buffer[0], buffer.size()); - IStreamBinary messageStream(messageChannel); - messageProcessor.ProcessMessage(hdr.Type, messageStream); + // restrict server size code only with current message. + OpcUa::InputFromBuffer messageChannel(&buffer[0], buffer.size()); + IStreamBinary messageStream(messageChannel); + messageProcessor.ProcessMessage(hdr.Type, messageStream); - if (messageChannel.GetRemainSize()) + if (messageChannel.GetRemainSize()) { std::cerr << "opc_tcp_processor| ERROR!!! Message from client has been processed partially." << std::endl; } - } + } - private: - OpcUa::Services::SharedPtr Server; - bool Debug; - }; +private: + OpcUa::Services::SharedPtr Server; + bool Debug; +}; - class OpcUaProtocol : public OpcUa::Server::OpcUaProtocol - { - public: - DEFINE_CLASS_POINTERS(OpcUaProtocol) +class OpcUaProtocol : public OpcUa::Server::OpcUaProtocol +{ +public: + DEFINE_CLASS_POINTERS(OpcUaProtocol) - public: - OpcUaProtocol(OpcUa::Server::TcpServer& tcpServer, bool debug) - : TcpAddon(tcpServer) - , Debug(debug) - { - } +public: + OpcUaProtocol(OpcUa::Server::TcpServer & tcpServer, bool debug) + : TcpAddon(tcpServer) + , Debug(debug) + { + } - virtual void StartEndpoints(const std::vector& endpoints, OpcUa::Services::SharedPtr server) override - { - for (const EndpointDescription endpoint : endpoints) + virtual void StartEndpoints(const std::vector & endpoints, OpcUa::Services::SharedPtr server) override + { + for (const EndpointDescription endpoint : endpoints) { const Common::Uri uri(endpoint.EndpointUrl); + if (uri.Scheme() == "opc.tcp") - { - std::shared_ptr processor(new OpcTcp(server, Debug)); - TcpParameters tcpParams; - tcpParams.Port = uri.Port(); - if (Debug) std::clog << "opc_tcp_processor| Starting listen port " << tcpParams.Port << std::endl; - TcpAddon.Listen(tcpParams, processor); - Ports.push_back(tcpParams); - } + { + std::shared_ptr processor(new OpcTcp(server, Debug)); + TcpParameters tcpParams; + tcpParams.Port = uri.Port(); + + if (Debug) { std::clog << "opc_tcp_processor| Starting listen port " << tcpParams.Port << std::endl; } + + TcpAddon.Listen(tcpParams, processor); + Ports.push_back(tcpParams); + } } - } + } - virtual void StopEndpoints() override - { - for (const TcpParameters& params : Ports) + virtual void StopEndpoints() override + { + for (const TcpParameters & params : Ports) { TcpAddon.StopListen(params); } - } + } - private: - OpcUa::Server::TcpServer& TcpAddon; - std::vector Ports; - bool Debug; - }; +private: + OpcUa::Server::TcpServer & TcpAddon; + std::vector Ports; + bool Debug; +}; - class OpcUaProtocolAddon : public Common::Addon +class OpcUaProtocolAddon : public Common::Addon +{ +public: + OpcUaProtocolAddon() + : Debug(false) { - public: - OpcUaProtocolAddon() - : Debug(false) - { - } + } - public: // Common::Addon - virtual void Initialize(Common::AddonsManager& addons, const Common::AddonParameters& params) override; - virtual void Stop() override; +public: // Common::Addon + virtual void Initialize(Common::AddonsManager & addons, const Common::AddonParameters & params) override; + virtual void Stop() override; - private: - void ApplyAddonParameters(const Common::AddonParameters& params); - // not used - // void PublishApplicationsInformation(std::vector applications, std::vector endpoints, const Common::AddonsManager& addons) const; +private: + void ApplyAddonParameters(const Common::AddonParameters & params); + // not used + // void PublishApplicationsInformation(std::vector applications, std::vector endpoints, const Common::AddonsManager& addons) const; - private: - OpcUa::Server::ServicesRegistry::SharedPtr InternalServer; - OpcUa::Server::TcpServer::SharedPtr TcpServer; - OpcUa::Server::OpcUaProtocol::SharedPtr Protocol; - bool Debug; - }; +private: + OpcUa::Server::ServicesRegistry::SharedPtr InternalServer; + OpcUa::Server::TcpServer::SharedPtr TcpServer; + OpcUa::Server::OpcUaProtocol::SharedPtr Protocol; + bool Debug; +}; - void OpcUaProtocolAddon::Initialize(Common::AddonsManager& addons, const Common::AddonParameters& params) - { - ApplyAddonParameters(params); - const std::vector applications = OpcUa::ParseEndpointsParameters(params.Groups, Debug); - for (OpcUa::Server::ApplicationData d: applications) { +void OpcUaProtocolAddon::Initialize(Common::AddonsManager & addons, const Common::AddonParameters & params) +{ + ApplyAddonParameters(params); + const std::vector applications = OpcUa::ParseEndpointsParameters(params.Groups, Debug); + + for (OpcUa::Server::ApplicationData d : applications) + { std::cout << "Endpoint is: " << d.Endpoints.front().EndpointUrl << std::endl; } - std::vector applicationDescriptions; - std::vector endpointDescriptions; - for (const OpcUa::Server::ApplicationData application : applications) + std::vector applicationDescriptions; + std::vector endpointDescriptions; + + for (const OpcUa::Server::ApplicationData application : applications) { applicationDescriptions.push_back(application.Application); endpointDescriptions.insert(endpointDescriptions.end(), application.Endpoints.begin(), application.Endpoints.end()); } - OpcUa::Server::EndpointsRegistry::SharedPtr endpointsAddon = addons.GetAddon(OpcUa::Server::EndpointsRegistryAddonId); - if (!endpointsAddon) + + OpcUa::Server::EndpointsRegistry::SharedPtr endpointsAddon = addons.GetAddon(OpcUa::Server::EndpointsRegistryAddonId); + + if (!endpointsAddon) { std::cerr << "Cannot save information about endpoints. Endpoints services addon didn't' registered." << std::endl; return; } - endpointsAddon->AddEndpoints(endpointDescriptions); - endpointsAddon->AddApplications(applicationDescriptions); - InternalServer = addons.GetAddon(OpcUa::Server::ServicesRegistryAddonId); + endpointsAddon->AddEndpoints(endpointDescriptions); + endpointsAddon->AddApplications(applicationDescriptions); - TcpServer = OpcUa::Server::CreateTcpServer(); - Protocol.reset(new OpcUaProtocol(*TcpServer, Debug)); - Protocol->StartEndpoints(endpointDescriptions, InternalServer->GetServer()); - } + InternalServer = addons.GetAddon(OpcUa::Server::ServicesRegistryAddonId); - void OpcUaProtocolAddon::Stop() - { - Protocol.reset(); - TcpServer.reset(); - InternalServer.reset(); - } + TcpServer = OpcUa::Server::CreateTcpServer(); + Protocol.reset(new OpcUaProtocol(*TcpServer, Debug)); + Protocol->StartEndpoints(endpointDescriptions, InternalServer->GetServer()); +} - void OpcUaProtocolAddon::ApplyAddonParameters(const Common::AddonParameters& params) - { - for (const Common::Parameter parameter : params.Parameters) +void OpcUaProtocolAddon::Stop() +{ + Protocol.reset(); + TcpServer.reset(); + InternalServer.reset(); +} + +void OpcUaProtocolAddon::ApplyAddonParameters(const Common::AddonParameters & params) +{ + for (const Common::Parameter parameter : params.Parameters) { if (parameter.Name == "debug" && !parameter.Value.empty() && parameter.Value != "0") - { - Debug = true; - std::cout << "Enabled debug mode in the binary protocol addon." << std::endl; - } + { + Debug = true; + std::cout << "Enabled debug mode in the binary protocol addon." << std::endl; + } } - } - - // not used - //void OpcUaProtocolAddon::PublishApplicationsInformation(std::vector applications, std::vector endpoints, const Common::AddonsManager& addons) const - //{ - // OpcUa::Server::EndpointsRegistry::SharedPtr endpointsAddon = addons.GetAddon(OpcUa::Server::EndpointsRegistryAddonId); - // if (!endpointsAddon) - // { - // std::cerr << "Cannot save information about endpoints. Endpoints services addon didn't' registered." << std::endl; - // return; - // } - // endpointsAddon->AddEndpoints(endpoints); - // endpointsAddon->AddApplications(applications); - //} +} + +// not used +//void OpcUaProtocolAddon::PublishApplicationsInformation(std::vector applications, std::vector endpoints, const Common::AddonsManager& addons) const +//{ +// OpcUa::Server::EndpointsRegistry::SharedPtr endpointsAddon = addons.GetAddon(OpcUa::Server::EndpointsRegistryAddonId); +// if (!endpointsAddon) +// { +// std::cerr << "Cannot save information about endpoints. Endpoints services addon didn't' registered." << std::endl; +// return; +// } +// endpointsAddon->AddEndpoints(endpoints); +// endpointsAddon->AddApplications(applications); +//} } // namespace namespace OpcUa { - namespace Server - { - Common::Addon::UniquePtr OpcUaProtocolAddonFactory::CreateAddon() - { - return Common::Addon::UniquePtr(new ::OpcUaProtocolAddon()); - } +namespace Server +{ +Common::Addon::UniquePtr OpcUaProtocolAddonFactory::CreateAddon() +{ + return Common::Addon::UniquePtr(new ::OpcUaProtocolAddon()); +} - OpcUaProtocol::UniquePtr CreateOpcUaProtocol(TcpServer& tcpServer, bool debug) - { - return OpcUaProtocol::UniquePtr(new ::OpcUaProtocol(tcpServer, debug)); - } +OpcUaProtocol::UniquePtr CreateOpcUaProtocol(TcpServer & tcpServer, bool debug) +{ + return OpcUaProtocol::UniquePtr(new ::OpcUaProtocol(tcpServer, debug)); +} - } +} } diff --git a/src/server/server.cpp b/src/server/server.cpp index a441cceb..d1201485 100644 --- a/src/server/server.cpp +++ b/src/server/server.cpp @@ -27,180 +27,182 @@ namespace OpcUa { - UaServer::UaServer() - { - } - - UaServer::UaServer(bool debug) - : Debug(debug) - { - } - - void UaServer::SetEndpoint(const std::string& endpoint) - { - Endpoint = endpoint; - } - - void UaServer::SetProductURI(const std::string& uri) - { - ProductUri = uri; - } - - void UaServer::SetServerURI(const std::string& uri) - { - ServerUri = uri; - } - - void UaServer::SetServerName(const std::string& name) - { - Name = name; - } - - void UaServer::AddAddressSpace(const std::string& path) - { - XmlAddressSpaces.push_back(path); - } - - void UaServer::CheckStarted() const - { - if ( ! Registry ) +UaServer::UaServer() +{ +} + +UaServer::UaServer(bool debug) + : Debug(debug) +{ +} + +void UaServer::SetEndpoint(const std::string & endpoint) +{ + Endpoint = endpoint; +} + +void UaServer::SetProductURI(const std::string & uri) +{ + ProductUri = uri; +} + +void UaServer::SetServerURI(const std::string & uri) +{ + ServerUri = uri; +} + +void UaServer::SetServerName(const std::string & name) +{ + Name = name; +} + +void UaServer::AddAddressSpace(const std::string & path) +{ + XmlAddressSpaces.push_back(path); +} + +void UaServer::CheckStarted() const +{ + if (! Registry) { - throw(std::runtime_error("Server is not started")); + throw (std::runtime_error("Server is not started")); } - } - - uint32_t UaServer::RegisterNamespace(std::string uri) - { - CheckStarted(); - Node namespacearray(Registry->GetServer(), ObjectId::Server_NamespaceArray); - std::vector uris = namespacearray.GetValue().As>(); - uint32_t index = uris.size(); - uris.push_back(uri); - namespacearray.SetValue(uris); - return index; - } - - uint32_t UaServer::GetNamespaceIndex(std::string uri) - { - CheckStarted(); - Node namespacearray(Registry->GetServer(), ObjectId::Server_NamespaceArray); - std::vector uris = namespacearray.GetValue().As>();; - for ( uint32_t i=0; iGetServer(), ObjectId::Server_NamespaceArray); + std::vector uris = namespacearray.GetValue().As>(); + uint32_t index = uris.size(); + uris.push_back(uri); + namespacearray.SetValue(uris); + return index; +} + +uint32_t UaServer::GetNamespaceIndex(std::string uri) +{ + CheckStarted(); + Node namespacearray(Registry->GetServer(), ObjectId::Server_NamespaceArray); + std::vector uris = namespacearray.GetValue().As>();; + + for (uint32_t i = 0; i < uris.size(); ++i) { - if (uris[i] == uri ) - { - return i; - } + if (uris[i] == uri) + { + return i; + } } - throw(std::runtime_error("Error namespace uri does not exists in server")); - //return -1; - } - - void UaServer::Start() - { - ApplicationDescription appDesc; - appDesc.ApplicationName = LocalizedText(Name); - appDesc.ApplicationUri = ServerUri; - appDesc.ApplicationType = ApplicationType::Server; - appDesc.ProductUri = ProductUri; - - OpcUa::Server::Parameters params; - params.Debug = Debug; - params.Endpoint.Server = appDesc; - params.Endpoint.EndpointUrl = Endpoint; - params.Endpoint.SecurityMode = SecurityMode; - params.Endpoint.SecurityPolicyUri = "http://opcfoundation.org/UA/SecurityPolicy#None"; - params.Endpoint.TransportProfileUri = "http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary"; - //setting up policy is required for some client, this should be in a constructor - UserTokenPolicy policy; - policy.TokenType = UserTokenType::Anonymous; - params.Endpoint.UserIdentityTokens.push_back(policy); - - Addons = Common::CreateAddonsManager(); - Server::RegisterCommonAddons(params, *Addons); - Addons->Start(); - - Registry = Addons->GetAddon(Server::ServicesRegistryAddonId); - SubscriptionService = Addons->GetAddon(Server::SubscriptionServiceAddonId); - - Node ServerArray = GetNode(OpcUa::ObjectId::Server_ServerArray); - ServerArray.SetValue(std::vector({Endpoint})); - - EnableEventNotification(); //Enabling event notification, it probably does hurt anyway and users will forgot to set it up - } - - Node UaServer::GetNode(const std::string& nodeid) const - { - return GetNode(ToNodeId(nodeid)); - } - - Node UaServer::GetNode(const NodeId& nodeid) const - { - CheckStarted(); - return Node(Registry->GetServer(), nodeid); - } - - Node UaServer::GetNodeFromPath(const std::vector& path) const - { - return GetRootNode().GetChild(path); - } - - Node UaServer::GetNodeFromPath(const std::vector& path) const - { - return GetRootNode().GetChild(path); - } - - void UaServer::Stop() - { - std::cout << "Stopping opcua server application" << std::endl; - CheckStarted(); - Addons->Stop(); - } - - Node UaServer::GetRootNode() const - { - return GetNode(OpcUa::ObjectId::RootFolder); - } - - Node UaServer::GetObjectsNode() const - { - return GetNode(ObjectId::ObjectsFolder); - } - - Node UaServer::GetServerNode() const - { - return GetNode(ObjectId::Server); - } - - void UaServer::EnableEventNotification() - { - Node server = GetServerNode(); - - uint8_t notifierval = 0; - notifierval |= EventNotifier::SubscribeToEvents; - - DataValue dval(notifierval); - dval.SetSourceTimestamp(DateTime::Current()); - - server.SetAttribute(AttributeId::EventNotifier, dval); - } - - std::unique_ptr UaServer::CreateSubscription(unsigned int period, SubscriptionHandler& callback) - { - CheckStarted(); - CreateSubscriptionParameters params; - params.RequestedPublishingInterval = period; - return std::unique_ptr(new Subscription (Registry->GetServer(), params, callback, Debug)); - } - - ServerOperations UaServer::CreateServerOperations() - { - return std::move(ServerOperations(Registry->GetServer())); - } - - void UaServer::TriggerEvent(Event event) - { - SubscriptionService->TriggerEvent(ObjectId::Server, event); - } + + throw (std::runtime_error("Error namespace uri does not exists in server")); + //return -1; +} + +void UaServer::Start() +{ + ApplicationDescription appDesc; + appDesc.ApplicationName = LocalizedText(Name); + appDesc.ApplicationUri = ServerUri; + appDesc.ApplicationType = ApplicationType::Server; + appDesc.ProductUri = ProductUri; + + OpcUa::Server::Parameters params; + params.Debug = Debug; + params.Endpoint.Server = appDesc; + params.Endpoint.EndpointUrl = Endpoint; + params.Endpoint.SecurityMode = SecurityMode; + params.Endpoint.SecurityPolicyUri = "http://opcfoundation.org/UA/SecurityPolicy#None"; + params.Endpoint.TransportProfileUri = "http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary"; + //setting up policy is required for some client, this should be in a constructor + UserTokenPolicy policy; + policy.TokenType = UserTokenType::Anonymous; + params.Endpoint.UserIdentityTokens.push_back(policy); + + Addons = Common::CreateAddonsManager(); + Server::RegisterCommonAddons(params, *Addons); + Addons->Start(); + + Registry = Addons->GetAddon(Server::ServicesRegistryAddonId); + SubscriptionService = Addons->GetAddon(Server::SubscriptionServiceAddonId); + + Node ServerArray = GetNode(OpcUa::ObjectId::Server_ServerArray); + ServerArray.SetValue(std::vector({Endpoint})); + + EnableEventNotification(); //Enabling event notification, it probably does hurt anyway and users will forgot to set it up +} + +Node UaServer::GetNode(const std::string & nodeid) const +{ + return GetNode(ToNodeId(nodeid)); +} + +Node UaServer::GetNode(const NodeId & nodeid) const +{ + CheckStarted(); + return Node(Registry->GetServer(), nodeid); +} + +Node UaServer::GetNodeFromPath(const std::vector & path) const +{ + return GetRootNode().GetChild(path); +} + +Node UaServer::GetNodeFromPath(const std::vector & path) const +{ + return GetRootNode().GetChild(path); +} + +void UaServer::Stop() +{ + std::cout << "Stopping opcua server application" << std::endl; + CheckStarted(); + Addons->Stop(); +} + +Node UaServer::GetRootNode() const +{ + return GetNode(OpcUa::ObjectId::RootFolder); +} + +Node UaServer::GetObjectsNode() const +{ + return GetNode(ObjectId::ObjectsFolder); +} + +Node UaServer::GetServerNode() const +{ + return GetNode(ObjectId::Server); +} + +void UaServer::EnableEventNotification() +{ + Node server = GetServerNode(); + + uint8_t notifierval = 0; + notifierval |= EventNotifier::SubscribeToEvents; + + DataValue dval(notifierval); + dval.SetSourceTimestamp(DateTime::Current()); + + server.SetAttribute(AttributeId::EventNotifier, dval); +} + +std::unique_ptr UaServer::CreateSubscription(unsigned int period, SubscriptionHandler & callback) +{ + CheckStarted(); + CreateSubscriptionParameters params; + params.RequestedPublishingInterval = period; + return std::unique_ptr(new Subscription(Registry->GetServer(), params, callback, Debug)); +} + +ServerOperations UaServer::CreateServerOperations() +{ + return std::move(ServerOperations(Registry->GetServer())); +} + +void UaServer::TriggerEvent(Event event) +{ + SubscriptionService->TriggerEvent(ObjectId::Server, event); +} } diff --git a/src/server/server_object.cpp b/src/server/server_object.cpp index 3f3c7c8a..bb03ba6f 100644 --- a/src/server/server_object.cpp +++ b/src/server/server_object.cpp @@ -30,96 +30,101 @@ namespace { - OpcUa::RelativePathElement GetHierarchicalElement(const std::string& browseName) - { - OpcUa::RelativePathElement element; - element.ReferenceTypeId = OpcUa::ObjectId::HierarchicalReferences; - element.IncludeSubtypes = true; - element.TargetName.Name = browseName; - return element; - } +OpcUa::RelativePathElement GetHierarchicalElement(const std::string & browseName) +{ + OpcUa::RelativePathElement element; + element.ReferenceTypeId = OpcUa::ObjectId::HierarchicalReferences; + element.IncludeSubtypes = true; + element.TargetName.Name = browseName; + return element; +} - OpcUa::RelativePath GetCurrentTimeRelativepath() - { - OpcUa::RelativePath path; - path.Elements.push_back(GetHierarchicalElement(OpcUa::Names::ServerStatus)); - path.Elements.push_back(GetHierarchicalElement(OpcUa::Names::CurrentTime)); - return path; - } +OpcUa::RelativePath GetCurrentTimeRelativepath() +{ + OpcUa::RelativePath path; + path.Elements.push_back(GetHierarchicalElement(OpcUa::Names::ServerStatus)); + path.Elements.push_back(GetHierarchicalElement(OpcUa::Names::CurrentTime)); + return path; +} } namespace OpcUa { - namespace Server +namespace Server +{ + +ServerObject::ServerObject(Services::SharedPtr services, boost::asio::io_service & io, bool debug) + : Server(services) + , Io(io) + , Debug(debug) + , Instance(std::move(CreateServerObject(services))) + , ServerTime(Instance.GetVariable(GetCurrentTimeRelativepath())) + , Timer(io) +{ + Timer.Start(boost::posix_time::seconds(1), [this]() { + UpdateTime(); + }); + //Set many values in address space which are expected by clients + std::vector uris; + uris.push_back("http://opcfoundation.org/UA/"); + uris.push_back("http://freeopcua.github.io"); + Node node = Node(Server, ObjectId::Server_NamespaceArray); + node.SetValue(uris); + node = Node(Server, ObjectId::Server_ServerStatus_BuildInfo_ManufacturerName); + node.SetValue(std::string("FreeOpcUa")); + node = Node(Server, ObjectId::Server_ServerCapabilities_LocaleIdArray); + node.SetValue(std::vector({ "en" })); + node = Node(Server, ObjectId::Server_ServerStatus_BuildInfo_BuildNumber); + node.SetValue(std::string("0.8")); + node = Node(Server, ObjectId::Server_ServerStatus_BuildInfo_ProductName); + node.SetValue(std::string("FreeOpcUa")); + node = Node(Server, ObjectId::Server_ServerStatus_BuildInfo_ProductUri); + node.SetValue(std::string("https://freeopcua.github.io")); + node = Node(Server, ObjectId::Server_ServerStatus_State); + node.SetValue((int32_t) 0); + node = Node(Server, ObjectId::Server_ServerStatus_CurrentTime); + node.SetValue(DateTime::Current());//Set time before the thread does it - ServerObject::ServerObject(Services::SharedPtr services, boost::asio::io_service& io, bool debug) - : Server(services) - , Io(io) - , Debug(debug) - , Instance(std::move(CreateServerObject(services))) - , ServerTime(Instance.GetVariable(GetCurrentTimeRelativepath())) - , Timer(io) - { - Timer.Start(boost::posix_time::seconds(1), [this](){ - UpdateTime(); - }); - //Set many values in address space which are expected by clients - std::vector uris; - uris.push_back("http://opcfoundation.org/UA/"); - uris.push_back("http://freeopcua.github.io"); - Node node = Node(Server, ObjectId::Server_NamespaceArray); - node.SetValue(uris); - node = Node(Server, ObjectId::Server_ServerStatus_BuildInfo_ManufacturerName); - node.SetValue(std::string("FreeOpcUa")); - node = Node(Server, ObjectId::Server_ServerCapabilities_LocaleIdArray); - node.SetValue(std::vector({ "en" })); - node = Node(Server, ObjectId::Server_ServerStatus_BuildInfo_BuildNumber); - node.SetValue(std::string("0.8")); - node = Node(Server, ObjectId::Server_ServerStatus_BuildInfo_ProductName); - node.SetValue(std::string("FreeOpcUa")); - node = Node(Server, ObjectId::Server_ServerStatus_BuildInfo_ProductUri); - node.SetValue(std::string("https://freeopcua.github.io")); - node = Node(Server, ObjectId::Server_ServerStatus_State); - node.SetValue((int32_t) 0); - node = Node(Server, ObjectId::Server_ServerStatus_CurrentTime); - node.SetValue(DateTime::Current());//Set time before the thread does it +} - } +ServerObject::~ServerObject() +{ + if (Debug) { std::clog << "server_object| canceling timer..." << std::endl; } - ServerObject::~ServerObject() - { - if (Debug) std::clog << "server_object| canceling timer..." << std::endl; - Timer.Cancel(); - if (Debug) std::clog << "server_object| timer stopped." << std::endl; - } + Timer.Cancel(); + + if (Debug) { std::clog << "server_object| timer stopped." << std::endl; } +} + +Model::Object ServerObject::CreateServerObject(const Services::SharedPtr & services) const +{ + Model::Server server(services); + Model::Object serverObject = server.GetObject(ObjectId::Server); + return serverObject; +} - Model::Object ServerObject::CreateServerObject(const Services::SharedPtr& services) const +void ServerObject::UpdateTime() +{ + try { - Model::Server server(services); - Model::Object serverObject = server.GetObject(ObjectId::Server); - return serverObject; + DateTime t = OpcUa::DateTime::Current(); + DataValue timeData(t); + timeData.SetSourceTimestamp(t); + timeData.SetServerTimestamp(t); + + if (Debug) { std::clog << "server_object| Updating server time: " << t << std::endl; } + + ServerTime.SetValue(timeData); } - void ServerObject::UpdateTime() + catch (std::exception & ex) { - try - { - DateTime t = OpcUa::DateTime::Current(); - DataValue timeData(t); - timeData.SetSourceTimestamp(t); - timeData.SetServerTimestamp(t); - - if (Debug) std::clog << "server_object| Updating server time: " << t << std::endl; - ServerTime.SetValue(timeData); - } - catch (std::exception& ex) - { - std::cerr << "Failed to update time at server object: " << ex.what() << std::endl; - } - + std::cerr << "Failed to update time at server object: " << ex.what() << std::endl; } - } // namespace UaServer +} + +} // namespace UaServer } // namespace OpcUa diff --git a/src/server/server_object.h b/src/server/server_object.h index 088f313c..9d7fd67e 100644 --- a/src/server/server_object.h +++ b/src/server/server_object.h @@ -26,38 +26,38 @@ namespace boost { - namespace asio - { - class io_service; - } +namespace asio +{ +class io_service; +} } namespace OpcUa { - namespace Server - { - - class ServerObject - { - public: - DEFINE_CLASS_POINTERS(ServerObject) - - public: - ServerObject(Services::SharedPtr services, boost::asio::io_service& io, bool debug); - ~ServerObject(); - - private: - Model::Object CreateServerObject(const Services::SharedPtr& services) const; - void UpdateTime(); - - private: - Services::SharedPtr Server; - boost::asio::io_service& Io; - bool Debug = false; - Model::Object Instance; - Model::Variable ServerTime; - PeriodicTimer Timer; - }; - - } +namespace Server +{ + +class ServerObject +{ +public: + DEFINE_CLASS_POINTERS(ServerObject) + +public: + ServerObject(Services::SharedPtr services, boost::asio::io_service & io, bool debug); + ~ServerObject(); + +private: + Model::Object CreateServerObject(const Services::SharedPtr & services) const; + void UpdateTime(); + +private: + Services::SharedPtr Server; + boost::asio::io_service & Io; + bool Debug = false; + Model::Object Instance; + Model::Variable ServerTime; + PeriodicTimer Timer; +}; + +} } diff --git a/src/server/server_object_addon.cpp b/src/server/server_object_addon.cpp index 309735f4..941bb162 100644 --- a/src/server/server_object_addon.cpp +++ b/src/server/server_object_addon.cpp @@ -27,45 +27,45 @@ namespace { - class ServerObjectAddon : public Common::Addon +class ServerObjectAddon : public Common::Addon +{ +public: + void Initialize(Common::AddonsManager & manager, const Common::AddonParameters & parameters) override { - public: - void Initialize(Common::AddonsManager& manager, const Common::AddonParameters& parameters) override - { - for (const Common::Parameter& param : parameters.Parameters) + for (const Common::Parameter & param : parameters.Parameters) { if (param.Name == "debug") - Debug = param.Value == "false" || param.Value == "0" ? false : true; + { Debug = param.Value == "false" || param.Value == "0" ? false : true; } } - OpcUa::Server::ServicesRegistry::SharedPtr registry = manager.GetAddon(OpcUa::Server::ServicesRegistryAddonId); - OpcUa::Server::AsioAddon::SharedPtr asio = manager.GetAddon(OpcUa::Server::AsioAddonId); - OpcUa::Services::SharedPtr services = registry->GetServer(); - Object.reset(new OpcUa::Server::ServerObject(services, asio->GetIoService(), Debug)); - } + OpcUa::Server::ServicesRegistry::SharedPtr registry = manager.GetAddon(OpcUa::Server::ServicesRegistryAddonId); + OpcUa::Server::AsioAddon::SharedPtr asio = manager.GetAddon(OpcUa::Server::AsioAddonId); + OpcUa::Services::SharedPtr services = registry->GetServer(); + Object.reset(new OpcUa::Server::ServerObject(services, asio->GetIoService(), Debug)); + } - void Stop() override - { - Object.reset(); - } + void Stop() override + { + Object.reset(); + } - private: - bool Debug = false; - OpcUa::Server::ServerObject::UniquePtr Object; - }; +private: + bool Debug = false; + OpcUa::Server::ServerObject::UniquePtr Object; +}; } // namespace namespace OpcUa { - namespace Server - { +namespace Server +{ - Common::Addon::UniquePtr ServerObjectFactory::CreateAddon() - { - return Common::Addon::UniquePtr(new ServerObjectAddon()); - } +Common::Addon::UniquePtr ServerObjectFactory::CreateAddon() +{ + return Common::Addon::UniquePtr(new ServerObjectAddon()); +} - } // namespace UaServer +} // namespace UaServer } // namespace OpcUa diff --git a/src/server/server_object_addon.h b/src/server/server_object_addon.h index 401e11af..9e099864 100644 --- a/src/server/server_object_addon.h +++ b/src/server/server_object_addon.h @@ -23,17 +23,17 @@ namespace OpcUa { - namespace Server - { +namespace Server +{ - const char ServerObjectAddonId[] = "server_object"; +const char ServerObjectAddonId[] = "server_object"; - class ServerObjectFactory : public Common::AddonFactory - { - public: - /// @brief Create instance of addon. - Common::Addon::UniquePtr CreateAddon() override; - }; +class ServerObjectFactory : public Common::AddonFactory +{ +public: + /// @brief Create instance of addon. + Common::Addon::UniquePtr CreateAddon() override; +}; - } +} } diff --git a/src/server/services_registry_factory.cpp b/src/server/services_registry_factory.cpp index 3a7cf69e..83135cba 100644 --- a/src/server/services_registry_factory.cpp +++ b/src/server/services_registry_factory.cpp @@ -14,104 +14,104 @@ namespace { - class ServicesRegistryAddon : public Common::Addon, public OpcUa::Server::ServicesRegistry +class ServicesRegistryAddon : public Common::Addon, public OpcUa::Server::ServicesRegistry +{ +public: + DEFINE_CLASS_POINTERS(ServicesRegistryAddon) + +public: + virtual void Initialize(Common::AddonsManager &, const Common::AddonParameters &) + { + Impl = OpcUa::Server::CreateServicesRegistry(); + } + + virtual void Stop() + { + Impl.reset(); + } + + virtual OpcUa::Services::SharedPtr GetServer() const + { + return Impl->GetServer(); + } + + virtual void RegisterEndpointsServices(std::shared_ptr endpoints) + { + Impl->RegisterEndpointsServices(endpoints); + } + + virtual void UnregisterEndpointsServices() + { + Impl->UnregisterEndpointsServices(); + } + + virtual void RegisterViewServices(std::shared_ptr views) + { + Impl->RegisterViewServices(views); + } + + virtual void UnregisterViewServices() + { + Impl->UnregisterViewServices(); + } + + virtual void RegisterAttributeServices(std::shared_ptr attributes) + { + Impl->RegisterAttributeServices(attributes); + } + + virtual void UnregisterAttributeServices() { - public: - DEFINE_CLASS_POINTERS(ServicesRegistryAddon) - - public: - virtual void Initialize(Common::AddonsManager&, const Common::AddonParameters&) - { - Impl = OpcUa::Server::CreateServicesRegistry(); - } - - virtual void Stop() - { - Impl.reset(); - } - - virtual OpcUa::Services::SharedPtr GetServer() const - { - return Impl->GetServer(); - } - - virtual void RegisterEndpointsServices(std::shared_ptr endpoints) - { - Impl->RegisterEndpointsServices(endpoints); - } - - virtual void UnregisterEndpointsServices() - { - Impl->UnregisterEndpointsServices(); - } - - virtual void RegisterViewServices(std::shared_ptr views) - { - Impl->RegisterViewServices(views); - } - - virtual void UnregisterViewServices() - { - Impl->UnregisterViewServices(); - } - - virtual void RegisterAttributeServices(std::shared_ptr attributes) - { - Impl->RegisterAttributeServices(attributes); - } - - virtual void UnregisterAttributeServices() - { - Impl->UnregisterAttributeServices(); - } - - virtual void RegisterMethodServices(std::shared_ptr method) - { - Impl->RegisterMethodServices(method); - } - - virtual void UnregisterMethodServices() - { - Impl->UnregisterMethodServices(); - } - - virtual void RegisterNodeManagementServices(std::shared_ptr nodes) - { - Impl->RegisterNodeManagementServices(nodes); - } - - virtual void UnregisterNodeManagementServices() - { - Impl->UnregisterNodeManagementServices(); - } - - virtual void RegisterSubscriptionServices(std::shared_ptr subscriptions) - { - Impl->RegisterSubscriptionServices(subscriptions); - } - - virtual void UnregisterSubscriptionServices() - { - Impl->UnregisterSubscriptionServices(); - } - - private: - ServicesRegistry::UniquePtr Impl; - }; + Impl->UnregisterAttributeServices(); + } + + virtual void RegisterMethodServices(std::shared_ptr method) + { + Impl->RegisterMethodServices(method); + } + + virtual void UnregisterMethodServices() + { + Impl->UnregisterMethodServices(); + } + + virtual void RegisterNodeManagementServices(std::shared_ptr nodes) + { + Impl->RegisterNodeManagementServices(nodes); + } + + virtual void UnregisterNodeManagementServices() + { + Impl->UnregisterNodeManagementServices(); + } + + virtual void RegisterSubscriptionServices(std::shared_ptr subscriptions) + { + Impl->RegisterSubscriptionServices(subscriptions); + } + + virtual void UnregisterSubscriptionServices() + { + Impl->UnregisterSubscriptionServices(); + } + +private: + ServicesRegistry::UniquePtr Impl; +}; } // namespace namespace OpcUa { - namespace Server - { +namespace Server +{ - Common::Addon::UniquePtr ServicesRegistryFactory::CreateAddon() - { - return Common::Addon::UniquePtr(new ::ServicesRegistryAddon()); - } +Common::Addon::UniquePtr ServicesRegistryFactory::CreateAddon() +{ + return Common::Addon::UniquePtr(new ::ServicesRegistryAddon()); +} - } +} } diff --git a/src/server/services_registry_impl.cpp b/src/server/services_registry_impl.cpp index f40d5288..42337658 100644 --- a/src/server/services_registry_impl.cpp +++ b/src/server/services_registry_impl.cpp @@ -14,359 +14,359 @@ namespace { - using namespace OpcUa; - - class ServicesRegistry : public OpcUa::Server::ServicesRegistry - { - public: - ServicesRegistry(); - - public: // InternalServerAddon - virtual OpcUa::Services::SharedPtr GetServer() const override; - virtual void RegisterEndpointsServices(EndpointServices::SharedPtr endpoints) override; - virtual void UnregisterEndpointsServices() override; - virtual void RegisterViewServices(ViewServices::SharedPtr views) override; - virtual void UnregisterViewServices() override; - virtual void RegisterMethodServices(MethodServices::SharedPtr method) override; - virtual void UnregisterMethodServices() override; - virtual void RegisterNodeManagementServices(NodeManagementServices::SharedPtr addr) override; - virtual void UnregisterNodeManagementServices() override; - virtual void RegisterAttributeServices(AttributeServices::SharedPtr attributes) override; - virtual void UnregisterAttributeServices() override; - virtual void RegisterSubscriptionServices(SubscriptionServices::SharedPtr service) override; - virtual void UnregisterSubscriptionServices() override; - - private: - class InternalServer; - std::shared_ptr Comp; - }; - - - class DefaultServices - : public EndpointServices - , public ViewServices - , public AttributeServices - , public MethodServices - , public NodeManagementServices - , public SubscriptionServices - { - public: - virtual std::vector FindServers(const FindServersParameters& params) const - { - return std::vector(); - } - - virtual std::vector GetEndpoints(const GetEndpointsParameters& filter) const - { - return std::vector(); - } - - virtual void RegisterServer(const ServerParameters& parameters) - { - } - - virtual std::vector Call(const std::vector& methodsToCall) - { - return std::vector(); - } - - virtual std::vector AddNodes(const std::vector& items) - { - return std::vector(); - } - - virtual std::vector AddReferences(const std::vector& items) - { - return std::vector(); - } - - virtual void SetMethod(const NodeId& node, std::function (NodeId context, std::vector arguments)> callback) - { - return; - } - - virtual void AddAttribute(const NodeId& node, AttributeId attribute, const Variant& value) - { - } - - virtual void AddReference(const NodeId& sourceNode, const ReferenceDescription& reference) - { - } - - virtual std::vector Browse(const NodesQuery& query) const - { - return std::vector(); - } - - virtual std::vector BrowseNext() const - { - return std::vector(); - } - - virtual std::vector TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters& params) const - { - return std::vector(); - } - - virtual std::vector RegisterNodes(const std::vector& params) const - { - return std::vector(); - } - - virtual void UnregisterNodes(const std::vector& params) const - { - return; - } - - virtual std::vector Read(const OpcUa::ReadParameters& filter) const - { - DataValue value; - value.Encoding = DATA_VALUE_STATUS_CODE; - value.Status = StatusCode::BadNotImplemented; - return std::vector(filter.AttributesToRead.size(), value); - } - - virtual std::vector Write(const std::vector& filter) - { - return std::vector(filter.size(), StatusCode::BadNotImplemented); - } - - virtual SubscriptionData CreateSubscription(const CreateSubscriptionRequest& request, std::function callback=0) - { - return SubscriptionData(); - } - - virtual ModifySubscriptionResponse ModifySubscription(const ModifySubscriptionParameters& parameters) - { - return ModifySubscriptionResponse(); - } - - virtual std::vector DeleteSubscriptions(const std::vector& subscriptions) - { - return std::vector(); - } - - virtual std::vector CreateMonitoredItems(const MonitoredItemsParameters& parameters) - { - return std::vector(); - } - - virtual std::vector DeleteMonitoredItems(const DeleteMonitoredItemsParameters& params) - { - return std::vector(); - } - - virtual void Publish(const PublishRequest& request) - { - } - - virtual RepublishResponse Republish(const RepublishParameters& params) - { - RepublishResponse response; - response.Header.ServiceResult = StatusCode::BadNotImplemented; - return response; - } - - }; - - class ServicesRegistry::InternalServer : public Services - { - public: - InternalServer() - : Services(new DefaultServices()) - { - SetEndpoints(Services); - SetViews(Services); - SetAttributes(Services); - SetSubscriptions(Services); - SetMethod(Services); - } - - virtual CreateSessionResponse CreateSession(const RemoteSessionParameters& parameters) override - { - return CreateSessionResponse(); - } - - virtual ActivateSessionResponse ActivateSession(const ActivateSessionParameters &session_parameters) override - { - (void)session_parameters; - return ActivateSessionResponse(); - } - - virtual OpenSecureChannelResponse OpenSecureChannel(const OpenSecureChannelParameters& parameters) override - { - return OpenSecureChannelResponse(); - } - - virtual void CloseSecureChannel(uint32_t channelId) override - { - } - - virtual CloseSessionResponse CloseSession() override - { - return CloseSessionResponse(); - } - - virtual void AbortSession() override - { - } - - virtual DeleteNodesResponse DeleteNodes(const std::vector &nodesToDelete) override - { - return DeleteNodesResponse(); - } +using namespace OpcUa; - virtual EndpointServices::SharedPtr Endpoints() override - { - return EndpointsServices; - } +class ServicesRegistry : public OpcUa::Server::ServicesRegistry +{ +public: + ServicesRegistry(); + +public: // InternalServerAddon + virtual OpcUa::Services::SharedPtr GetServer() const override; + virtual void RegisterEndpointsServices(EndpointServices::SharedPtr endpoints) override; + virtual void UnregisterEndpointsServices() override; + virtual void RegisterViewServices(ViewServices::SharedPtr views) override; + virtual void UnregisterViewServices() override; + virtual void RegisterMethodServices(MethodServices::SharedPtr method) override; + virtual void UnregisterMethodServices() override; + virtual void RegisterNodeManagementServices(NodeManagementServices::SharedPtr addr) override; + virtual void UnregisterNodeManagementServices() override; + virtual void RegisterAttributeServices(AttributeServices::SharedPtr attributes) override; + virtual void UnregisterAttributeServices() override; + virtual void RegisterSubscriptionServices(SubscriptionServices::SharedPtr service) override; + virtual void UnregisterSubscriptionServices() override; + +private: + class InternalServer; + std::shared_ptr Comp; +}; + + +class DefaultServices + : public EndpointServices + , public ViewServices + , public AttributeServices + , public MethodServices + , public NodeManagementServices + , public SubscriptionServices +{ +public: + virtual std::vector FindServers(const FindServersParameters & params) const + { + return std::vector(); + } - virtual std::shared_ptr Views() override - { - return ViewsServices; - } + virtual std::vector GetEndpoints(const GetEndpointsParameters & filter) const + { + return std::vector(); + } - virtual std::shared_ptr Method() override - { - return MethodsServices; - } + virtual void RegisterServer(const ServerParameters & parameters) + { + } - virtual std::shared_ptr NodeManagement() override - { - return NodeServices; - } + virtual std::vector Call(const std::vector & methodsToCall) + { + return std::vector(); + } - virtual std::shared_ptr Attributes() override - { - return AttributesServices; - } + virtual std::vector AddNodes(const std::vector & items) + { + return std::vector(); + } - virtual std::shared_ptr Subscriptions() override - { - return SubscriptionsServices; - } + virtual std::vector AddReferences(const std::vector & items) + { + return std::vector(); + } - public: - void SetEndpoints(std::shared_ptr endpoints) - { - EndpointsServices = endpoints ? endpoints : Services; - } + virtual void SetMethod(const NodeId & node, std::function (NodeId context, std::vector arguments)> callback) + { + return; + } - void SetViews(std::shared_ptr views) - { - ViewsServices = views ? views : Services; - } + virtual void AddAttribute(const NodeId & node, AttributeId attribute, const Variant & value) + { + } - void SetMethod(std::shared_ptr method) - { - MethodsServices = method ? method : Services; - } + virtual void AddReference(const NodeId & sourceNode, const ReferenceDescription & reference) + { + } - void SetAddressSpace(std::shared_ptr addrs) - { - NodeServices = addrs ? addrs : Services; - } + virtual std::vector Browse(const NodesQuery & query) const + { + return std::vector(); + } - void SetAttributes(std::shared_ptr attributes) - { - AttributesServices = attributes ? attributes : Services; - } + virtual std::vector BrowseNext() const + { + return std::vector(); + } - void SetSubscriptions(std::shared_ptr subscriptions) - { - SubscriptionsServices = subscriptions ? subscriptions : Services; - } + virtual std::vector TranslateBrowsePathsToNodeIds(const TranslateBrowsePathsParameters & params) const + { + return std::vector(); + } - public: - OpcUa::AttributeServices::SharedPtr AttributesServices; - OpcUa::ViewServices::SharedPtr ViewsServices; - OpcUa::MethodServices::SharedPtr MethodsServices; - OpcUa::NodeManagementServices::SharedPtr NodeServices; - OpcUa::EndpointServices::SharedPtr EndpointsServices; - OpcUa::SubscriptionServices::SharedPtr SubscriptionsServices; - std::shared_ptr Services; - }; + virtual std::vector RegisterNodes(const std::vector & params) const + { + return std::vector(); + } + virtual void UnregisterNodes(const std::vector & params) const + { + return; + } - ServicesRegistry::ServicesRegistry() - : Comp(new InternalServer()) + virtual std::vector Read(const OpcUa::ReadParameters & filter) const { + DataValue value; + value.Encoding = DATA_VALUE_STATUS_CODE; + value.Status = StatusCode::BadNotImplemented; + return std::vector(filter.AttributesToRead.size(), value); } - std::shared_ptr ServicesRegistry::GetServer() const + virtual std::vector Write(const std::vector & filter) { - return Comp; + return std::vector(filter.size(), StatusCode::BadNotImplemented); } - void ServicesRegistry::RegisterEndpointsServices(EndpointServices::SharedPtr endpoints) + virtual SubscriptionData CreateSubscription(const CreateSubscriptionRequest & request, std::function callback = 0) { - Comp->SetEndpoints(endpoints); + return SubscriptionData(); } - void ServicesRegistry::UnregisterEndpointsServices() + virtual ModifySubscriptionResponse ModifySubscription(const ModifySubscriptionParameters & parameters) { - Comp->SetEndpoints(EndpointServices::SharedPtr()); + return ModifySubscriptionResponse(); } - void ServicesRegistry::RegisterViewServices(ViewServices::SharedPtr views) + virtual std::vector DeleteSubscriptions(const std::vector & subscriptions) { - Comp->SetViews(views); + return std::vector(); } - void ServicesRegistry::UnregisterViewServices() + virtual std::vector CreateMonitoredItems(const MonitoredItemsParameters & parameters) { - Comp->SetViews(ViewServices::SharedPtr()); + return std::vector(); } - void ServicesRegistry::RegisterMethodServices(MethodServices::SharedPtr method) + virtual std::vector DeleteMonitoredItems(const DeleteMonitoredItemsParameters & params) { - Comp->SetMethod(method); + return std::vector(); } - void ServicesRegistry::UnregisterMethodServices() + virtual void Publish(const PublishRequest & request) { - Comp->SetMethod(MethodServices::SharedPtr()); } - void ServicesRegistry::RegisterNodeManagementServices(NodeManagementServices::SharedPtr addr) + virtual RepublishResponse Republish(const RepublishParameters & params) { - Comp->SetAddressSpace(addr); + RepublishResponse response; + response.Header.ServiceResult = StatusCode::BadNotImplemented; + return response; } - void ServicesRegistry::UnregisterNodeManagementServices() +}; + +class ServicesRegistry::InternalServer : public Services +{ +public: + InternalServer() + : Services(new DefaultServices()) { - Comp->SetAddressSpace(NodeManagementServices::SharedPtr()); + SetEndpoints(Services); + SetViews(Services); + SetAttributes(Services); + SetSubscriptions(Services); + SetMethod(Services); } + virtual CreateSessionResponse CreateSession(const RemoteSessionParameters & parameters) override + { + return CreateSessionResponse(); + } + + virtual ActivateSessionResponse ActivateSession(const ActivateSessionParameters & session_parameters) override + { + (void)session_parameters; + return ActivateSessionResponse(); + } + + virtual OpenSecureChannelResponse OpenSecureChannel(const OpenSecureChannelParameters & parameters) override + { + return OpenSecureChannelResponse(); + } - void ServicesRegistry::RegisterAttributeServices(AttributeServices::SharedPtr attributes) + virtual void CloseSecureChannel(uint32_t channelId) override { - Comp->SetAttributes(attributes); } - void ServicesRegistry::UnregisterAttributeServices() + virtual CloseSessionResponse CloseSession() override { - Comp->SetAttributes(AttributeServices::SharedPtr()); + return CloseSessionResponse(); } - void ServicesRegistry::RegisterSubscriptionServices(SubscriptionServices::SharedPtr service) + virtual void AbortSession() override { - Comp->SetSubscriptions(service); } - void ServicesRegistry::UnregisterSubscriptionServices() + virtual DeleteNodesResponse DeleteNodes(const std::vector & nodesToDelete) override { - Comp->SetSubscriptions(SubscriptionServices::SharedPtr()); + return DeleteNodesResponse(); } + virtual EndpointServices::SharedPtr Endpoints() override + { + return EndpointsServices; + } + + virtual std::shared_ptr Views() override + { + return ViewsServices; + } + + virtual std::shared_ptr Method() override + { + return MethodsServices; + } + + virtual std::shared_ptr NodeManagement() override + { + return NodeServices; + } + + virtual std::shared_ptr Attributes() override + { + return AttributesServices; + } + + virtual std::shared_ptr Subscriptions() override + { + return SubscriptionsServices; + } + +public: + void SetEndpoints(std::shared_ptr endpoints) + { + EndpointsServices = endpoints ? endpoints : Services; + } + + void SetViews(std::shared_ptr views) + { + ViewsServices = views ? views : Services; + } + + void SetMethod(std::shared_ptr method) + { + MethodsServices = method ? method : Services; + } + + void SetAddressSpace(std::shared_ptr addrs) + { + NodeServices = addrs ? addrs : Services; + } + + void SetAttributes(std::shared_ptr attributes) + { + AttributesServices = attributes ? attributes : Services; + } + + void SetSubscriptions(std::shared_ptr subscriptions) + { + SubscriptionsServices = subscriptions ? subscriptions : Services; + } + +public: + OpcUa::AttributeServices::SharedPtr AttributesServices; + OpcUa::ViewServices::SharedPtr ViewsServices; + OpcUa::MethodServices::SharedPtr MethodsServices; + OpcUa::NodeManagementServices::SharedPtr NodeServices; + OpcUa::EndpointServices::SharedPtr EndpointsServices; + OpcUa::SubscriptionServices::SharedPtr SubscriptionsServices; + std::shared_ptr Services; +}; + + +ServicesRegistry::ServicesRegistry() + : Comp(new InternalServer()) +{ +} + +std::shared_ptr ServicesRegistry::GetServer() const +{ + return Comp; +} + +void ServicesRegistry::RegisterEndpointsServices(EndpointServices::SharedPtr endpoints) +{ + Comp->SetEndpoints(endpoints); +} + +void ServicesRegistry::UnregisterEndpointsServices() +{ + Comp->SetEndpoints(EndpointServices::SharedPtr()); +} + +void ServicesRegistry::RegisterViewServices(ViewServices::SharedPtr views) +{ + Comp->SetViews(views); +} + +void ServicesRegistry::UnregisterViewServices() +{ + Comp->SetViews(ViewServices::SharedPtr()); +} + +void ServicesRegistry::RegisterMethodServices(MethodServices::SharedPtr method) +{ + Comp->SetMethod(method); +} + +void ServicesRegistry::UnregisterMethodServices() +{ + Comp->SetMethod(MethodServices::SharedPtr()); +} + +void ServicesRegistry::RegisterNodeManagementServices(NodeManagementServices::SharedPtr addr) +{ + Comp->SetAddressSpace(addr); +} + +void ServicesRegistry::UnregisterNodeManagementServices() +{ + Comp->SetAddressSpace(NodeManagementServices::SharedPtr()); +} + + +void ServicesRegistry::RegisterAttributeServices(AttributeServices::SharedPtr attributes) +{ + Comp->SetAttributes(attributes); +} + +void ServicesRegistry::UnregisterAttributeServices() +{ + Comp->SetAttributes(AttributeServices::SharedPtr()); +} + +void ServicesRegistry::RegisterSubscriptionServices(SubscriptionServices::SharedPtr service) +{ + Comp->SetSubscriptions(service); +} + +void ServicesRegistry::UnregisterSubscriptionServices() +{ + Comp->SetSubscriptions(SubscriptionServices::SharedPtr()); +} + } namespace OpcUa { - Server::ServicesRegistry::UniquePtr Server::CreateServicesRegistry() - { - return Server::ServicesRegistry::UniquePtr(new ::ServicesRegistry()); - } +Server::ServicesRegistry::UniquePtr Server::CreateServicesRegistry() +{ + return Server::ServicesRegistry::UniquePtr(new ::ServicesRegistry()); +} } diff --git a/src/server/standard_address_space.cpp b/src/server/standard_address_space.cpp index 86e841af..3c526afc 100644 --- a/src/server/standard_address_space.cpp +++ b/src/server/standard_address_space.cpp @@ -8,22 +8,22 @@ namespace OpcUa { - namespace Server - { - - void FillStandardNamespace(OpcUa::NodeManagementServices& registry, bool debug) - { - OpcUa::CreateAddressSpacePart3(registry); - OpcUa::CreateAddressSpacePart4(registry); - OpcUa::CreateAddressSpacePart5(registry); - OpcUa::CreateAddressSpacePart8(registry); - OpcUa::CreateAddressSpacePart9(registry); - OpcUa::CreateAddressSpacePart10(registry); - OpcUa::CreateAddressSpacePart11(registry); - OpcUa::CreateAddressSpacePart13(registry); - } - - } // namespace UaServer +namespace Server +{ + +void FillStandardNamespace(OpcUa::NodeManagementServices & registry, bool debug) +{ + OpcUa::CreateAddressSpacePart3(registry); + OpcUa::CreateAddressSpacePart4(registry); + OpcUa::CreateAddressSpacePart5(registry); + OpcUa::CreateAddressSpacePart8(registry); + OpcUa::CreateAddressSpacePart9(registry); + OpcUa::CreateAddressSpacePart10(registry); + OpcUa::CreateAddressSpacePart11(registry); + OpcUa::CreateAddressSpacePart13(registry); +} + +} // namespace UaServer } // namespace OpcUa diff --git a/src/server/standard_address_space_addon.cpp b/src/server/standard_address_space_addon.cpp index 27e9ccd9..a4f12752 100644 --- a/src/server/standard_address_space_addon.cpp +++ b/src/server/standard_address_space_addon.cpp @@ -19,34 +19,34 @@ namespace { - class StandardNamespaceAddon : public Common::Addon - { - public: - DEFINE_CLASS_POINTERS(StandardNamespaceAddon) +class StandardNamespaceAddon : public Common::Addon +{ +public: + DEFINE_CLASS_POINTERS(StandardNamespaceAddon) - void Initialize(Common::AddonsManager& addons, const Common::AddonParameters& params) - { - OpcUa::NodeManagementServices::SharedPtr registry = addons.GetAddon(OpcUa::Server::AddressSpaceRegistryAddonId); - const bool debug = false; - OpcUa::Server::FillStandardNamespace(*registry, debug); - } + void Initialize(Common::AddonsManager & addons, const Common::AddonParameters & params) + { + OpcUa::NodeManagementServices::SharedPtr registry = addons.GetAddon(OpcUa::Server::AddressSpaceRegistryAddonId); + const bool debug = false; + OpcUa::Server::FillStandardNamespace(*registry, debug); + } - void Stop() - { - } - }; + void Stop() + { + } +}; } // namespace namespace OpcUa { - namespace Server - { +namespace Server +{ - Common::Addon::UniquePtr StandardNamespaceAddonFactory::CreateAddon() - { - return Common::Addon::UniquePtr(new StandardNamespaceAddon()); - } +Common::Addon::UniquePtr StandardNamespaceAddonFactory::CreateAddon() +{ + return Common::Addon::UniquePtr(new StandardNamespaceAddon()); +} - } +} } diff --git a/src/server/standard_address_space_part10.cpp b/src/server/standard_address_space_part10.cpp index 07e9c752..34c4f646 100644 --- a/src/server/standard_address_space_part10.cpp +++ b/src/server/standard_address_space_part10.cpp @@ -16,2728 +16,2728 @@ namespace OpcUa { - void CreateAddressSpacePart10(OpcUa::NodeManagementServices& registry) - { - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2391"); - node.BrowseName = ToQualifiedName("ProgramStateMachineType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2771"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("A state machine for a program."); - attrs.DisplayName = LocalizedText("ProgramStateMachineType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3830"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3835"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2392"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2393"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2394"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2395"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2396"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2397"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2398"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2399"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3850"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2400"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2402"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2404"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2406"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2408"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2410"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2412"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2414"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2416"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2418"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2420"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2422"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2424"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2426"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2427"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2428"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2429"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2391"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2430"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3830"); - node.BrowseName = ToQualifiedName("CurrentState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2760"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3830"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3831"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3830"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3833"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3830"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3831"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3830"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3831"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3833"); - node.BrowseName = ToQualifiedName("Number"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3830"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Number"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3833"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3835"); - node.BrowseName = ToQualifiedName("LastTransition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2767"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastTransition"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3835"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3836"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3835"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3838"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3835"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3839"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3835"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3836"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3835"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3836"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3838"); - node.BrowseName = ToQualifiedName("Number"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3835"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Number"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3838"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3839"); - node.BrowseName = ToQualifiedName("TransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3835"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3839"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2392"); - node.BrowseName = ToQualifiedName("Creatable"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Creatable"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2393"); - node.BrowseName = ToQualifiedName("Deletable"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Deletable"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2393"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2394"); - node.BrowseName = ToQualifiedName("AutoDelete"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AutoDelete"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2394"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=79"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2395"); - node.BrowseName = ToQualifiedName("RecycleCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RecycleCount"); - attrs.Type = ObjectId::Int32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2395"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2396"); - node.BrowseName = ToQualifiedName("InstanceCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InstanceCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2397"); - node.BrowseName = ToQualifiedName("MaxInstanceCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MaxInstanceCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2398"); - node.BrowseName = ToQualifiedName("MaxRecycleCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MaxRecycleCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2399"); - node.BrowseName = ToQualifiedName("ProgramDiagnostics"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2380"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ProgramDiagnostics"); - attrs.Type = ToNodeId("i=894"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2399"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3840"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2399"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3841"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2399"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3842"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2399"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3843"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2399"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3844"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2399"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3845"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2399"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3846"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2399"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3847"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2399"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3848"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2399"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3849"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2399"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3840"); - node.BrowseName = ToQualifiedName("CreateSessionId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2399"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CreateSessionId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3840"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3841"); - node.BrowseName = ToQualifiedName("CreateClientName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2399"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CreateClientName"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3841"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3842"); - node.BrowseName = ToQualifiedName("InvocationCreationTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2399"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InvocationCreationTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3842"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3843"); - node.BrowseName = ToQualifiedName("LastTransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2399"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastTransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3843"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3844"); - node.BrowseName = ToQualifiedName("LastMethodCall"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2399"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastMethodCall"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3844"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3845"); - node.BrowseName = ToQualifiedName("LastMethodSessionId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2399"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastMethodSessionId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3845"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3846"); - node.BrowseName = ToQualifiedName("LastMethodInputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2399"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastMethodInputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3846"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3847"); - node.BrowseName = ToQualifiedName("LastMethodOutputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2399"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastMethodOutputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3847"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3848"); - node.BrowseName = ToQualifiedName("LastMethodCallTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2399"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastMethodCallTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3848"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3849"); - node.BrowseName = ToQualifiedName("LastMethodReturnStatus"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2399"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastMethodReturnStatus"); - attrs.Type = ToNodeId("i=299"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3849"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3850"); - node.BrowseName = ToQualifiedName("FinalResultData"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=58"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("FinalResultData"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3850"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2400"); - node.BrowseName = ToQualifiedName("Ready"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2307"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("The Program is properly initialized and may be started."); - attrs.DisplayName = LocalizedText("Ready"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2400"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2401"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2401"); - node.BrowseName = ToQualifiedName("StateNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2400"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StateNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Value = (uint32_t) 1; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2401"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2402"); - node.BrowseName = ToQualifiedName("Running"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2307"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("The Program is executing making progress towards completion."); - attrs.DisplayName = LocalizedText("Running"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2402"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2403"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2403"); - node.BrowseName = ToQualifiedName("StateNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2402"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StateNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Value = (uint32_t) 2; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2403"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2404"); - node.BrowseName = ToQualifiedName("Suspended"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2307"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("The Program has been stopped prior to reaching a terminal state but may be resumed."); - attrs.DisplayName = LocalizedText("Suspended"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2404"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2405"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2405"); - node.BrowseName = ToQualifiedName("StateNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2404"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StateNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Value = (uint32_t) 3; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2405"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2406"); - node.BrowseName = ToQualifiedName("Halted"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2307"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("The Program is in a terminal or failed state, and it cannot be started or resumed without being reset."); - attrs.DisplayName = LocalizedText("Halted"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2406"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2407"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2407"); - node.BrowseName = ToQualifiedName("StateNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2406"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StateNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Value = (uint32_t) 4; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2407"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2408"); - node.BrowseName = ToQualifiedName("HaltedToReady"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("HaltedToReady"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2408"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2409"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=2408"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2406"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=2408"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2400"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=53"); - ref.SourceNodeId = ToNodeId("i=2408"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2430"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=54"); - ref.SourceNodeId = ToNodeId("i=2408"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2378"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2409"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2408"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Value = (uint32_t) 1; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2409"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2410"); - node.BrowseName = ToQualifiedName("ReadyToRunning"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("ReadyToRunning"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2410"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2411"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=2410"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2400"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=2410"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2402"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=53"); - ref.SourceNodeId = ToNodeId("i=2410"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2426"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=54"); - ref.SourceNodeId = ToNodeId("i=2410"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2378"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2411"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2410"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Value = (uint32_t) 2; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2411"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2412"); - node.BrowseName = ToQualifiedName("RunningToHalted"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("RunningToHalted"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2412"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2413"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=2412"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2402"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=2412"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2406"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=53"); - ref.SourceNodeId = ToNodeId("i=2412"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2429"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=54"); - ref.SourceNodeId = ToNodeId("i=2412"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2378"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2413"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2412"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Value = (uint32_t) 3; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2413"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2414"); - node.BrowseName = ToQualifiedName("RunningToReady"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("RunningToReady"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2414"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2415"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=2414"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2402"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=2414"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2400"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=54"); - ref.SourceNodeId = ToNodeId("i=2414"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2378"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2415"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2414"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Value = (uint32_t) 4; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2415"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2416"); - node.BrowseName = ToQualifiedName("RunningToSuspended"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("RunningToSuspended"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2416"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2417"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=2416"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2402"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=2416"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2404"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=53"); - ref.SourceNodeId = ToNodeId("i=2416"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2427"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=54"); - ref.SourceNodeId = ToNodeId("i=2416"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2378"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2417"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2416"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Value = (uint32_t) 5; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2417"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2418"); - node.BrowseName = ToQualifiedName("SuspendedToRunning"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("SuspendedToRunning"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2418"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2419"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=2418"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2404"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=2418"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2402"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=53"); - ref.SourceNodeId = ToNodeId("i=2418"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2428"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=54"); - ref.SourceNodeId = ToNodeId("i=2418"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2378"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2419"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2418"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Value = (uint32_t) 6; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2419"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2420"); - node.BrowseName = ToQualifiedName("SuspendedToHalted"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("SuspendedToHalted"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2420"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2421"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=2420"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2404"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=2420"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2406"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=53"); - ref.SourceNodeId = ToNodeId("i=2420"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2429"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=54"); - ref.SourceNodeId = ToNodeId("i=2420"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2378"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2421"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2420"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Value = (uint32_t) 7; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2421"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2422"); - node.BrowseName = ToQualifiedName("SuspendedToReady"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("SuspendedToReady"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2422"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2423"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=2422"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2404"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=2422"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2400"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=54"); - ref.SourceNodeId = ToNodeId("i=2422"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2378"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2423"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2422"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Value = (uint32_t) 8; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2423"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2424"); - node.BrowseName = ToQualifiedName("ReadyToHalted"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2391"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("ReadyToHalted"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2424"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2425"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=2424"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2400"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=2424"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2406"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=53"); - ref.SourceNodeId = ToNodeId("i=2424"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2429"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=54"); - ref.SourceNodeId = ToNodeId("i=2424"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2378"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2425"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2424"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Value = (uint32_t) 9; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2425"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2378"); - node.BrowseName = ToQualifiedName("ProgramTransitionEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2311"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ProgramTransitionEventType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2378"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2379"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2379"); - node.BrowseName = ToQualifiedName("IntermediateResult"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2378"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("IntermediateResult"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2379"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11856"); - node.BrowseName = ToQualifiedName("AuditProgramTransitionEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2315"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditProgramTransitionEventType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11856"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11875"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11875"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11856"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11875"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3806"); - node.BrowseName = ToQualifiedName("ProgramTransitionAuditEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2315"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ProgramTransitionAuditEventType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3806"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3825"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3825"); - node.BrowseName = ToQualifiedName("Transition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3806"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2767"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Transition"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3825"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3826"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3825"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3826"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3825"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3826"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2380"); - node.BrowseName = ToQualifiedName("ProgramDiagnosticType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ProgramDiagnosticType"); - attrs.Type = ToNodeId("i=894"); - attrs.Rank = -1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2380"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2381"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2380"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2382"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2380"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2383"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2380"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2384"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2380"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2385"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2380"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2386"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2380"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2387"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2380"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2388"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2380"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2389"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2380"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2390"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2381"); - node.BrowseName = ToQualifiedName("CreateSessionId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2380"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CreateSessionId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2381"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2382"); - node.BrowseName = ToQualifiedName("CreateClientName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2380"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CreateClientName"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2382"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2383"); - node.BrowseName = ToQualifiedName("InvocationCreationTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2380"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InvocationCreationTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2383"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2384"); - node.BrowseName = ToQualifiedName("LastTransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2380"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastTransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2384"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2385"); - node.BrowseName = ToQualifiedName("LastMethodCall"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2380"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastMethodCall"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2385"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2386"); - node.BrowseName = ToQualifiedName("LastMethodSessionId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2380"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastMethodSessionId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2386"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2387"); - node.BrowseName = ToQualifiedName("LastMethodInputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2380"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastMethodInputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2387"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2388"); - node.BrowseName = ToQualifiedName("LastMethodOutputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2380"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastMethodOutputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2388"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2389"); - node.BrowseName = ToQualifiedName("LastMethodCallTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2380"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastMethodCallTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2389"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2390"); - node.BrowseName = ToQualifiedName("LastMethodReturnStatus"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2380"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastMethodReturnStatus"); - attrs.Type = ToNodeId("i=299"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2390"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=894"); - node.BrowseName = ToQualifiedName("ProgramDiagnosticDataType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ProgramDiagnosticDataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=895"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=894"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=895"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8882"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=896"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=894"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=896"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8247"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - } +void CreateAddressSpacePart10(OpcUa::NodeManagementServices & registry) +{ + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2391"); + node.BrowseName = ToQualifiedName("ProgramStateMachineType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2771"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("A state machine for a program."); + attrs.DisplayName = LocalizedText("ProgramStateMachineType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3830"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3835"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2392"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2393"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2394"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2395"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2396"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2397"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2398"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2399"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3850"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2400"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2402"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2404"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2406"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2408"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2410"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2412"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2414"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2416"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2418"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2420"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2422"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2424"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2426"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2427"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2428"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2429"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2391"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2430"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3830"); + node.BrowseName = ToQualifiedName("CurrentState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2760"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3830"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3831"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3830"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3833"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3830"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3831"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3830"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3831"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3833"); + node.BrowseName = ToQualifiedName("Number"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3830"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Number"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3833"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3835"); + node.BrowseName = ToQualifiedName("LastTransition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2767"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastTransition"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3835"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3836"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3835"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3838"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3835"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3839"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3835"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3836"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3835"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3836"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3838"); + node.BrowseName = ToQualifiedName("Number"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3835"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Number"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3838"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3839"); + node.BrowseName = ToQualifiedName("TransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3835"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3839"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2392"); + node.BrowseName = ToQualifiedName("Creatable"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Creatable"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2393"); + node.BrowseName = ToQualifiedName("Deletable"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Deletable"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2393"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2394"); + node.BrowseName = ToQualifiedName("AutoDelete"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AutoDelete"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2394"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=79"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2395"); + node.BrowseName = ToQualifiedName("RecycleCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RecycleCount"); + attrs.Type = ObjectId::Int32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2395"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2396"); + node.BrowseName = ToQualifiedName("InstanceCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InstanceCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2397"); + node.BrowseName = ToQualifiedName("MaxInstanceCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MaxInstanceCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2398"); + node.BrowseName = ToQualifiedName("MaxRecycleCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MaxRecycleCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2399"); + node.BrowseName = ToQualifiedName("ProgramDiagnostics"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2380"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ProgramDiagnostics"); + attrs.Type = ToNodeId("i=894"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2399"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3840"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2399"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3841"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2399"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3842"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2399"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3843"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2399"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3844"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2399"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3845"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2399"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3846"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2399"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3847"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2399"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3848"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2399"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3849"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2399"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3840"); + node.BrowseName = ToQualifiedName("CreateSessionId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2399"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CreateSessionId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3840"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3841"); + node.BrowseName = ToQualifiedName("CreateClientName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2399"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CreateClientName"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3841"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3842"); + node.BrowseName = ToQualifiedName("InvocationCreationTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2399"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InvocationCreationTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3842"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3843"); + node.BrowseName = ToQualifiedName("LastTransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2399"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastTransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3843"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3844"); + node.BrowseName = ToQualifiedName("LastMethodCall"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2399"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastMethodCall"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3844"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3845"); + node.BrowseName = ToQualifiedName("LastMethodSessionId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2399"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastMethodSessionId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3845"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3846"); + node.BrowseName = ToQualifiedName("LastMethodInputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2399"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastMethodInputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3846"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3847"); + node.BrowseName = ToQualifiedName("LastMethodOutputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2399"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastMethodOutputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3847"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3848"); + node.BrowseName = ToQualifiedName("LastMethodCallTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2399"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastMethodCallTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3848"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3849"); + node.BrowseName = ToQualifiedName("LastMethodReturnStatus"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2399"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastMethodReturnStatus"); + attrs.Type = ToNodeId("i=299"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3849"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3850"); + node.BrowseName = ToQualifiedName("FinalResultData"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=58"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("FinalResultData"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3850"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2400"); + node.BrowseName = ToQualifiedName("Ready"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2307"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("The Program is properly initialized and may be started."); + attrs.DisplayName = LocalizedText("Ready"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2400"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2401"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2401"); + node.BrowseName = ToQualifiedName("StateNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2400"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StateNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Value = (uint32_t) 1; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2401"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2402"); + node.BrowseName = ToQualifiedName("Running"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2307"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("The Program is executing making progress towards completion."); + attrs.DisplayName = LocalizedText("Running"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2402"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2403"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2403"); + node.BrowseName = ToQualifiedName("StateNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2402"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StateNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Value = (uint32_t) 2; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2403"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2404"); + node.BrowseName = ToQualifiedName("Suspended"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2307"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("The Program has been stopped prior to reaching a terminal state but may be resumed."); + attrs.DisplayName = LocalizedText("Suspended"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2404"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2405"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2405"); + node.BrowseName = ToQualifiedName("StateNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2404"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StateNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Value = (uint32_t) 3; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2405"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2406"); + node.BrowseName = ToQualifiedName("Halted"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2307"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("The Program is in a terminal or failed state, and it cannot be started or resumed without being reset."); + attrs.DisplayName = LocalizedText("Halted"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2406"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2407"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2407"); + node.BrowseName = ToQualifiedName("StateNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2406"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StateNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Value = (uint32_t) 4; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2407"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2408"); + node.BrowseName = ToQualifiedName("HaltedToReady"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("HaltedToReady"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2408"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2409"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=2408"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2406"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=2408"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2400"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=53"); + ref.SourceNodeId = ToNodeId("i=2408"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2430"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=54"); + ref.SourceNodeId = ToNodeId("i=2408"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2378"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2409"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2408"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Value = (uint32_t) 1; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2409"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2410"); + node.BrowseName = ToQualifiedName("ReadyToRunning"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("ReadyToRunning"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2410"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2411"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=2410"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2400"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=2410"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2402"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=53"); + ref.SourceNodeId = ToNodeId("i=2410"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2426"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=54"); + ref.SourceNodeId = ToNodeId("i=2410"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2378"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2411"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2410"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Value = (uint32_t) 2; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2411"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2412"); + node.BrowseName = ToQualifiedName("RunningToHalted"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("RunningToHalted"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2412"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2413"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=2412"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2402"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=2412"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2406"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=53"); + ref.SourceNodeId = ToNodeId("i=2412"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2429"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=54"); + ref.SourceNodeId = ToNodeId("i=2412"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2378"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2413"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2412"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Value = (uint32_t) 3; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2413"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2414"); + node.BrowseName = ToQualifiedName("RunningToReady"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("RunningToReady"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2414"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2415"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=2414"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2402"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=2414"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2400"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=54"); + ref.SourceNodeId = ToNodeId("i=2414"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2378"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2415"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2414"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Value = (uint32_t) 4; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2415"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2416"); + node.BrowseName = ToQualifiedName("RunningToSuspended"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("RunningToSuspended"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2416"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2417"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=2416"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2402"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=2416"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2404"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=53"); + ref.SourceNodeId = ToNodeId("i=2416"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2427"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=54"); + ref.SourceNodeId = ToNodeId("i=2416"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2378"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2417"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2416"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Value = (uint32_t) 5; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2417"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2418"); + node.BrowseName = ToQualifiedName("SuspendedToRunning"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("SuspendedToRunning"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2418"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2419"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=2418"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2404"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=2418"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2402"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=53"); + ref.SourceNodeId = ToNodeId("i=2418"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2428"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=54"); + ref.SourceNodeId = ToNodeId("i=2418"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2378"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2419"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2418"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Value = (uint32_t) 6; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2419"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2420"); + node.BrowseName = ToQualifiedName("SuspendedToHalted"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("SuspendedToHalted"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2420"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2421"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=2420"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2404"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=2420"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2406"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=53"); + ref.SourceNodeId = ToNodeId("i=2420"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2429"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=54"); + ref.SourceNodeId = ToNodeId("i=2420"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2378"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2421"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2420"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Value = (uint32_t) 7; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2421"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2422"); + node.BrowseName = ToQualifiedName("SuspendedToReady"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("SuspendedToReady"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2422"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2423"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=2422"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2404"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=2422"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2400"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=54"); + ref.SourceNodeId = ToNodeId("i=2422"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2378"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2423"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2422"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Value = (uint32_t) 8; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2423"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2424"); + node.BrowseName = ToQualifiedName("ReadyToHalted"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2391"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("ReadyToHalted"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2424"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2425"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=2424"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2400"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=2424"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2406"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=53"); + ref.SourceNodeId = ToNodeId("i=2424"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2429"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=54"); + ref.SourceNodeId = ToNodeId("i=2424"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2378"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2425"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2424"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Value = (uint32_t) 9; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2425"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2378"); + node.BrowseName = ToQualifiedName("ProgramTransitionEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2311"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ProgramTransitionEventType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2378"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2379"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2379"); + node.BrowseName = ToQualifiedName("IntermediateResult"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2378"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("IntermediateResult"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2379"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11856"); + node.BrowseName = ToQualifiedName("AuditProgramTransitionEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2315"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditProgramTransitionEventType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11856"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11875"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11875"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11856"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11875"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3806"); + node.BrowseName = ToQualifiedName("ProgramTransitionAuditEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2315"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ProgramTransitionAuditEventType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3806"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3825"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3825"); + node.BrowseName = ToQualifiedName("Transition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3806"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2767"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Transition"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3825"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3826"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3825"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3826"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3825"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3826"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2380"); + node.BrowseName = ToQualifiedName("ProgramDiagnosticType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ProgramDiagnosticType"); + attrs.Type = ToNodeId("i=894"); + attrs.Rank = -1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2380"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2381"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2380"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2382"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2380"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2383"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2380"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2384"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2380"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2385"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2380"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2386"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2380"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2387"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2380"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2388"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2380"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2389"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2380"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2390"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2381"); + node.BrowseName = ToQualifiedName("CreateSessionId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2380"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CreateSessionId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2381"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2382"); + node.BrowseName = ToQualifiedName("CreateClientName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2380"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CreateClientName"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2382"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2383"); + node.BrowseName = ToQualifiedName("InvocationCreationTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2380"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InvocationCreationTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2383"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2384"); + node.BrowseName = ToQualifiedName("LastTransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2380"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastTransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2384"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2385"); + node.BrowseName = ToQualifiedName("LastMethodCall"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2380"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastMethodCall"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2385"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2386"); + node.BrowseName = ToQualifiedName("LastMethodSessionId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2380"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastMethodSessionId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2386"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2387"); + node.BrowseName = ToQualifiedName("LastMethodInputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2380"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastMethodInputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2387"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2388"); + node.BrowseName = ToQualifiedName("LastMethodOutputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2380"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastMethodOutputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2388"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2389"); + node.BrowseName = ToQualifiedName("LastMethodCallTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2380"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastMethodCallTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2389"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2390"); + node.BrowseName = ToQualifiedName("LastMethodReturnStatus"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2380"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastMethodReturnStatus"); + attrs.Type = ToNodeId("i=299"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2390"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=894"); + node.BrowseName = ToQualifiedName("ProgramDiagnosticDataType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ProgramDiagnosticDataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=895"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=894"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=895"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8882"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=896"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=894"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=896"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8247"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + +} } // namespace - + diff --git a/src/server/standard_address_space_part11.cpp b/src/server/standard_address_space_part11.cpp index b2f82b58..40356f6b 100644 --- a/src/server/standard_address_space_part11.cpp +++ b/src/server/standard_address_space_part11.cpp @@ -16,2547 +16,2547 @@ namespace OpcUa { - void CreateAddressSpacePart11(OpcUa::NodeManagementServices& registry) - { - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=56"); - node.BrowseName = ToQualifiedName("HasHistoricalConfiguration"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=44"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for a reference to the historical configuration for a data variable."); - attrs.DisplayName = LocalizedText("HasHistoricalConfiguration"); - attrs.InverseName = LocalizedText("HistoricalConfigurationOf"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11192"); - node.BrowseName = ToQualifiedName("HistoryServerCapabilities"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2268"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2330"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("HistoryServerCapabilities"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11192"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11193"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11192"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11242"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11192"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11273"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11192"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11274"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11192"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11196"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11192"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11197"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11192"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11198"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11192"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11199"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11192"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11200"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11192"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11281"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11192"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11282"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11192"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11283"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11192"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11502"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11192"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11275"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11192"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11201"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11193"); - node.BrowseName = ToQualifiedName("AccessHistoryDataCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11192"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AccessHistoryDataCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11242"); - node.BrowseName = ToQualifiedName("AccessHistoryEventsCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11192"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AccessHistoryEventsCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11273"); - node.BrowseName = ToQualifiedName("MaxReturnDataValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11192"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MaxReturnDataValues"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11274"); - node.BrowseName = ToQualifiedName("MaxReturnEventValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11192"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MaxReturnEventValues"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11196"); - node.BrowseName = ToQualifiedName("InsertDataCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11192"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InsertDataCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11197"); - node.BrowseName = ToQualifiedName("ReplaceDataCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11192"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ReplaceDataCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11198"); - node.BrowseName = ToQualifiedName("UpdateDataCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11192"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UpdateDataCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11199"); - node.BrowseName = ToQualifiedName("DeleteRawCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11192"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteRawCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11200"); - node.BrowseName = ToQualifiedName("DeleteAtTimeCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11192"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteAtTimeCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11281"); - node.BrowseName = ToQualifiedName("InsertEventCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11192"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InsertEventCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11282"); - node.BrowseName = ToQualifiedName("ReplaceEventCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11192"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ReplaceEventCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11283"); - node.BrowseName = ToQualifiedName("UpdateEventCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11192"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UpdateEventCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11502"); - node.BrowseName = ToQualifiedName("DeleteEventCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11192"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteEventCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11275"); - node.BrowseName = ToQualifiedName("InsertAnnotationCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11192"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InsertAnnotationCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11201"); - node.BrowseName = ToQualifiedName("AggregateFunctions"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=11192"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("AggregateFunctions"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11214"); - node.BrowseName = ToQualifiedName("Annotations"); - node.Class = NodeClass::Variable; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Annotations"); - attrs.Type = ToNodeId("i=891"); - attrs.Rank = -2; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2318"); - node.BrowseName = ToQualifiedName("HistoricalDataConfigurationType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("HistoricalDataConfigurationType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3059"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11876"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2323"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2324"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2325"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2326"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2327"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2328"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11499"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11500"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3059"); - node.BrowseName = ToQualifiedName("AggregateConfiguration"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2318"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=11187"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("AggregateConfiguration"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3059"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11168"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3059"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11169"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3059"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11170"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3059"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11171"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3059"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11168"); - node.BrowseName = ToQualifiedName("TreatUncertainAsBad"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3059"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TreatUncertainAsBad"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11168"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11169"); - node.BrowseName = ToQualifiedName("PercentDataBad"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3059"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PercentDataBad"); - attrs.Type = ObjectId::Byte; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11169"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11170"); - node.BrowseName = ToQualifiedName("PercentDataGood"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3059"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PercentDataGood"); - attrs.Type = ObjectId::Byte; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11170"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11171"); - node.BrowseName = ToQualifiedName("UseSlopedExtrapolation"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3059"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UseSlopedExtrapolation"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11171"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11876"); - node.BrowseName = ToQualifiedName("AggregateFunctions"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2318"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("AggregateFunctions"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11876"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2323"); - node.BrowseName = ToQualifiedName("Stepped"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2318"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Stepped"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2323"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2324"); - node.BrowseName = ToQualifiedName("Definition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2318"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Definition"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2324"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2325"); - node.BrowseName = ToQualifiedName("MaxTimeInterval"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2318"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MaxTimeInterval"); - attrs.Type = ToNodeId("i=290"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2325"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2326"); - node.BrowseName = ToQualifiedName("MinTimeInterval"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2318"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MinTimeInterval"); - attrs.Type = ToNodeId("i=290"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2326"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2327"); - node.BrowseName = ToQualifiedName("ExceptionDeviation"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2318"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ExceptionDeviation"); - attrs.Type = ObjectId::Double; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2327"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2328"); - node.BrowseName = ToQualifiedName("ExceptionDeviationFormat"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2318"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ExceptionDeviationFormat"); - attrs.Type = ToNodeId("i=890"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2328"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11499"); - node.BrowseName = ToQualifiedName("StartOfArchive"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2318"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StartOfArchive"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11499"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11500"); - node.BrowseName = ToQualifiedName("StartOfOnlineArchive"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2318"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StartOfOnlineArchive"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11500"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11202"); - node.BrowseName = ToQualifiedName("HA Configuration"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2318"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("HA Configuration"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11202"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11203"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11202"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11208"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11203"); - node.BrowseName = ToQualifiedName("AggregateConfiguration"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=11202"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=11187"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("AggregateConfiguration"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11203"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11204"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11203"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11205"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11203"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11206"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11203"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11207"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11204"); - node.BrowseName = ToQualifiedName("TreatUncertainAsBad"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11203"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TreatUncertainAsBad"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11205"); - node.BrowseName = ToQualifiedName("PercentDataBad"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11203"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PercentDataBad"); - attrs.Type = ObjectId::Byte; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11206"); - node.BrowseName = ToQualifiedName("PercentDataGood"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11203"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PercentDataGood"); - attrs.Type = ObjectId::Byte; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11207"); - node.BrowseName = ToQualifiedName("UseSlopedExtrapolation"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11203"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UseSlopedExtrapolation"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11208"); - node.BrowseName = ToQualifiedName("Stepped"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11202"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Stepped"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11215"); - node.BrowseName = ToQualifiedName("HistoricalEventFilter"); - node.Class = NodeClass::Variable; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("HistoricalEventFilter"); - attrs.Type = ToNodeId("i=725"); - attrs.Rank = -2; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2330"); - node.BrowseName = ToQualifiedName("HistoryServerCapabilitiesType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("HistoryServerCapabilitiesType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2331"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2332"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11268"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11269"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2334"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2335"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2336"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2337"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2338"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11278"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11279"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11280"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11501"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11270"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11172"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2331"); - node.BrowseName = ToQualifiedName("AccessHistoryDataCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2330"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AccessHistoryDataCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2331"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2332"); - node.BrowseName = ToQualifiedName("AccessHistoryEventsCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2330"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AccessHistoryEventsCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2332"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11268"); - node.BrowseName = ToQualifiedName("MaxReturnDataValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2330"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MaxReturnDataValues"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11268"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11269"); - node.BrowseName = ToQualifiedName("MaxReturnEventValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2330"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MaxReturnEventValues"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11269"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2334"); - node.BrowseName = ToQualifiedName("InsertDataCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2330"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InsertDataCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2334"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2335"); - node.BrowseName = ToQualifiedName("ReplaceDataCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2330"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ReplaceDataCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2335"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2336"); - node.BrowseName = ToQualifiedName("UpdateDataCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2330"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UpdateDataCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2336"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2337"); - node.BrowseName = ToQualifiedName("DeleteRawCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2330"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteRawCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2337"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2338"); - node.BrowseName = ToQualifiedName("DeleteAtTimeCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2330"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteAtTimeCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2338"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11278"); - node.BrowseName = ToQualifiedName("InsertEventCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2330"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InsertEventCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11278"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11279"); - node.BrowseName = ToQualifiedName("ReplaceEventCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2330"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ReplaceEventCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11279"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11280"); - node.BrowseName = ToQualifiedName("UpdateEventCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2330"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UpdateEventCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11280"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11501"); - node.BrowseName = ToQualifiedName("DeleteEventCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2330"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteEventCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11501"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11270"); - node.BrowseName = ToQualifiedName("InsertAnnotationCapability"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2330"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InsertAnnotationCapability"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11270"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11172"); - node.BrowseName = ToQualifiedName("AggregateFunctions"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2330"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("AggregateFunctions"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2999"); - node.BrowseName = ToQualifiedName("AuditHistoryEventUpdateEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2104"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditHistoryEventUpdateEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2999"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3025"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2999"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3028"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2999"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3003"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2999"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3029"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2999"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3030"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3025"); - node.BrowseName = ToQualifiedName("UpdatedNode"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2999"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UpdatedNode"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3025"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3028"); - node.BrowseName = ToQualifiedName("PerformInsertReplace"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2999"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PerformInsertReplace"); - attrs.Type = ToNodeId("i=11293"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3028"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3003"); - node.BrowseName = ToQualifiedName("Filter"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2999"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Filter"); - attrs.Type = ToNodeId("i=725"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3003"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3029"); - node.BrowseName = ToQualifiedName("NewValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2999"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("NewValues"); - attrs.Type = ToNodeId("i=920"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3029"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3030"); - node.BrowseName = ToQualifiedName("OldValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2999"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OldValues"); - attrs.Type = ToNodeId("i=920"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3006"); - node.BrowseName = ToQualifiedName("AuditHistoryValueUpdateEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2104"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditHistoryValueUpdateEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3006"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3026"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3006"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3031"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3006"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3032"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3006"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3033"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3026"); - node.BrowseName = ToQualifiedName("UpdatedNode"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3006"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UpdatedNode"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3026"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3031"); - node.BrowseName = ToQualifiedName("PerformInsertReplace"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3006"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PerformInsertReplace"); - attrs.Type = ToNodeId("i=11293"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3031"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3032"); - node.BrowseName = ToQualifiedName("NewValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3006"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("NewValues"); - attrs.Type = ToNodeId("i=23"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3032"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3033"); - node.BrowseName = ToQualifiedName("OldValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3006"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OldValues"); - attrs.Type = ToNodeId("i=23"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3033"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3012"); - node.BrowseName = ToQualifiedName("AuditHistoryDeleteEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2104"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditHistoryDeleteEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3012"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3027"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3027"); - node.BrowseName = ToQualifiedName("UpdatedNode"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3012"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UpdatedNode"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3027"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3014"); - node.BrowseName = ToQualifiedName("AuditHistoryRawModifyDeleteEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=3012"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditHistoryRawModifyDeleteEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3014"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3015"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3014"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3016"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3014"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3017"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3014"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3034"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3015"); - node.BrowseName = ToQualifiedName("IsDeleteModified"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3014"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("IsDeleteModified"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3015"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3016"); - node.BrowseName = ToQualifiedName("StartTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3014"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StartTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3016"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3017"); - node.BrowseName = ToQualifiedName("EndTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3014"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EndTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3017"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3034"); - node.BrowseName = ToQualifiedName("OldValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3014"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OldValues"); - attrs.Type = ToNodeId("i=23"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3034"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3019"); - node.BrowseName = ToQualifiedName("AuditHistoryAtTimeDeleteEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=3012"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditHistoryAtTimeDeleteEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3019"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3020"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3019"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3021"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3020"); - node.BrowseName = ToQualifiedName("ReqTimes"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3019"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ReqTimes"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3020"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3021"); - node.BrowseName = ToQualifiedName("OldValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3019"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OldValues"); - attrs.Type = ToNodeId("i=23"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3022"); - node.BrowseName = ToQualifiedName("AuditHistoryEventDeleteEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=3012"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditHistoryEventDeleteEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3022"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3023"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=3022"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3024"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3023"); - node.BrowseName = ToQualifiedName("EventIds"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3022"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EventIds"); - attrs.Type = ObjectId::ByteString; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3023"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3024"); - node.BrowseName = ToQualifiedName("OldValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3022"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OldValues"); - attrs.Type = ToNodeId("i=920"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3024"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=891"); - node.BrowseName = ToQualifiedName("Annotation"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("Annotation"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=890"); - node.BrowseName = ToQualifiedName("ExceptionDeviationFormat"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ExceptionDeviationFormat"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=890"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7614"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7614"); - node.BrowseName = ToQualifiedName("EnumStrings"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=890"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumStrings"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=7614"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=892"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=891"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=892"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8879"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=893"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=891"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=893"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8244"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - } +void CreateAddressSpacePart11(OpcUa::NodeManagementServices & registry) +{ + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=56"); + node.BrowseName = ToQualifiedName("HasHistoricalConfiguration"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=44"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for a reference to the historical configuration for a data variable."); + attrs.DisplayName = LocalizedText("HasHistoricalConfiguration"); + attrs.InverseName = LocalizedText("HistoricalConfigurationOf"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11192"); + node.BrowseName = ToQualifiedName("HistoryServerCapabilities"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2268"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2330"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("HistoryServerCapabilities"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11192"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11193"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11192"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11242"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11192"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11273"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11192"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11274"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11192"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11196"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11192"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11197"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11192"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11198"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11192"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11199"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11192"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11200"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11192"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11281"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11192"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11282"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11192"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11283"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11192"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11502"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11192"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11275"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11192"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11201"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11193"); + node.BrowseName = ToQualifiedName("AccessHistoryDataCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11192"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AccessHistoryDataCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11242"); + node.BrowseName = ToQualifiedName("AccessHistoryEventsCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11192"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AccessHistoryEventsCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11273"); + node.BrowseName = ToQualifiedName("MaxReturnDataValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11192"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MaxReturnDataValues"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11274"); + node.BrowseName = ToQualifiedName("MaxReturnEventValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11192"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MaxReturnEventValues"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11196"); + node.BrowseName = ToQualifiedName("InsertDataCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11192"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InsertDataCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11197"); + node.BrowseName = ToQualifiedName("ReplaceDataCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11192"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ReplaceDataCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11198"); + node.BrowseName = ToQualifiedName("UpdateDataCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11192"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UpdateDataCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11199"); + node.BrowseName = ToQualifiedName("DeleteRawCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11192"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteRawCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11200"); + node.BrowseName = ToQualifiedName("DeleteAtTimeCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11192"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteAtTimeCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11281"); + node.BrowseName = ToQualifiedName("InsertEventCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11192"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InsertEventCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11282"); + node.BrowseName = ToQualifiedName("ReplaceEventCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11192"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ReplaceEventCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11283"); + node.BrowseName = ToQualifiedName("UpdateEventCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11192"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UpdateEventCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11502"); + node.BrowseName = ToQualifiedName("DeleteEventCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11192"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteEventCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11275"); + node.BrowseName = ToQualifiedName("InsertAnnotationCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11192"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InsertAnnotationCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11201"); + node.BrowseName = ToQualifiedName("AggregateFunctions"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=11192"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("AggregateFunctions"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11214"); + node.BrowseName = ToQualifiedName("Annotations"); + node.Class = NodeClass::Variable; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Annotations"); + attrs.Type = ToNodeId("i=891"); + attrs.Rank = -2; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2318"); + node.BrowseName = ToQualifiedName("HistoricalDataConfigurationType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("HistoricalDataConfigurationType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3059"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11876"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2323"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2324"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2325"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2326"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2327"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2328"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11499"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11500"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3059"); + node.BrowseName = ToQualifiedName("AggregateConfiguration"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2318"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=11187"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("AggregateConfiguration"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3059"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11168"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3059"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11169"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3059"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11170"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3059"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11171"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3059"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11168"); + node.BrowseName = ToQualifiedName("TreatUncertainAsBad"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3059"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TreatUncertainAsBad"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11168"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11169"); + node.BrowseName = ToQualifiedName("PercentDataBad"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3059"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PercentDataBad"); + attrs.Type = ObjectId::Byte; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11169"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11170"); + node.BrowseName = ToQualifiedName("PercentDataGood"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3059"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PercentDataGood"); + attrs.Type = ObjectId::Byte; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11170"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11171"); + node.BrowseName = ToQualifiedName("UseSlopedExtrapolation"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3059"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UseSlopedExtrapolation"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11171"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11876"); + node.BrowseName = ToQualifiedName("AggregateFunctions"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2318"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("AggregateFunctions"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11876"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2323"); + node.BrowseName = ToQualifiedName("Stepped"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2318"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Stepped"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2323"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2324"); + node.BrowseName = ToQualifiedName("Definition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2318"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Definition"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2324"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2325"); + node.BrowseName = ToQualifiedName("MaxTimeInterval"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2318"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MaxTimeInterval"); + attrs.Type = ToNodeId("i=290"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2325"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2326"); + node.BrowseName = ToQualifiedName("MinTimeInterval"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2318"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MinTimeInterval"); + attrs.Type = ToNodeId("i=290"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2326"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2327"); + node.BrowseName = ToQualifiedName("ExceptionDeviation"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2318"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ExceptionDeviation"); + attrs.Type = ObjectId::Double; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2327"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2328"); + node.BrowseName = ToQualifiedName("ExceptionDeviationFormat"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2318"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ExceptionDeviationFormat"); + attrs.Type = ToNodeId("i=890"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2328"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11499"); + node.BrowseName = ToQualifiedName("StartOfArchive"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2318"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StartOfArchive"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11499"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11500"); + node.BrowseName = ToQualifiedName("StartOfOnlineArchive"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2318"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StartOfOnlineArchive"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11500"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11202"); + node.BrowseName = ToQualifiedName("HA Configuration"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2318"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("HA Configuration"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11202"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11203"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11202"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11208"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11203"); + node.BrowseName = ToQualifiedName("AggregateConfiguration"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=11202"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=11187"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("AggregateConfiguration"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11203"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11204"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11203"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11205"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11203"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11206"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11203"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11207"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11204"); + node.BrowseName = ToQualifiedName("TreatUncertainAsBad"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11203"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TreatUncertainAsBad"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11205"); + node.BrowseName = ToQualifiedName("PercentDataBad"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11203"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PercentDataBad"); + attrs.Type = ObjectId::Byte; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11206"); + node.BrowseName = ToQualifiedName("PercentDataGood"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11203"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PercentDataGood"); + attrs.Type = ObjectId::Byte; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11207"); + node.BrowseName = ToQualifiedName("UseSlopedExtrapolation"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11203"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UseSlopedExtrapolation"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11208"); + node.BrowseName = ToQualifiedName("Stepped"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11202"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Stepped"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11215"); + node.BrowseName = ToQualifiedName("HistoricalEventFilter"); + node.Class = NodeClass::Variable; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("HistoricalEventFilter"); + attrs.Type = ToNodeId("i=725"); + attrs.Rank = -2; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2330"); + node.BrowseName = ToQualifiedName("HistoryServerCapabilitiesType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("HistoryServerCapabilitiesType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2331"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2332"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11268"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11269"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2334"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2335"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2336"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2337"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2338"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11278"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11279"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11280"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11501"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11270"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11172"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2331"); + node.BrowseName = ToQualifiedName("AccessHistoryDataCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2330"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AccessHistoryDataCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2331"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2332"); + node.BrowseName = ToQualifiedName("AccessHistoryEventsCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2330"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AccessHistoryEventsCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2332"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11268"); + node.BrowseName = ToQualifiedName("MaxReturnDataValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2330"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MaxReturnDataValues"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11268"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11269"); + node.BrowseName = ToQualifiedName("MaxReturnEventValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2330"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MaxReturnEventValues"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11269"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2334"); + node.BrowseName = ToQualifiedName("InsertDataCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2330"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InsertDataCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2334"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2335"); + node.BrowseName = ToQualifiedName("ReplaceDataCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2330"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ReplaceDataCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2335"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2336"); + node.BrowseName = ToQualifiedName("UpdateDataCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2330"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UpdateDataCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2336"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2337"); + node.BrowseName = ToQualifiedName("DeleteRawCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2330"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteRawCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2337"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2338"); + node.BrowseName = ToQualifiedName("DeleteAtTimeCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2330"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteAtTimeCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2338"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11278"); + node.BrowseName = ToQualifiedName("InsertEventCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2330"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InsertEventCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11278"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11279"); + node.BrowseName = ToQualifiedName("ReplaceEventCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2330"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ReplaceEventCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11279"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11280"); + node.BrowseName = ToQualifiedName("UpdateEventCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2330"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UpdateEventCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11280"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11501"); + node.BrowseName = ToQualifiedName("DeleteEventCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2330"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteEventCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11501"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11270"); + node.BrowseName = ToQualifiedName("InsertAnnotationCapability"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2330"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InsertAnnotationCapability"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11270"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11172"); + node.BrowseName = ToQualifiedName("AggregateFunctions"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2330"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("AggregateFunctions"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2999"); + node.BrowseName = ToQualifiedName("AuditHistoryEventUpdateEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2104"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditHistoryEventUpdateEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2999"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3025"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2999"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3028"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2999"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3003"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2999"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3029"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2999"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3030"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3025"); + node.BrowseName = ToQualifiedName("UpdatedNode"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2999"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UpdatedNode"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3025"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3028"); + node.BrowseName = ToQualifiedName("PerformInsertReplace"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2999"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PerformInsertReplace"); + attrs.Type = ToNodeId("i=11293"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3028"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3003"); + node.BrowseName = ToQualifiedName("Filter"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2999"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Filter"); + attrs.Type = ToNodeId("i=725"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3003"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3029"); + node.BrowseName = ToQualifiedName("NewValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2999"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("NewValues"); + attrs.Type = ToNodeId("i=920"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3029"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3030"); + node.BrowseName = ToQualifiedName("OldValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2999"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OldValues"); + attrs.Type = ToNodeId("i=920"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3006"); + node.BrowseName = ToQualifiedName("AuditHistoryValueUpdateEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2104"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditHistoryValueUpdateEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3006"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3026"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3006"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3031"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3006"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3032"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3006"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3033"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3026"); + node.BrowseName = ToQualifiedName("UpdatedNode"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3006"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UpdatedNode"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3026"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3031"); + node.BrowseName = ToQualifiedName("PerformInsertReplace"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3006"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PerformInsertReplace"); + attrs.Type = ToNodeId("i=11293"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3031"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3032"); + node.BrowseName = ToQualifiedName("NewValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3006"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("NewValues"); + attrs.Type = ToNodeId("i=23"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3032"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3033"); + node.BrowseName = ToQualifiedName("OldValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3006"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OldValues"); + attrs.Type = ToNodeId("i=23"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3033"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3012"); + node.BrowseName = ToQualifiedName("AuditHistoryDeleteEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2104"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditHistoryDeleteEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3012"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3027"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3027"); + node.BrowseName = ToQualifiedName("UpdatedNode"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3012"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UpdatedNode"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3027"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3014"); + node.BrowseName = ToQualifiedName("AuditHistoryRawModifyDeleteEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=3012"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditHistoryRawModifyDeleteEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3014"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3015"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3014"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3016"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3014"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3017"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3014"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3034"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3015"); + node.BrowseName = ToQualifiedName("IsDeleteModified"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3014"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("IsDeleteModified"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3015"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3016"); + node.BrowseName = ToQualifiedName("StartTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3014"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StartTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3016"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3017"); + node.BrowseName = ToQualifiedName("EndTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3014"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EndTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3017"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3034"); + node.BrowseName = ToQualifiedName("OldValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3014"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OldValues"); + attrs.Type = ToNodeId("i=23"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3034"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3019"); + node.BrowseName = ToQualifiedName("AuditHistoryAtTimeDeleteEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=3012"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditHistoryAtTimeDeleteEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3019"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3020"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3019"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3021"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3020"); + node.BrowseName = ToQualifiedName("ReqTimes"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3019"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ReqTimes"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3020"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3021"); + node.BrowseName = ToQualifiedName("OldValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3019"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OldValues"); + attrs.Type = ToNodeId("i=23"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3022"); + node.BrowseName = ToQualifiedName("AuditHistoryEventDeleteEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=3012"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditHistoryEventDeleteEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3022"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3023"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=3022"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3024"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3023"); + node.BrowseName = ToQualifiedName("EventIds"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3022"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EventIds"); + attrs.Type = ObjectId::ByteString; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3023"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3024"); + node.BrowseName = ToQualifiedName("OldValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3022"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OldValues"); + attrs.Type = ToNodeId("i=920"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3024"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=891"); + node.BrowseName = ToQualifiedName("Annotation"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("Annotation"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=890"); + node.BrowseName = ToQualifiedName("ExceptionDeviationFormat"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ExceptionDeviationFormat"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=890"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7614"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7614"); + node.BrowseName = ToQualifiedName("EnumStrings"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=890"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumStrings"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=7614"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=892"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=891"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=892"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8879"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=893"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=891"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=893"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8244"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + +} } // namespace - + diff --git a/src/server/standard_address_space_part13.cpp b/src/server/standard_address_space_part13.cpp index a957529d..7f22d62f 100644 --- a/src/server/standard_address_space_part13.cpp +++ b/src/server/standard_address_space_part13.cpp @@ -16,688 +16,688 @@ namespace OpcUa { - void CreateAddressSpacePart13(OpcUa::NodeManagementServices& registry) - { - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11187"); - node.BrowseName = ToQualifiedName("AggregateConfigurationType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AggregateConfigurationType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11187"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11188"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11187"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11189"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11187"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11190"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11187"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11191"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11188"); - node.BrowseName = ToQualifiedName("TreatUncertainAsBad"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11187"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TreatUncertainAsBad"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11188"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11189"); - node.BrowseName = ToQualifiedName("PercentDataBad"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11187"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PercentDataBad"); - attrs.Type = ObjectId::Byte; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11189"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11190"); - node.BrowseName = ToQualifiedName("PercentDataGood"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11187"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PercentDataGood"); - attrs.Type = ObjectId::Byte; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11190"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11191"); - node.BrowseName = ToQualifiedName("UseSlopedExtrapolation"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11187"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UseSlopedExtrapolation"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11191"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2341"); - node.BrowseName = ToQualifiedName("Interpolative"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("At the beginning of each interval, retrieve the calculated value from the data points on either side of the requested timestamp."); - attrs.DisplayName = LocalizedText("Interpolative"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2342"); - node.BrowseName = ToQualifiedName("Average"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the average value of the data over the interval."); - attrs.DisplayName = LocalizedText("Average"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2343"); - node.BrowseName = ToQualifiedName("TimeAverage"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the time weighted average data over the interval using Interpolated Bounding Values."); - attrs.DisplayName = LocalizedText("TimeAverage"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11285"); - node.BrowseName = ToQualifiedName("TimeAverage2"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the time weighted average data over the interval using Simple Bounding Values."); - attrs.DisplayName = LocalizedText("TimeAverage2"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2344"); - node.BrowseName = ToQualifiedName("Total"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the total (time integral) of the data over the interval using Interpolated Bounding Values."); - attrs.DisplayName = LocalizedText("Total"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11304"); - node.BrowseName = ToQualifiedName("Total2"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the total (time integral) of the data over the interval using Simple Bounding Values."); - attrs.DisplayName = LocalizedText("Total2"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2346"); - node.BrowseName = ToQualifiedName("Minimum"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the minimum raw value in the interval with the timestamp of the start of the interval."); - attrs.DisplayName = LocalizedText("Minimum"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2347"); - node.BrowseName = ToQualifiedName("Maximum"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the maximum raw value in the interval with the timestamp of the start of the interval."); - attrs.DisplayName = LocalizedText("Maximum"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2348"); - node.BrowseName = ToQualifiedName("MinimumActualTime"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the minimum value in the interval and the Timestamp of the minimum value."); - attrs.DisplayName = LocalizedText("MinimumActualTime"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2349"); - node.BrowseName = ToQualifiedName("MaximumActualTime"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the maximum value in the interval and the Timestamp of the maximum value."); - attrs.DisplayName = LocalizedText("MaximumActualTime"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2350"); - node.BrowseName = ToQualifiedName("Range"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the difference between the minimum and maximum Value over the interval."); - attrs.DisplayName = LocalizedText("Range"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11286"); - node.BrowseName = ToQualifiedName("Minimum2"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the minimum value in the interval including the Simple Bounding Values."); - attrs.DisplayName = LocalizedText("Minimum2"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11287"); - node.BrowseName = ToQualifiedName("Maximum2"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the maximum value in the interval including the Simple Bounding Values."); - attrs.DisplayName = LocalizedText("Maximum2"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11305"); - node.BrowseName = ToQualifiedName("MinimumActualTime2"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the minimum value with the actual timestamp including the Simple Bounding Values."); - attrs.DisplayName = LocalizedText("MinimumActualTime2"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11306"); - node.BrowseName = ToQualifiedName("MaximumActualTime2"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the maximum value with the actual timestamp including the Simple Bounding Values."); - attrs.DisplayName = LocalizedText("MaximumActualTime2"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11288"); - node.BrowseName = ToQualifiedName("Range2"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the difference between the Minimum2 and Maximum2 value over the interval."); - attrs.DisplayName = LocalizedText("Range2"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2351"); - node.BrowseName = ToQualifiedName("AnnotationCount"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the number of Annotations in the interval."); - attrs.DisplayName = LocalizedText("AnnotationCount"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2352"); - node.BrowseName = ToQualifiedName("Count"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the number of raw values over the interval."); - attrs.DisplayName = LocalizedText("Count"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11307"); - node.BrowseName = ToQualifiedName("DurationInStateZero"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the time a Boolean or numeric was in a zero state using Simple Bounding Values."); - attrs.DisplayName = LocalizedText("DurationInStateZero"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11308"); - node.BrowseName = ToQualifiedName("DurationInStateNonZero"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the time a Boolean or numeric was in a non-zero state using Simple Bounding Values."); - attrs.DisplayName = LocalizedText("DurationInStateNonZero"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2355"); - node.BrowseName = ToQualifiedName("NumberOfTransitions"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the number of changes between zero and non-zero that a Boolean or Numeric value experienced in the interval."); - attrs.DisplayName = LocalizedText("NumberOfTransitions"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2357"); - node.BrowseName = ToQualifiedName("Start"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the value at the beginning of the interval using Interpolated Bounding Values."); - attrs.DisplayName = LocalizedText("Start"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2358"); - node.BrowseName = ToQualifiedName("End"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the value at the end of the interval using Interpolated Bounding Values."); - attrs.DisplayName = LocalizedText("End"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2359"); - node.BrowseName = ToQualifiedName("Delta"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the difference between the Start and End value in the interval."); - attrs.DisplayName = LocalizedText("Delta"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11505"); - node.BrowseName = ToQualifiedName("StartBound"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the value at the beginning of the interval using Simple Bounding Values."); - attrs.DisplayName = LocalizedText("StartBound"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11506"); - node.BrowseName = ToQualifiedName("EndBound"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the value at the end of the interval using Simple Bounding Values."); - attrs.DisplayName = LocalizedText("EndBound"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11507"); - node.BrowseName = ToQualifiedName("DeltaBounds"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the difference between the StartBound and EndBound value in the interval."); - attrs.DisplayName = LocalizedText("DeltaBounds"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2360"); - node.BrowseName = ToQualifiedName("DurationGood"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the total duration of time in the interval during which the data is good."); - attrs.DisplayName = LocalizedText("DurationGood"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2361"); - node.BrowseName = ToQualifiedName("DurationBad"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the total duration of time in the interval during which the data is bad."); - attrs.DisplayName = LocalizedText("DurationBad"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2362"); - node.BrowseName = ToQualifiedName("PercentGood"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the percent of data (0 to 100) in the interval which has a good StatusCode."); - attrs.DisplayName = LocalizedText("PercentGood"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2363"); - node.BrowseName = ToQualifiedName("PercentBad"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the percent of data (0 to 100) in the interval which has a bad StatusCode."); - attrs.DisplayName = LocalizedText("PercentBad"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2364"); - node.BrowseName = ToQualifiedName("WorstQuality"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the worst StatusCode of data in the interval."); - attrs.DisplayName = LocalizedText("WorstQuality"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11292"); - node.BrowseName = ToQualifiedName("WorstQuality2"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the worst StatusCode of data in the interval including the Simple Bounding Values."); - attrs.DisplayName = LocalizedText("WorstQuality2"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11426"); - node.BrowseName = ToQualifiedName("StandardDeviationSample"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the standard deviation for the interval for a sample of the population (n-1)."); - attrs.DisplayName = LocalizedText("StandardDeviationSample"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11427"); - node.BrowseName = ToQualifiedName("StandardDeviationPopulation"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the standard deviation for the interval for a complete population (n) which includes Simple Bounding Values."); - attrs.DisplayName = LocalizedText("StandardDeviationPopulation"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11428"); - node.BrowseName = ToQualifiedName("VarianceSample"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the variance for the interval as calculated by the StandardDeviationSample."); - attrs.DisplayName = LocalizedText("VarianceSample"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11429"); - node.BrowseName = ToQualifiedName("VariancePopulation"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=2340"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Retrieve the variance for the interval as calculated by the StandardDeviationPopulation which includes Simple Bounding Values."); - attrs.DisplayName = LocalizedText("VariancePopulation"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - } +void CreateAddressSpacePart13(OpcUa::NodeManagementServices & registry) +{ + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11187"); + node.BrowseName = ToQualifiedName("AggregateConfigurationType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AggregateConfigurationType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11187"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11188"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11187"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11189"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11187"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11190"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11187"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11191"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11188"); + node.BrowseName = ToQualifiedName("TreatUncertainAsBad"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11187"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TreatUncertainAsBad"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11188"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11189"); + node.BrowseName = ToQualifiedName("PercentDataBad"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11187"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PercentDataBad"); + attrs.Type = ObjectId::Byte; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11189"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11190"); + node.BrowseName = ToQualifiedName("PercentDataGood"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11187"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PercentDataGood"); + attrs.Type = ObjectId::Byte; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11190"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11191"); + node.BrowseName = ToQualifiedName("UseSlopedExtrapolation"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11187"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UseSlopedExtrapolation"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11191"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2341"); + node.BrowseName = ToQualifiedName("Interpolative"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("At the beginning of each interval, retrieve the calculated value from the data points on either side of the requested timestamp."); + attrs.DisplayName = LocalizedText("Interpolative"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2342"); + node.BrowseName = ToQualifiedName("Average"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the average value of the data over the interval."); + attrs.DisplayName = LocalizedText("Average"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2343"); + node.BrowseName = ToQualifiedName("TimeAverage"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the time weighted average data over the interval using Interpolated Bounding Values."); + attrs.DisplayName = LocalizedText("TimeAverage"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11285"); + node.BrowseName = ToQualifiedName("TimeAverage2"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the time weighted average data over the interval using Simple Bounding Values."); + attrs.DisplayName = LocalizedText("TimeAverage2"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2344"); + node.BrowseName = ToQualifiedName("Total"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the total (time integral) of the data over the interval using Interpolated Bounding Values."); + attrs.DisplayName = LocalizedText("Total"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11304"); + node.BrowseName = ToQualifiedName("Total2"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the total (time integral) of the data over the interval using Simple Bounding Values."); + attrs.DisplayName = LocalizedText("Total2"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2346"); + node.BrowseName = ToQualifiedName("Minimum"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the minimum raw value in the interval with the timestamp of the start of the interval."); + attrs.DisplayName = LocalizedText("Minimum"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2347"); + node.BrowseName = ToQualifiedName("Maximum"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the maximum raw value in the interval with the timestamp of the start of the interval."); + attrs.DisplayName = LocalizedText("Maximum"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2348"); + node.BrowseName = ToQualifiedName("MinimumActualTime"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the minimum value in the interval and the Timestamp of the minimum value."); + attrs.DisplayName = LocalizedText("MinimumActualTime"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2349"); + node.BrowseName = ToQualifiedName("MaximumActualTime"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the maximum value in the interval and the Timestamp of the maximum value."); + attrs.DisplayName = LocalizedText("MaximumActualTime"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2350"); + node.BrowseName = ToQualifiedName("Range"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the difference between the minimum and maximum Value over the interval."); + attrs.DisplayName = LocalizedText("Range"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11286"); + node.BrowseName = ToQualifiedName("Minimum2"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the minimum value in the interval including the Simple Bounding Values."); + attrs.DisplayName = LocalizedText("Minimum2"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11287"); + node.BrowseName = ToQualifiedName("Maximum2"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the maximum value in the interval including the Simple Bounding Values."); + attrs.DisplayName = LocalizedText("Maximum2"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11305"); + node.BrowseName = ToQualifiedName("MinimumActualTime2"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the minimum value with the actual timestamp including the Simple Bounding Values."); + attrs.DisplayName = LocalizedText("MinimumActualTime2"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11306"); + node.BrowseName = ToQualifiedName("MaximumActualTime2"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the maximum value with the actual timestamp including the Simple Bounding Values."); + attrs.DisplayName = LocalizedText("MaximumActualTime2"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11288"); + node.BrowseName = ToQualifiedName("Range2"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the difference between the Minimum2 and Maximum2 value over the interval."); + attrs.DisplayName = LocalizedText("Range2"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2351"); + node.BrowseName = ToQualifiedName("AnnotationCount"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the number of Annotations in the interval."); + attrs.DisplayName = LocalizedText("AnnotationCount"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2352"); + node.BrowseName = ToQualifiedName("Count"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the number of raw values over the interval."); + attrs.DisplayName = LocalizedText("Count"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11307"); + node.BrowseName = ToQualifiedName("DurationInStateZero"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the time a Boolean or numeric was in a zero state using Simple Bounding Values."); + attrs.DisplayName = LocalizedText("DurationInStateZero"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11308"); + node.BrowseName = ToQualifiedName("DurationInStateNonZero"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the time a Boolean or numeric was in a non-zero state using Simple Bounding Values."); + attrs.DisplayName = LocalizedText("DurationInStateNonZero"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2355"); + node.BrowseName = ToQualifiedName("NumberOfTransitions"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the number of changes between zero and non-zero that a Boolean or Numeric value experienced in the interval."); + attrs.DisplayName = LocalizedText("NumberOfTransitions"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2357"); + node.BrowseName = ToQualifiedName("Start"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the value at the beginning of the interval using Interpolated Bounding Values."); + attrs.DisplayName = LocalizedText("Start"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2358"); + node.BrowseName = ToQualifiedName("End"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the value at the end of the interval using Interpolated Bounding Values."); + attrs.DisplayName = LocalizedText("End"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2359"); + node.BrowseName = ToQualifiedName("Delta"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the difference between the Start and End value in the interval."); + attrs.DisplayName = LocalizedText("Delta"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11505"); + node.BrowseName = ToQualifiedName("StartBound"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the value at the beginning of the interval using Simple Bounding Values."); + attrs.DisplayName = LocalizedText("StartBound"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11506"); + node.BrowseName = ToQualifiedName("EndBound"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the value at the end of the interval using Simple Bounding Values."); + attrs.DisplayName = LocalizedText("EndBound"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11507"); + node.BrowseName = ToQualifiedName("DeltaBounds"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the difference between the StartBound and EndBound value in the interval."); + attrs.DisplayName = LocalizedText("DeltaBounds"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2360"); + node.BrowseName = ToQualifiedName("DurationGood"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the total duration of time in the interval during which the data is good."); + attrs.DisplayName = LocalizedText("DurationGood"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2361"); + node.BrowseName = ToQualifiedName("DurationBad"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the total duration of time in the interval during which the data is bad."); + attrs.DisplayName = LocalizedText("DurationBad"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2362"); + node.BrowseName = ToQualifiedName("PercentGood"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the percent of data (0 to 100) in the interval which has a good StatusCode."); + attrs.DisplayName = LocalizedText("PercentGood"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2363"); + node.BrowseName = ToQualifiedName("PercentBad"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the percent of data (0 to 100) in the interval which has a bad StatusCode."); + attrs.DisplayName = LocalizedText("PercentBad"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2364"); + node.BrowseName = ToQualifiedName("WorstQuality"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the worst StatusCode of data in the interval."); + attrs.DisplayName = LocalizedText("WorstQuality"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11292"); + node.BrowseName = ToQualifiedName("WorstQuality2"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the worst StatusCode of data in the interval including the Simple Bounding Values."); + attrs.DisplayName = LocalizedText("WorstQuality2"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11426"); + node.BrowseName = ToQualifiedName("StandardDeviationSample"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the standard deviation for the interval for a sample of the population (n-1)."); + attrs.DisplayName = LocalizedText("StandardDeviationSample"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11427"); + node.BrowseName = ToQualifiedName("StandardDeviationPopulation"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the standard deviation for the interval for a complete population (n) which includes Simple Bounding Values."); + attrs.DisplayName = LocalizedText("StandardDeviationPopulation"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11428"); + node.BrowseName = ToQualifiedName("VarianceSample"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the variance for the interval as calculated by the StandardDeviationSample."); + attrs.DisplayName = LocalizedText("VarianceSample"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11429"); + node.BrowseName = ToQualifiedName("VariancePopulation"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=2340"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Retrieve the variance for the interval as calculated by the StandardDeviationPopulation which includes Simple Bounding Values."); + attrs.DisplayName = LocalizedText("VariancePopulation"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + +} } // namespace - + diff --git a/src/server/standard_address_space_part3.cpp b/src/server/standard_address_space_part3.cpp index 28094757..f2a39802 100644 --- a/src/server/standard_address_space_part3.cpp +++ b/src/server/standard_address_space_part3.cpp @@ -16,1389 +16,1389 @@ namespace OpcUa { - void CreateAddressSpacePart3(OpcUa::NodeManagementServices& registry) - { - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3062"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=58"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("The default binary encoding for a data type."); - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3063"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=58"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("The default XML encoding for a data type."); - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=24"); - node.BrowseName = ToQualifiedName("BaseDataType"); - node.Class = NodeClass::DataType; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that can have any valid DataType."); - attrs.DisplayName = LocalizedText("BaseDataType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=26"); - node.BrowseName = ToQualifiedName("Number"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that can have any numeric DataType."); - attrs.DisplayName = LocalizedText("Number"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=27"); - node.BrowseName = ToQualifiedName("Integer"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=26"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that can have any integer DataType."); - attrs.DisplayName = LocalizedText("Integer"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=28"); - node.BrowseName = ToQualifiedName("UInteger"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=27"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that can have any unsigned integer DataType."); - attrs.DisplayName = LocalizedText("UInteger"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=29"); - node.BrowseName = ToQualifiedName("Enumeration"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is an enumerated DataType."); - attrs.DisplayName = LocalizedText("Enumeration"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=1"); - node.BrowseName = ToQualifiedName("Boolean"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is either TRUE or FALSE."); - attrs.DisplayName = LocalizedText("Boolean"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2"); - node.BrowseName = ToQualifiedName("SByte"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=27"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is an integer between -128 and 127."); - attrs.DisplayName = LocalizedText("SByte"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3"); - node.BrowseName = ToQualifiedName("Byte"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=28"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is an integer between 0 and 255."); - attrs.DisplayName = LocalizedText("Byte"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=4"); - node.BrowseName = ToQualifiedName("Int16"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=27"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is an integer between −32,768 and 32,767."); - attrs.DisplayName = LocalizedText("Int16"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=5"); - node.BrowseName = ToQualifiedName("UInt16"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=28"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is an integer between 0 and 65535."); - attrs.DisplayName = LocalizedText("UInt16"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=6"); - node.BrowseName = ToQualifiedName("Int32"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=27"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is an integer between −2,147,483,648 and 2,147,483,647."); - attrs.DisplayName = LocalizedText("Int32"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7"); - node.BrowseName = ToQualifiedName("UInt32"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=28"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is an integer between 0 and 4,294,967,295."); - attrs.DisplayName = LocalizedText("UInt32"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8"); - node.BrowseName = ToQualifiedName("Int64"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=27"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is an integer between −9,223,372,036,854,775,808 and 9,223,372,036,854,775,807."); - attrs.DisplayName = LocalizedText("Int64"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9"); - node.BrowseName = ToQualifiedName("UInt64"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=28"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is an integer between 0 and 18,446,744,073,709,551,615."); - attrs.DisplayName = LocalizedText("UInt64"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10"); - node.BrowseName = ToQualifiedName("Float"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=26"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is an IEEE 754-1985 single precision floating point number."); - attrs.DisplayName = LocalizedText("Float"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11"); - node.BrowseName = ToQualifiedName("Double"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=26"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is an IEEE 754-1985 double precision floating point number."); - attrs.DisplayName = LocalizedText("Double"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12"); - node.BrowseName = ToQualifiedName("String"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is a sequence of printable Unicode characters."); - attrs.DisplayName = LocalizedText("String"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=13"); - node.BrowseName = ToQualifiedName("DateTime"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is a Gregorian calender date and time."); - attrs.DisplayName = LocalizedText("DateTime"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=14"); - node.BrowseName = ToQualifiedName("Guid"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is a 128-bit globally unique identifier."); - attrs.DisplayName = LocalizedText("Guid"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=15"); - node.BrowseName = ToQualifiedName("ByteString"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is a sequence of bytes."); - attrs.DisplayName = LocalizedText("ByteString"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=16"); - node.BrowseName = ToQualifiedName("XmlElement"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is an XML element."); - attrs.DisplayName = LocalizedText("XmlElement"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=17"); - node.BrowseName = ToQualifiedName("NodeId"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is an identifier for a node within a Server address space."); - attrs.DisplayName = LocalizedText("NodeId"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=20"); - node.BrowseName = ToQualifiedName("QualifiedName"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is a name qualified by a namespace."); - attrs.DisplayName = LocalizedText("QualifiedName"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=21"); - node.BrowseName = ToQualifiedName("LocalizedText"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is human readable Unicode text with a locale identifier."); - attrs.DisplayName = LocalizedText("LocalizedText"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=22"); - node.BrowseName = ToQualifiedName("Structure"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is any type of structure that can be described with a data encoding."); - attrs.DisplayName = LocalizedText("Structure"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=30"); - node.BrowseName = ToQualifiedName("Image"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=15"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is an image encoded as a string of bytes."); - attrs.DisplayName = LocalizedText("Image"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=31"); - node.BrowseName = ToQualifiedName("References"); - node.Class = NodeClass::ReferenceType; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The abstract base type for all references."); - attrs.DisplayName = LocalizedText("References"); - attrs.InverseName = LocalizedText("References"); - attrs.IsAbstract = true; - attrs.Symmetric = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=32"); - node.BrowseName = ToQualifiedName("NonHierarchicalReferences"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=31"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The abstract base type for all non-hierarchical references."); - attrs.DisplayName = LocalizedText("NonHierarchicalReferences"); - attrs.InverseName = LocalizedText("NonHierarchicalReferences"); - attrs.IsAbstract = true; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=33"); - node.BrowseName = ToQualifiedName("HierarchicalReferences"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=31"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The abstract base type for all hierarchical references."); - attrs.DisplayName = LocalizedText("HierarchicalReferences"); - attrs.InverseName = LocalizedText("HierarchicalReferences"); - attrs.IsAbstract = true; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=34"); - node.BrowseName = ToQualifiedName("HasChild"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=33"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The abstract base type for all non-looping hierarchical references."); - attrs.DisplayName = LocalizedText("HasChild"); - attrs.InverseName = LocalizedText("ChildOf"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=35"); - node.BrowseName = ToQualifiedName("Organizes"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=33"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for hierarchical references that are used to organize nodes."); - attrs.DisplayName = LocalizedText("Organizes"); - attrs.InverseName = LocalizedText("OrganizedBy"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=36"); - node.BrowseName = ToQualifiedName("HasEventSource"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=33"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for non-looping hierarchical references that are used to organize event sources."); - attrs.DisplayName = LocalizedText("HasEventSource"); - attrs.InverseName = LocalizedText("EventSourceOf"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=37"); - node.BrowseName = ToQualifiedName("HasModellingRule"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=32"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for references from instance declarations to modelling rule nodes."); - attrs.DisplayName = LocalizedText("HasModellingRule"); - attrs.InverseName = LocalizedText("ModellingRuleOf"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=38"); - node.BrowseName = ToQualifiedName("HasEncoding"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=32"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for references from data type nodes to to data type encoding nodes."); - attrs.DisplayName = LocalizedText("HasEncoding"); - attrs.InverseName = LocalizedText("EncodingOf"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=39"); - node.BrowseName = ToQualifiedName("HasDescription"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=32"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for references from data type encoding nodes to data type description nodes."); - attrs.DisplayName = LocalizedText("HasDescription"); - attrs.InverseName = LocalizedText("DescriptionOf"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=40"); - node.BrowseName = ToQualifiedName("HasTypeDefinition"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=32"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for references from a instance node its type defintion node."); - attrs.DisplayName = LocalizedText("HasTypeDefinition"); - attrs.InverseName = LocalizedText("TypeDefinitionOf"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=41"); - node.BrowseName = ToQualifiedName("GeneratesEvent"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=32"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for references from a node to an event type that is raised by node."); - attrs.DisplayName = LocalizedText("GeneratesEvent"); - attrs.InverseName = LocalizedText("GeneratesEvent"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3065"); - node.BrowseName = ToQualifiedName("AlwaysGeneratesEvent"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=32"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for references from a node to an event type that is always raised by node."); - attrs.DisplayName = LocalizedText("AlwaysGeneratesEvent"); - attrs.InverseName = LocalizedText("AlwaysGeneratesEvent"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=44"); - node.BrowseName = ToQualifiedName("Aggregates"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=34"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for non-looping hierarchical references that are used to aggregate nodes into complex types."); - attrs.DisplayName = LocalizedText("Aggregates"); - attrs.InverseName = LocalizedText("AggregatedBy"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=45"); - node.BrowseName = ToQualifiedName("HasSubtype"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=34"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for non-looping hierarchical references that are used to define sub types."); - attrs.DisplayName = LocalizedText("HasSubtype"); - attrs.InverseName = LocalizedText("HasSupertype"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=46"); - node.BrowseName = ToQualifiedName("HasProperty"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=44"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for non-looping hierarchical reference from a node to its property."); - attrs.DisplayName = LocalizedText("HasProperty"); - attrs.InverseName = LocalizedText("PropertyOf"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=47"); - node.BrowseName = ToQualifiedName("HasComponent"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=44"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for non-looping hierarchical reference from a node to its component."); - attrs.DisplayName = LocalizedText("HasComponent"); - attrs.InverseName = LocalizedText("ComponentOf"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=48"); - node.BrowseName = ToQualifiedName("HasNotifier"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=36"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for non-looping hierarchical references that are used to indicate how events propagate from node to node."); - attrs.DisplayName = LocalizedText("HasNotifier"); - attrs.InverseName = LocalizedText("NotifierOf"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=49"); - node.BrowseName = ToQualifiedName("HasOrderedComponent"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=47"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for non-looping hierarchical reference from a node to its component when the order of references matters."); - attrs.DisplayName = LocalizedText("HasOrderedComponent"); - attrs.InverseName = LocalizedText("OrderedComponentOf"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=120"); - node.BrowseName = ToQualifiedName("NamingRuleType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that specifies the significance of the BrowseName for an instance declaration."); - attrs.DisplayName = LocalizedText("NamingRuleType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=120"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12169"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12169"); - node.BrowseName = ToQualifiedName("EnumValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=120"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumValues"); - attrs.Type = ToNodeId("i=7594"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12169"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3068"); - node.BrowseName = ToQualifiedName("NodeVersion"); - node.Class = NodeClass::Variable; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The version number of the node (used to indicate changes to references of the owning node)."); - attrs.DisplayName = LocalizedText("NodeVersion"); - attrs.Type = ObjectId::String; - attrs.Rank = -2; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12170"); - node.BrowseName = ToQualifiedName("ViewVersion"); - node.Class = NodeClass::Variable; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The version number of the view."); - attrs.DisplayName = LocalizedText("ViewVersion"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -2; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3067"); - node.BrowseName = ToQualifiedName("Icon"); - node.Class = NodeClass::Variable; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A small image representing the object."); - attrs.DisplayName = LocalizedText("Icon"); - attrs.Type = ToNodeId("i=30"); - attrs.Rank = -2; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3069"); - node.BrowseName = ToQualifiedName("LocalTime"); - node.Class = NodeClass::Variable; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The local time where the owning variable value was collected."); - attrs.DisplayName = LocalizedText("LocalTime"); - attrs.Type = ToNodeId("i=8912"); - attrs.Rank = -2; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3070"); - node.BrowseName = ToQualifiedName("AllowNulls"); - node.Class = NodeClass::Variable; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Whether the value of the owning variable is allowed to be null."); - attrs.DisplayName = LocalizedText("AllowNulls"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -2; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11433"); - node.BrowseName = ToQualifiedName("ValueAsText"); - node.Class = NodeClass::Variable; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The string representation of the current value for a variable with an enumerated data type."); - attrs.DisplayName = LocalizedText("ValueAsText"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -2; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11498"); - node.BrowseName = ToQualifiedName("MaxStringLength"); - node.Class = NodeClass::Variable; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum length for a string that can be stored in the owning variable."); - attrs.DisplayName = LocalizedText("MaxStringLength"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -2; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11512"); - node.BrowseName = ToQualifiedName("MaxArrayLength"); - node.Class = NodeClass::Variable; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum length for an array that can be stored in the owning variable."); - attrs.DisplayName = LocalizedText("MaxArrayLength"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -2; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11513"); - node.BrowseName = ToQualifiedName("EngineeringUnits"); - node.Class = NodeClass::Variable; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The engineering units for the value of the owning variable."); - attrs.DisplayName = LocalizedText("EngineeringUnits"); - attrs.Type = ToNodeId("i=887"); - attrs.Rank = -2; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11432"); - node.BrowseName = ToQualifiedName("EnumStrings"); - node.Class = NodeClass::Variable; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The human readable strings associated with the values of an enumerated value (when values are sequential)."); - attrs.DisplayName = LocalizedText("EnumStrings"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3071"); - node.BrowseName = ToQualifiedName("EnumValues"); - node.Class = NodeClass::Variable; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The human readable strings associated with the values of an enumerated value (when values have no sequence)."); - attrs.DisplayName = LocalizedText("EnumValues"); - attrs.Type = ToNodeId("i=7594"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3072"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The input arguments for a method."); - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3073"); - node.BrowseName = ToQualifiedName("OutputArguments"); - node.Class = NodeClass::Variable; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The output arguments for a method."); - attrs.DisplayName = LocalizedText("OutputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2000"); - node.BrowseName = ToQualifiedName("ImageBMP"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=30"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("An image encoded in BMP format."); - attrs.DisplayName = LocalizedText("ImageBMP"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2001"); - node.BrowseName = ToQualifiedName("ImageGIF"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=30"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("An image encoded in GIF format."); - attrs.DisplayName = LocalizedText("ImageGIF"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2002"); - node.BrowseName = ToQualifiedName("ImageJPG"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=30"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("An image encoded in JPEG format."); - attrs.DisplayName = LocalizedText("ImageJPG"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2003"); - node.BrowseName = ToQualifiedName("ImagePNG"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=30"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("An image encoded in PNG format."); - attrs.DisplayName = LocalizedText("ImagePNG"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=256"); - node.BrowseName = ToQualifiedName("IdType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("The type of identifier used in a node id."); - attrs.DisplayName = LocalizedText("IdType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=256"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7591"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7591"); - node.BrowseName = ToQualifiedName("EnumStrings"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=256"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumStrings"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=7591"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=257"); - node.BrowseName = ToQualifiedName("NodeClass"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A mask specifying the class of the node."); - attrs.DisplayName = LocalizedText("NodeClass"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=257"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11878"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11878"); - node.BrowseName = ToQualifiedName("EnumValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=257"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumValues"); - attrs.Type = ToNodeId("i=7594"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11878"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=296"); - node.BrowseName = ToQualifiedName("Argument"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("An argument for a method."); - attrs.DisplayName = LocalizedText("Argument"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7594"); - node.BrowseName = ToQualifiedName("EnumValueType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A mapping between a value of an enumerated type and a name and description."); - attrs.DisplayName = LocalizedText("EnumValueType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=290"); - node.BrowseName = ToQualifiedName("Duration"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=11"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A period of time measured in seconds."); - attrs.DisplayName = LocalizedText("Duration"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=294"); - node.BrowseName = ToQualifiedName("UtcTime"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=13"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A date/time value specified in Universal Coordinated Time (UTC)."); - attrs.DisplayName = LocalizedText("UtcTime"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=295"); - node.BrowseName = ToQualifiedName("LocaleId"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=12"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("An identifier for a user locale."); - attrs.DisplayName = LocalizedText("LocaleId"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8912"); - node.BrowseName = ToQualifiedName("TimeZoneDataType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("TimeZoneDataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=297"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=296"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=297"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8285"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7616"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=7594"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=7616"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8291"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8913"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=8912"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=8913"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8918"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=298"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=296"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=298"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7650"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8251"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=7594"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=8251"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7656"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8917"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=8912"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=8917"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8914"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - } +void CreateAddressSpacePart3(OpcUa::NodeManagementServices & registry) +{ + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3062"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=58"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("The default binary encoding for a data type."); + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3063"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=58"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("The default XML encoding for a data type."); + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=24"); + node.BrowseName = ToQualifiedName("BaseDataType"); + node.Class = NodeClass::DataType; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that can have any valid DataType."); + attrs.DisplayName = LocalizedText("BaseDataType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=26"); + node.BrowseName = ToQualifiedName("Number"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that can have any numeric DataType."); + attrs.DisplayName = LocalizedText("Number"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=27"); + node.BrowseName = ToQualifiedName("Integer"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=26"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that can have any integer DataType."); + attrs.DisplayName = LocalizedText("Integer"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=28"); + node.BrowseName = ToQualifiedName("UInteger"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=27"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that can have any unsigned integer DataType."); + attrs.DisplayName = LocalizedText("UInteger"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=29"); + node.BrowseName = ToQualifiedName("Enumeration"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is an enumerated DataType."); + attrs.DisplayName = LocalizedText("Enumeration"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=1"); + node.BrowseName = ToQualifiedName("Boolean"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is either TRUE or FALSE."); + attrs.DisplayName = LocalizedText("Boolean"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2"); + node.BrowseName = ToQualifiedName("SByte"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=27"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is an integer between -128 and 127."); + attrs.DisplayName = LocalizedText("SByte"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3"); + node.BrowseName = ToQualifiedName("Byte"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=28"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is an integer between 0 and 255."); + attrs.DisplayName = LocalizedText("Byte"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=4"); + node.BrowseName = ToQualifiedName("Int16"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=27"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is an integer between −32,768 and 32,767."); + attrs.DisplayName = LocalizedText("Int16"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=5"); + node.BrowseName = ToQualifiedName("UInt16"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=28"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is an integer between 0 and 65535."); + attrs.DisplayName = LocalizedText("UInt16"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=6"); + node.BrowseName = ToQualifiedName("Int32"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=27"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is an integer between −2,147,483,648 and 2,147,483,647."); + attrs.DisplayName = LocalizedText("Int32"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7"); + node.BrowseName = ToQualifiedName("UInt32"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=28"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is an integer between 0 and 4,294,967,295."); + attrs.DisplayName = LocalizedText("UInt32"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8"); + node.BrowseName = ToQualifiedName("Int64"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=27"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is an integer between −9,223,372,036,854,775,808 and 9,223,372,036,854,775,807."); + attrs.DisplayName = LocalizedText("Int64"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9"); + node.BrowseName = ToQualifiedName("UInt64"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=28"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is an integer between 0 and 18,446,744,073,709,551,615."); + attrs.DisplayName = LocalizedText("UInt64"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10"); + node.BrowseName = ToQualifiedName("Float"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=26"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is an IEEE 754-1985 single precision floating point number."); + attrs.DisplayName = LocalizedText("Float"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11"); + node.BrowseName = ToQualifiedName("Double"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=26"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is an IEEE 754-1985 double precision floating point number."); + attrs.DisplayName = LocalizedText("Double"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12"); + node.BrowseName = ToQualifiedName("String"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is a sequence of printable Unicode characters."); + attrs.DisplayName = LocalizedText("String"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=13"); + node.BrowseName = ToQualifiedName("DateTime"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is a Gregorian calender date and time."); + attrs.DisplayName = LocalizedText("DateTime"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=14"); + node.BrowseName = ToQualifiedName("Guid"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is a 128-bit globally unique identifier."); + attrs.DisplayName = LocalizedText("Guid"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=15"); + node.BrowseName = ToQualifiedName("ByteString"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is a sequence of bytes."); + attrs.DisplayName = LocalizedText("ByteString"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=16"); + node.BrowseName = ToQualifiedName("XmlElement"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is an XML element."); + attrs.DisplayName = LocalizedText("XmlElement"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=17"); + node.BrowseName = ToQualifiedName("NodeId"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is an identifier for a node within a Server address space."); + attrs.DisplayName = LocalizedText("NodeId"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=20"); + node.BrowseName = ToQualifiedName("QualifiedName"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is a name qualified by a namespace."); + attrs.DisplayName = LocalizedText("QualifiedName"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=21"); + node.BrowseName = ToQualifiedName("LocalizedText"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is human readable Unicode text with a locale identifier."); + attrs.DisplayName = LocalizedText("LocalizedText"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=22"); + node.BrowseName = ToQualifiedName("Structure"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is any type of structure that can be described with a data encoding."); + attrs.DisplayName = LocalizedText("Structure"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=30"); + node.BrowseName = ToQualifiedName("Image"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=15"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is an image encoded as a string of bytes."); + attrs.DisplayName = LocalizedText("Image"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=31"); + node.BrowseName = ToQualifiedName("References"); + node.Class = NodeClass::ReferenceType; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The abstract base type for all references."); + attrs.DisplayName = LocalizedText("References"); + attrs.InverseName = LocalizedText("References"); + attrs.IsAbstract = true; + attrs.Symmetric = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=32"); + node.BrowseName = ToQualifiedName("NonHierarchicalReferences"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=31"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The abstract base type for all non-hierarchical references."); + attrs.DisplayName = LocalizedText("NonHierarchicalReferences"); + attrs.InverseName = LocalizedText("NonHierarchicalReferences"); + attrs.IsAbstract = true; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=33"); + node.BrowseName = ToQualifiedName("HierarchicalReferences"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=31"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The abstract base type for all hierarchical references."); + attrs.DisplayName = LocalizedText("HierarchicalReferences"); + attrs.InverseName = LocalizedText("HierarchicalReferences"); + attrs.IsAbstract = true; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=34"); + node.BrowseName = ToQualifiedName("HasChild"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=33"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The abstract base type for all non-looping hierarchical references."); + attrs.DisplayName = LocalizedText("HasChild"); + attrs.InverseName = LocalizedText("ChildOf"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=35"); + node.BrowseName = ToQualifiedName("Organizes"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=33"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for hierarchical references that are used to organize nodes."); + attrs.DisplayName = LocalizedText("Organizes"); + attrs.InverseName = LocalizedText("OrganizedBy"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=36"); + node.BrowseName = ToQualifiedName("HasEventSource"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=33"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for non-looping hierarchical references that are used to organize event sources."); + attrs.DisplayName = LocalizedText("HasEventSource"); + attrs.InverseName = LocalizedText("EventSourceOf"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=37"); + node.BrowseName = ToQualifiedName("HasModellingRule"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=32"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for references from instance declarations to modelling rule nodes."); + attrs.DisplayName = LocalizedText("HasModellingRule"); + attrs.InverseName = LocalizedText("ModellingRuleOf"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=38"); + node.BrowseName = ToQualifiedName("HasEncoding"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=32"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for references from data type nodes to to data type encoding nodes."); + attrs.DisplayName = LocalizedText("HasEncoding"); + attrs.InverseName = LocalizedText("EncodingOf"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=39"); + node.BrowseName = ToQualifiedName("HasDescription"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=32"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for references from data type encoding nodes to data type description nodes."); + attrs.DisplayName = LocalizedText("HasDescription"); + attrs.InverseName = LocalizedText("DescriptionOf"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=40"); + node.BrowseName = ToQualifiedName("HasTypeDefinition"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=32"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for references from a instance node its type defintion node."); + attrs.DisplayName = LocalizedText("HasTypeDefinition"); + attrs.InverseName = LocalizedText("TypeDefinitionOf"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=41"); + node.BrowseName = ToQualifiedName("GeneratesEvent"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=32"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for references from a node to an event type that is raised by node."); + attrs.DisplayName = LocalizedText("GeneratesEvent"); + attrs.InverseName = LocalizedText("GeneratesEvent"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3065"); + node.BrowseName = ToQualifiedName("AlwaysGeneratesEvent"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=32"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for references from a node to an event type that is always raised by node."); + attrs.DisplayName = LocalizedText("AlwaysGeneratesEvent"); + attrs.InverseName = LocalizedText("AlwaysGeneratesEvent"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=44"); + node.BrowseName = ToQualifiedName("Aggregates"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=34"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for non-looping hierarchical references that are used to aggregate nodes into complex types."); + attrs.DisplayName = LocalizedText("Aggregates"); + attrs.InverseName = LocalizedText("AggregatedBy"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=45"); + node.BrowseName = ToQualifiedName("HasSubtype"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=34"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for non-looping hierarchical references that are used to define sub types."); + attrs.DisplayName = LocalizedText("HasSubtype"); + attrs.InverseName = LocalizedText("HasSupertype"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=46"); + node.BrowseName = ToQualifiedName("HasProperty"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=44"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for non-looping hierarchical reference from a node to its property."); + attrs.DisplayName = LocalizedText("HasProperty"); + attrs.InverseName = LocalizedText("PropertyOf"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=47"); + node.BrowseName = ToQualifiedName("HasComponent"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=44"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for non-looping hierarchical reference from a node to its component."); + attrs.DisplayName = LocalizedText("HasComponent"); + attrs.InverseName = LocalizedText("ComponentOf"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=48"); + node.BrowseName = ToQualifiedName("HasNotifier"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=36"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for non-looping hierarchical references that are used to indicate how events propagate from node to node."); + attrs.DisplayName = LocalizedText("HasNotifier"); + attrs.InverseName = LocalizedText("NotifierOf"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=49"); + node.BrowseName = ToQualifiedName("HasOrderedComponent"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=47"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for non-looping hierarchical reference from a node to its component when the order of references matters."); + attrs.DisplayName = LocalizedText("HasOrderedComponent"); + attrs.InverseName = LocalizedText("OrderedComponentOf"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=120"); + node.BrowseName = ToQualifiedName("NamingRuleType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that specifies the significance of the BrowseName for an instance declaration."); + attrs.DisplayName = LocalizedText("NamingRuleType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=120"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12169"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12169"); + node.BrowseName = ToQualifiedName("EnumValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=120"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumValues"); + attrs.Type = ToNodeId("i=7594"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12169"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3068"); + node.BrowseName = ToQualifiedName("NodeVersion"); + node.Class = NodeClass::Variable; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The version number of the node (used to indicate changes to references of the owning node)."); + attrs.DisplayName = LocalizedText("NodeVersion"); + attrs.Type = ObjectId::String; + attrs.Rank = -2; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12170"); + node.BrowseName = ToQualifiedName("ViewVersion"); + node.Class = NodeClass::Variable; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The version number of the view."); + attrs.DisplayName = LocalizedText("ViewVersion"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -2; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3067"); + node.BrowseName = ToQualifiedName("Icon"); + node.Class = NodeClass::Variable; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A small image representing the object."); + attrs.DisplayName = LocalizedText("Icon"); + attrs.Type = ToNodeId("i=30"); + attrs.Rank = -2; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3069"); + node.BrowseName = ToQualifiedName("LocalTime"); + node.Class = NodeClass::Variable; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The local time where the owning variable value was collected."); + attrs.DisplayName = LocalizedText("LocalTime"); + attrs.Type = ToNodeId("i=8912"); + attrs.Rank = -2; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3070"); + node.BrowseName = ToQualifiedName("AllowNulls"); + node.Class = NodeClass::Variable; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Whether the value of the owning variable is allowed to be null."); + attrs.DisplayName = LocalizedText("AllowNulls"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -2; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11433"); + node.BrowseName = ToQualifiedName("ValueAsText"); + node.Class = NodeClass::Variable; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The string representation of the current value for a variable with an enumerated data type."); + attrs.DisplayName = LocalizedText("ValueAsText"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -2; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11498"); + node.BrowseName = ToQualifiedName("MaxStringLength"); + node.Class = NodeClass::Variable; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum length for a string that can be stored in the owning variable."); + attrs.DisplayName = LocalizedText("MaxStringLength"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -2; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11512"); + node.BrowseName = ToQualifiedName("MaxArrayLength"); + node.Class = NodeClass::Variable; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum length for an array that can be stored in the owning variable."); + attrs.DisplayName = LocalizedText("MaxArrayLength"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -2; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11513"); + node.BrowseName = ToQualifiedName("EngineeringUnits"); + node.Class = NodeClass::Variable; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The engineering units for the value of the owning variable."); + attrs.DisplayName = LocalizedText("EngineeringUnits"); + attrs.Type = ToNodeId("i=887"); + attrs.Rank = -2; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11432"); + node.BrowseName = ToQualifiedName("EnumStrings"); + node.Class = NodeClass::Variable; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The human readable strings associated with the values of an enumerated value (when values are sequential)."); + attrs.DisplayName = LocalizedText("EnumStrings"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3071"); + node.BrowseName = ToQualifiedName("EnumValues"); + node.Class = NodeClass::Variable; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The human readable strings associated with the values of an enumerated value (when values have no sequence)."); + attrs.DisplayName = LocalizedText("EnumValues"); + attrs.Type = ToNodeId("i=7594"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3072"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The input arguments for a method."); + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3073"); + node.BrowseName = ToQualifiedName("OutputArguments"); + node.Class = NodeClass::Variable; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The output arguments for a method."); + attrs.DisplayName = LocalizedText("OutputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2000"); + node.BrowseName = ToQualifiedName("ImageBMP"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=30"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("An image encoded in BMP format."); + attrs.DisplayName = LocalizedText("ImageBMP"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2001"); + node.BrowseName = ToQualifiedName("ImageGIF"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=30"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("An image encoded in GIF format."); + attrs.DisplayName = LocalizedText("ImageGIF"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2002"); + node.BrowseName = ToQualifiedName("ImageJPG"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=30"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("An image encoded in JPEG format."); + attrs.DisplayName = LocalizedText("ImageJPG"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2003"); + node.BrowseName = ToQualifiedName("ImagePNG"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=30"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("An image encoded in PNG format."); + attrs.DisplayName = LocalizedText("ImagePNG"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=256"); + node.BrowseName = ToQualifiedName("IdType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("The type of identifier used in a node id."); + attrs.DisplayName = LocalizedText("IdType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=256"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7591"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7591"); + node.BrowseName = ToQualifiedName("EnumStrings"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=256"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumStrings"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=7591"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=257"); + node.BrowseName = ToQualifiedName("NodeClass"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A mask specifying the class of the node."); + attrs.DisplayName = LocalizedText("NodeClass"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=257"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11878"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11878"); + node.BrowseName = ToQualifiedName("EnumValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=257"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumValues"); + attrs.Type = ToNodeId("i=7594"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11878"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=296"); + node.BrowseName = ToQualifiedName("Argument"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("An argument for a method."); + attrs.DisplayName = LocalizedText("Argument"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7594"); + node.BrowseName = ToQualifiedName("EnumValueType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A mapping between a value of an enumerated type and a name and description."); + attrs.DisplayName = LocalizedText("EnumValueType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=290"); + node.BrowseName = ToQualifiedName("Duration"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=11"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A period of time measured in seconds."); + attrs.DisplayName = LocalizedText("Duration"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=294"); + node.BrowseName = ToQualifiedName("UtcTime"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=13"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A date/time value specified in Universal Coordinated Time (UTC)."); + attrs.DisplayName = LocalizedText("UtcTime"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=295"); + node.BrowseName = ToQualifiedName("LocaleId"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=12"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("An identifier for a user locale."); + attrs.DisplayName = LocalizedText("LocaleId"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8912"); + node.BrowseName = ToQualifiedName("TimeZoneDataType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("TimeZoneDataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=297"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=296"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=297"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8285"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7616"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=7594"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=7616"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8291"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8913"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=8912"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=8913"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8918"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=298"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=296"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=298"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7650"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8251"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=7594"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=8251"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7656"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8917"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=8912"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=8917"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8914"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + +} } // namespace - + diff --git a/src/server/standard_address_space_part4.cpp b/src/server/standard_address_space_part4.cpp index 8461c277..6ea46514 100644 --- a/src/server/standard_address_space_part4.cpp +++ b/src/server/standard_address_space_part4.cpp @@ -16,2644 +16,2644 @@ namespace OpcUa { - void CreateAddressSpacePart4(OpcUa::NodeManagementServices& registry) - { - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=18"); - node.BrowseName = ToQualifiedName("ExpandedNodeId"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is an absolute identifier for a node."); - attrs.DisplayName = LocalizedText("ExpandedNodeId"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=19"); - node.BrowseName = ToQualifiedName("StatusCode"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is a code representing the outcome of an operation by a Server."); - attrs.DisplayName = LocalizedText("StatusCode"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=23"); - node.BrowseName = ToQualifiedName("DataValue"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is a structure containing a value, a status code and timestamps."); - attrs.DisplayName = LocalizedText("DataValue"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=25"); - node.BrowseName = ToQualifiedName("DiagnosticInfo"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=24"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a value that is a structure containing diagnostics associated with a StatusCode."); - attrs.DisplayName = LocalizedText("DiagnosticInfo"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=288"); - node.BrowseName = ToQualifiedName("IntegerId"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=7"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A numeric identifier for an object."); - attrs.DisplayName = LocalizedText("IntegerId"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=307"); - node.BrowseName = ToQualifiedName("ApplicationType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("The types of applications."); - attrs.DisplayName = LocalizedText("ApplicationType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=307"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7597"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7597"); - node.BrowseName = ToQualifiedName("EnumStrings"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=307"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumStrings"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=7597"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=308"); - node.BrowseName = ToQualifiedName("ApplicationDescription"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes an application and how to find it."); - attrs.DisplayName = LocalizedText("ApplicationDescription"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=311"); - node.BrowseName = ToQualifiedName("ApplicationInstanceCertificate"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=15"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A certificate for an instance of an application."); - attrs.DisplayName = LocalizedText("ApplicationInstanceCertificate"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=302"); - node.BrowseName = ToQualifiedName("MessageSecurityMode"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("The type of security to use on a message."); - attrs.DisplayName = LocalizedText("MessageSecurityMode"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=302"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7595"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7595"); - node.BrowseName = ToQualifiedName("EnumStrings"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=302"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumStrings"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=7595"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=303"); - node.BrowseName = ToQualifiedName("UserTokenType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("The possible user token types."); - attrs.DisplayName = LocalizedText("UserTokenType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=303"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7596"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7596"); - node.BrowseName = ToQualifiedName("EnumStrings"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=303"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumStrings"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=7596"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=304"); - node.BrowseName = ToQualifiedName("UserTokenPolicy"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Describes a user token that can be used with a server."); - attrs.DisplayName = LocalizedText("UserTokenPolicy"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=312"); - node.BrowseName = ToQualifiedName("EndpointDescription"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("The description of a endpoint that can be used to access a server."); - attrs.DisplayName = LocalizedText("EndpointDescription"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=432"); - node.BrowseName = ToQualifiedName("RegisteredServer"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("The information required to register a server with a discovery server."); - attrs.DisplayName = LocalizedText("RegisteredServer"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=315"); - node.BrowseName = ToQualifiedName("SecurityTokenRequestType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Indicates whether a token if being created or renewed."); - attrs.DisplayName = LocalizedText("SecurityTokenRequestType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=315"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7598"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7598"); - node.BrowseName = ToQualifiedName("EnumStrings"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=315"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumStrings"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=7598"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=344"); - node.BrowseName = ToQualifiedName("SignedSoftwareCertificate"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A software certificate with a digital signature."); - attrs.DisplayName = LocalizedText("SignedSoftwareCertificate"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=388"); - node.BrowseName = ToQualifiedName("SessionAuthenticationToken"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=17"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A unique identifier for a session used to authenticate requests."); - attrs.DisplayName = LocalizedText("SessionAuthenticationToken"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=316"); - node.BrowseName = ToQualifiedName("UserIdentityToken"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A base type for a user identity token."); - attrs.DisplayName = LocalizedText("UserIdentityToken"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=319"); - node.BrowseName = ToQualifiedName("AnonymousIdentityToken"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=316"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A token representing an anonymous user."); - attrs.DisplayName = LocalizedText("AnonymousIdentityToken"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=322"); - node.BrowseName = ToQualifiedName("UserNameIdentityToken"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=316"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A token representing a user identified by a user name and password."); - attrs.DisplayName = LocalizedText("UserNameIdentityToken"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=325"); - node.BrowseName = ToQualifiedName("X509IdentityToken"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=316"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A token representing a user identified by an X509 certificate."); - attrs.DisplayName = LocalizedText("X509IdentityToken"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=938"); - node.BrowseName = ToQualifiedName("IssuedIdentityToken"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=316"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A token representing a user identified by a WS-Security XML token."); - attrs.DisplayName = LocalizedText("IssuedIdentityToken"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=348"); - node.BrowseName = ToQualifiedName("NodeAttributesMask"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("The bits used to specify default attributes for a new node."); - attrs.DisplayName = LocalizedText("NodeAttributesMask"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=348"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11881"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11881"); - node.BrowseName = ToQualifiedName("EnumValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=348"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumValues"); - attrs.Type = ToNodeId("i=7594"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11881"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=376"); - node.BrowseName = ToQualifiedName("AddNodesItem"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A request to add a node to the server address space."); - attrs.DisplayName = LocalizedText("AddNodesItem"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=379"); - node.BrowseName = ToQualifiedName("AddReferencesItem"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A request to add a reference to the server address space."); - attrs.DisplayName = LocalizedText("AddReferencesItem"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=382"); - node.BrowseName = ToQualifiedName("DeleteNodesItem"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A request to delete a node to the server address space."); - attrs.DisplayName = LocalizedText("DeleteNodesItem"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=385"); - node.BrowseName = ToQualifiedName("DeleteReferencesItem"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A request to delete a node from the server address space."); - attrs.DisplayName = LocalizedText("DeleteReferencesItem"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=347"); - node.BrowseName = ToQualifiedName("AttributeWriteMask"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Define bits used to indicate which attributes are writeable."); - attrs.DisplayName = LocalizedText("AttributeWriteMask"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=347"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11882"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11882"); - node.BrowseName = ToQualifiedName("EnumValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=347"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumValues"); - attrs.Type = ToNodeId("i=7594"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11882"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=521"); - node.BrowseName = ToQualifiedName("ContinuationPoint"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=15"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("An identifier for a suspended query or browse operation."); - attrs.DisplayName = LocalizedText("ContinuationPoint"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=289"); - node.BrowseName = ToQualifiedName("Counter"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=7"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A monotonically increasing value."); - attrs.DisplayName = LocalizedText("Counter"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=291"); - node.BrowseName = ToQualifiedName("NumericRange"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=12"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("Specifies a range of array indexes."); - attrs.DisplayName = LocalizedText("NumericRange"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=292"); - node.BrowseName = ToQualifiedName("Time"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=12"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A time value specified as HH:MM:SS.SSS."); - attrs.DisplayName = LocalizedText("Time"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=293"); - node.BrowseName = ToQualifiedName("Date"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=13"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A date value."); - attrs.DisplayName = LocalizedText("Date"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=331"); - node.BrowseName = ToQualifiedName("EndpointConfiguration"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("EndpointConfiguration"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=334"); - node.BrowseName = ToQualifiedName("ComplianceLevel"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ComplianceLevel"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=334"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7599"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7599"); - node.BrowseName = ToQualifiedName("EnumStrings"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=334"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumStrings"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=7599"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=335"); - node.BrowseName = ToQualifiedName("SupportedProfile"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SupportedProfile"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=341"); - node.BrowseName = ToQualifiedName("SoftwareCertificate"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SoftwareCertificate"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=576"); - node.BrowseName = ToQualifiedName("FilterOperator"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("FilterOperator"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=576"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7605"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7605"); - node.BrowseName = ToQualifiedName("EnumStrings"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=576"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumStrings"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=7605"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=583"); - node.BrowseName = ToQualifiedName("ContentFilterElement"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ContentFilterElement"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=586"); - node.BrowseName = ToQualifiedName("ContentFilter"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ContentFilter"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=589"); - node.BrowseName = ToQualifiedName("FilterOperand"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("FilterOperand"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=592"); - node.BrowseName = ToQualifiedName("ElementOperand"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=589"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ElementOperand"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=595"); - node.BrowseName = ToQualifiedName("LiteralOperand"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=589"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("LiteralOperand"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=598"); - node.BrowseName = ToQualifiedName("AttributeOperand"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=589"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AttributeOperand"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=601"); - node.BrowseName = ToQualifiedName("SimpleAttributeOperand"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=589"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SimpleAttributeOperand"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=659"); - node.BrowseName = ToQualifiedName("HistoryEvent"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("HistoryEvent"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11234"); - node.BrowseName = ToQualifiedName("HistoryUpdateType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("HistoryUpdateType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11234"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11884"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11884"); - node.BrowseName = ToQualifiedName("EnumValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11234"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumValues"); - attrs.Type = ToNodeId("i=7594"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11884"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11293"); - node.BrowseName = ToQualifiedName("PerformUpdateType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("PerformUpdateType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11293"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11885"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11885"); - node.BrowseName = ToQualifiedName("EnumValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11293"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumValues"); - attrs.Type = ToNodeId("i=7594"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11885"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=719"); - node.BrowseName = ToQualifiedName("MonitoringFilter"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("MonitoringFilter"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=725"); - node.BrowseName = ToQualifiedName("EventFilter"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=719"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("EventFilter"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=948"); - node.BrowseName = ToQualifiedName("AggregateConfiguration"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AggregateConfiguration"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=920"); - node.BrowseName = ToQualifiedName("HistoryEventFieldList"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("HistoryEventFieldList"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=309"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=308"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=309"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8300"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=305"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=304"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=305"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8297"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=313"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=312"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=313"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8303"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=433"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=432"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=433"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8417"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=345"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=344"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=345"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8333"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=317"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=316"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=317"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8306"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=320"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=319"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=320"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8309"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=323"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=322"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=323"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8312"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=326"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=325"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=326"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8315"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=939"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=938"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=939"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8318"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=377"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=376"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=377"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8363"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=380"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=379"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=380"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8366"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=383"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=382"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=383"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8369"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=386"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=385"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=386"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8372"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=332"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=331"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=332"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8321"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=336"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=335"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=336"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8324"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=342"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=341"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=342"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8330"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=584"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=583"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=584"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8564"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=587"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=586"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=587"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8567"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=590"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=589"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=590"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8570"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=593"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=592"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=593"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8573"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=596"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=595"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=596"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8576"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=599"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=598"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=599"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8579"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=602"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=601"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=602"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8582"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=660"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=659"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=660"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8639"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=720"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=719"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=720"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8702"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=726"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=725"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=726"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8708"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=949"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=948"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=949"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8711"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=921"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=920"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=921"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8807"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=310"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=308"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=310"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7665"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=306"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=304"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=306"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7662"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=314"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=312"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=314"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7668"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=434"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=432"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=434"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7782"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=346"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=344"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=346"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7698"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=318"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=316"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7671"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=321"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=319"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=321"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7674"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=324"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=322"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=324"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7677"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=327"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=325"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=327"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7680"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=940"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=938"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=940"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7683"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=378"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=376"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=378"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7728"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=381"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=379"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=381"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7731"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=384"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=382"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=384"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7734"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=387"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=385"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=387"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7737"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=333"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=331"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=333"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7686"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=337"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=335"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=337"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7689"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=343"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=341"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=343"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7695"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=585"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=583"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=585"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7929"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=588"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=586"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=588"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7932"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=591"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=589"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=591"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7935"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=594"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=592"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=594"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7938"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=597"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=595"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=597"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7941"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=600"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=598"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=600"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7944"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=603"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=601"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=603"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7947"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=661"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=659"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=661"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8004"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=721"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=719"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=721"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8067"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=727"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=725"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=727"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8073"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=950"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=948"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=950"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8076"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=922"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=920"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=922"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8172"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - } +void CreateAddressSpacePart4(OpcUa::NodeManagementServices & registry) +{ + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=18"); + node.BrowseName = ToQualifiedName("ExpandedNodeId"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is an absolute identifier for a node."); + attrs.DisplayName = LocalizedText("ExpandedNodeId"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=19"); + node.BrowseName = ToQualifiedName("StatusCode"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is a code representing the outcome of an operation by a Server."); + attrs.DisplayName = LocalizedText("StatusCode"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=23"); + node.BrowseName = ToQualifiedName("DataValue"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is a structure containing a value, a status code and timestamps."); + attrs.DisplayName = LocalizedText("DataValue"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=25"); + node.BrowseName = ToQualifiedName("DiagnosticInfo"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=24"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a value that is a structure containing diagnostics associated with a StatusCode."); + attrs.DisplayName = LocalizedText("DiagnosticInfo"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=288"); + node.BrowseName = ToQualifiedName("IntegerId"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=7"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A numeric identifier for an object."); + attrs.DisplayName = LocalizedText("IntegerId"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=307"); + node.BrowseName = ToQualifiedName("ApplicationType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("The types of applications."); + attrs.DisplayName = LocalizedText("ApplicationType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=307"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7597"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7597"); + node.BrowseName = ToQualifiedName("EnumStrings"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=307"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumStrings"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=7597"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=308"); + node.BrowseName = ToQualifiedName("ApplicationDescription"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes an application and how to find it."); + attrs.DisplayName = LocalizedText("ApplicationDescription"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=311"); + node.BrowseName = ToQualifiedName("ApplicationInstanceCertificate"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=15"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A certificate for an instance of an application."); + attrs.DisplayName = LocalizedText("ApplicationInstanceCertificate"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=302"); + node.BrowseName = ToQualifiedName("MessageSecurityMode"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("The type of security to use on a message."); + attrs.DisplayName = LocalizedText("MessageSecurityMode"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=302"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7595"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7595"); + node.BrowseName = ToQualifiedName("EnumStrings"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=302"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumStrings"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=7595"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=303"); + node.BrowseName = ToQualifiedName("UserTokenType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("The possible user token types."); + attrs.DisplayName = LocalizedText("UserTokenType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=303"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7596"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7596"); + node.BrowseName = ToQualifiedName("EnumStrings"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=303"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumStrings"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=7596"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=304"); + node.BrowseName = ToQualifiedName("UserTokenPolicy"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Describes a user token that can be used with a server."); + attrs.DisplayName = LocalizedText("UserTokenPolicy"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=312"); + node.BrowseName = ToQualifiedName("EndpointDescription"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("The description of a endpoint that can be used to access a server."); + attrs.DisplayName = LocalizedText("EndpointDescription"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=432"); + node.BrowseName = ToQualifiedName("RegisteredServer"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("The information required to register a server with a discovery server."); + attrs.DisplayName = LocalizedText("RegisteredServer"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=315"); + node.BrowseName = ToQualifiedName("SecurityTokenRequestType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Indicates whether a token if being created or renewed."); + attrs.DisplayName = LocalizedText("SecurityTokenRequestType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=315"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7598"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7598"); + node.BrowseName = ToQualifiedName("EnumStrings"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=315"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumStrings"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=7598"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=344"); + node.BrowseName = ToQualifiedName("SignedSoftwareCertificate"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A software certificate with a digital signature."); + attrs.DisplayName = LocalizedText("SignedSoftwareCertificate"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=388"); + node.BrowseName = ToQualifiedName("SessionAuthenticationToken"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=17"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A unique identifier for a session used to authenticate requests."); + attrs.DisplayName = LocalizedText("SessionAuthenticationToken"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=316"); + node.BrowseName = ToQualifiedName("UserIdentityToken"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A base type for a user identity token."); + attrs.DisplayName = LocalizedText("UserIdentityToken"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=319"); + node.BrowseName = ToQualifiedName("AnonymousIdentityToken"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=316"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A token representing an anonymous user."); + attrs.DisplayName = LocalizedText("AnonymousIdentityToken"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=322"); + node.BrowseName = ToQualifiedName("UserNameIdentityToken"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=316"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A token representing a user identified by a user name and password."); + attrs.DisplayName = LocalizedText("UserNameIdentityToken"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=325"); + node.BrowseName = ToQualifiedName("X509IdentityToken"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=316"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A token representing a user identified by an X509 certificate."); + attrs.DisplayName = LocalizedText("X509IdentityToken"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=938"); + node.BrowseName = ToQualifiedName("IssuedIdentityToken"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=316"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A token representing a user identified by a WS-Security XML token."); + attrs.DisplayName = LocalizedText("IssuedIdentityToken"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=348"); + node.BrowseName = ToQualifiedName("NodeAttributesMask"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("The bits used to specify default attributes for a new node."); + attrs.DisplayName = LocalizedText("NodeAttributesMask"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=348"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11881"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11881"); + node.BrowseName = ToQualifiedName("EnumValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=348"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumValues"); + attrs.Type = ToNodeId("i=7594"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11881"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=376"); + node.BrowseName = ToQualifiedName("AddNodesItem"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A request to add a node to the server address space."); + attrs.DisplayName = LocalizedText("AddNodesItem"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=379"); + node.BrowseName = ToQualifiedName("AddReferencesItem"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A request to add a reference to the server address space."); + attrs.DisplayName = LocalizedText("AddReferencesItem"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=382"); + node.BrowseName = ToQualifiedName("DeleteNodesItem"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A request to delete a node to the server address space."); + attrs.DisplayName = LocalizedText("DeleteNodesItem"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=385"); + node.BrowseName = ToQualifiedName("DeleteReferencesItem"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A request to delete a node from the server address space."); + attrs.DisplayName = LocalizedText("DeleteReferencesItem"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=347"); + node.BrowseName = ToQualifiedName("AttributeWriteMask"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Define bits used to indicate which attributes are writeable."); + attrs.DisplayName = LocalizedText("AttributeWriteMask"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=347"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11882"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11882"); + node.BrowseName = ToQualifiedName("EnumValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=347"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumValues"); + attrs.Type = ToNodeId("i=7594"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11882"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=521"); + node.BrowseName = ToQualifiedName("ContinuationPoint"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=15"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("An identifier for a suspended query or browse operation."); + attrs.DisplayName = LocalizedText("ContinuationPoint"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=289"); + node.BrowseName = ToQualifiedName("Counter"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=7"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A monotonically increasing value."); + attrs.DisplayName = LocalizedText("Counter"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=291"); + node.BrowseName = ToQualifiedName("NumericRange"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=12"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("Specifies a range of array indexes."); + attrs.DisplayName = LocalizedText("NumericRange"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=292"); + node.BrowseName = ToQualifiedName("Time"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=12"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A time value specified as HH:MM:SS.SSS."); + attrs.DisplayName = LocalizedText("Time"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=293"); + node.BrowseName = ToQualifiedName("Date"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=13"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A date value."); + attrs.DisplayName = LocalizedText("Date"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=331"); + node.BrowseName = ToQualifiedName("EndpointConfiguration"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("EndpointConfiguration"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=334"); + node.BrowseName = ToQualifiedName("ComplianceLevel"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ComplianceLevel"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=334"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7599"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7599"); + node.BrowseName = ToQualifiedName("EnumStrings"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=334"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumStrings"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=7599"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=335"); + node.BrowseName = ToQualifiedName("SupportedProfile"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SupportedProfile"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=341"); + node.BrowseName = ToQualifiedName("SoftwareCertificate"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SoftwareCertificate"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=576"); + node.BrowseName = ToQualifiedName("FilterOperator"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("FilterOperator"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=576"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7605"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7605"); + node.BrowseName = ToQualifiedName("EnumStrings"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=576"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumStrings"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=7605"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=583"); + node.BrowseName = ToQualifiedName("ContentFilterElement"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ContentFilterElement"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=586"); + node.BrowseName = ToQualifiedName("ContentFilter"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ContentFilter"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=589"); + node.BrowseName = ToQualifiedName("FilterOperand"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("FilterOperand"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=592"); + node.BrowseName = ToQualifiedName("ElementOperand"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=589"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ElementOperand"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=595"); + node.BrowseName = ToQualifiedName("LiteralOperand"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=589"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("LiteralOperand"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=598"); + node.BrowseName = ToQualifiedName("AttributeOperand"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=589"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AttributeOperand"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=601"); + node.BrowseName = ToQualifiedName("SimpleAttributeOperand"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=589"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SimpleAttributeOperand"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=659"); + node.BrowseName = ToQualifiedName("HistoryEvent"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("HistoryEvent"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11234"); + node.BrowseName = ToQualifiedName("HistoryUpdateType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("HistoryUpdateType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11234"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11884"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11884"); + node.BrowseName = ToQualifiedName("EnumValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11234"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumValues"); + attrs.Type = ToNodeId("i=7594"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11884"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11293"); + node.BrowseName = ToQualifiedName("PerformUpdateType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("PerformUpdateType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11293"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11885"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11885"); + node.BrowseName = ToQualifiedName("EnumValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11293"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumValues"); + attrs.Type = ToNodeId("i=7594"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11885"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=719"); + node.BrowseName = ToQualifiedName("MonitoringFilter"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("MonitoringFilter"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=725"); + node.BrowseName = ToQualifiedName("EventFilter"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=719"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("EventFilter"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=948"); + node.BrowseName = ToQualifiedName("AggregateConfiguration"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AggregateConfiguration"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=920"); + node.BrowseName = ToQualifiedName("HistoryEventFieldList"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("HistoryEventFieldList"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=309"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=308"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=309"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8300"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=305"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=304"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=305"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8297"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=313"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=312"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=313"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8303"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=433"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=432"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=433"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8417"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=345"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=344"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=345"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8333"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=317"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=316"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=317"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8306"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=320"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=319"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=320"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8309"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=323"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=322"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=323"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8312"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=326"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=325"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=326"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8315"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=939"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=938"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=939"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8318"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=377"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=376"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=377"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8363"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=380"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=379"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=380"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8366"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=383"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=382"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=383"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8369"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=386"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=385"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=386"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8372"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=332"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=331"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=332"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8321"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=336"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=335"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=336"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8324"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=342"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=341"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=342"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8330"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=584"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=583"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=584"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8564"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=587"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=586"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=587"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8567"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=590"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=589"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=590"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8570"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=593"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=592"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=593"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8573"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=596"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=595"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=596"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8576"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=599"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=598"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=599"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8579"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=602"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=601"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=602"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8582"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=660"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=659"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=660"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8639"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=720"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=719"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=720"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8702"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=726"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=725"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=726"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8708"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=949"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=948"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=949"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8711"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=921"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=920"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=921"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8807"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=310"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=308"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=310"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7665"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=306"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=304"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=306"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7662"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=314"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=312"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=314"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7668"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=434"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=432"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=434"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7782"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=346"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=344"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=346"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7698"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=318"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=316"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7671"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=321"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=319"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=321"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7674"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=324"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=322"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=324"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7677"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=327"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=325"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=327"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7680"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=940"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=938"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=940"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7683"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=378"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=376"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=378"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7728"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=381"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=379"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=381"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7731"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=384"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=382"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=384"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7734"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=387"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=385"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=387"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7737"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=333"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=331"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=333"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7686"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=337"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=335"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=337"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7689"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=343"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=341"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=343"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7695"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=585"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=583"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=585"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7929"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=588"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=586"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=588"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7932"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=591"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=589"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=591"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7935"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=594"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=592"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=594"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7938"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=597"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=595"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=597"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7941"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=600"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=598"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=600"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7944"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=603"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=601"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=603"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7947"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=661"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=659"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=661"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8004"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=721"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=719"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=721"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8067"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=727"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=725"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=727"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8073"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=950"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=948"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=950"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8076"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=922"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=920"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=922"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8172"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + +} } // namespace - + diff --git a/src/server/standard_address_space_part5.cpp b/src/server/standard_address_space_part5.cpp index 43dc3f3f..46e420ad 100644 --- a/src/server/standard_address_space_part5.cpp +++ b/src/server/standard_address_space_part5.cpp @@ -16,24895 +16,24895 @@ namespace OpcUa { - void CreateAddressSpacePart5(OpcUa::NodeManagementServices& registry) - { - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=51"); - node.BrowseName = ToQualifiedName("FromState"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=32"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for a reference to the state before a transition."); - attrs.DisplayName = LocalizedText("FromState"); - attrs.InverseName = LocalizedText("ToTransition"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=52"); - node.BrowseName = ToQualifiedName("ToState"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=32"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for a reference to the state after a transition."); - attrs.DisplayName = LocalizedText("ToState"); - attrs.InverseName = LocalizedText("FromTransition"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=53"); - node.BrowseName = ToQualifiedName("HasCause"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=32"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for a reference to a method that can cause a transition to occur."); - attrs.DisplayName = LocalizedText("HasCause"); - attrs.InverseName = LocalizedText("MayBeCausedBy"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=54"); - node.BrowseName = ToQualifiedName("HasEffect"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=32"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for a reference to an event that may be raised when a transition occurs."); - attrs.DisplayName = LocalizedText("HasEffect"); - attrs.InverseName = LocalizedText("MayBeEffectedBy"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=117"); - node.BrowseName = ToQualifiedName("HasSubStateMachine"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=32"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.Description = LocalizedText("The type for a reference to a substate for a state."); - attrs.DisplayName = LocalizedText("HasSubStateMachine"); - attrs.InverseName = LocalizedText("SubStateMachineOf"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=58"); - node.BrowseName = ToQualifiedName("BaseObjectType"); - node.Class = NodeClass::ObjectType; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("The base type for all object nodes."); - attrs.DisplayName = LocalizedText("BaseObjectType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=61"); - node.BrowseName = ToQualifiedName("FolderType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("The type for objects that organize other nodes."); - attrs.DisplayName = LocalizedText("FolderType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=62"); - node.BrowseName = ToQualifiedName("BaseVariableType"); - node.Class = NodeClass::VariableType; - VariableTypeAttributes attrs; - attrs.Description = LocalizedText("The abstract base type for all variable nodes."); - attrs.DisplayName = LocalizedText("BaseVariableType"); - attrs.Type = ObjectId::String; - attrs.Rank = -2; - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=63"); - node.BrowseName = ToQualifiedName("BaseDataVariableType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=62"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.Description = LocalizedText("The type for variable that represents a process value."); - attrs.DisplayName = LocalizedText("BaseDataVariableType"); - attrs.Type = ObjectId::String; - attrs.Rank = -2; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=68"); - node.BrowseName = ToQualifiedName("PropertyType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=62"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.Description = LocalizedText("The type for variable that represents a property of another node."); - attrs.DisplayName = LocalizedText("PropertyType"); - attrs.Type = ObjectId::String; - attrs.Rank = -2; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=69"); - node.BrowseName = ToQualifiedName("DataTypeDescriptionType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.Description = LocalizedText("The type for variable that represents the description of a data type encoding."); - attrs.DisplayName = LocalizedText("DataTypeDescriptionType"); - attrs.Type = ObjectId::String; - attrs.Rank = -2; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=69"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=104"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=69"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=105"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=104"); - node.BrowseName = ToQualifiedName("DataTypeVersion"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=69"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The version number for the data type description."); - attrs.DisplayName = LocalizedText("DataTypeVersion"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=104"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=105"); - node.BrowseName = ToQualifiedName("DictionaryFragment"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=69"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A fragment of a data type dictionary that defines the data type."); - attrs.DisplayName = LocalizedText("DictionaryFragment"); - attrs.Type = ObjectId::ByteString; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=105"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=72"); - node.BrowseName = ToQualifiedName("DataTypeDictionaryType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.Description = LocalizedText("The type for variable that represents the collection of data type decriptions."); - attrs.DisplayName = LocalizedText("DataTypeDictionaryType"); - attrs.Type = ObjectId::ByteString; - attrs.Rank = -2; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=72"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=106"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=72"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=107"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=106"); - node.BrowseName = ToQualifiedName("DataTypeVersion"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=72"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The version number for the data type dictionary."); - attrs.DisplayName = LocalizedText("DataTypeVersion"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=106"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=107"); - node.BrowseName = ToQualifiedName("NamespaceUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=72"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A URI that uniquely identifies the dictionary."); - attrs.DisplayName = LocalizedText("NamespaceUri"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=107"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=75"); - node.BrowseName = ToQualifiedName("DataTypeSystemType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("DataTypeSystemType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=76"); - node.BrowseName = ToQualifiedName("DataTypeEncodingType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("DataTypeEncodingType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=77"); - node.BrowseName = ToQualifiedName("ModellingRuleType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("The type for an object that describes how an instance declaration is used when a type is instantiated."); - attrs.DisplayName = LocalizedText("ModellingRuleType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=77"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=111"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=111"); - node.BrowseName = ToQualifiedName("NamingRule"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=77"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Specified the significances of the BrowseName when a type is instantiated."); - attrs.DisplayName = LocalizedText("NamingRule"); - attrs.Type = ToNodeId("i=120"); - attrs.Value = (int32_t) 1; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=111"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=78"); - node.BrowseName = ToQualifiedName("Mandatory"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=77"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Specifies that an instance with the attributes and references of the instance declaration must appear when a type is instantiated."); - attrs.DisplayName = LocalizedText("Mandatory"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=78"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=112"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=112"); - node.BrowseName = ToQualifiedName("NamingRule"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=78"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Specified the significances of the BrowseName when a type is instantiated."); - attrs.DisplayName = LocalizedText("NamingRule"); - attrs.Type = ToNodeId("i=120"); - attrs.Value = (int32_t) 1; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=80"); - node.BrowseName = ToQualifiedName("Optional"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=77"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Specifies that an instance with the attributes and references of the instance declaration may appear when a type is instantiated."); - attrs.DisplayName = LocalizedText("Optional"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=80"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=113"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=113"); - node.BrowseName = ToQualifiedName("NamingRule"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=80"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Specified the significances of the BrowseName when a type is instantiated."); - attrs.DisplayName = LocalizedText("NamingRule"); - attrs.Type = ToNodeId("i=120"); - attrs.Value = (int32_t) 2; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=83"); - node.BrowseName = ToQualifiedName("ExposesItsArray"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=77"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Specifies that an instance appears for each element of the containing array variable."); - attrs.DisplayName = LocalizedText("ExposesItsArray"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=83"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=114"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=114"); - node.BrowseName = ToQualifiedName("NamingRule"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=83"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Specified the significances of the BrowseName when a type is instantiated."); - attrs.DisplayName = LocalizedText("NamingRule"); - attrs.Type = ToNodeId("i=120"); - attrs.Value = (int32_t) 3; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=79"); - node.BrowseName = ToQualifiedName("MandatoryShared"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=77"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Specifies that a reference to a shared instance must appear in when a type is instantiated."); - attrs.DisplayName = LocalizedText("MandatoryShared"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=79"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=116"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=116"); - node.BrowseName = ToQualifiedName("NamingRule"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=79"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Specified the significances of the BrowseName when a type is instantiated."); - attrs.DisplayName = LocalizedText("NamingRule"); - attrs.Type = ToNodeId("i=120"); - attrs.Value = (int32_t) 1; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11508"); - node.BrowseName = ToQualifiedName("OptionalPlaceholder"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=77"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Specifies that zero or more instances with the attributes and references of the instance declaration may appear when a type is instantiated."); - attrs.DisplayName = LocalizedText("OptionalPlaceholder"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11508"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11509"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11509"); - node.BrowseName = ToQualifiedName("NamingRule"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11508"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Specified the significances of the BrowseName when a type is instantiated."); - attrs.DisplayName = LocalizedText("NamingRule"); - attrs.Type = ToNodeId("i=120"); - attrs.Value = (int32_t) 2; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11510"); - node.BrowseName = ToQualifiedName("MandatoryPlaceholder"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=77"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Specifies that one or more instances with the attributes and references of the instance declaration must appear when a type is instantiated."); - attrs.DisplayName = LocalizedText("MandatoryPlaceholder"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11510"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11511"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11511"); - node.BrowseName = ToQualifiedName("NamingRule"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11510"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Specified the significances of the BrowseName when a type is instantiated."); - attrs.DisplayName = LocalizedText("NamingRule"); - attrs.Type = ToNodeId("i=120"); - attrs.Value = (int32_t) 1; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=84"); - node.BrowseName = ToQualifiedName("Root"); - node.Class = NodeClass::Object; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("The root of the server address space."); - attrs.DisplayName = LocalizedText("Root"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=85"); - node.BrowseName = ToQualifiedName("Objects"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=84"); - node.ReferenceTypeId = ReferenceId::Organizes; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("The browse entry point when looking for objects in the server address space."); - attrs.DisplayName = LocalizedText("Objects"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=86"); - node.BrowseName = ToQualifiedName("Types"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=84"); - node.ReferenceTypeId = ReferenceId::Organizes; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("The browse entry point when looking for types in the server address space."); - attrs.DisplayName = LocalizedText("Types"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=87"); - node.BrowseName = ToQualifiedName("Views"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=84"); - node.ReferenceTypeId = ReferenceId::Organizes; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("The browse entry point when looking for views in the server address space."); - attrs.DisplayName = LocalizedText("Views"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=88"); - node.BrowseName = ToQualifiedName("ObjectTypes"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=86"); - node.ReferenceTypeId = ReferenceId::Organizes; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("The browse entry point when looking for object types in the server address space."); - attrs.DisplayName = LocalizedText("ObjectTypes"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::Organizes; - ref.SourceNodeId = ToNodeId("i=88"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=58"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=89"); - node.BrowseName = ToQualifiedName("VariableTypes"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=86"); - node.ReferenceTypeId = ReferenceId::Organizes; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("The browse entry point when looking for variable types in the server address space."); - attrs.DisplayName = LocalizedText("VariableTypes"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::Organizes; - ref.SourceNodeId = ToNodeId("i=89"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=62"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=90"); - node.BrowseName = ToQualifiedName("DataTypes"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=86"); - node.ReferenceTypeId = ReferenceId::Organizes; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("The browse entry point when looking for data types in the server address space."); - attrs.DisplayName = LocalizedText("DataTypes"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::Organizes; - ref.SourceNodeId = ToNodeId("i=90"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=24"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=91"); - node.BrowseName = ToQualifiedName("ReferenceTypes"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=86"); - node.ReferenceTypeId = ReferenceId::Organizes; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("The browse entry point when looking for reference types in the server address space."); - attrs.DisplayName = LocalizedText("ReferenceTypes"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::Organizes; - ref.SourceNodeId = ToNodeId("i=91"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=31"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=92"); - node.BrowseName = ToQualifiedName("XML Schema"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=90"); - node.ReferenceTypeId = ReferenceId::Organizes; - node.TypeDefinition = ToNodeId("i=75"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("A type system which uses XML schema to describe the encoding of data types."); - attrs.DisplayName = LocalizedText("XML Schema"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=93"); - node.BrowseName = ToQualifiedName("OPC Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=90"); - node.ReferenceTypeId = ReferenceId::Organizes; - node.TypeDefinition = ToNodeId("i=75"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("A type system which uses OPC binary schema to describe the encoding of data types."); - attrs.DisplayName = LocalizedText("OPC Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2004"); - node.BrowseName = ToQualifiedName("ServerType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("Specifies the current status and capabilities of the server."); - attrs.DisplayName = LocalizedText("ServerType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2004"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2005"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2004"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2006"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2004"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2007"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2004"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2008"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2004"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2742"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2004"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2009"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2004"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2010"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2004"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2011"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2004"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2012"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2004"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11527"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2004"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11489"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2005"); - node.BrowseName = ToQualifiedName("ServerArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2004"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The list of server URIs used by the server."); - attrs.DisplayName = LocalizedText("ServerArray"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2005"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2006"); - node.BrowseName = ToQualifiedName("NamespaceArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2004"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The list of namespace URIs used by the server."); - attrs.DisplayName = LocalizedText("NamespaceArray"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2006"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2007"); - node.BrowseName = ToQualifiedName("ServerStatus"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2004"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2138"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The current status of the server."); - attrs.DisplayName = LocalizedText("ServerStatus"); - attrs.Type = ToNodeId("i=862"); - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2007"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3074"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2007"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3075"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2007"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3076"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2007"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3077"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2007"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3084"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2007"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3085"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2007"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3074"); - node.BrowseName = ToQualifiedName("StartTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2007"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StartTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3074"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3075"); - node.BrowseName = ToQualifiedName("CurrentTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2007"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3075"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3076"); - node.BrowseName = ToQualifiedName("State"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2007"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("State"); - attrs.Type = ToNodeId("i=852"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3076"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3077"); - node.BrowseName = ToQualifiedName("BuildInfo"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2007"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=3051"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BuildInfo"); - attrs.Type = ToNodeId("i=338"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3077"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3078"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3077"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3079"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3077"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3080"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3077"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3081"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3077"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3082"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3077"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3083"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3077"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3078"); - node.BrowseName = ToQualifiedName("ProductUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3077"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ProductUri"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3078"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3079"); - node.BrowseName = ToQualifiedName("ManufacturerName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3077"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ManufacturerName"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3079"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3080"); - node.BrowseName = ToQualifiedName("ProductName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3077"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ProductName"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3080"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3081"); - node.BrowseName = ToQualifiedName("SoftwareVersion"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3077"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SoftwareVersion"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3081"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3082"); - node.BrowseName = ToQualifiedName("BuildNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3077"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BuildNumber"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3082"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3083"); - node.BrowseName = ToQualifiedName("BuildDate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3077"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BuildDate"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3083"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3084"); - node.BrowseName = ToQualifiedName("SecondsTillShutdown"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2007"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecondsTillShutdown"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3084"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3085"); - node.BrowseName = ToQualifiedName("ShutdownReason"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2007"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ShutdownReason"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3085"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2008"); - node.BrowseName = ToQualifiedName("ServiceLevel"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2004"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A value indicating the level of service the server can provide. 255 indicates the best."); - attrs.DisplayName = LocalizedText("ServiceLevel"); - attrs.Type = ObjectId::Byte; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2008"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2742"); - node.BrowseName = ToQualifiedName("Auditing"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2004"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A flag indicating whether the server is currently generating audit events."); - attrs.DisplayName = LocalizedText("Auditing"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2742"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2009"); - node.BrowseName = ToQualifiedName("ServerCapabilities"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2004"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2013"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Describes capabilities supported by the server."); - attrs.DisplayName = LocalizedText("ServerCapabilities"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2009"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3086"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2009"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3087"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2009"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3088"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2009"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3089"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2009"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3090"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2009"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3091"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2009"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3092"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2009"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3093"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2009"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3094"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2009"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3086"); - node.BrowseName = ToQualifiedName("ServerProfileArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2009"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of profiles supported by the server."); - attrs.DisplayName = LocalizedText("ServerProfileArray"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3086"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3087"); - node.BrowseName = ToQualifiedName("LocaleIdArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2009"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of locales supported by the server."); - attrs.DisplayName = LocalizedText("LocaleIdArray"); - attrs.Type = ToNodeId("i=295"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3087"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3088"); - node.BrowseName = ToQualifiedName("MinSupportedSampleRate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2009"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The minimum sampling interval supported by the server."); - attrs.DisplayName = LocalizedText("MinSupportedSampleRate"); - attrs.Type = ToNodeId("i=290"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3088"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3089"); - node.BrowseName = ToQualifiedName("MaxBrowseContinuationPoints"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2009"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of continuation points for Browse operations per session."); - attrs.DisplayName = LocalizedText("MaxBrowseContinuationPoints"); - attrs.Type = ObjectId::UInt16; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3089"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3090"); - node.BrowseName = ToQualifiedName("MaxQueryContinuationPoints"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2009"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of continuation points for Query operations per session."); - attrs.DisplayName = LocalizedText("MaxQueryContinuationPoints"); - attrs.Type = ObjectId::UInt16; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3090"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3091"); - node.BrowseName = ToQualifiedName("MaxHistoryContinuationPoints"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2009"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of continuation points for ReadHistory operations per session."); - attrs.DisplayName = LocalizedText("MaxHistoryContinuationPoints"); - attrs.Type = ObjectId::UInt16; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3091"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3092"); - node.BrowseName = ToQualifiedName("SoftwareCertificates"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2009"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The software certificates owned by the server."); - attrs.DisplayName = LocalizedText("SoftwareCertificates"); - attrs.Type = ToNodeId("i=344"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3092"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3093"); - node.BrowseName = ToQualifiedName("ModellingRules"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2009"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("A folder for the modelling rules supported by the server."); - attrs.DisplayName = LocalizedText("ModellingRules"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3093"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3094"); - node.BrowseName = ToQualifiedName("AggregateFunctions"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2009"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("A folder for the real time aggregates supported by the server."); - attrs.DisplayName = LocalizedText("AggregateFunctions"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3094"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2010"); - node.BrowseName = ToQualifiedName("ServerDiagnostics"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2004"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2020"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Reports diagnostics about the server."); - attrs.DisplayName = LocalizedText("ServerDiagnostics"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2010"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3095"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2010"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3110"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2010"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3111"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2010"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3114"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2010"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3095"); - node.BrowseName = ToQualifiedName("ServerDiagnosticsSummary"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2010"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2150"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A summary of server level diagnostics."); - attrs.DisplayName = LocalizedText("ServerDiagnosticsSummary"); - attrs.Type = ToNodeId("i=859"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3095"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3096"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3095"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3097"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3095"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3098"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3095"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3099"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3095"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3100"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3095"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3101"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3095"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3102"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3095"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3104"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3095"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3105"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3095"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3106"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3095"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3107"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3095"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3108"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3095"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3096"); - node.BrowseName = ToQualifiedName("ServerViewCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3095"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ServerViewCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3096"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3097"); - node.BrowseName = ToQualifiedName("CurrentSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3095"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3097"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3098"); - node.BrowseName = ToQualifiedName("CumulatedSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3095"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CumulatedSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3099"); - node.BrowseName = ToQualifiedName("SecurityRejectedSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3095"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecurityRejectedSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3099"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3100"); - node.BrowseName = ToQualifiedName("RejectedSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3095"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RejectedSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3100"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3101"); - node.BrowseName = ToQualifiedName("SessionTimeoutCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3095"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionTimeoutCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3101"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3102"); - node.BrowseName = ToQualifiedName("SessionAbortCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3095"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionAbortCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3102"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3104"); - node.BrowseName = ToQualifiedName("PublishingIntervalCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3095"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PublishingIntervalCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3104"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3105"); - node.BrowseName = ToQualifiedName("CurrentSubscriptionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3095"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentSubscriptionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3105"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3106"); - node.BrowseName = ToQualifiedName("CumulatedSubscriptionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3095"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CumulatedSubscriptionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3106"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3107"); - node.BrowseName = ToQualifiedName("SecurityRejectedRequestsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3095"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecurityRejectedRequestsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3107"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3108"); - node.BrowseName = ToQualifiedName("RejectedRequestsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3095"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RejectedRequestsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3108"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3110"); - node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2010"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2171"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of diagnostics for each active subscription."); - attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsArray"); - attrs.Type = ToNodeId("i=874"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3110"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3111"); - node.BrowseName = ToQualifiedName("SessionsDiagnosticsSummary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2010"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2026"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("A summary of session level diagnostics."); - attrs.DisplayName = LocalizedText("SessionsDiagnosticsSummary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3111"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3112"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3111"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3113"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3111"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3112"); - node.BrowseName = ToQualifiedName("SessionDiagnosticsArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3111"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2196"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of diagnostics for each active session."); - attrs.DisplayName = LocalizedText("SessionDiagnosticsArray"); - attrs.Type = ToNodeId("i=865"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3112"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3113"); - node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3111"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2243"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of security related diagnostics for each active session."); - attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsArray"); - attrs.Type = ToNodeId("i=868"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3113"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3114"); - node.BrowseName = ToQualifiedName("EnabledFlag"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2010"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("If TRUE the diagnostics collection is enabled."); - attrs.DisplayName = LocalizedText("EnabledFlag"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - attrs.AccessLevel = (VariableAccessLevel) 3; - attrs.UserAccessLevel = (VariableAccessLevel) 3; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3114"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2011"); - node.BrowseName = ToQualifiedName("VendorServerInfo"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2004"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2033"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Server information provided by the vendor."); - attrs.DisplayName = LocalizedText("VendorServerInfo"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2011"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2012"); - node.BrowseName = ToQualifiedName("ServerRedundancy"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2004"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2034"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Describes the redundancy capabilities of the server."); - attrs.DisplayName = LocalizedText("ServerRedundancy"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2012"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3115"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2012"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3115"); - node.BrowseName = ToQualifiedName("RedundancySupport"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2012"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Indicates what style of redundancy is supported by the server."); - attrs.DisplayName = LocalizedText("RedundancySupport"); - attrs.Type = ToNodeId("i=851"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3115"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11527"); - node.BrowseName = ToQualifiedName("Namespaces"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2004"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=11645"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Describes the namespaces supported by the server."); - attrs.DisplayName = LocalizedText("Namespaces"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11527"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11490"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11489"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11490"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11491"); - node.BrowseName = ToQualifiedName("OutputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11489"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OutputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11491"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2013"); - node.BrowseName = ToQualifiedName("ServerCapabilitiesType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("Describes the capabilities supported by the server."); - attrs.DisplayName = LocalizedText("ServerCapabilitiesType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2013"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2014"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2013"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2016"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2013"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2017"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2013"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2732"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2013"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2733"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2013"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2734"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2013"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3049"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2013"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11549"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2013"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11550"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2013"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11551"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2013"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2019"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2013"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2754"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2013"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11562"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2014"); - node.BrowseName = ToQualifiedName("ServerProfileArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2013"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of profiles supported by the server."); - attrs.DisplayName = LocalizedText("ServerProfileArray"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2014"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2016"); - node.BrowseName = ToQualifiedName("LocaleIdArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2013"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of locales supported by the server."); - attrs.DisplayName = LocalizedText("LocaleIdArray"); - attrs.Type = ToNodeId("i=295"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2016"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2017"); - node.BrowseName = ToQualifiedName("MinSupportedSampleRate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2013"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The minimum sampling interval supported by the server."); - attrs.DisplayName = LocalizedText("MinSupportedSampleRate"); - attrs.Type = ToNodeId("i=290"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2017"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2732"); - node.BrowseName = ToQualifiedName("MaxBrowseContinuationPoints"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2013"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of continuation points for Browse operations per session."); - attrs.DisplayName = LocalizedText("MaxBrowseContinuationPoints"); - attrs.Type = ObjectId::UInt16; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2732"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2733"); - node.BrowseName = ToQualifiedName("MaxQueryContinuationPoints"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2013"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of continuation points for Query operations per session."); - attrs.DisplayName = LocalizedText("MaxQueryContinuationPoints"); - attrs.Type = ObjectId::UInt16; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2733"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2734"); - node.BrowseName = ToQualifiedName("MaxHistoryContinuationPoints"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2013"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of continuation points for ReadHistory operations per session."); - attrs.DisplayName = LocalizedText("MaxHistoryContinuationPoints"); - attrs.Type = ObjectId::UInt16; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2734"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3049"); - node.BrowseName = ToQualifiedName("SoftwareCertificates"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2013"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The software certificates owned by the server."); - attrs.DisplayName = LocalizedText("SoftwareCertificates"); - attrs.Type = ToNodeId("i=344"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3049"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11549"); - node.BrowseName = ToQualifiedName("MaxArrayLength"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2013"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum length for an array value supported by the server."); - attrs.DisplayName = LocalizedText("MaxArrayLength"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11549"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11550"); - node.BrowseName = ToQualifiedName("MaxStringLength"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2013"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum length for a string value supported by the server."); - attrs.DisplayName = LocalizedText("MaxStringLength"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11550"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11551"); - node.BrowseName = ToQualifiedName("OperationLimits"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2013"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=11564"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Defines the limits supported by the server for different operations."); - attrs.DisplayName = LocalizedText("OperationLimits"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11551"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2019"); - node.BrowseName = ToQualifiedName("ModellingRules"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2013"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("A folder for the modelling rules supported by the server."); - attrs.DisplayName = LocalizedText("ModellingRules"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2019"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2754"); - node.BrowseName = ToQualifiedName("AggregateFunctions"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2013"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("A folder for the real time aggregates supported by the server."); - attrs.DisplayName = LocalizedText("AggregateFunctions"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2754"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11562"); - node.BrowseName = ToQualifiedName(""); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2013"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2137"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText(""); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11562"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11508"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2020"); - node.BrowseName = ToQualifiedName("ServerDiagnosticsType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("The diagnostics information for a server."); - attrs.DisplayName = LocalizedText("ServerDiagnosticsType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2020"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2021"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2020"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2022"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2020"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2023"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2020"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2744"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2020"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2025"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2021"); - node.BrowseName = ToQualifiedName("ServerDiagnosticsSummary"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2020"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2150"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A summary of server level diagnostics."); - attrs.DisplayName = LocalizedText("ServerDiagnosticsSummary"); - attrs.Type = ToNodeId("i=859"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3116"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3117"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3118"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3119"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3120"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3121"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3122"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3124"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3125"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3126"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3127"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3128"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3116"); - node.BrowseName = ToQualifiedName("ServerViewCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2021"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ServerViewCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3116"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3117"); - node.BrowseName = ToQualifiedName("CurrentSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2021"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3117"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3118"); - node.BrowseName = ToQualifiedName("CumulatedSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2021"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CumulatedSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3118"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3119"); - node.BrowseName = ToQualifiedName("SecurityRejectedSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2021"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecurityRejectedSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3119"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3120"); - node.BrowseName = ToQualifiedName("RejectedSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2021"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RejectedSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3120"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3121"); - node.BrowseName = ToQualifiedName("SessionTimeoutCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2021"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionTimeoutCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3121"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3122"); - node.BrowseName = ToQualifiedName("SessionAbortCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2021"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionAbortCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3122"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3124"); - node.BrowseName = ToQualifiedName("PublishingIntervalCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2021"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PublishingIntervalCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3124"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3125"); - node.BrowseName = ToQualifiedName("CurrentSubscriptionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2021"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentSubscriptionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3125"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3126"); - node.BrowseName = ToQualifiedName("CumulatedSubscriptionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2021"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CumulatedSubscriptionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3126"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3127"); - node.BrowseName = ToQualifiedName("SecurityRejectedRequestsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2021"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecurityRejectedRequestsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3127"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3128"); - node.BrowseName = ToQualifiedName("RejectedRequestsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2021"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RejectedRequestsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3128"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2022"); - node.BrowseName = ToQualifiedName("SamplingIntervalDiagnosticsArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2020"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2164"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of diagnostics for each sampling interval supported by the server."); - attrs.DisplayName = LocalizedText("SamplingIntervalDiagnosticsArray"); - attrs.Type = ToNodeId("i=856"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2022"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2023"); - node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2020"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2171"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of diagnostics for each active subscription."); - attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsArray"); - attrs.Type = ToNodeId("i=874"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2023"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2744"); - node.BrowseName = ToQualifiedName("SessionsDiagnosticsSummary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2020"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2026"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("A summary of session level diagnostics."); - attrs.DisplayName = LocalizedText("SessionsDiagnosticsSummary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2744"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3129"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2744"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3130"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2744"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3129"); - node.BrowseName = ToQualifiedName("SessionDiagnosticsArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2744"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2196"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of diagnostics for each active session."); - attrs.DisplayName = LocalizedText("SessionDiagnosticsArray"); - attrs.Type = ToNodeId("i=865"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3129"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3130"); - node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2744"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2243"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of security related diagnostics for each active session."); - attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsArray"); - attrs.Type = ToNodeId("i=868"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3130"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2025"); - node.BrowseName = ToQualifiedName("EnabledFlag"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2020"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("If TRUE the diagnostics collection is enabled."); - attrs.DisplayName = LocalizedText("EnabledFlag"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - attrs.AccessLevel = (VariableAccessLevel) 3; - attrs.UserAccessLevel = (VariableAccessLevel) 3; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2025"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2026"); - node.BrowseName = ToQualifiedName("SessionsDiagnosticsSummaryType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("Provides a summary of session level diagnostics."); - attrs.DisplayName = LocalizedText("SessionsDiagnosticsSummaryType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2026"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2027"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2026"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2028"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2026"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12097"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2027"); - node.BrowseName = ToQualifiedName("SessionDiagnosticsArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2026"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2196"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of diagnostics for each active session."); - attrs.DisplayName = LocalizedText("SessionDiagnosticsArray"); - attrs.Type = ToNodeId("i=865"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2027"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2028"); - node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2026"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2243"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of security related diagnostics for each active session."); - attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsArray"); - attrs.Type = ToNodeId("i=868"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2028"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12097"); - node.BrowseName = ToQualifiedName(""); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2026"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2029"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText(""); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12097"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12098"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12097"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12142"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12097"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12152"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12097"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11508"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12098"); - node.BrowseName = ToQualifiedName("SessionDiagnostics"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12097"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2197"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Diagnostics information for an active session."); - attrs.DisplayName = LocalizedText("SessionDiagnostics"); - attrs.Type = ToNodeId("i=865"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12099"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12100"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12101"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12102"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12103"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12104"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12105"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12106"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12107"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12108"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12109"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12110"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12111"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12112"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12113"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12114"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12115"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12116"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12117"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12118"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12119"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12120"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12121"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12122"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12123"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12124"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12125"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12126"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12127"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12128"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12129"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12130"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12131"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12132"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12133"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12134"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12135"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12136"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12137"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12138"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12139"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12140"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12141"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12099"); - node.BrowseName = ToQualifiedName("SessionId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12099"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12100"); - node.BrowseName = ToQualifiedName("SessionName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionName"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12100"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12101"); - node.BrowseName = ToQualifiedName("ClientDescription"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientDescription"); - attrs.Type = ToNodeId("i=308"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12101"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12102"); - node.BrowseName = ToQualifiedName("ServerUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ServerUri"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12102"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12103"); - node.BrowseName = ToQualifiedName("EndpointUrl"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EndpointUrl"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12103"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12104"); - node.BrowseName = ToQualifiedName("LocaleIds"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LocaleIds"); - attrs.Type = ToNodeId("i=295"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12104"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12105"); - node.BrowseName = ToQualifiedName("ActualSessionTimeout"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ActualSessionTimeout"); - attrs.Type = ToNodeId("i=290"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12105"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12106"); - node.BrowseName = ToQualifiedName("MaxResponseMessageSize"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MaxResponseMessageSize"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12106"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12107"); - node.BrowseName = ToQualifiedName("ClientConnectionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientConnectionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12107"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12108"); - node.BrowseName = ToQualifiedName("ClientLastContactTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientLastContactTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12108"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12109"); - node.BrowseName = ToQualifiedName("CurrentSubscriptionsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentSubscriptionsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12109"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12110"); - node.BrowseName = ToQualifiedName("CurrentMonitoredItemsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentMonitoredItemsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12110"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12111"); - node.BrowseName = ToQualifiedName("CurrentPublishRequestsInQueue"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentPublishRequestsInQueue"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12111"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12112"); - node.BrowseName = ToQualifiedName("TotalRequestCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TotalRequestCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12112"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12113"); - node.BrowseName = ToQualifiedName("UnauthorizedRequestCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UnauthorizedRequestCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12113"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12114"); - node.BrowseName = ToQualifiedName("ReadCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ReadCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12114"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12115"); - node.BrowseName = ToQualifiedName("HistoryReadCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("HistoryReadCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12115"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12116"); - node.BrowseName = ToQualifiedName("WriteCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("WriteCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12116"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12117"); - node.BrowseName = ToQualifiedName("HistoryUpdateCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("HistoryUpdateCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12117"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12118"); - node.BrowseName = ToQualifiedName("CallCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CallCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12118"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12119"); - node.BrowseName = ToQualifiedName("CreateMonitoredItemsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CreateMonitoredItemsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12119"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12120"); - node.BrowseName = ToQualifiedName("ModifyMonitoredItemsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ModifyMonitoredItemsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12120"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12121"); - node.BrowseName = ToQualifiedName("SetMonitoringModeCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SetMonitoringModeCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12121"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12122"); - node.BrowseName = ToQualifiedName("SetTriggeringCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SetTriggeringCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12122"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12123"); - node.BrowseName = ToQualifiedName("DeleteMonitoredItemsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteMonitoredItemsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12123"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12124"); - node.BrowseName = ToQualifiedName("CreateSubscriptionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CreateSubscriptionCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12124"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12125"); - node.BrowseName = ToQualifiedName("ModifySubscriptionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ModifySubscriptionCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12125"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12126"); - node.BrowseName = ToQualifiedName("SetPublishingModeCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SetPublishingModeCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12126"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12127"); - node.BrowseName = ToQualifiedName("PublishCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PublishCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12127"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12128"); - node.BrowseName = ToQualifiedName("RepublishCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RepublishCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12128"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12129"); - node.BrowseName = ToQualifiedName("TransferSubscriptionsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransferSubscriptionsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12129"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12130"); - node.BrowseName = ToQualifiedName("DeleteSubscriptionsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteSubscriptionsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12130"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12131"); - node.BrowseName = ToQualifiedName("AddNodesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AddNodesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12131"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12132"); - node.BrowseName = ToQualifiedName("AddReferencesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AddReferencesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12132"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12133"); - node.BrowseName = ToQualifiedName("DeleteNodesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteNodesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12133"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12134"); - node.BrowseName = ToQualifiedName("DeleteReferencesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteReferencesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12134"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12135"); - node.BrowseName = ToQualifiedName("BrowseCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BrowseCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12135"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12136"); - node.BrowseName = ToQualifiedName("BrowseNextCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BrowseNextCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12136"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12137"); - node.BrowseName = ToQualifiedName("TranslateBrowsePathsToNodeIdsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TranslateBrowsePathsToNodeIdsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12137"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12138"); - node.BrowseName = ToQualifiedName("QueryFirstCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("QueryFirstCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12138"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12139"); - node.BrowseName = ToQualifiedName("QueryNextCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("QueryNextCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12139"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12140"); - node.BrowseName = ToQualifiedName("RegisterNodesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RegisterNodesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12140"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12141"); - node.BrowseName = ToQualifiedName("UnregisterNodesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12098"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UnregisterNodesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12141"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12142"); - node.BrowseName = ToQualifiedName("SessionSecurityDiagnostics"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12097"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2244"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Security related diagnostics information for an active session."); - attrs.DisplayName = LocalizedText("SessionSecurityDiagnostics"); - attrs.Type = ToNodeId("i=868"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12143"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12144"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12145"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12146"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12147"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12148"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12149"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12150"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=12142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12151"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12143"); - node.BrowseName = ToQualifiedName("SessionId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12142"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12143"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12144"); - node.BrowseName = ToQualifiedName("ClientUserIdOfSession"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12142"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientUserIdOfSession"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12144"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12145"); - node.BrowseName = ToQualifiedName("ClientUserIdHistory"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12142"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientUserIdHistory"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12145"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12146"); - node.BrowseName = ToQualifiedName("AuthenticationMechanism"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12142"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AuthenticationMechanism"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12146"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12147"); - node.BrowseName = ToQualifiedName("Encoding"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12142"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Encoding"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12147"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12148"); - node.BrowseName = ToQualifiedName("TransportProtocol"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12142"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransportProtocol"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12148"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12149"); - node.BrowseName = ToQualifiedName("SecurityMode"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12142"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecurityMode"); - attrs.Type = ToNodeId("i=302"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12149"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12150"); - node.BrowseName = ToQualifiedName("SecurityPolicyUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12142"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecurityPolicyUri"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12150"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12151"); - node.BrowseName = ToQualifiedName("ClientCertificate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12142"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientCertificate"); - attrs.Type = ObjectId::ByteString; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12151"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12152"); - node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12097"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2171"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of diagnostics for each subscription owned by the session."); - attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsArray"); - attrs.Type = ToNodeId("i=874"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12152"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2029"); - node.BrowseName = ToQualifiedName("SessionDiagnosticsObjectType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("A container for session level diagnostics information."); - attrs.DisplayName = LocalizedText("SessionDiagnosticsObjectType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2029"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2030"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2029"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2031"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2029"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2032"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2030"); - node.BrowseName = ToQualifiedName("SessionDiagnostics"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2029"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2197"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Diagnostics information for an active session."); - attrs.DisplayName = LocalizedText("SessionDiagnostics"); - attrs.Type = ToNodeId("i=865"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3131"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3132"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3133"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3134"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3135"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3136"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3137"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3138"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3139"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3140"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3141"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3142"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3143"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8898"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11891"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3151"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3152"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3153"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3154"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3155"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3156"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3157"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3158"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3159"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3160"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3161"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3162"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3163"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3164"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3165"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3166"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3167"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3168"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3169"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3170"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3171"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3172"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3173"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3174"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3175"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3176"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3177"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3178"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3131"); - node.BrowseName = ToQualifiedName("SessionId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3131"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3132"); - node.BrowseName = ToQualifiedName("SessionName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionName"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3132"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3133"); - node.BrowseName = ToQualifiedName("ClientDescription"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientDescription"); - attrs.Type = ToNodeId("i=308"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3133"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3134"); - node.BrowseName = ToQualifiedName("ServerUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ServerUri"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3134"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3135"); - node.BrowseName = ToQualifiedName("EndpointUrl"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EndpointUrl"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3135"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3136"); - node.BrowseName = ToQualifiedName("LocaleIds"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LocaleIds"); - attrs.Type = ToNodeId("i=295"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3136"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3137"); - node.BrowseName = ToQualifiedName("ActualSessionTimeout"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ActualSessionTimeout"); - attrs.Type = ToNodeId("i=290"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3137"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3138"); - node.BrowseName = ToQualifiedName("MaxResponseMessageSize"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MaxResponseMessageSize"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3138"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3139"); - node.BrowseName = ToQualifiedName("ClientConnectionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientConnectionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3139"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3140"); - node.BrowseName = ToQualifiedName("ClientLastContactTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientLastContactTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3140"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3141"); - node.BrowseName = ToQualifiedName("CurrentSubscriptionsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentSubscriptionsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3141"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3142"); - node.BrowseName = ToQualifiedName("CurrentMonitoredItemsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentMonitoredItemsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3143"); - node.BrowseName = ToQualifiedName("CurrentPublishRequestsInQueue"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentPublishRequestsInQueue"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3143"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8898"); - node.BrowseName = ToQualifiedName("TotalRequestCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TotalRequestCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8898"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11891"); - node.BrowseName = ToQualifiedName("UnauthorizedRequestCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UnauthorizedRequestCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11891"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3151"); - node.BrowseName = ToQualifiedName("ReadCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ReadCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3151"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3152"); - node.BrowseName = ToQualifiedName("HistoryReadCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("HistoryReadCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3152"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3153"); - node.BrowseName = ToQualifiedName("WriteCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("WriteCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3153"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3154"); - node.BrowseName = ToQualifiedName("HistoryUpdateCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("HistoryUpdateCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3154"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3155"); - node.BrowseName = ToQualifiedName("CallCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CallCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3155"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3156"); - node.BrowseName = ToQualifiedName("CreateMonitoredItemsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CreateMonitoredItemsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3156"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3157"); - node.BrowseName = ToQualifiedName("ModifyMonitoredItemsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ModifyMonitoredItemsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3157"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3158"); - node.BrowseName = ToQualifiedName("SetMonitoringModeCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SetMonitoringModeCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3158"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3159"); - node.BrowseName = ToQualifiedName("SetTriggeringCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SetTriggeringCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3159"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3160"); - node.BrowseName = ToQualifiedName("DeleteMonitoredItemsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteMonitoredItemsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3160"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3161"); - node.BrowseName = ToQualifiedName("CreateSubscriptionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CreateSubscriptionCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3161"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3162"); - node.BrowseName = ToQualifiedName("ModifySubscriptionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ModifySubscriptionCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3162"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3163"); - node.BrowseName = ToQualifiedName("SetPublishingModeCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SetPublishingModeCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3163"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3164"); - node.BrowseName = ToQualifiedName("PublishCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PublishCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3164"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3165"); - node.BrowseName = ToQualifiedName("RepublishCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RepublishCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3165"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3166"); - node.BrowseName = ToQualifiedName("TransferSubscriptionsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransferSubscriptionsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3166"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3167"); - node.BrowseName = ToQualifiedName("DeleteSubscriptionsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteSubscriptionsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3167"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3168"); - node.BrowseName = ToQualifiedName("AddNodesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AddNodesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3168"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3169"); - node.BrowseName = ToQualifiedName("AddReferencesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AddReferencesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3169"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3170"); - node.BrowseName = ToQualifiedName("DeleteNodesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteNodesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3170"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3171"); - node.BrowseName = ToQualifiedName("DeleteReferencesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteReferencesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3171"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3172"); - node.BrowseName = ToQualifiedName("BrowseCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BrowseCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3173"); - node.BrowseName = ToQualifiedName("BrowseNextCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BrowseNextCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3173"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3174"); - node.BrowseName = ToQualifiedName("TranslateBrowsePathsToNodeIdsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TranslateBrowsePathsToNodeIdsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3174"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3175"); - node.BrowseName = ToQualifiedName("QueryFirstCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("QueryFirstCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3175"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3176"); - node.BrowseName = ToQualifiedName("QueryNextCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("QueryNextCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3176"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3177"); - node.BrowseName = ToQualifiedName("RegisterNodesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RegisterNodesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3177"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3178"); - node.BrowseName = ToQualifiedName("UnregisterNodesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2030"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UnregisterNodesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3178"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2031"); - node.BrowseName = ToQualifiedName("SessionSecurityDiagnostics"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2029"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2244"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Security related diagnostics information for an active session."); - attrs.DisplayName = LocalizedText("SessionSecurityDiagnostics"); - attrs.Type = ToNodeId("i=868"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2031"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3179"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2031"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3180"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2031"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3181"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2031"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3182"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2031"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3183"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2031"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3184"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2031"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3185"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2031"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3186"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2031"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3187"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2031"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3179"); - node.BrowseName = ToQualifiedName("SessionId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2031"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3179"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3180"); - node.BrowseName = ToQualifiedName("ClientUserIdOfSession"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2031"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientUserIdOfSession"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3180"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3181"); - node.BrowseName = ToQualifiedName("ClientUserIdHistory"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2031"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientUserIdHistory"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3181"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3182"); - node.BrowseName = ToQualifiedName("AuthenticationMechanism"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2031"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AuthenticationMechanism"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3182"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3183"); - node.BrowseName = ToQualifiedName("Encoding"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2031"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Encoding"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3183"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3184"); - node.BrowseName = ToQualifiedName("TransportProtocol"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2031"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransportProtocol"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3184"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3185"); - node.BrowseName = ToQualifiedName("SecurityMode"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2031"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecurityMode"); - attrs.Type = ToNodeId("i=302"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3185"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3186"); - node.BrowseName = ToQualifiedName("SecurityPolicyUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2031"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecurityPolicyUri"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3186"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3187"); - node.BrowseName = ToQualifiedName("ClientCertificate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2031"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientCertificate"); - attrs.Type = ObjectId::ByteString; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3187"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2032"); - node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2029"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2171"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of diagnostics for each subscription owned by the session."); - attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsArray"); - attrs.Type = ToNodeId("i=874"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2032"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2033"); - node.BrowseName = ToQualifiedName("VendorServerInfoType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("A base type for vendor specific server information."); - attrs.DisplayName = LocalizedText("VendorServerInfoType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2034"); - node.BrowseName = ToQualifiedName("ServerRedundancyType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("A base type for an object that describe how a server supports redundancy."); - attrs.DisplayName = LocalizedText("ServerRedundancyType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2034"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2035"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2035"); - node.BrowseName = ToQualifiedName("RedundancySupport"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2034"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Indicates what style of redundancy is supported by the server."); - attrs.DisplayName = LocalizedText("RedundancySupport"); - attrs.Type = ToNodeId("i=851"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2035"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2036"); - node.BrowseName = ToQualifiedName("TransparentRedundancyType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2034"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("Identifies the capabilties of server that supports transparent redundancy."); - attrs.DisplayName = LocalizedText("TransparentRedundancyType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2036"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2037"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2036"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2038"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2037"); - node.BrowseName = ToQualifiedName("CurrentServerId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2036"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The ID of the server that is currently in use."); - attrs.DisplayName = LocalizedText("CurrentServerId"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2037"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2038"); - node.BrowseName = ToQualifiedName("RedundantServerArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2036"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of servers in the same redundant set."); - attrs.DisplayName = LocalizedText("RedundantServerArray"); - attrs.Type = ToNodeId("i=853"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2038"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2039"); - node.BrowseName = ToQualifiedName("NonTransparentRedundancyType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2034"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("Identifies the capabilties of server that supports non-transparent redundancy."); - attrs.DisplayName = LocalizedText("NonTransparentRedundancyType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2039"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2040"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2040"); - node.BrowseName = ToQualifiedName("ServerUriArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2039"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of servers in the same redundant set."); - attrs.DisplayName = LocalizedText("ServerUriArray"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2040"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11945"); - node.BrowseName = ToQualifiedName("NonTransparentNetworkRedundancyType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2039"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("NonTransparentNetworkRedundancyType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11945"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11948"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11948"); - node.BrowseName = ToQualifiedName("ServerNetworkGroups"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11945"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ServerNetworkGroups"); - attrs.Type = ToNodeId("i=11944"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11948"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11564"); - node.BrowseName = ToQualifiedName("OperationLimitsType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("Identifies the operation limits imposed by the server."); - attrs.DisplayName = LocalizedText("OperationLimitsType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11564"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11565"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11564"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12161"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11564"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12162"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11564"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11567"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11564"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12163"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11564"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12164"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11564"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11569"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11564"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11570"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11564"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11571"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11564"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11572"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11564"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11573"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11564"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11574"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11565"); - node.BrowseName = ToQualifiedName("MaxNodesPerRead"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11564"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single Read request."); - attrs.DisplayName = LocalizedText("MaxNodesPerRead"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11565"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12161"); - node.BrowseName = ToQualifiedName("MaxNodesPerHistoryReadData"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11564"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single data HistoryRead request."); - attrs.DisplayName = LocalizedText("MaxNodesPerHistoryReadData"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12161"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12162"); - node.BrowseName = ToQualifiedName("MaxNodesPerHistoryReadEvents"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11564"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single event HistoryRead request."); - attrs.DisplayName = LocalizedText("MaxNodesPerHistoryReadEvents"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12162"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11567"); - node.BrowseName = ToQualifiedName("MaxNodesPerWrite"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11564"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single Write request."); - attrs.DisplayName = LocalizedText("MaxNodesPerWrite"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11567"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12163"); - node.BrowseName = ToQualifiedName("MaxNodesPerHistoryUpdateData"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11564"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single data HistoryUpdate request."); - attrs.DisplayName = LocalizedText("MaxNodesPerHistoryUpdateData"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12163"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12164"); - node.BrowseName = ToQualifiedName("MaxNodesPerHistoryUpdateEvents"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11564"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single event HistoryUpdate request."); - attrs.DisplayName = LocalizedText("MaxNodesPerHistoryUpdateEvents"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12164"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11569"); - node.BrowseName = ToQualifiedName("MaxNodesPerMethodCall"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11564"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single Call request."); - attrs.DisplayName = LocalizedText("MaxNodesPerMethodCall"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11569"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11570"); - node.BrowseName = ToQualifiedName("MaxNodesPerBrowse"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11564"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single Browse request."); - attrs.DisplayName = LocalizedText("MaxNodesPerBrowse"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11570"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11571"); - node.BrowseName = ToQualifiedName("MaxNodesPerRegisterNodes"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11564"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single RegisterNodes request."); - attrs.DisplayName = LocalizedText("MaxNodesPerRegisterNodes"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11571"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11572"); - node.BrowseName = ToQualifiedName("MaxNodesPerTranslateBrowsePathsToNodeIds"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11564"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single TranslateBrowsePathsToNodeIds request."); - attrs.DisplayName = LocalizedText("MaxNodesPerTranslateBrowsePathsToNodeIds"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11572"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11573"); - node.BrowseName = ToQualifiedName("MaxNodesPerNodeManagement"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11564"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single AddNodes, AddReferences, DeleteNodes or DeleteReferences request."); - attrs.DisplayName = LocalizedText("MaxNodesPerNodeManagement"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11573"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11574"); - node.BrowseName = ToQualifiedName("MaxMonitoredItemsPerCall"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11564"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single MonitoredItem related request."); - attrs.DisplayName = LocalizedText("MaxMonitoredItemsPerCall"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11574"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11575"); - node.BrowseName = ToQualifiedName("FileType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("An object that represents a file that can be accessed via the server."); - attrs.DisplayName = LocalizedText("FileType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11575"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11576"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11575"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11577"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11575"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11578"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11575"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11579"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11575"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11580"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11575"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11583"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11575"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11585"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11575"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11588"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11575"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11590"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11575"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11593"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11576"); - node.BrowseName = ToQualifiedName("Size"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11575"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The size of the file in bytes."); - attrs.DisplayName = LocalizedText("Size"); - attrs.Type = ObjectId::UInt64; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11576"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11577"); - node.BrowseName = ToQualifiedName("Writeable"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11575"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Whether the file is writeable."); - attrs.DisplayName = LocalizedText("Writeable"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11577"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11578"); - node.BrowseName = ToQualifiedName("UserWriteable"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11575"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Whether the file is writeable by the current user."); - attrs.DisplayName = LocalizedText("UserWriteable"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11578"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11579"); - node.BrowseName = ToQualifiedName("OpenCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11575"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The current number of open file handles."); - attrs.DisplayName = LocalizedText("OpenCount"); - attrs.Type = ObjectId::UInt16; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11579"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11581"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11580"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11581"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11582"); - node.BrowseName = ToQualifiedName("OutputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11580"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OutputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11582"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11584"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11583"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11584"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11586"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11585"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11586"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11587"); - node.BrowseName = ToQualifiedName("OutputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11585"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OutputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11587"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11589"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11588"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11589"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11591"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11590"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11591"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11592"); - node.BrowseName = ToQualifiedName("OutputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11590"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OutputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11592"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11594"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11593"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11594"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11595"); - node.BrowseName = ToQualifiedName("AddressSpaceFileType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=11575"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("A file used to store a namespace exported from the server."); - attrs.DisplayName = LocalizedText("AddressSpaceFileType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11595"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11615"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11616"); - node.BrowseName = ToQualifiedName("NamespaceMetadataType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("Provides the metadata for a namespace used by the server."); - attrs.DisplayName = LocalizedText("NamespaceMetadataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11616"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11617"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11616"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11618"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11616"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11619"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11616"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11620"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11616"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11621"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11616"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11622"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11616"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11623"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11616"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11624"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11617"); - node.BrowseName = ToQualifiedName("NamespaceUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11616"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The URI of the namespace."); - attrs.DisplayName = LocalizedText("NamespaceUri"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11618"); - node.BrowseName = ToQualifiedName("NamespaceVersion"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11616"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The human readable string representing version of the namespace."); - attrs.DisplayName = LocalizedText("NamespaceVersion"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11618"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11619"); - node.BrowseName = ToQualifiedName("NamespacePublicationDate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11616"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The publication date for the namespace."); - attrs.DisplayName = LocalizedText("NamespacePublicationDate"); - attrs.Type = ObjectId::DateTime; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11619"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11620"); - node.BrowseName = ToQualifiedName("IsNamespaceSubset"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11616"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("If TRUE then the server only supports a subset of the namespace."); - attrs.DisplayName = LocalizedText("IsNamespaceSubset"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11620"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11621"); - node.BrowseName = ToQualifiedName("StaticNodeIdIdentifierTypes"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11616"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of IdTypes for nodes which are the same in every server that exposes them."); - attrs.DisplayName = LocalizedText("StaticNodeIdIdentifierTypes"); - attrs.Type = ToNodeId("i=256"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11621"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11622"); - node.BrowseName = ToQualifiedName("StaticNumericNodeIdRange"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11616"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of ranges for numeric node ids which are the same in every server that exposes them."); - attrs.DisplayName = LocalizedText("StaticNumericNodeIdRange"); - attrs.Type = ToNodeId("i=291"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11622"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11623"); - node.BrowseName = ToQualifiedName("StaticStringNodeIdPattern"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11616"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A regular expression which matches string node ids are the same in every server that exposes them."); - attrs.DisplayName = LocalizedText("StaticStringNodeIdPattern"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11623"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11624"); - node.BrowseName = ToQualifiedName("NamespaceFile"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=11616"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=11595"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("A file containing the nodes of the namespace."); - attrs.DisplayName = LocalizedText("NamespaceFile"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11624"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11625"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11624"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11626"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11624"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11627"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11624"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11628"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11624"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11629"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11624"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11632"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11624"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11634"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11624"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11637"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11624"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11639"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11624"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11642"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11624"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11625"); - node.BrowseName = ToQualifiedName("Size"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11624"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The size of the file in bytes."); - attrs.DisplayName = LocalizedText("Size"); - attrs.Type = ObjectId::UInt64; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11625"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11626"); - node.BrowseName = ToQualifiedName("Writeable"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11624"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Whether the file is writeable."); - attrs.DisplayName = LocalizedText("Writeable"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11626"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11627"); - node.BrowseName = ToQualifiedName("UserWriteable"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11624"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Whether the file is writeable by the current user."); - attrs.DisplayName = LocalizedText("UserWriteable"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11627"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11628"); - node.BrowseName = ToQualifiedName("OpenCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11624"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The current number of open file handles."); - attrs.DisplayName = LocalizedText("OpenCount"); - attrs.Type = ObjectId::UInt16; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11628"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11630"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11629"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11630"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11631"); - node.BrowseName = ToQualifiedName("OutputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11629"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OutputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11631"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11633"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11632"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11633"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11635"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11634"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11635"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11636"); - node.BrowseName = ToQualifiedName("OutputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11634"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OutputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11636"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11638"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11637"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11638"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11640"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11639"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11640"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11641"); - node.BrowseName = ToQualifiedName("OutputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11639"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OutputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11641"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11643"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11642"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11643"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11645"); - node.BrowseName = ToQualifiedName("NamespacesType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("A container for the namespace metadata provided by the server."); - attrs.DisplayName = LocalizedText("NamespacesType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11645"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11646"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11645"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11675"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11646"); - node.BrowseName = ToQualifiedName(""); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=11645"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=11616"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText(""); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11646"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11647"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11646"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11648"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11646"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11649"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11646"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11650"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11646"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11651"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11646"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11652"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11646"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11653"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11646"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11508"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11647"); - node.BrowseName = ToQualifiedName("NamespaceUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11646"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The URI of the namespace."); - attrs.DisplayName = LocalizedText("NamespaceUri"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11647"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11648"); - node.BrowseName = ToQualifiedName("NamespaceVersion"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11646"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The human readable string representing version of the namespace."); - attrs.DisplayName = LocalizedText("NamespaceVersion"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11648"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11649"); - node.BrowseName = ToQualifiedName("NamespacePublicationDate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11646"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The publication date for the namespace."); - attrs.DisplayName = LocalizedText("NamespacePublicationDate"); - attrs.Type = ObjectId::DateTime; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11649"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11650"); - node.BrowseName = ToQualifiedName("IsNamespaceSubset"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11646"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("If TRUE then the server only supports a subset of the namespace."); - attrs.DisplayName = LocalizedText("IsNamespaceSubset"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11650"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11651"); - node.BrowseName = ToQualifiedName("StaticNodeIdIdentifierTypes"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11646"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of IdTypes for nodes which are the same in every server that exposes them."); - attrs.DisplayName = LocalizedText("StaticNodeIdIdentifierTypes"); - attrs.Type = ToNodeId("i=256"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11651"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11652"); - node.BrowseName = ToQualifiedName("StaticNumericNodeIdRange"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11646"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of ranges for numeric node ids which are the same in every server that exposes them."); - attrs.DisplayName = LocalizedText("StaticNumericNodeIdRange"); - attrs.Type = ToNodeId("i=291"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11652"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11653"); - node.BrowseName = ToQualifiedName("StaticStringNodeIdPattern"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11646"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A regular expression which matches string node ids are the same in every server that exposes them."); - attrs.DisplayName = LocalizedText("StaticStringNodeIdPattern"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11653"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11675"); - node.BrowseName = ToQualifiedName("AddressSpaceFile"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=11645"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=11595"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("A file containing the nodes of the namespace."); - attrs.DisplayName = LocalizedText("AddressSpaceFile"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11675"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11676"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11675"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11677"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11675"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11678"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11675"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11679"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11675"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11680"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11675"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11683"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11675"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11685"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11675"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11688"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11675"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11690"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=11675"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11693"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11675"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11676"); - node.BrowseName = ToQualifiedName("Size"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11675"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The size of the file in bytes."); - attrs.DisplayName = LocalizedText("Size"); - attrs.Type = ObjectId::UInt64; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11676"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11677"); - node.BrowseName = ToQualifiedName("Writeable"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11675"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Whether the file is writeable."); - attrs.DisplayName = LocalizedText("Writeable"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11677"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11678"); - node.BrowseName = ToQualifiedName("UserWriteable"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11675"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Whether the file is writeable by the current user."); - attrs.DisplayName = LocalizedText("UserWriteable"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11678"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11679"); - node.BrowseName = ToQualifiedName("OpenCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11675"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The current number of open file handles."); - attrs.DisplayName = LocalizedText("OpenCount"); - attrs.Type = ObjectId::UInt16; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11679"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11681"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11680"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11681"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11682"); - node.BrowseName = ToQualifiedName("OutputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11680"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OutputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11682"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11684"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11683"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11684"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11686"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11685"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11686"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11687"); - node.BrowseName = ToQualifiedName("OutputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11685"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OutputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11687"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11689"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11688"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11689"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11691"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11690"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11691"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11692"); - node.BrowseName = ToQualifiedName("OutputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11690"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OutputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11692"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11694"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11693"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11694"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2041"); - node.BrowseName = ToQualifiedName("BaseEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("The base type for all events."); - attrs.DisplayName = LocalizedText("BaseEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2041"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2042"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2041"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2043"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2041"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2044"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2041"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2045"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2041"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2046"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2041"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2047"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2041"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3190"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2041"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2050"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2041"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2051"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2042"); - node.BrowseName = ToQualifiedName("EventId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A globally unique identifier for the event."); - attrs.DisplayName = LocalizedText("EventId"); - attrs.Type = ObjectId::ByteString; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2042"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2043"); - node.BrowseName = ToQualifiedName("EventType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The identifier for the event type."); - attrs.DisplayName = LocalizedText("EventType"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2043"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2044"); - node.BrowseName = ToQualifiedName("SourceNode"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The source of the event."); - attrs.DisplayName = LocalizedText("SourceNode"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2044"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2045"); - node.BrowseName = ToQualifiedName("SourceName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A description of the source of the event."); - attrs.DisplayName = LocalizedText("SourceName"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2045"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2046"); - node.BrowseName = ToQualifiedName("Time"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("When the event occurred."); - attrs.DisplayName = LocalizedText("Time"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2046"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2047"); - node.BrowseName = ToQualifiedName("ReceiveTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("When the server received the event from the underlying system."); - attrs.DisplayName = LocalizedText("ReceiveTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2047"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3190"); - node.BrowseName = ToQualifiedName("LocalTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Information about the local time where the event originated."); - attrs.DisplayName = LocalizedText("LocalTime"); - attrs.Type = ToNodeId("i=8912"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3190"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2050"); - node.BrowseName = ToQualifiedName("Message"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A localized description of the event."); - attrs.DisplayName = LocalizedText("Message"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2050"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2051"); - node.BrowseName = ToQualifiedName("Severity"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Indicates how urgent an event is."); - attrs.DisplayName = LocalizedText("Severity"); - attrs.Type = ObjectId::UInt16; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2051"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2052"); - node.BrowseName = ToQualifiedName("AuditEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("A base type for events used to track client initiated changes to the server state."); - attrs.DisplayName = LocalizedText("AuditEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2052"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2053"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2052"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2054"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2052"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2055"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2052"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2056"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2052"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2057"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2053"); - node.BrowseName = ToQualifiedName("ActionTimeStamp"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2052"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("When the action triggering the event occurred."); - attrs.DisplayName = LocalizedText("ActionTimeStamp"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2053"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2054"); - node.BrowseName = ToQualifiedName("Status"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2052"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("If TRUE the action was performed. If FALSE the action failed and the server state did not change."); - attrs.DisplayName = LocalizedText("Status"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2054"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2055"); - node.BrowseName = ToQualifiedName("ServerId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2052"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The unique identifier for the server generating the event."); - attrs.DisplayName = LocalizedText("ServerId"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2055"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2056"); - node.BrowseName = ToQualifiedName("ClientAuditEntryId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2052"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The log entry id provided in the request that initiated the action."); - attrs.DisplayName = LocalizedText("ClientAuditEntryId"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2056"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2057"); - node.BrowseName = ToQualifiedName("ClientUserId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2052"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The user identity associated with the session that initiated the action."); - attrs.DisplayName = LocalizedText("ClientUserId"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2057"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2058"); - node.BrowseName = ToQualifiedName("AuditSecurityEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2052"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("A base type for events used to track security related changes."); - attrs.DisplayName = LocalizedText("AuditSecurityEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2059"); - node.BrowseName = ToQualifiedName("AuditChannelEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2058"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("A base type for events used to track related changes to a secure channel."); - attrs.DisplayName = LocalizedText("AuditChannelEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2059"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2745"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2745"); - node.BrowseName = ToQualifiedName("SecureChannelId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2059"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The identifier for the secure channel that was changed."); - attrs.DisplayName = LocalizedText("SecureChannelId"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2745"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2060"); - node.BrowseName = ToQualifiedName("AuditOpenSecureChannelEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2059"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("An event that is raised when a secure channel is opened."); - attrs.DisplayName = LocalizedText("AuditOpenSecureChannelEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2060"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2061"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2060"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2746"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2060"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2062"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2060"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2063"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2060"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2065"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2060"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2066"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2061"); - node.BrowseName = ToQualifiedName("ClientCertificate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2060"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The certificate provided by the client."); - attrs.DisplayName = LocalizedText("ClientCertificate"); - attrs.Type = ObjectId::ByteString; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2061"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2746"); - node.BrowseName = ToQualifiedName("ClientCertificateThumbprint"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2060"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The thumbprint for certificate provided by the client."); - attrs.DisplayName = LocalizedText("ClientCertificateThumbprint"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2746"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2062"); - node.BrowseName = ToQualifiedName("RequestType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2060"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The type of request (NEW or RENEW)."); - attrs.DisplayName = LocalizedText("RequestType"); - attrs.Type = ToNodeId("i=315"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2062"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2063"); - node.BrowseName = ToQualifiedName("SecurityPolicyUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2060"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The security policy used by the channel."); - attrs.DisplayName = LocalizedText("SecurityPolicyUri"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2063"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2065"); - node.BrowseName = ToQualifiedName("SecurityMode"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2060"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The security mode used by the channel."); - attrs.DisplayName = LocalizedText("SecurityMode"); - attrs.Type = ToNodeId("i=302"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2065"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2066"); - node.BrowseName = ToQualifiedName("RequestedLifetime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2060"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The lifetime of the channel requested by the client."); - attrs.DisplayName = LocalizedText("RequestedLifetime"); - attrs.Type = ToNodeId("i=290"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2066"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2069"); - node.BrowseName = ToQualifiedName("AuditSessionEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2052"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("A base type for events used to track related changes to a session."); - attrs.DisplayName = LocalizedText("AuditSessionEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2069"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2070"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2070"); - node.BrowseName = ToQualifiedName("SessionId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2069"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The unique identifier for the session,."); - attrs.DisplayName = LocalizedText("SessionId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2070"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2071"); - node.BrowseName = ToQualifiedName("AuditCreateSessionEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2069"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.Description = LocalizedText("An event that is raised when a session is created."); - attrs.DisplayName = LocalizedText("AuditCreateSessionEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2071"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2072"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2071"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2073"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2071"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2747"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2071"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2074"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2072"); - node.BrowseName = ToQualifiedName("SecureChannelId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2071"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The secure channel associated with the session."); - attrs.DisplayName = LocalizedText("SecureChannelId"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2072"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2073"); - node.BrowseName = ToQualifiedName("ClientCertificate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2071"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The certificate provided by the client."); - attrs.DisplayName = LocalizedText("ClientCertificate"); - attrs.Type = ObjectId::ByteString; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2073"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2747"); - node.BrowseName = ToQualifiedName("ClientCertificateThumbprint"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2071"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The thumbprint of the certificate provided by the client."); - attrs.DisplayName = LocalizedText("ClientCertificateThumbprint"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2747"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2074"); - node.BrowseName = ToQualifiedName("RevisedSessionTimeout"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2071"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The timeout for the session."); - attrs.DisplayName = LocalizedText("RevisedSessionTimeout"); - attrs.Type = ToNodeId("i=290"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2074"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2748"); - node.BrowseName = ToQualifiedName("AuditUrlMismatchEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2071"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditUrlMismatchEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2748"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2749"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2749"); - node.BrowseName = ToQualifiedName("EndpointUrl"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2748"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EndpointUrl"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2749"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2075"); - node.BrowseName = ToQualifiedName("AuditActivateSessionEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2069"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditActivateSessionEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2075"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2076"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2075"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2077"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2075"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11485"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2076"); - node.BrowseName = ToQualifiedName("ClientSoftwareCertificates"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2075"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientSoftwareCertificates"); - attrs.Type = ToNodeId("i=344"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2076"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2077"); - node.BrowseName = ToQualifiedName("UserIdentityToken"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2075"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UserIdentityToken"); - attrs.Type = ToNodeId("i=316"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2077"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11485"); - node.BrowseName = ToQualifiedName("SecureChannelId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2075"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecureChannelId"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11485"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2078"); - node.BrowseName = ToQualifiedName("AuditCancelEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2069"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditCancelEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2078"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2079"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2079"); - node.BrowseName = ToQualifiedName("RequestHandle"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2078"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RequestHandle"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2079"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2080"); - node.BrowseName = ToQualifiedName("AuditCertificateEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2058"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditCertificateEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2080"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2081"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2081"); - node.BrowseName = ToQualifiedName("Certificate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2080"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Certificate"); - attrs.Type = ObjectId::ByteString; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2081"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2082"); - node.BrowseName = ToQualifiedName("AuditCertificateDataMismatchEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2080"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditCertificateDataMismatchEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2082"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2083"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2082"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2084"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2083"); - node.BrowseName = ToQualifiedName("InvalidHostname"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2082"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InvalidHostname"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2083"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2084"); - node.BrowseName = ToQualifiedName("InvalidUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2082"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InvalidUri"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2084"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2085"); - node.BrowseName = ToQualifiedName("AuditCertificateExpiredEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2080"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditCertificateExpiredEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2086"); - node.BrowseName = ToQualifiedName("AuditCertificateInvalidEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2080"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditCertificateInvalidEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2087"); - node.BrowseName = ToQualifiedName("AuditCertificateUntrustedEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2080"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditCertificateUntrustedEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2088"); - node.BrowseName = ToQualifiedName("AuditCertificateRevokedEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2080"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditCertificateRevokedEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2089"); - node.BrowseName = ToQualifiedName("AuditCertificateMismatchEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2080"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditCertificateMismatchEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2090"); - node.BrowseName = ToQualifiedName("AuditNodeManagementEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2052"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditNodeManagementEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2091"); - node.BrowseName = ToQualifiedName("AuditAddNodesEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2090"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditAddNodesEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2091"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2092"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2092"); - node.BrowseName = ToQualifiedName("NodesToAdd"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2091"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("NodesToAdd"); - attrs.Type = ToNodeId("i=376"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2092"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2093"); - node.BrowseName = ToQualifiedName("AuditDeleteNodesEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2090"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditDeleteNodesEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2093"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2094"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2094"); - node.BrowseName = ToQualifiedName("NodesToDelete"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2093"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("NodesToDelete"); - attrs.Type = ToNodeId("i=382"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2094"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2095"); - node.BrowseName = ToQualifiedName("AuditAddReferencesEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2090"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditAddReferencesEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2095"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2096"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2096"); - node.BrowseName = ToQualifiedName("ReferencesToAdd"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2095"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ReferencesToAdd"); - attrs.Type = ToNodeId("i=379"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2096"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2097"); - node.BrowseName = ToQualifiedName("AuditDeleteReferencesEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2090"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditDeleteReferencesEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2097"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2098"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2098"); - node.BrowseName = ToQualifiedName("ReferencesToDelete"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2097"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ReferencesToDelete"); - attrs.Type = ToNodeId("i=385"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2099"); - node.BrowseName = ToQualifiedName("AuditUpdateEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2052"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditUpdateEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2100"); - node.BrowseName = ToQualifiedName("AuditWriteUpdateEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2099"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditWriteUpdateEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2100"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2750"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2100"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2101"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2100"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2102"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2100"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2103"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2750"); - node.BrowseName = ToQualifiedName("AttributeId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2100"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AttributeId"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2750"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2101"); - node.BrowseName = ToQualifiedName("IndexRange"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2100"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("IndexRange"); - attrs.Type = ToNodeId("i=291"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2101"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2102"); - node.BrowseName = ToQualifiedName("OldValue"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2100"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OldValue"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2102"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2103"); - node.BrowseName = ToQualifiedName("NewValue"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2100"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("NewValue"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2103"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2104"); - node.BrowseName = ToQualifiedName("AuditHistoryUpdateEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2099"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditHistoryUpdateEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2104"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2751"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2751"); - node.BrowseName = ToQualifiedName("ParameterDataTypeId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2104"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ParameterDataTypeId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2751"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2127"); - node.BrowseName = ToQualifiedName("AuditUpdateMethodEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2052"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditUpdateMethodEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2127"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2128"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2127"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2129"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2128"); - node.BrowseName = ToQualifiedName("MethodId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2127"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MethodId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2128"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2129"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2127"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2129"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2130"); - node.BrowseName = ToQualifiedName("SystemEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SystemEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2131"); - node.BrowseName = ToQualifiedName("DeviceFailureEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2130"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("DeviceFailureEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11446"); - node.BrowseName = ToQualifiedName("SystemStatusChangeEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2130"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SystemStatusChangeEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11446"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11696"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11696"); - node.BrowseName = ToQualifiedName("SystemState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11446"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SystemState"); - attrs.Type = ToNodeId("i=852"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11696"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2132"); - node.BrowseName = ToQualifiedName("BaseModelChangeEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("BaseModelChangeEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2133"); - node.BrowseName = ToQualifiedName("GeneralModelChangeEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2132"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("GeneralModelChangeEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2133"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2134"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2134"); - node.BrowseName = ToQualifiedName("Changes"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2133"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Changes"); - attrs.Type = ToNodeId("i=877"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2134"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2738"); - node.BrowseName = ToQualifiedName("SemanticChangeEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2132"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SemanticChangeEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2738"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2739"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2739"); - node.BrowseName = ToQualifiedName("Changes"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2738"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Changes"); - attrs.Type = ToNodeId("i=897"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2739"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3035"); - node.BrowseName = ToQualifiedName("EventQueueOverflowEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("EventQueueOverflowEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11436"); - node.BrowseName = ToQualifiedName("ProgressEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ProgressEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2340"); - node.BrowseName = ToQualifiedName("AggregateFunctionType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AggregateFunctionType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2137"); - node.BrowseName = ToQualifiedName("ServerVendorCapabilityType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ServerVendorCapabilityType"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2138"); - node.BrowseName = ToQualifiedName("ServerStatusType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ServerStatusType"); - attrs.Type = ToNodeId("i=862"); - attrs.Rank = -1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2138"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2139"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2138"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2140"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2138"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2141"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2138"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2142"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2138"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2752"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2138"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2753"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2139"); - node.BrowseName = ToQualifiedName("StartTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2138"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StartTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2139"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2140"); - node.BrowseName = ToQualifiedName("CurrentTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2138"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2140"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2141"); - node.BrowseName = ToQualifiedName("State"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2138"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("State"); - attrs.Type = ToNodeId("i=852"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2141"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2142"); - node.BrowseName = ToQualifiedName("BuildInfo"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2138"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=3051"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BuildInfo"); - attrs.Type = ToNodeId("i=338"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3698"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3699"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3700"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3701"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3702"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3703"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2142"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3698"); - node.BrowseName = ToQualifiedName("ProductUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2142"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ProductUri"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3698"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3699"); - node.BrowseName = ToQualifiedName("ManufacturerName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2142"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ManufacturerName"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3699"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3700"); - node.BrowseName = ToQualifiedName("ProductName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2142"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ProductName"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3700"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3701"); - node.BrowseName = ToQualifiedName("SoftwareVersion"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2142"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SoftwareVersion"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3701"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3702"); - node.BrowseName = ToQualifiedName("BuildNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2142"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BuildNumber"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3702"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3703"); - node.BrowseName = ToQualifiedName("BuildDate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2142"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BuildDate"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3703"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2752"); - node.BrowseName = ToQualifiedName("SecondsTillShutdown"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2138"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecondsTillShutdown"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2752"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2753"); - node.BrowseName = ToQualifiedName("ShutdownReason"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2138"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ShutdownReason"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2753"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3051"); - node.BrowseName = ToQualifiedName("BuildInfoType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("BuildInfoType"); - attrs.Type = ToNodeId("i=338"); - attrs.Rank = -1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3051"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3052"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3051"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3053"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3051"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3054"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3051"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3055"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3051"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3056"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3051"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3057"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3052"); - node.BrowseName = ToQualifiedName("ProductUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3051"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ProductUri"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3052"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3053"); - node.BrowseName = ToQualifiedName("ManufacturerName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3051"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ManufacturerName"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3053"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3054"); - node.BrowseName = ToQualifiedName("ProductName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3051"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ProductName"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3054"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3055"); - node.BrowseName = ToQualifiedName("SoftwareVersion"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3051"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SoftwareVersion"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3055"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3056"); - node.BrowseName = ToQualifiedName("BuildNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3051"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BuildNumber"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3056"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3057"); - node.BrowseName = ToQualifiedName("BuildDate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3051"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BuildDate"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3057"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2150"); - node.BrowseName = ToQualifiedName("ServerDiagnosticsSummaryType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ServerDiagnosticsSummaryType"); - attrs.Type = ToNodeId("i=859"); - attrs.Rank = -1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2150"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2151"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2150"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2152"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2150"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2153"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2150"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2154"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2150"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2155"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2150"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2156"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2150"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2157"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2150"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2159"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2150"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2160"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2150"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2161"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2150"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2162"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2150"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2163"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2151"); - node.BrowseName = ToQualifiedName("ServerViewCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2150"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ServerViewCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2151"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2152"); - node.BrowseName = ToQualifiedName("CurrentSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2150"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2152"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2153"); - node.BrowseName = ToQualifiedName("CumulatedSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2150"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CumulatedSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2153"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2154"); - node.BrowseName = ToQualifiedName("SecurityRejectedSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2150"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecurityRejectedSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2154"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2155"); - node.BrowseName = ToQualifiedName("RejectedSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2150"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RejectedSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2155"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2156"); - node.BrowseName = ToQualifiedName("SessionTimeoutCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2150"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionTimeoutCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2156"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2157"); - node.BrowseName = ToQualifiedName("SessionAbortCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2150"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionAbortCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2157"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2159"); - node.BrowseName = ToQualifiedName("PublishingIntervalCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2150"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PublishingIntervalCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2159"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2160"); - node.BrowseName = ToQualifiedName("CurrentSubscriptionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2150"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentSubscriptionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2160"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2161"); - node.BrowseName = ToQualifiedName("CumulatedSubscriptionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2150"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CumulatedSubscriptionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2161"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2162"); - node.BrowseName = ToQualifiedName("SecurityRejectedRequestsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2150"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecurityRejectedRequestsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2162"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2163"); - node.BrowseName = ToQualifiedName("RejectedRequestsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2150"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RejectedRequestsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2163"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2164"); - node.BrowseName = ToQualifiedName("SamplingIntervalDiagnosticsArrayType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SamplingIntervalDiagnosticsArrayType"); - attrs.Type = ToNodeId("i=856"); - attrs.Rank = 1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2165"); - node.BrowseName = ToQualifiedName("SamplingIntervalDiagnosticsType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SamplingIntervalDiagnosticsType"); - attrs.Type = ToNodeId("i=856"); - attrs.Rank = -1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2165"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2166"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2165"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11697"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2165"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11698"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2165"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11699"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2166"); - node.BrowseName = ToQualifiedName("SamplingInterval"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2165"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SamplingInterval"); - attrs.Type = ToNodeId("i=290"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2166"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11697"); - node.BrowseName = ToQualifiedName("SampledMonitoredItemsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2165"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SampledMonitoredItemsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11697"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11698"); - node.BrowseName = ToQualifiedName("MaxSampledMonitoredItemsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2165"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MaxSampledMonitoredItemsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11698"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11699"); - node.BrowseName = ToQualifiedName("DisabledMonitoredItemsSamplingCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2165"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DisabledMonitoredItemsSamplingCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11699"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2171"); - node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsArrayType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsArrayType"); - attrs.Type = ToNodeId("i=874"); - attrs.Rank = 1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2172"); - node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsType"); - attrs.Type = ToNodeId("i=874"); - attrs.Rank = -1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2173"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2174"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2175"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2176"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2177"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8888"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2179"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2180"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2181"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2182"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2183"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2184"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2185"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2186"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2187"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2188"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2189"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2190"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2191"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2998"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2193"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8889"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8890"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8891"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8892"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8893"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8894"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8895"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8896"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8897"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2172"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8902"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2173"); - node.BrowseName = ToQualifiedName("SessionId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2173"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2174"); - node.BrowseName = ToQualifiedName("SubscriptionId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SubscriptionId"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2174"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2175"); - node.BrowseName = ToQualifiedName("Priority"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Priority"); - attrs.Type = ObjectId::Byte; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2175"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2176"); - node.BrowseName = ToQualifiedName("PublishingInterval"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PublishingInterval"); - attrs.Type = ObjectId::Double; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2176"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2177"); - node.BrowseName = ToQualifiedName("MaxKeepAliveCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MaxKeepAliveCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2177"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8888"); - node.BrowseName = ToQualifiedName("MaxLifetimeCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MaxLifetimeCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8888"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2179"); - node.BrowseName = ToQualifiedName("MaxNotificationsPerPublish"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MaxNotificationsPerPublish"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2179"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2180"); - node.BrowseName = ToQualifiedName("PublishingEnabled"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PublishingEnabled"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2180"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2181"); - node.BrowseName = ToQualifiedName("ModifyCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ModifyCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2181"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2182"); - node.BrowseName = ToQualifiedName("EnableCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnableCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2182"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2183"); - node.BrowseName = ToQualifiedName("DisableCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DisableCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2183"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2184"); - node.BrowseName = ToQualifiedName("RepublishRequestCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RepublishRequestCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2184"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2185"); - node.BrowseName = ToQualifiedName("RepublishMessageRequestCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RepublishMessageRequestCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2185"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2186"); - node.BrowseName = ToQualifiedName("RepublishMessageCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RepublishMessageCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2186"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2187"); - node.BrowseName = ToQualifiedName("TransferRequestCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransferRequestCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2187"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2188"); - node.BrowseName = ToQualifiedName("TransferredToAltClientCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransferredToAltClientCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2188"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2189"); - node.BrowseName = ToQualifiedName("TransferredToSameClientCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransferredToSameClientCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2189"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2190"); - node.BrowseName = ToQualifiedName("PublishRequestCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PublishRequestCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2190"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2191"); - node.BrowseName = ToQualifiedName("DataChangeNotificationsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DataChangeNotificationsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2191"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2998"); - node.BrowseName = ToQualifiedName("EventNotificationsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EventNotificationsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2998"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2193"); - node.BrowseName = ToQualifiedName("NotificationsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("NotificationsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2193"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8889"); - node.BrowseName = ToQualifiedName("LatePublishRequestCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LatePublishRequestCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8889"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8890"); - node.BrowseName = ToQualifiedName("CurrentKeepAliveCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentKeepAliveCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8890"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8891"); - node.BrowseName = ToQualifiedName("CurrentLifetimeCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentLifetimeCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8891"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8892"); - node.BrowseName = ToQualifiedName("UnacknowledgedMessageCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UnacknowledgedMessageCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8892"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8893"); - node.BrowseName = ToQualifiedName("DiscardedMessageCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DiscardedMessageCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8893"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8894"); - node.BrowseName = ToQualifiedName("MonitoredItemCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MonitoredItemCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8894"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8895"); - node.BrowseName = ToQualifiedName("DisabledMonitoredItemCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DisabledMonitoredItemCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8895"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8896"); - node.BrowseName = ToQualifiedName("MonitoringQueueOverflowCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MonitoringQueueOverflowCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8896"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8897"); - node.BrowseName = ToQualifiedName("NextSequenceNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("NextSequenceNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8897"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8902"); - node.BrowseName = ToQualifiedName("EventQueueOverFlowCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2172"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EventQueueOverFlowCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8902"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2196"); - node.BrowseName = ToQualifiedName("SessionDiagnosticsArrayType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SessionDiagnosticsArrayType"); - attrs.Type = ToNodeId("i=865"); - attrs.Rank = 1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2197"); - node.BrowseName = ToQualifiedName("SessionDiagnosticsVariableType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SessionDiagnosticsVariableType"); - attrs.Type = ToNodeId("i=865"); - attrs.Rank = -1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2198"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2199"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2200"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2201"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2202"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2203"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2204"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3050"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2205"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2206"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2207"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2208"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2209"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8900"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11892"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2217"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2218"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2219"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2220"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2221"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2222"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2223"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2224"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2225"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2226"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2227"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2228"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2229"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2230"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2231"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2232"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2233"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2234"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2235"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2236"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2237"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2238"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2239"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2240"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2241"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2242"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2730"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2197"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2731"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2198"); - node.BrowseName = ToQualifiedName("SessionId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2198"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2199"); - node.BrowseName = ToQualifiedName("SessionName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionName"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2199"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2200"); - node.BrowseName = ToQualifiedName("ClientDescription"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientDescription"); - attrs.Type = ToNodeId("i=308"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2200"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2201"); - node.BrowseName = ToQualifiedName("ServerUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ServerUri"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2201"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2202"); - node.BrowseName = ToQualifiedName("EndpointUrl"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EndpointUrl"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2202"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2203"); - node.BrowseName = ToQualifiedName("LocaleIds"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LocaleIds"); - attrs.Type = ToNodeId("i=295"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2203"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2204"); - node.BrowseName = ToQualifiedName("ActualSessionTimeout"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ActualSessionTimeout"); - attrs.Type = ToNodeId("i=290"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2204"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3050"); - node.BrowseName = ToQualifiedName("MaxResponseMessageSize"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MaxResponseMessageSize"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3050"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2205"); - node.BrowseName = ToQualifiedName("ClientConnectionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientConnectionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2205"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2206"); - node.BrowseName = ToQualifiedName("ClientLastContactTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientLastContactTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2206"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2207"); - node.BrowseName = ToQualifiedName("CurrentSubscriptionsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentSubscriptionsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2207"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2208"); - node.BrowseName = ToQualifiedName("CurrentMonitoredItemsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentMonitoredItemsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2208"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2209"); - node.BrowseName = ToQualifiedName("CurrentPublishRequestsInQueue"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentPublishRequestsInQueue"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2209"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8900"); - node.BrowseName = ToQualifiedName("TotalRequestCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TotalRequestCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8900"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11892"); - node.BrowseName = ToQualifiedName("UnauthorizedRequestCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UnauthorizedRequestCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11892"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2217"); - node.BrowseName = ToQualifiedName("ReadCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ReadCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2217"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2218"); - node.BrowseName = ToQualifiedName("HistoryReadCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("HistoryReadCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2218"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2219"); - node.BrowseName = ToQualifiedName("WriteCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("WriteCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2219"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2220"); - node.BrowseName = ToQualifiedName("HistoryUpdateCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("HistoryUpdateCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2220"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2221"); - node.BrowseName = ToQualifiedName("CallCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CallCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2221"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2222"); - node.BrowseName = ToQualifiedName("CreateMonitoredItemsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CreateMonitoredItemsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2222"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2223"); - node.BrowseName = ToQualifiedName("ModifyMonitoredItemsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ModifyMonitoredItemsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2223"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2224"); - node.BrowseName = ToQualifiedName("SetMonitoringModeCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SetMonitoringModeCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2224"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2225"); - node.BrowseName = ToQualifiedName("SetTriggeringCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SetTriggeringCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2225"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2226"); - node.BrowseName = ToQualifiedName("DeleteMonitoredItemsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteMonitoredItemsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2226"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2227"); - node.BrowseName = ToQualifiedName("CreateSubscriptionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CreateSubscriptionCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2227"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2228"); - node.BrowseName = ToQualifiedName("ModifySubscriptionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ModifySubscriptionCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2228"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2229"); - node.BrowseName = ToQualifiedName("SetPublishingModeCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SetPublishingModeCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2229"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2230"); - node.BrowseName = ToQualifiedName("PublishCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PublishCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2230"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2231"); - node.BrowseName = ToQualifiedName("RepublishCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RepublishCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2231"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2232"); - node.BrowseName = ToQualifiedName("TransferSubscriptionsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransferSubscriptionsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2232"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2233"); - node.BrowseName = ToQualifiedName("DeleteSubscriptionsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteSubscriptionsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2233"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2234"); - node.BrowseName = ToQualifiedName("AddNodesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AddNodesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2234"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2235"); - node.BrowseName = ToQualifiedName("AddReferencesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AddReferencesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2235"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2236"); - node.BrowseName = ToQualifiedName("DeleteNodesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteNodesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2236"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2237"); - node.BrowseName = ToQualifiedName("DeleteReferencesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteReferencesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2237"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2238"); - node.BrowseName = ToQualifiedName("BrowseCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BrowseCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2238"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2239"); - node.BrowseName = ToQualifiedName("BrowseNextCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BrowseNextCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2239"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2240"); - node.BrowseName = ToQualifiedName("TranslateBrowsePathsToNodeIdsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TranslateBrowsePathsToNodeIdsCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2240"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2241"); - node.BrowseName = ToQualifiedName("QueryFirstCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("QueryFirstCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2241"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2242"); - node.BrowseName = ToQualifiedName("QueryNextCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("QueryNextCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2242"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2730"); - node.BrowseName = ToQualifiedName("RegisterNodesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RegisterNodesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2730"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2731"); - node.BrowseName = ToQualifiedName("UnregisterNodesCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2197"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UnregisterNodesCount"); - attrs.Type = ToNodeId("i=871"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2731"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2243"); - node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsArrayType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsArrayType"); - attrs.Type = ToNodeId("i=868"); - attrs.Rank = 1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2244"); - node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsType"); - attrs.Type = ToNodeId("i=868"); - attrs.Rank = -1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2244"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2245"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2244"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2246"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2244"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2247"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2244"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2248"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2244"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2249"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2244"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2250"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2244"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2251"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2244"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2252"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2244"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3058"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2245"); - node.BrowseName = ToQualifiedName("SessionId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2244"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2245"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2246"); - node.BrowseName = ToQualifiedName("ClientUserIdOfSession"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2244"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientUserIdOfSession"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2246"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2247"); - node.BrowseName = ToQualifiedName("ClientUserIdHistory"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2244"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientUserIdHistory"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2247"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2248"); - node.BrowseName = ToQualifiedName("AuthenticationMechanism"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2244"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AuthenticationMechanism"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2248"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2249"); - node.BrowseName = ToQualifiedName("Encoding"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2244"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Encoding"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2249"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2250"); - node.BrowseName = ToQualifiedName("TransportProtocol"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2244"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransportProtocol"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2250"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2251"); - node.BrowseName = ToQualifiedName("SecurityMode"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2244"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecurityMode"); - attrs.Type = ToNodeId("i=302"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2251"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2252"); - node.BrowseName = ToQualifiedName("SecurityPolicyUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2244"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecurityPolicyUri"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3058"); - node.BrowseName = ToQualifiedName("ClientCertificate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2244"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientCertificate"); - attrs.Type = ObjectId::ByteString; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3058"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11487"); - node.BrowseName = ToQualifiedName("OptionSetType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("OptionSetType"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11487"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11488"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11487"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11701"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11488"); - node.BrowseName = ToQualifiedName("OptionSetValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11487"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OptionSetValues"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11488"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11701"); - node.BrowseName = ToQualifiedName("BitMask"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11487"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BitMask"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11701"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3048"); - node.BrowseName = ToQualifiedName("EventTypes"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=86"); - node.ReferenceTypeId = ReferenceId::Organizes; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("EventTypes"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::Organizes; - ref.SourceNodeId = ToNodeId("i=3048"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2041"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2253"); - node.BrowseName = ToQualifiedName("Server"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=85"); - node.ReferenceTypeId = ReferenceId::Organizes; - node.TypeDefinition = ToNodeId("i=2004"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Server"); - attrs.EventNotifier = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2253"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2254"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2253"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2255"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2253"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2256"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2253"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2267"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2253"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2994"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2253"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2268"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2253"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2274"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2253"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2295"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2253"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2296"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2253"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11715"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2253"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11492"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2254"); - node.BrowseName = ToQualifiedName("ServerArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2253"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The list of server URIs used by the server."); - attrs.DisplayName = LocalizedText("ServerArray"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2255"); - node.BrowseName = ToQualifiedName("NamespaceArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2253"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The list of namespace URIs used by the server."); - attrs.DisplayName = LocalizedText("NamespaceArray"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2256"); - node.BrowseName = ToQualifiedName("ServerStatus"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2253"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2138"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The current status of the server."); - attrs.DisplayName = LocalizedText("ServerStatus"); - attrs.Type = ToNodeId("i=862"); - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2256"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2257"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2256"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2258"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2256"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2259"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2256"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2260"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2256"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2992"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2256"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2993"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2257"); - node.BrowseName = ToQualifiedName("StartTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2256"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StartTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2258"); - node.BrowseName = ToQualifiedName("CurrentTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2256"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2259"); - node.BrowseName = ToQualifiedName("State"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2256"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("State"); - attrs.Type = ToNodeId("i=852"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2260"); - node.BrowseName = ToQualifiedName("BuildInfo"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2256"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=3051"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BuildInfo"); - attrs.Type = ToNodeId("i=338"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2260"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2262"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2260"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2263"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2260"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2261"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2260"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2264"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2260"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2265"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2260"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2266"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2262"); - node.BrowseName = ToQualifiedName("ProductUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2260"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ProductUri"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2263"); - node.BrowseName = ToQualifiedName("ManufacturerName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2260"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ManufacturerName"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2261"); - node.BrowseName = ToQualifiedName("ProductName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2260"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ProductName"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2264"); - node.BrowseName = ToQualifiedName("SoftwareVersion"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2260"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SoftwareVersion"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2265"); - node.BrowseName = ToQualifiedName("BuildNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2260"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BuildNumber"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2266"); - node.BrowseName = ToQualifiedName("BuildDate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2260"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BuildDate"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2992"); - node.BrowseName = ToQualifiedName("SecondsTillShutdown"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2256"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecondsTillShutdown"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2993"); - node.BrowseName = ToQualifiedName("ShutdownReason"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2256"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ShutdownReason"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2267"); - node.BrowseName = ToQualifiedName("ServiceLevel"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2253"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A value indicating the level of service the server can provide. 255 indicates the best."); - attrs.DisplayName = LocalizedText("ServiceLevel"); - attrs.Type = ObjectId::Byte; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2994"); - node.BrowseName = ToQualifiedName("Auditing"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2253"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A flag indicating whether the server is currently generating audit events."); - attrs.DisplayName = LocalizedText("Auditing"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - attrs.MinimumSamplingInterval = 1000; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2268"); - node.BrowseName = ToQualifiedName("ServerCapabilities"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2253"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2013"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Describes capabilities supported by the server."); - attrs.DisplayName = LocalizedText("ServerCapabilities"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2268"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2269"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2268"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2271"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2268"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2272"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2268"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2735"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2268"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2736"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2268"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2737"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2268"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3704"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2268"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11702"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2268"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11703"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2268"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11704"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2268"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2996"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2268"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2997"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2269"); - node.BrowseName = ToQualifiedName("ServerProfileArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2268"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of profiles supported by the server."); - attrs.DisplayName = LocalizedText("ServerProfileArray"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2271"); - node.BrowseName = ToQualifiedName("LocaleIdArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2268"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of locales supported by the server."); - attrs.DisplayName = LocalizedText("LocaleIdArray"); - attrs.Type = ToNodeId("i=295"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2272"); - node.BrowseName = ToQualifiedName("MinSupportedSampleRate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2268"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The minimum sampling interval supported by the server."); - attrs.DisplayName = LocalizedText("MinSupportedSampleRate"); - attrs.Type = ToNodeId("i=290"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2735"); - node.BrowseName = ToQualifiedName("MaxBrowseContinuationPoints"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2268"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of continuation points for Browse operations per session."); - attrs.DisplayName = LocalizedText("MaxBrowseContinuationPoints"); - attrs.Type = ObjectId::UInt16; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2736"); - node.BrowseName = ToQualifiedName("MaxQueryContinuationPoints"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2268"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of continuation points for Query operations per session."); - attrs.DisplayName = LocalizedText("MaxQueryContinuationPoints"); - attrs.Type = ObjectId::UInt16; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2737"); - node.BrowseName = ToQualifiedName("MaxHistoryContinuationPoints"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2268"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of continuation points for ReadHistory operations per session."); - attrs.DisplayName = LocalizedText("MaxHistoryContinuationPoints"); - attrs.Type = ObjectId::UInt16; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3704"); - node.BrowseName = ToQualifiedName("SoftwareCertificates"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2268"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The software certificates owned by the server."); - attrs.DisplayName = LocalizedText("SoftwareCertificates"); - attrs.Type = ToNodeId("i=344"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11702"); - node.BrowseName = ToQualifiedName("MaxArrayLength"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2268"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum length for an array value supported by the server."); - attrs.DisplayName = LocalizedText("MaxArrayLength"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11703"); - node.BrowseName = ToQualifiedName("MaxStringLength"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2268"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum length for a string value supported by the server."); - attrs.DisplayName = LocalizedText("MaxStringLength"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11704"); - node.BrowseName = ToQualifiedName("OperationLimits"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2268"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=11564"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Defines the limits supported by the server for different operations."); - attrs.DisplayName = LocalizedText("OperationLimits"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11704"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11705"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11704"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12165"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11704"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12166"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11704"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11707"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11704"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12167"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11704"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12168"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11704"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11709"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11704"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11710"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11704"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11711"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11704"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11712"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11704"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11713"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11704"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11714"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11705"); - node.BrowseName = ToQualifiedName("MaxNodesPerRead"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11704"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single Read request."); - attrs.DisplayName = LocalizedText("MaxNodesPerRead"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12165"); - node.BrowseName = ToQualifiedName("MaxNodesPerHistoryReadData"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11704"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single data HistoryRead request."); - attrs.DisplayName = LocalizedText("MaxNodesPerHistoryReadData"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12166"); - node.BrowseName = ToQualifiedName("MaxNodesPerHistoryReadEvents"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11704"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single event HistoryRead request."); - attrs.DisplayName = LocalizedText("MaxNodesPerHistoryReadEvents"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11707"); - node.BrowseName = ToQualifiedName("MaxNodesPerWrite"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11704"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single Write request."); - attrs.DisplayName = LocalizedText("MaxNodesPerWrite"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12167"); - node.BrowseName = ToQualifiedName("MaxNodesPerHistoryUpdateData"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11704"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single data HistoryUpdate request."); - attrs.DisplayName = LocalizedText("MaxNodesPerHistoryUpdateData"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12168"); - node.BrowseName = ToQualifiedName("MaxNodesPerHistoryUpdateEvents"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11704"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single event HistoryUpdate request."); - attrs.DisplayName = LocalizedText("MaxNodesPerHistoryUpdateEvents"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11709"); - node.BrowseName = ToQualifiedName("MaxNodesPerMethodCall"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11704"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single Call request."); - attrs.DisplayName = LocalizedText("MaxNodesPerMethodCall"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11710"); - node.BrowseName = ToQualifiedName("MaxNodesPerBrowse"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11704"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single Browse request."); - attrs.DisplayName = LocalizedText("MaxNodesPerBrowse"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11711"); - node.BrowseName = ToQualifiedName("MaxNodesPerRegisterNodes"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11704"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single RegisterNodes request."); - attrs.DisplayName = LocalizedText("MaxNodesPerRegisterNodes"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11712"); - node.BrowseName = ToQualifiedName("MaxNodesPerTranslateBrowsePathsToNodeIds"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11704"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single TranslateBrowsePathsToNodeIds request."); - attrs.DisplayName = LocalizedText("MaxNodesPerTranslateBrowsePathsToNodeIds"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11713"); - node.BrowseName = ToQualifiedName("MaxNodesPerNodeManagement"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11704"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single AddNodes, AddReferences, DeleteNodes or DeleteReferences request."); - attrs.DisplayName = LocalizedText("MaxNodesPerNodeManagement"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11714"); - node.BrowseName = ToQualifiedName("MaxMonitoredItemsPerCall"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11704"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum number of operations in a single MonitoredItem related request."); - attrs.DisplayName = LocalizedText("MaxMonitoredItemsPerCall"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2996"); - node.BrowseName = ToQualifiedName("ModellingRules"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2268"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("A folder for the modelling rules supported by the server."); - attrs.DisplayName = LocalizedText("ModellingRules"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2997"); - node.BrowseName = ToQualifiedName("AggregateFunctions"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2268"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=61"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("A folder for the real time aggregates supported by the server."); - attrs.DisplayName = LocalizedText("AggregateFunctions"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2274"); - node.BrowseName = ToQualifiedName("ServerDiagnostics"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2253"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2020"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Reports diagnostics about the server."); - attrs.DisplayName = LocalizedText("ServerDiagnostics"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2274"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2275"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2274"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2289"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2274"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2290"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2274"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3706"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2274"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2294"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2275"); - node.BrowseName = ToQualifiedName("ServerDiagnosticsSummary"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2274"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2150"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A summary of server level diagnostics."); - attrs.DisplayName = LocalizedText("ServerDiagnosticsSummary"); - attrs.Type = ToNodeId("i=859"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2275"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2276"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2275"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2277"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2275"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2278"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2275"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2279"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2275"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3705"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2275"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2281"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2275"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2282"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2275"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2284"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2275"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2285"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2275"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2286"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2275"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2287"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2275"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2288"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2276"); - node.BrowseName = ToQualifiedName("ServerViewCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2275"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ServerViewCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2277"); - node.BrowseName = ToQualifiedName("CurrentSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2275"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2278"); - node.BrowseName = ToQualifiedName("CumulatedSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2275"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CumulatedSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2279"); - node.BrowseName = ToQualifiedName("SecurityRejectedSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2275"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecurityRejectedSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3705"); - node.BrowseName = ToQualifiedName("RejectedSessionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2275"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RejectedSessionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2281"); - node.BrowseName = ToQualifiedName("SessionTimeoutCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2275"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionTimeoutCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2282"); - node.BrowseName = ToQualifiedName("SessionAbortCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2275"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionAbortCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2284"); - node.BrowseName = ToQualifiedName("PublishingIntervalCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2275"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("PublishingIntervalCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2285"); - node.BrowseName = ToQualifiedName("CurrentSubscriptionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2275"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentSubscriptionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2286"); - node.BrowseName = ToQualifiedName("CumulatedSubscriptionCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2275"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CumulatedSubscriptionCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2287"); - node.BrowseName = ToQualifiedName("SecurityRejectedRequestsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2275"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SecurityRejectedRequestsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2288"); - node.BrowseName = ToQualifiedName("RejectedRequestsCount"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2275"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=63"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RejectedRequestsCount"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2289"); - node.BrowseName = ToQualifiedName("SamplingIntervalDiagnosticsArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2274"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2164"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of diagnostics for each sampling interval supported by the server."); - attrs.DisplayName = LocalizedText("SamplingIntervalDiagnosticsArray"); - attrs.Type = ToNodeId("i=856"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2290"); - node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2274"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2171"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of diagnostics for each active subscription."); - attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsArray"); - attrs.Type = ToNodeId("i=874"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3706"); - node.BrowseName = ToQualifiedName("SessionsDiagnosticsSummary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2274"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2026"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("A summary of session level diagnostics."); - attrs.DisplayName = LocalizedText("SessionsDiagnosticsSummary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3706"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3707"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=3706"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3708"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3707"); - node.BrowseName = ToQualifiedName("SessionDiagnosticsArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3706"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2196"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of diagnostics for each active session."); - attrs.DisplayName = LocalizedText("SessionDiagnosticsArray"); - attrs.Type = ToNodeId("i=865"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3708"); - node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3706"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2243"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A list of security related diagnostics for each active session."); - attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsArray"); - attrs.Type = ToNodeId("i=868"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2294"); - node.BrowseName = ToQualifiedName("EnabledFlag"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2274"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("If TRUE the diagnostics collection is enabled."); - attrs.DisplayName = LocalizedText("EnabledFlag"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - attrs.AccessLevel = (VariableAccessLevel) 3; - attrs.UserAccessLevel = (VariableAccessLevel) 3; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2295"); - node.BrowseName = ToQualifiedName("VendorServerInfo"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2253"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2033"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Server information provided by the vendor."); - attrs.DisplayName = LocalizedText("VendorServerInfo"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2296"); - node.BrowseName = ToQualifiedName("ServerRedundancy"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2253"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2034"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Describes the redundancy capabilities of the server."); - attrs.DisplayName = LocalizedText("ServerRedundancy"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2296"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3709"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2296"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11312"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2296"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11313"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2296"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11314"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3709"); - node.BrowseName = ToQualifiedName("RedundancySupport"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2296"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("Indicates what style of redundancy is supported by the server."); - attrs.DisplayName = LocalizedText("RedundancySupport"); - attrs.Type = ToNodeId("i=851"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11312"); - node.BrowseName = ToQualifiedName("CurrentServerId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2296"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentServerId"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11313"); - node.BrowseName = ToQualifiedName("RedundantServerArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2296"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RedundantServerArray"); - attrs.Type = ToNodeId("i=853"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11314"); - node.BrowseName = ToQualifiedName("ServerUriArray"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2296"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ServerUriArray"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11715"); - node.BrowseName = ToQualifiedName("Namespaces"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2253"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=11645"); - ObjectAttributes attrs; - attrs.Description = LocalizedText("Describes the namespaces supported by the server."); - attrs.DisplayName = LocalizedText("Namespaces"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11493"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11492"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11494"); - node.BrowseName = ToQualifiedName("OutputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11492"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OutputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11737"); - node.BrowseName = ToQualifiedName("BitFieldMaskDataType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=9"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.Description = LocalizedText("A mask of 32 bits that can be updated individually by using the top 32 bits as a mask."); - attrs.DisplayName = LocalizedText("BitFieldMaskDataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2299"); - node.BrowseName = ToQualifiedName("StateMachineType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("StateMachineType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2299"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2769"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2299"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2770"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2769"); - node.BrowseName = ToQualifiedName("CurrentState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2299"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2755"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2769"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3720"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2769"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3720"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2769"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3720"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2770"); - node.BrowseName = ToQualifiedName("LastTransition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2299"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2762"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastTransition"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2770"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3724"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2770"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3724"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2770"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3724"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2755"); - node.BrowseName = ToQualifiedName("StateVariableType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("StateVariableType"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2755"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2756"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2755"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2757"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2755"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2758"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2755"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2759"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2756"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2755"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2756"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2757"); - node.BrowseName = ToQualifiedName("Name"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2755"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Name"); - attrs.Type = ObjectId::QualifiedName; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2757"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2758"); - node.BrowseName = ToQualifiedName("Number"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2755"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Number"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2758"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2759"); - node.BrowseName = ToQualifiedName("EffectiveDisplayName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2755"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EffectiveDisplayName"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2759"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2762"); - node.BrowseName = ToQualifiedName("TransitionVariableType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionVariableType"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2762"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2763"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2762"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2764"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2762"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2765"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2762"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2766"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2762"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11456"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2763"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2762"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2763"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2764"); - node.BrowseName = ToQualifiedName("Name"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2762"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Name"); - attrs.Type = ObjectId::QualifiedName; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2764"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2765"); - node.BrowseName = ToQualifiedName("Number"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2762"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Number"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2765"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2766"); - node.BrowseName = ToQualifiedName("TransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2762"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2766"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11456"); - node.BrowseName = ToQualifiedName("EffectiveTransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2762"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EffectiveTransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11456"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2771"); - node.BrowseName = ToQualifiedName("FiniteStateMachineType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2299"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("FiniteStateMachineType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2771"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2772"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2771"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2773"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2772"); - node.BrowseName = ToQualifiedName("CurrentState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2771"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2760"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2772"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3728"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2772"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3728"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2772"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3728"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2773"); - node.BrowseName = ToQualifiedName("LastTransition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2771"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2767"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastTransition"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2773"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3732"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2773"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3732"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2773"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3732"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2760"); - node.BrowseName = ToQualifiedName("FiniteStateVariableType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=2755"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("FiniteStateVariableType"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2760"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2761"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2761"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2760"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2761"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2767"); - node.BrowseName = ToQualifiedName("FiniteTransitionVariableType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=2762"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("FiniteTransitionVariableType"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2767"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2768"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2768"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2767"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2768"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2307"); - node.BrowseName = ToQualifiedName("StateType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("StateType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2307"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2308"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2308"); - node.BrowseName = ToQualifiedName("StateNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2307"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StateNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2308"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2309"); - node.BrowseName = ToQualifiedName("InitialStateType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2307"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("InitialStateType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2310"); - node.BrowseName = ToQualifiedName("TransitionType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2310"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2312"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2312"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2310"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2312"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2311"); - node.BrowseName = ToQualifiedName("TransitionEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionEventType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2311"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2774"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2311"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2775"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2311"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2776"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2774"); - node.BrowseName = ToQualifiedName("Transition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2311"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2762"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Transition"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2774"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3754"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2774"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3754"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2774"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3754"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2775"); - node.BrowseName = ToQualifiedName("FromState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2311"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2755"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("FromState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2775"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3746"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2775"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3746"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2775"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3746"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2776"); - node.BrowseName = ToQualifiedName("ToState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2311"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2755"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ToState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2776"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3750"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2776"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3750"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2776"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3750"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2315"); - node.BrowseName = ToQualifiedName("AuditUpdateStateEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2127"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditUpdateStateEventType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2315"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2777"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2315"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2778"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2777"); - node.BrowseName = ToQualifiedName("OldStateId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2315"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OldStateId"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2777"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2778"); - node.BrowseName = ToQualifiedName("NewStateId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2315"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("NewStateId"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2778"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=338"); - node.BrowseName = ToQualifiedName("BuildInfo"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("BuildInfo"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=851"); - node.BrowseName = ToQualifiedName("RedundancySupport"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("RedundancySupport"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=851"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7611"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7611"); - node.BrowseName = ToQualifiedName("EnumStrings"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=851"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumStrings"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=7611"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=852"); - node.BrowseName = ToQualifiedName("ServerState"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ServerState"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=852"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7612"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7612"); - node.BrowseName = ToQualifiedName("EnumStrings"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=852"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumStrings"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=7612"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=853"); - node.BrowseName = ToQualifiedName("RedundantServerDataType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("RedundantServerDataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11943"); - node.BrowseName = ToQualifiedName("EndpointUrlListDataType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("EndpointUrlListDataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11944"); - node.BrowseName = ToQualifiedName("NetworkGroupDataType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("NetworkGroupDataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=856"); - node.BrowseName = ToQualifiedName("SamplingIntervalDiagnosticsDataType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SamplingIntervalDiagnosticsDataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=859"); - node.BrowseName = ToQualifiedName("ServerDiagnosticsSummaryDataType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ServerDiagnosticsSummaryDataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=862"); - node.BrowseName = ToQualifiedName("ServerStatusDataType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ServerStatusDataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=865"); - node.BrowseName = ToQualifiedName("SessionDiagnosticsDataType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SessionDiagnosticsDataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=868"); - node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsDataType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsDataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=871"); - node.BrowseName = ToQualifiedName("ServiceCounterDataType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ServiceCounterDataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=299"); - node.BrowseName = ToQualifiedName("StatusResult"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("StatusResult"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=874"); - node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsDataType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsDataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=877"); - node.BrowseName = ToQualifiedName("ModelChangeStructureDataType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ModelChangeStructureDataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=897"); - node.BrowseName = ToQualifiedName("SemanticChangeStructureDataType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SemanticChangeStructureDataType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=339"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=338"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=339"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8327"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=854"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=853"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=854"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8843"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11949"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=11943"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=11949"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11951"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11950"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=11944"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=11950"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11954"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=857"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=856"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=857"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8846"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=860"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=859"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=860"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8849"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=863"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=862"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=863"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8852"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=866"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=865"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=866"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8855"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=869"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=868"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=869"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8858"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=872"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=871"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=872"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8861"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=300"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=299"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=300"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8294"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=875"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=874"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=875"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8864"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=878"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=877"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=878"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8867"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=898"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=897"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=898"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8870"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8252"); - node.BrowseName = ToQualifiedName("Opc.Ua"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=92"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=72"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Opc.Ua"); - attrs.Type = ObjectId::ByteString; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8254"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8285"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8291"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8918"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8300"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8297"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8303"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8417"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8333"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8306"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8309"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8312"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8315"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8318"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8363"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8366"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8369"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8372"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8321"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8324"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8330"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8564"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8567"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8570"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8573"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8576"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8579"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8582"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8639"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8702"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8708"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8711"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8807"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8384"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8387"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8390"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8327"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8843"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11951"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11954"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8846"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8849"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8852"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8855"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8858"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8861"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8294"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8864"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8867"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8870"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8873"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8876"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12175"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12178"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12083"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12086"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8882"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=8252"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8879"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8254"); - node.BrowseName = ToQualifiedName("NamespaceUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A URI that uniquely identifies the dictionary."); - attrs.DisplayName = LocalizedText("NamespaceUri"); - attrs.Type = ObjectId::String; - attrs.Value = +"http://opcfoundation.org/UA/2008/02/Types.xsd"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8285"); - node.BrowseName = ToQualifiedName("Argument"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Argument"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='Argument']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8291"); - node.BrowseName = ToQualifiedName("EnumValueType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumValueType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='EnumValueType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8918"); - node.BrowseName = ToQualifiedName("TimeZoneDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TimeZoneDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='TimeZoneDataType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8300"); - node.BrowseName = ToQualifiedName("ApplicationDescription"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ApplicationDescription"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='ApplicationDescription']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8297"); - node.BrowseName = ToQualifiedName("UserTokenPolicy"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UserTokenPolicy"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='UserTokenPolicy']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8303"); - node.BrowseName = ToQualifiedName("EndpointDescription"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EndpointDescription"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='EndpointDescription']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8417"); - node.BrowseName = ToQualifiedName("RegisteredServer"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RegisteredServer"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='RegisteredServer']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8333"); - node.BrowseName = ToQualifiedName("SignedSoftwareCertificate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SignedSoftwareCertificate"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='SignedSoftwareCertificate']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8306"); - node.BrowseName = ToQualifiedName("UserIdentityToken"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UserIdentityToken"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='UserIdentityToken']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8309"); - node.BrowseName = ToQualifiedName("AnonymousIdentityToken"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AnonymousIdentityToken"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='AnonymousIdentityToken']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8312"); - node.BrowseName = ToQualifiedName("UserNameIdentityToken"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UserNameIdentityToken"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='UserNameIdentityToken']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8315"); - node.BrowseName = ToQualifiedName("X509IdentityToken"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("X509IdentityToken"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='X509IdentityToken']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8318"); - node.BrowseName = ToQualifiedName("IssuedIdentityToken"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("IssuedIdentityToken"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='IssuedIdentityToken']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8363"); - node.BrowseName = ToQualifiedName("AddNodesItem"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AddNodesItem"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='AddNodesItem']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8366"); - node.BrowseName = ToQualifiedName("AddReferencesItem"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AddReferencesItem"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='AddReferencesItem']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8369"); - node.BrowseName = ToQualifiedName("DeleteNodesItem"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteNodesItem"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='DeleteNodesItem']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8372"); - node.BrowseName = ToQualifiedName("DeleteReferencesItem"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteReferencesItem"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='DeleteReferencesItem']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8321"); - node.BrowseName = ToQualifiedName("EndpointConfiguration"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EndpointConfiguration"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='EndpointConfiguration']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8324"); - node.BrowseName = ToQualifiedName("SupportedProfile"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SupportedProfile"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='SupportedProfile']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8330"); - node.BrowseName = ToQualifiedName("SoftwareCertificate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SoftwareCertificate"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='SoftwareCertificate']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8564"); - node.BrowseName = ToQualifiedName("ContentFilterElement"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ContentFilterElement"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='ContentFilterElement']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8567"); - node.BrowseName = ToQualifiedName("ContentFilter"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ContentFilter"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='ContentFilter']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8570"); - node.BrowseName = ToQualifiedName("FilterOperand"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("FilterOperand"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='FilterOperand']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8573"); - node.BrowseName = ToQualifiedName("ElementOperand"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ElementOperand"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='ElementOperand']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8576"); - node.BrowseName = ToQualifiedName("LiteralOperand"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LiteralOperand"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='LiteralOperand']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8579"); - node.BrowseName = ToQualifiedName("AttributeOperand"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AttributeOperand"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='AttributeOperand']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8582"); - node.BrowseName = ToQualifiedName("SimpleAttributeOperand"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SimpleAttributeOperand"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='SimpleAttributeOperand']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8639"); - node.BrowseName = ToQualifiedName("HistoryEvent"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("HistoryEvent"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='HistoryEvent']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8702"); - node.BrowseName = ToQualifiedName("MonitoringFilter"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MonitoringFilter"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='MonitoringFilter']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8708"); - node.BrowseName = ToQualifiedName("EventFilter"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EventFilter"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='EventFilter']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8711"); - node.BrowseName = ToQualifiedName("AggregateConfiguration"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AggregateConfiguration"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='AggregateConfiguration']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8807"); - node.BrowseName = ToQualifiedName("HistoryEventFieldList"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("HistoryEventFieldList"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='HistoryEventFieldList']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8384"); - node.BrowseName = ToQualifiedName("ScalarTestType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ScalarTestType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='ScalarTestType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8387"); - node.BrowseName = ToQualifiedName("ArrayTestType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ArrayTestType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='ArrayTestType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8390"); - node.BrowseName = ToQualifiedName("CompositeTestType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CompositeTestType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='CompositeTestType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8327"); - node.BrowseName = ToQualifiedName("BuildInfo"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BuildInfo"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='BuildInfo']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8843"); - node.BrowseName = ToQualifiedName("RedundantServerDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RedundantServerDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='RedundantServerDataType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11951"); - node.BrowseName = ToQualifiedName("EndpointUrlListDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EndpointUrlListDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='EndpointUrlListDataType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11954"); - node.BrowseName = ToQualifiedName("NetworkGroupDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("NetworkGroupDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='NetworkGroupDataType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8846"); - node.BrowseName = ToQualifiedName("SamplingIntervalDiagnosticsDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SamplingIntervalDiagnosticsDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='SamplingIntervalDiagnosticsDataType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8849"); - node.BrowseName = ToQualifiedName("ServerDiagnosticsSummaryDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ServerDiagnosticsSummaryDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='ServerDiagnosticsSummaryDataType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8852"); - node.BrowseName = ToQualifiedName("ServerStatusDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ServerStatusDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='ServerStatusDataType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8855"); - node.BrowseName = ToQualifiedName("SessionDiagnosticsDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionDiagnosticsDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='SessionDiagnosticsDataType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8858"); - node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='SessionSecurityDiagnosticsDataType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8861"); - node.BrowseName = ToQualifiedName("ServiceCounterDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ServiceCounterDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='ServiceCounterDataType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8294"); - node.BrowseName = ToQualifiedName("StatusResult"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StatusResult"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='StatusResult']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8864"); - node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='SubscriptionDiagnosticsDataType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8867"); - node.BrowseName = ToQualifiedName("ModelChangeStructureDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ModelChangeStructureDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='ModelChangeStructureDataType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8870"); - node.BrowseName = ToQualifiedName("SemanticChangeStructureDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SemanticChangeStructureDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='SemanticChangeStructureDataType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8873"); - node.BrowseName = ToQualifiedName("Range"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Range"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='Range']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8876"); - node.BrowseName = ToQualifiedName("EUInformation"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EUInformation"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='EUInformation']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12175"); - node.BrowseName = ToQualifiedName("ComplexNumberType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ComplexNumberType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='ComplexNumberType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12178"); - node.BrowseName = ToQualifiedName("DoubleComplexNumberType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DoubleComplexNumberType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='DoubleComplexNumberType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12083"); - node.BrowseName = ToQualifiedName("AxisInformation"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AxisInformation"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='AxisInformation']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12086"); - node.BrowseName = ToQualifiedName("XVType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("XVType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='XVType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8882"); - node.BrowseName = ToQualifiedName("ProgramDiagnosticDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ProgramDiagnosticDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='ProgramDiagnosticDataType']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8879"); - node.BrowseName = ToQualifiedName("Annotation"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8252"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Annotation"); - attrs.Type = ObjectId::String; - attrs.Value = +"//xs:element[@name='Annotation']"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=340"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=338"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=340"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7692"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=855"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=853"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=855"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8208"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11957"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=11943"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=11957"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11959"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11958"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=11944"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=11958"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11962"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=858"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=856"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=858"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8211"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=861"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=859"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=861"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8214"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=864"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=862"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=864"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8217"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=867"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=865"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=867"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8220"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=870"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=868"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=870"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8223"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=873"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=871"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=873"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8226"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=301"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=299"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=301"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7659"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=876"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=874"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=876"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8229"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=879"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=877"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=879"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8232"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=899"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=897"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=899"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8235"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7617"); - node.BrowseName = ToQualifiedName("Opc.Ua"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=93"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=72"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Opc.Ua"); - attrs.Type = ObjectId::ByteString; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7619"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7650"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7656"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8914"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7665"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7662"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7668"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7782"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7698"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7671"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7674"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7677"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7680"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7683"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7728"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7731"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7734"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7737"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7686"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7689"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7695"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7929"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7932"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7935"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7938"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7941"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7944"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7947"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8004"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8067"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8073"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8076"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8172"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7749"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7752"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7755"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7692"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8208"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11959"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11962"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8211"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8214"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8217"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8220"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8223"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8226"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=7659"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8229"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8232"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8235"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8238"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8241"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12183"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12186"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12091"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12094"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8247"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=7617"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8244"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7619"); - node.BrowseName = ToQualifiedName("NamespaceUri"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A URI that uniquely identifies the dictionary."); - attrs.DisplayName = LocalizedText("NamespaceUri"); - attrs.Type = ObjectId::String; - attrs.Value = +"http://opcfoundation.org/UA/"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7650"); - node.BrowseName = ToQualifiedName("Argument"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Argument"); - attrs.Type = ObjectId::String; - attrs.Value = +"Argument"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7656"); - node.BrowseName = ToQualifiedName("EnumValueType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumValueType"); - attrs.Type = ObjectId::String; - attrs.Value = +"EnumValueType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8914"); - node.BrowseName = ToQualifiedName("TimeZoneDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TimeZoneDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"TimeZoneDataType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7665"); - node.BrowseName = ToQualifiedName("ApplicationDescription"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ApplicationDescription"); - attrs.Type = ObjectId::String; - attrs.Value = +"ApplicationDescription"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7662"); - node.BrowseName = ToQualifiedName("UserTokenPolicy"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UserTokenPolicy"); - attrs.Type = ObjectId::String; - attrs.Value = +"UserTokenPolicy"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7668"); - node.BrowseName = ToQualifiedName("EndpointDescription"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EndpointDescription"); - attrs.Type = ObjectId::String; - attrs.Value = +"EndpointDescription"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7782"); - node.BrowseName = ToQualifiedName("RegisteredServer"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RegisteredServer"); - attrs.Type = ObjectId::String; - attrs.Value = +"RegisteredServer"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7698"); - node.BrowseName = ToQualifiedName("SignedSoftwareCertificate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SignedSoftwareCertificate"); - attrs.Type = ObjectId::String; - attrs.Value = +"SignedSoftwareCertificate"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7671"); - node.BrowseName = ToQualifiedName("UserIdentityToken"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UserIdentityToken"); - attrs.Type = ObjectId::String; - attrs.Value = +"UserIdentityToken"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7674"); - node.BrowseName = ToQualifiedName("AnonymousIdentityToken"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AnonymousIdentityToken"); - attrs.Type = ObjectId::String; - attrs.Value = +"AnonymousIdentityToken"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7677"); - node.BrowseName = ToQualifiedName("UserNameIdentityToken"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UserNameIdentityToken"); - attrs.Type = ObjectId::String; - attrs.Value = +"UserNameIdentityToken"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7680"); - node.BrowseName = ToQualifiedName("X509IdentityToken"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("X509IdentityToken"); - attrs.Type = ObjectId::String; - attrs.Value = +"X509IdentityToken"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7683"); - node.BrowseName = ToQualifiedName("IssuedIdentityToken"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("IssuedIdentityToken"); - attrs.Type = ObjectId::String; - attrs.Value = +"IssuedIdentityToken"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7728"); - node.BrowseName = ToQualifiedName("AddNodesItem"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AddNodesItem"); - attrs.Type = ObjectId::String; - attrs.Value = +"AddNodesItem"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7731"); - node.BrowseName = ToQualifiedName("AddReferencesItem"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AddReferencesItem"); - attrs.Type = ObjectId::String; - attrs.Value = +"AddReferencesItem"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7734"); - node.BrowseName = ToQualifiedName("DeleteNodesItem"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteNodesItem"); - attrs.Type = ObjectId::String; - attrs.Value = +"DeleteNodesItem"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7737"); - node.BrowseName = ToQualifiedName("DeleteReferencesItem"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DeleteReferencesItem"); - attrs.Type = ObjectId::String; - attrs.Value = +"DeleteReferencesItem"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7686"); - node.BrowseName = ToQualifiedName("EndpointConfiguration"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EndpointConfiguration"); - attrs.Type = ObjectId::String; - attrs.Value = +"EndpointConfiguration"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7689"); - node.BrowseName = ToQualifiedName("SupportedProfile"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SupportedProfile"); - attrs.Type = ObjectId::String; - attrs.Value = +"SupportedProfile"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7695"); - node.BrowseName = ToQualifiedName("SoftwareCertificate"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SoftwareCertificate"); - attrs.Type = ObjectId::String; - attrs.Value = +"SoftwareCertificate"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7929"); - node.BrowseName = ToQualifiedName("ContentFilterElement"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ContentFilterElement"); - attrs.Type = ObjectId::String; - attrs.Value = +"ContentFilterElement"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7932"); - node.BrowseName = ToQualifiedName("ContentFilter"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ContentFilter"); - attrs.Type = ObjectId::String; - attrs.Value = +"ContentFilter"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7935"); - node.BrowseName = ToQualifiedName("FilterOperand"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("FilterOperand"); - attrs.Type = ObjectId::String; - attrs.Value = +"FilterOperand"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7938"); - node.BrowseName = ToQualifiedName("ElementOperand"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ElementOperand"); - attrs.Type = ObjectId::String; - attrs.Value = +"ElementOperand"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7941"); - node.BrowseName = ToQualifiedName("LiteralOperand"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LiteralOperand"); - attrs.Type = ObjectId::String; - attrs.Value = +"LiteralOperand"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7944"); - node.BrowseName = ToQualifiedName("AttributeOperand"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AttributeOperand"); - attrs.Type = ObjectId::String; - attrs.Value = +"AttributeOperand"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7947"); - node.BrowseName = ToQualifiedName("SimpleAttributeOperand"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SimpleAttributeOperand"); - attrs.Type = ObjectId::String; - attrs.Value = +"SimpleAttributeOperand"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8004"); - node.BrowseName = ToQualifiedName("HistoryEvent"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("HistoryEvent"); - attrs.Type = ObjectId::String; - attrs.Value = +"HistoryEvent"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8067"); - node.BrowseName = ToQualifiedName("MonitoringFilter"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MonitoringFilter"); - attrs.Type = ObjectId::String; - attrs.Value = +"MonitoringFilter"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8073"); - node.BrowseName = ToQualifiedName("EventFilter"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EventFilter"); - attrs.Type = ObjectId::String; - attrs.Value = +"EventFilter"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8076"); - node.BrowseName = ToQualifiedName("AggregateConfiguration"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AggregateConfiguration"); - attrs.Type = ObjectId::String; - attrs.Value = +"AggregateConfiguration"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8172"); - node.BrowseName = ToQualifiedName("HistoryEventFieldList"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("HistoryEventFieldList"); - attrs.Type = ObjectId::String; - attrs.Value = +"HistoryEventFieldList"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7749"); - node.BrowseName = ToQualifiedName("ScalarTestType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ScalarTestType"); - attrs.Type = ObjectId::String; - attrs.Value = +"ScalarTestType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7752"); - node.BrowseName = ToQualifiedName("ArrayTestType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ArrayTestType"); - attrs.Type = ObjectId::String; - attrs.Value = +"ArrayTestType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7755"); - node.BrowseName = ToQualifiedName("CompositeTestType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CompositeTestType"); - attrs.Type = ObjectId::String; - attrs.Value = +"CompositeTestType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7692"); - node.BrowseName = ToQualifiedName("BuildInfo"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BuildInfo"); - attrs.Type = ObjectId::String; - attrs.Value = +"BuildInfo"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8208"); - node.BrowseName = ToQualifiedName("RedundantServerDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("RedundantServerDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"RedundantServerDataType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11959"); - node.BrowseName = ToQualifiedName("EndpointUrlListDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EndpointUrlListDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"EndpointUrlListDataType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11962"); - node.BrowseName = ToQualifiedName("NetworkGroupDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("NetworkGroupDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"NetworkGroupDataType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8211"); - node.BrowseName = ToQualifiedName("SamplingIntervalDiagnosticsDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SamplingIntervalDiagnosticsDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"SamplingIntervalDiagnosticsDataType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8214"); - node.BrowseName = ToQualifiedName("ServerDiagnosticsSummaryDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ServerDiagnosticsSummaryDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"ServerDiagnosticsSummaryDataType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8217"); - node.BrowseName = ToQualifiedName("ServerStatusDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ServerStatusDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"ServerStatusDataType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8220"); - node.BrowseName = ToQualifiedName("SessionDiagnosticsDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionDiagnosticsDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"SessionDiagnosticsDataType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8223"); - node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"SessionSecurityDiagnosticsDataType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8226"); - node.BrowseName = ToQualifiedName("ServiceCounterDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ServiceCounterDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"ServiceCounterDataType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=7659"); - node.BrowseName = ToQualifiedName("StatusResult"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StatusResult"); - attrs.Type = ObjectId::String; - attrs.Value = +"StatusResult"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8229"); - node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"SubscriptionDiagnosticsDataType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8232"); - node.BrowseName = ToQualifiedName("ModelChangeStructureDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ModelChangeStructureDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"ModelChangeStructureDataType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8235"); - node.BrowseName = ToQualifiedName("SemanticChangeStructureDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SemanticChangeStructureDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"SemanticChangeStructureDataType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8238"); - node.BrowseName = ToQualifiedName("Range"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Range"); - attrs.Type = ObjectId::String; - attrs.Value = +"Range"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8241"); - node.BrowseName = ToQualifiedName("EUInformation"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EUInformation"); - attrs.Type = ObjectId::String; - attrs.Value = +"EUInformation"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12183"); - node.BrowseName = ToQualifiedName("ComplexNumberType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ComplexNumberType"); - attrs.Type = ObjectId::String; - attrs.Value = +"ComplexNumberType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12186"); - node.BrowseName = ToQualifiedName("DoubleComplexNumberType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DoubleComplexNumberType"); - attrs.Type = ObjectId::String; - attrs.Value = +"DoubleComplexNumberType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12091"); - node.BrowseName = ToQualifiedName("AxisInformation"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AxisInformation"); - attrs.Type = ObjectId::String; - attrs.Value = +"AxisInformation"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12094"); - node.BrowseName = ToQualifiedName("XVType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("XVType"); - attrs.Type = ObjectId::String; - attrs.Value = +"XVType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8247"); - node.BrowseName = ToQualifiedName("ProgramDiagnosticDataType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ProgramDiagnosticDataType"); - attrs.Type = ObjectId::String; - attrs.Value = +"ProgramDiagnosticDataType"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8244"); - node.BrowseName = ToQualifiedName("Annotation"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=7617"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=69"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Annotation"); - attrs.Type = ObjectId::String; - attrs.Value = +"Annotation"; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - } +void CreateAddressSpacePart5(OpcUa::NodeManagementServices & registry) +{ + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=51"); + node.BrowseName = ToQualifiedName("FromState"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=32"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for a reference to the state before a transition."); + attrs.DisplayName = LocalizedText("FromState"); + attrs.InverseName = LocalizedText("ToTransition"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=52"); + node.BrowseName = ToQualifiedName("ToState"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=32"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for a reference to the state after a transition."); + attrs.DisplayName = LocalizedText("ToState"); + attrs.InverseName = LocalizedText("FromTransition"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=53"); + node.BrowseName = ToQualifiedName("HasCause"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=32"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for a reference to a method that can cause a transition to occur."); + attrs.DisplayName = LocalizedText("HasCause"); + attrs.InverseName = LocalizedText("MayBeCausedBy"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=54"); + node.BrowseName = ToQualifiedName("HasEffect"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=32"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for a reference to an event that may be raised when a transition occurs."); + attrs.DisplayName = LocalizedText("HasEffect"); + attrs.InverseName = LocalizedText("MayBeEffectedBy"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=117"); + node.BrowseName = ToQualifiedName("HasSubStateMachine"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=32"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.Description = LocalizedText("The type for a reference to a substate for a state."); + attrs.DisplayName = LocalizedText("HasSubStateMachine"); + attrs.InverseName = LocalizedText("SubStateMachineOf"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=58"); + node.BrowseName = ToQualifiedName("BaseObjectType"); + node.Class = NodeClass::ObjectType; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("The base type for all object nodes."); + attrs.DisplayName = LocalizedText("BaseObjectType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=61"); + node.BrowseName = ToQualifiedName("FolderType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("The type for objects that organize other nodes."); + attrs.DisplayName = LocalizedText("FolderType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=62"); + node.BrowseName = ToQualifiedName("BaseVariableType"); + node.Class = NodeClass::VariableType; + VariableTypeAttributes attrs; + attrs.Description = LocalizedText("The abstract base type for all variable nodes."); + attrs.DisplayName = LocalizedText("BaseVariableType"); + attrs.Type = ObjectId::String; + attrs.Rank = -2; + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=63"); + node.BrowseName = ToQualifiedName("BaseDataVariableType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=62"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.Description = LocalizedText("The type for variable that represents a process value."); + attrs.DisplayName = LocalizedText("BaseDataVariableType"); + attrs.Type = ObjectId::String; + attrs.Rank = -2; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=68"); + node.BrowseName = ToQualifiedName("PropertyType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=62"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.Description = LocalizedText("The type for variable that represents a property of another node."); + attrs.DisplayName = LocalizedText("PropertyType"); + attrs.Type = ObjectId::String; + attrs.Rank = -2; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=69"); + node.BrowseName = ToQualifiedName("DataTypeDescriptionType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.Description = LocalizedText("The type for variable that represents the description of a data type encoding."); + attrs.DisplayName = LocalizedText("DataTypeDescriptionType"); + attrs.Type = ObjectId::String; + attrs.Rank = -2; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=69"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=104"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=69"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=105"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=104"); + node.BrowseName = ToQualifiedName("DataTypeVersion"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=69"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The version number for the data type description."); + attrs.DisplayName = LocalizedText("DataTypeVersion"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=104"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=105"); + node.BrowseName = ToQualifiedName("DictionaryFragment"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=69"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A fragment of a data type dictionary that defines the data type."); + attrs.DisplayName = LocalizedText("DictionaryFragment"); + attrs.Type = ObjectId::ByteString; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=105"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=72"); + node.BrowseName = ToQualifiedName("DataTypeDictionaryType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.Description = LocalizedText("The type for variable that represents the collection of data type decriptions."); + attrs.DisplayName = LocalizedText("DataTypeDictionaryType"); + attrs.Type = ObjectId::ByteString; + attrs.Rank = -2; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=72"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=106"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=72"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=107"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=106"); + node.BrowseName = ToQualifiedName("DataTypeVersion"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=72"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The version number for the data type dictionary."); + attrs.DisplayName = LocalizedText("DataTypeVersion"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=106"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=107"); + node.BrowseName = ToQualifiedName("NamespaceUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=72"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A URI that uniquely identifies the dictionary."); + attrs.DisplayName = LocalizedText("NamespaceUri"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=107"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=75"); + node.BrowseName = ToQualifiedName("DataTypeSystemType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("DataTypeSystemType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=76"); + node.BrowseName = ToQualifiedName("DataTypeEncodingType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("DataTypeEncodingType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=77"); + node.BrowseName = ToQualifiedName("ModellingRuleType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("The type for an object that describes how an instance declaration is used when a type is instantiated."); + attrs.DisplayName = LocalizedText("ModellingRuleType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=77"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=111"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=111"); + node.BrowseName = ToQualifiedName("NamingRule"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=77"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Specified the significances of the BrowseName when a type is instantiated."); + attrs.DisplayName = LocalizedText("NamingRule"); + attrs.Type = ToNodeId("i=120"); + attrs.Value = (int32_t) 1; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=111"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=78"); + node.BrowseName = ToQualifiedName("Mandatory"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=77"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Specifies that an instance with the attributes and references of the instance declaration must appear when a type is instantiated."); + attrs.DisplayName = LocalizedText("Mandatory"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=78"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=112"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=112"); + node.BrowseName = ToQualifiedName("NamingRule"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=78"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Specified the significances of the BrowseName when a type is instantiated."); + attrs.DisplayName = LocalizedText("NamingRule"); + attrs.Type = ToNodeId("i=120"); + attrs.Value = (int32_t) 1; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=80"); + node.BrowseName = ToQualifiedName("Optional"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=77"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Specifies that an instance with the attributes and references of the instance declaration may appear when a type is instantiated."); + attrs.DisplayName = LocalizedText("Optional"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=80"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=113"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=113"); + node.BrowseName = ToQualifiedName("NamingRule"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=80"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Specified the significances of the BrowseName when a type is instantiated."); + attrs.DisplayName = LocalizedText("NamingRule"); + attrs.Type = ToNodeId("i=120"); + attrs.Value = (int32_t) 2; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=83"); + node.BrowseName = ToQualifiedName("ExposesItsArray"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=77"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Specifies that an instance appears for each element of the containing array variable."); + attrs.DisplayName = LocalizedText("ExposesItsArray"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=83"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=114"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=114"); + node.BrowseName = ToQualifiedName("NamingRule"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=83"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Specified the significances of the BrowseName when a type is instantiated."); + attrs.DisplayName = LocalizedText("NamingRule"); + attrs.Type = ToNodeId("i=120"); + attrs.Value = (int32_t) 3; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=79"); + node.BrowseName = ToQualifiedName("MandatoryShared"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=77"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Specifies that a reference to a shared instance must appear in when a type is instantiated."); + attrs.DisplayName = LocalizedText("MandatoryShared"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=79"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=116"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=116"); + node.BrowseName = ToQualifiedName("NamingRule"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=79"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Specified the significances of the BrowseName when a type is instantiated."); + attrs.DisplayName = LocalizedText("NamingRule"); + attrs.Type = ToNodeId("i=120"); + attrs.Value = (int32_t) 1; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11508"); + node.BrowseName = ToQualifiedName("OptionalPlaceholder"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=77"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Specifies that zero or more instances with the attributes and references of the instance declaration may appear when a type is instantiated."); + attrs.DisplayName = LocalizedText("OptionalPlaceholder"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11508"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11509"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11509"); + node.BrowseName = ToQualifiedName("NamingRule"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11508"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Specified the significances of the BrowseName when a type is instantiated."); + attrs.DisplayName = LocalizedText("NamingRule"); + attrs.Type = ToNodeId("i=120"); + attrs.Value = (int32_t) 2; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11510"); + node.BrowseName = ToQualifiedName("MandatoryPlaceholder"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=77"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Specifies that one or more instances with the attributes and references of the instance declaration must appear when a type is instantiated."); + attrs.DisplayName = LocalizedText("MandatoryPlaceholder"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11510"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11511"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11511"); + node.BrowseName = ToQualifiedName("NamingRule"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11510"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Specified the significances of the BrowseName when a type is instantiated."); + attrs.DisplayName = LocalizedText("NamingRule"); + attrs.Type = ToNodeId("i=120"); + attrs.Value = (int32_t) 1; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=84"); + node.BrowseName = ToQualifiedName("Root"); + node.Class = NodeClass::Object; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("The root of the server address space."); + attrs.DisplayName = LocalizedText("Root"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=85"); + node.BrowseName = ToQualifiedName("Objects"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=84"); + node.ReferenceTypeId = ReferenceId::Organizes; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("The browse entry point when looking for objects in the server address space."); + attrs.DisplayName = LocalizedText("Objects"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=86"); + node.BrowseName = ToQualifiedName("Types"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=84"); + node.ReferenceTypeId = ReferenceId::Organizes; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("The browse entry point when looking for types in the server address space."); + attrs.DisplayName = LocalizedText("Types"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=87"); + node.BrowseName = ToQualifiedName("Views"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=84"); + node.ReferenceTypeId = ReferenceId::Organizes; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("The browse entry point when looking for views in the server address space."); + attrs.DisplayName = LocalizedText("Views"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=88"); + node.BrowseName = ToQualifiedName("ObjectTypes"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=86"); + node.ReferenceTypeId = ReferenceId::Organizes; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("The browse entry point when looking for object types in the server address space."); + attrs.DisplayName = LocalizedText("ObjectTypes"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::Organizes; + ref.SourceNodeId = ToNodeId("i=88"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=58"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=89"); + node.BrowseName = ToQualifiedName("VariableTypes"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=86"); + node.ReferenceTypeId = ReferenceId::Organizes; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("The browse entry point when looking for variable types in the server address space."); + attrs.DisplayName = LocalizedText("VariableTypes"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::Organizes; + ref.SourceNodeId = ToNodeId("i=89"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=62"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=90"); + node.BrowseName = ToQualifiedName("DataTypes"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=86"); + node.ReferenceTypeId = ReferenceId::Organizes; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("The browse entry point when looking for data types in the server address space."); + attrs.DisplayName = LocalizedText("DataTypes"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::Organizes; + ref.SourceNodeId = ToNodeId("i=90"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=24"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=91"); + node.BrowseName = ToQualifiedName("ReferenceTypes"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=86"); + node.ReferenceTypeId = ReferenceId::Organizes; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("The browse entry point when looking for reference types in the server address space."); + attrs.DisplayName = LocalizedText("ReferenceTypes"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::Organizes; + ref.SourceNodeId = ToNodeId("i=91"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=31"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=92"); + node.BrowseName = ToQualifiedName("XML Schema"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=90"); + node.ReferenceTypeId = ReferenceId::Organizes; + node.TypeDefinition = ToNodeId("i=75"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("A type system which uses XML schema to describe the encoding of data types."); + attrs.DisplayName = LocalizedText("XML Schema"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=93"); + node.BrowseName = ToQualifiedName("OPC Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=90"); + node.ReferenceTypeId = ReferenceId::Organizes; + node.TypeDefinition = ToNodeId("i=75"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("A type system which uses OPC binary schema to describe the encoding of data types."); + attrs.DisplayName = LocalizedText("OPC Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2004"); + node.BrowseName = ToQualifiedName("ServerType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("Specifies the current status and capabilities of the server."); + attrs.DisplayName = LocalizedText("ServerType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2004"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2005"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2004"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2006"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2004"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2007"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2004"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2008"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2004"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2742"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2004"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2009"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2004"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2010"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2004"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2011"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2004"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2012"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2004"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11527"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2004"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11489"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2005"); + node.BrowseName = ToQualifiedName("ServerArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2004"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The list of server URIs used by the server."); + attrs.DisplayName = LocalizedText("ServerArray"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2005"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2006"); + node.BrowseName = ToQualifiedName("NamespaceArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2004"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The list of namespace URIs used by the server."); + attrs.DisplayName = LocalizedText("NamespaceArray"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2006"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2007"); + node.BrowseName = ToQualifiedName("ServerStatus"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2004"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2138"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The current status of the server."); + attrs.DisplayName = LocalizedText("ServerStatus"); + attrs.Type = ToNodeId("i=862"); + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2007"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3074"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2007"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3075"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2007"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3076"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2007"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3077"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2007"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3084"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2007"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3085"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2007"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3074"); + node.BrowseName = ToQualifiedName("StartTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2007"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StartTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3074"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3075"); + node.BrowseName = ToQualifiedName("CurrentTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2007"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3075"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3076"); + node.BrowseName = ToQualifiedName("State"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2007"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("State"); + attrs.Type = ToNodeId("i=852"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3076"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3077"); + node.BrowseName = ToQualifiedName("BuildInfo"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2007"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=3051"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BuildInfo"); + attrs.Type = ToNodeId("i=338"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3077"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3078"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3077"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3079"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3077"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3080"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3077"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3081"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3077"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3082"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3077"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3083"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3077"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3078"); + node.BrowseName = ToQualifiedName("ProductUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3077"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ProductUri"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3078"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3079"); + node.BrowseName = ToQualifiedName("ManufacturerName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3077"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ManufacturerName"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3079"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3080"); + node.BrowseName = ToQualifiedName("ProductName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3077"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ProductName"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3080"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3081"); + node.BrowseName = ToQualifiedName("SoftwareVersion"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3077"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SoftwareVersion"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3081"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3082"); + node.BrowseName = ToQualifiedName("BuildNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3077"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BuildNumber"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3082"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3083"); + node.BrowseName = ToQualifiedName("BuildDate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3077"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BuildDate"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3083"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3084"); + node.BrowseName = ToQualifiedName("SecondsTillShutdown"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2007"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecondsTillShutdown"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3084"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3085"); + node.BrowseName = ToQualifiedName("ShutdownReason"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2007"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ShutdownReason"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3085"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2008"); + node.BrowseName = ToQualifiedName("ServiceLevel"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2004"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A value indicating the level of service the server can provide. 255 indicates the best."); + attrs.DisplayName = LocalizedText("ServiceLevel"); + attrs.Type = ObjectId::Byte; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2008"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2742"); + node.BrowseName = ToQualifiedName("Auditing"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2004"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A flag indicating whether the server is currently generating audit events."); + attrs.DisplayName = LocalizedText("Auditing"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2742"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2009"); + node.BrowseName = ToQualifiedName("ServerCapabilities"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2004"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2013"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Describes capabilities supported by the server."); + attrs.DisplayName = LocalizedText("ServerCapabilities"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2009"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3086"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2009"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3087"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2009"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3088"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2009"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3089"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2009"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3090"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2009"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3091"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2009"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3092"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2009"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3093"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2009"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3094"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2009"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3086"); + node.BrowseName = ToQualifiedName("ServerProfileArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2009"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of profiles supported by the server."); + attrs.DisplayName = LocalizedText("ServerProfileArray"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3086"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3087"); + node.BrowseName = ToQualifiedName("LocaleIdArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2009"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of locales supported by the server."); + attrs.DisplayName = LocalizedText("LocaleIdArray"); + attrs.Type = ToNodeId("i=295"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3087"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3088"); + node.BrowseName = ToQualifiedName("MinSupportedSampleRate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2009"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The minimum sampling interval supported by the server."); + attrs.DisplayName = LocalizedText("MinSupportedSampleRate"); + attrs.Type = ToNodeId("i=290"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3088"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3089"); + node.BrowseName = ToQualifiedName("MaxBrowseContinuationPoints"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2009"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of continuation points for Browse operations per session."); + attrs.DisplayName = LocalizedText("MaxBrowseContinuationPoints"); + attrs.Type = ObjectId::UInt16; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3089"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3090"); + node.BrowseName = ToQualifiedName("MaxQueryContinuationPoints"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2009"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of continuation points for Query operations per session."); + attrs.DisplayName = LocalizedText("MaxQueryContinuationPoints"); + attrs.Type = ObjectId::UInt16; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3090"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3091"); + node.BrowseName = ToQualifiedName("MaxHistoryContinuationPoints"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2009"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of continuation points for ReadHistory operations per session."); + attrs.DisplayName = LocalizedText("MaxHistoryContinuationPoints"); + attrs.Type = ObjectId::UInt16; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3091"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3092"); + node.BrowseName = ToQualifiedName("SoftwareCertificates"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2009"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The software certificates owned by the server."); + attrs.DisplayName = LocalizedText("SoftwareCertificates"); + attrs.Type = ToNodeId("i=344"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3092"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3093"); + node.BrowseName = ToQualifiedName("ModellingRules"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2009"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("A folder for the modelling rules supported by the server."); + attrs.DisplayName = LocalizedText("ModellingRules"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3093"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3094"); + node.BrowseName = ToQualifiedName("AggregateFunctions"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2009"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("A folder for the real time aggregates supported by the server."); + attrs.DisplayName = LocalizedText("AggregateFunctions"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3094"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2010"); + node.BrowseName = ToQualifiedName("ServerDiagnostics"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2004"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2020"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Reports diagnostics about the server."); + attrs.DisplayName = LocalizedText("ServerDiagnostics"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2010"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3095"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2010"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3110"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2010"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3111"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2010"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3114"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2010"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3095"); + node.BrowseName = ToQualifiedName("ServerDiagnosticsSummary"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2010"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2150"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A summary of server level diagnostics."); + attrs.DisplayName = LocalizedText("ServerDiagnosticsSummary"); + attrs.Type = ToNodeId("i=859"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3095"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3096"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3095"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3097"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3095"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3098"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3095"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3099"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3095"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3100"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3095"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3101"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3095"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3102"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3095"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3104"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3095"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3105"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3095"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3106"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3095"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3107"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3095"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3108"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3095"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3096"); + node.BrowseName = ToQualifiedName("ServerViewCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3095"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ServerViewCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3096"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3097"); + node.BrowseName = ToQualifiedName("CurrentSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3095"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3097"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3098"); + node.BrowseName = ToQualifiedName("CumulatedSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3095"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CumulatedSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3099"); + node.BrowseName = ToQualifiedName("SecurityRejectedSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3095"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecurityRejectedSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3099"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3100"); + node.BrowseName = ToQualifiedName("RejectedSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3095"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RejectedSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3100"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3101"); + node.BrowseName = ToQualifiedName("SessionTimeoutCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3095"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionTimeoutCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3101"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3102"); + node.BrowseName = ToQualifiedName("SessionAbortCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3095"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionAbortCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3102"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3104"); + node.BrowseName = ToQualifiedName("PublishingIntervalCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3095"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PublishingIntervalCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3104"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3105"); + node.BrowseName = ToQualifiedName("CurrentSubscriptionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3095"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentSubscriptionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3105"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3106"); + node.BrowseName = ToQualifiedName("CumulatedSubscriptionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3095"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CumulatedSubscriptionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3106"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3107"); + node.BrowseName = ToQualifiedName("SecurityRejectedRequestsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3095"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecurityRejectedRequestsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3107"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3108"); + node.BrowseName = ToQualifiedName("RejectedRequestsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3095"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RejectedRequestsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3108"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3110"); + node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2010"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2171"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of diagnostics for each active subscription."); + attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsArray"); + attrs.Type = ToNodeId("i=874"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3110"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3111"); + node.BrowseName = ToQualifiedName("SessionsDiagnosticsSummary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2010"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2026"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("A summary of session level diagnostics."); + attrs.DisplayName = LocalizedText("SessionsDiagnosticsSummary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3111"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3112"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3111"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3113"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3111"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3112"); + node.BrowseName = ToQualifiedName("SessionDiagnosticsArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3111"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2196"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of diagnostics for each active session."); + attrs.DisplayName = LocalizedText("SessionDiagnosticsArray"); + attrs.Type = ToNodeId("i=865"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3112"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3113"); + node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3111"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2243"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of security related diagnostics for each active session."); + attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsArray"); + attrs.Type = ToNodeId("i=868"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3113"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3114"); + node.BrowseName = ToQualifiedName("EnabledFlag"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2010"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("If TRUE the diagnostics collection is enabled."); + attrs.DisplayName = LocalizedText("EnabledFlag"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + attrs.AccessLevel = (VariableAccessLevel) 3; + attrs.UserAccessLevel = (VariableAccessLevel) 3; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3114"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2011"); + node.BrowseName = ToQualifiedName("VendorServerInfo"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2004"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2033"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Server information provided by the vendor."); + attrs.DisplayName = LocalizedText("VendorServerInfo"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2011"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2012"); + node.BrowseName = ToQualifiedName("ServerRedundancy"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2004"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2034"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Describes the redundancy capabilities of the server."); + attrs.DisplayName = LocalizedText("ServerRedundancy"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2012"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3115"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2012"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3115"); + node.BrowseName = ToQualifiedName("RedundancySupport"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2012"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Indicates what style of redundancy is supported by the server."); + attrs.DisplayName = LocalizedText("RedundancySupport"); + attrs.Type = ToNodeId("i=851"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3115"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11527"); + node.BrowseName = ToQualifiedName("Namespaces"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2004"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=11645"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Describes the namespaces supported by the server."); + attrs.DisplayName = LocalizedText("Namespaces"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11527"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11490"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11489"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11490"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11491"); + node.BrowseName = ToQualifiedName("OutputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11489"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OutputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11491"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2013"); + node.BrowseName = ToQualifiedName("ServerCapabilitiesType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("Describes the capabilities supported by the server."); + attrs.DisplayName = LocalizedText("ServerCapabilitiesType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2013"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2014"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2013"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2016"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2013"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2017"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2013"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2732"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2013"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2733"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2013"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2734"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2013"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3049"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2013"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11549"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2013"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11550"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2013"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11551"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2013"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2019"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2013"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2754"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2013"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11562"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2014"); + node.BrowseName = ToQualifiedName("ServerProfileArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2013"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of profiles supported by the server."); + attrs.DisplayName = LocalizedText("ServerProfileArray"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2014"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2016"); + node.BrowseName = ToQualifiedName("LocaleIdArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2013"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of locales supported by the server."); + attrs.DisplayName = LocalizedText("LocaleIdArray"); + attrs.Type = ToNodeId("i=295"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2016"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2017"); + node.BrowseName = ToQualifiedName("MinSupportedSampleRate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2013"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The minimum sampling interval supported by the server."); + attrs.DisplayName = LocalizedText("MinSupportedSampleRate"); + attrs.Type = ToNodeId("i=290"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2017"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2732"); + node.BrowseName = ToQualifiedName("MaxBrowseContinuationPoints"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2013"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of continuation points for Browse operations per session."); + attrs.DisplayName = LocalizedText("MaxBrowseContinuationPoints"); + attrs.Type = ObjectId::UInt16; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2732"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2733"); + node.BrowseName = ToQualifiedName("MaxQueryContinuationPoints"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2013"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of continuation points for Query operations per session."); + attrs.DisplayName = LocalizedText("MaxQueryContinuationPoints"); + attrs.Type = ObjectId::UInt16; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2733"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2734"); + node.BrowseName = ToQualifiedName("MaxHistoryContinuationPoints"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2013"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of continuation points for ReadHistory operations per session."); + attrs.DisplayName = LocalizedText("MaxHistoryContinuationPoints"); + attrs.Type = ObjectId::UInt16; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2734"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3049"); + node.BrowseName = ToQualifiedName("SoftwareCertificates"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2013"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The software certificates owned by the server."); + attrs.DisplayName = LocalizedText("SoftwareCertificates"); + attrs.Type = ToNodeId("i=344"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3049"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11549"); + node.BrowseName = ToQualifiedName("MaxArrayLength"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2013"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum length for an array value supported by the server."); + attrs.DisplayName = LocalizedText("MaxArrayLength"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11549"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11550"); + node.BrowseName = ToQualifiedName("MaxStringLength"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2013"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum length for a string value supported by the server."); + attrs.DisplayName = LocalizedText("MaxStringLength"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11550"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11551"); + node.BrowseName = ToQualifiedName("OperationLimits"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2013"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=11564"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Defines the limits supported by the server for different operations."); + attrs.DisplayName = LocalizedText("OperationLimits"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11551"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2019"); + node.BrowseName = ToQualifiedName("ModellingRules"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2013"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("A folder for the modelling rules supported by the server."); + attrs.DisplayName = LocalizedText("ModellingRules"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2019"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2754"); + node.BrowseName = ToQualifiedName("AggregateFunctions"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2013"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("A folder for the real time aggregates supported by the server."); + attrs.DisplayName = LocalizedText("AggregateFunctions"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2754"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11562"); + node.BrowseName = ToQualifiedName(""); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2013"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2137"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText(""); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11562"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11508"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2020"); + node.BrowseName = ToQualifiedName("ServerDiagnosticsType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("The diagnostics information for a server."); + attrs.DisplayName = LocalizedText("ServerDiagnosticsType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2020"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2021"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2020"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2022"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2020"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2023"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2020"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2744"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2020"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2025"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2021"); + node.BrowseName = ToQualifiedName("ServerDiagnosticsSummary"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2020"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2150"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A summary of server level diagnostics."); + attrs.DisplayName = LocalizedText("ServerDiagnosticsSummary"); + attrs.Type = ToNodeId("i=859"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3116"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3117"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3118"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3119"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3120"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3121"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3122"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3124"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3125"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3126"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3127"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3128"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3116"); + node.BrowseName = ToQualifiedName("ServerViewCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2021"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ServerViewCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3116"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3117"); + node.BrowseName = ToQualifiedName("CurrentSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2021"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3117"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3118"); + node.BrowseName = ToQualifiedName("CumulatedSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2021"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CumulatedSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3118"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3119"); + node.BrowseName = ToQualifiedName("SecurityRejectedSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2021"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecurityRejectedSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3119"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3120"); + node.BrowseName = ToQualifiedName("RejectedSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2021"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RejectedSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3120"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3121"); + node.BrowseName = ToQualifiedName("SessionTimeoutCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2021"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionTimeoutCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3121"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3122"); + node.BrowseName = ToQualifiedName("SessionAbortCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2021"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionAbortCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3122"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3124"); + node.BrowseName = ToQualifiedName("PublishingIntervalCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2021"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PublishingIntervalCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3124"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3125"); + node.BrowseName = ToQualifiedName("CurrentSubscriptionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2021"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentSubscriptionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3125"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3126"); + node.BrowseName = ToQualifiedName("CumulatedSubscriptionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2021"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CumulatedSubscriptionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3126"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3127"); + node.BrowseName = ToQualifiedName("SecurityRejectedRequestsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2021"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecurityRejectedRequestsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3127"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3128"); + node.BrowseName = ToQualifiedName("RejectedRequestsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2021"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RejectedRequestsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3128"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2022"); + node.BrowseName = ToQualifiedName("SamplingIntervalDiagnosticsArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2020"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2164"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of diagnostics for each sampling interval supported by the server."); + attrs.DisplayName = LocalizedText("SamplingIntervalDiagnosticsArray"); + attrs.Type = ToNodeId("i=856"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2022"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2023"); + node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2020"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2171"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of diagnostics for each active subscription."); + attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsArray"); + attrs.Type = ToNodeId("i=874"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2023"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2744"); + node.BrowseName = ToQualifiedName("SessionsDiagnosticsSummary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2020"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2026"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("A summary of session level diagnostics."); + attrs.DisplayName = LocalizedText("SessionsDiagnosticsSummary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2744"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3129"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2744"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3130"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2744"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3129"); + node.BrowseName = ToQualifiedName("SessionDiagnosticsArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2744"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2196"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of diagnostics for each active session."); + attrs.DisplayName = LocalizedText("SessionDiagnosticsArray"); + attrs.Type = ToNodeId("i=865"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3129"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3130"); + node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2744"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2243"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of security related diagnostics for each active session."); + attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsArray"); + attrs.Type = ToNodeId("i=868"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3130"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2025"); + node.BrowseName = ToQualifiedName("EnabledFlag"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2020"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("If TRUE the diagnostics collection is enabled."); + attrs.DisplayName = LocalizedText("EnabledFlag"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + attrs.AccessLevel = (VariableAccessLevel) 3; + attrs.UserAccessLevel = (VariableAccessLevel) 3; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2025"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2026"); + node.BrowseName = ToQualifiedName("SessionsDiagnosticsSummaryType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("Provides a summary of session level diagnostics."); + attrs.DisplayName = LocalizedText("SessionsDiagnosticsSummaryType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2026"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2027"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2026"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2028"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2026"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12097"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2027"); + node.BrowseName = ToQualifiedName("SessionDiagnosticsArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2026"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2196"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of diagnostics for each active session."); + attrs.DisplayName = LocalizedText("SessionDiagnosticsArray"); + attrs.Type = ToNodeId("i=865"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2027"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2028"); + node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2026"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2243"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of security related diagnostics for each active session."); + attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsArray"); + attrs.Type = ToNodeId("i=868"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2028"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12097"); + node.BrowseName = ToQualifiedName(""); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2026"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2029"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText(""); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12097"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12098"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12097"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12142"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12097"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12152"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12097"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11508"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12098"); + node.BrowseName = ToQualifiedName("SessionDiagnostics"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12097"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2197"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Diagnostics information for an active session."); + attrs.DisplayName = LocalizedText("SessionDiagnostics"); + attrs.Type = ToNodeId("i=865"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12099"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12100"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12101"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12102"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12103"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12104"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12105"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12106"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12107"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12108"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12109"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12110"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12111"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12112"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12113"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12114"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12115"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12116"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12117"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12118"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12119"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12120"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12121"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12122"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12123"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12124"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12125"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12126"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12127"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12128"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12129"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12130"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12131"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12132"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12133"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12134"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12135"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12136"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12137"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12138"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12139"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12140"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12141"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12099"); + node.BrowseName = ToQualifiedName("SessionId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12099"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12100"); + node.BrowseName = ToQualifiedName("SessionName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionName"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12100"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12101"); + node.BrowseName = ToQualifiedName("ClientDescription"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientDescription"); + attrs.Type = ToNodeId("i=308"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12101"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12102"); + node.BrowseName = ToQualifiedName("ServerUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ServerUri"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12102"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12103"); + node.BrowseName = ToQualifiedName("EndpointUrl"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EndpointUrl"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12103"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12104"); + node.BrowseName = ToQualifiedName("LocaleIds"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LocaleIds"); + attrs.Type = ToNodeId("i=295"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12104"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12105"); + node.BrowseName = ToQualifiedName("ActualSessionTimeout"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ActualSessionTimeout"); + attrs.Type = ToNodeId("i=290"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12105"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12106"); + node.BrowseName = ToQualifiedName("MaxResponseMessageSize"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MaxResponseMessageSize"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12106"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12107"); + node.BrowseName = ToQualifiedName("ClientConnectionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientConnectionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12107"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12108"); + node.BrowseName = ToQualifiedName("ClientLastContactTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientLastContactTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12108"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12109"); + node.BrowseName = ToQualifiedName("CurrentSubscriptionsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentSubscriptionsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12109"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12110"); + node.BrowseName = ToQualifiedName("CurrentMonitoredItemsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentMonitoredItemsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12110"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12111"); + node.BrowseName = ToQualifiedName("CurrentPublishRequestsInQueue"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentPublishRequestsInQueue"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12111"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12112"); + node.BrowseName = ToQualifiedName("TotalRequestCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TotalRequestCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12112"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12113"); + node.BrowseName = ToQualifiedName("UnauthorizedRequestCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UnauthorizedRequestCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12113"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12114"); + node.BrowseName = ToQualifiedName("ReadCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ReadCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12114"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12115"); + node.BrowseName = ToQualifiedName("HistoryReadCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("HistoryReadCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12115"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12116"); + node.BrowseName = ToQualifiedName("WriteCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("WriteCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12116"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12117"); + node.BrowseName = ToQualifiedName("HistoryUpdateCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("HistoryUpdateCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12117"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12118"); + node.BrowseName = ToQualifiedName("CallCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CallCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12118"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12119"); + node.BrowseName = ToQualifiedName("CreateMonitoredItemsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CreateMonitoredItemsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12119"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12120"); + node.BrowseName = ToQualifiedName("ModifyMonitoredItemsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ModifyMonitoredItemsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12120"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12121"); + node.BrowseName = ToQualifiedName("SetMonitoringModeCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SetMonitoringModeCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12121"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12122"); + node.BrowseName = ToQualifiedName("SetTriggeringCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SetTriggeringCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12122"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12123"); + node.BrowseName = ToQualifiedName("DeleteMonitoredItemsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteMonitoredItemsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12123"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12124"); + node.BrowseName = ToQualifiedName("CreateSubscriptionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CreateSubscriptionCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12124"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12125"); + node.BrowseName = ToQualifiedName("ModifySubscriptionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ModifySubscriptionCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12125"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12126"); + node.BrowseName = ToQualifiedName("SetPublishingModeCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SetPublishingModeCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12126"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12127"); + node.BrowseName = ToQualifiedName("PublishCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PublishCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12127"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12128"); + node.BrowseName = ToQualifiedName("RepublishCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RepublishCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12128"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12129"); + node.BrowseName = ToQualifiedName("TransferSubscriptionsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransferSubscriptionsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12129"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12130"); + node.BrowseName = ToQualifiedName("DeleteSubscriptionsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteSubscriptionsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12130"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12131"); + node.BrowseName = ToQualifiedName("AddNodesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AddNodesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12131"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12132"); + node.BrowseName = ToQualifiedName("AddReferencesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AddReferencesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12132"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12133"); + node.BrowseName = ToQualifiedName("DeleteNodesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteNodesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12133"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12134"); + node.BrowseName = ToQualifiedName("DeleteReferencesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteReferencesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12134"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12135"); + node.BrowseName = ToQualifiedName("BrowseCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BrowseCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12135"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12136"); + node.BrowseName = ToQualifiedName("BrowseNextCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BrowseNextCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12136"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12137"); + node.BrowseName = ToQualifiedName("TranslateBrowsePathsToNodeIdsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TranslateBrowsePathsToNodeIdsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12137"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12138"); + node.BrowseName = ToQualifiedName("QueryFirstCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("QueryFirstCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12138"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12139"); + node.BrowseName = ToQualifiedName("QueryNextCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("QueryNextCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12139"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12140"); + node.BrowseName = ToQualifiedName("RegisterNodesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RegisterNodesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12140"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12141"); + node.BrowseName = ToQualifiedName("UnregisterNodesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12098"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UnregisterNodesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12141"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12142"); + node.BrowseName = ToQualifiedName("SessionSecurityDiagnostics"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12097"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2244"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Security related diagnostics information for an active session."); + attrs.DisplayName = LocalizedText("SessionSecurityDiagnostics"); + attrs.Type = ToNodeId("i=868"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12143"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12144"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12145"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12146"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12147"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12148"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12149"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12150"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=12142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12151"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12143"); + node.BrowseName = ToQualifiedName("SessionId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12142"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12143"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12144"); + node.BrowseName = ToQualifiedName("ClientUserIdOfSession"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12142"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientUserIdOfSession"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12144"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12145"); + node.BrowseName = ToQualifiedName("ClientUserIdHistory"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12142"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientUserIdHistory"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12145"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12146"); + node.BrowseName = ToQualifiedName("AuthenticationMechanism"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12142"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AuthenticationMechanism"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12146"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12147"); + node.BrowseName = ToQualifiedName("Encoding"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12142"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Encoding"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12147"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12148"); + node.BrowseName = ToQualifiedName("TransportProtocol"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12142"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransportProtocol"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12148"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12149"); + node.BrowseName = ToQualifiedName("SecurityMode"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12142"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecurityMode"); + attrs.Type = ToNodeId("i=302"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12149"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12150"); + node.BrowseName = ToQualifiedName("SecurityPolicyUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12142"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecurityPolicyUri"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12150"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12151"); + node.BrowseName = ToQualifiedName("ClientCertificate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12142"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientCertificate"); + attrs.Type = ObjectId::ByteString; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12151"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12152"); + node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12097"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2171"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of diagnostics for each subscription owned by the session."); + attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsArray"); + attrs.Type = ToNodeId("i=874"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12152"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2029"); + node.BrowseName = ToQualifiedName("SessionDiagnosticsObjectType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("A container for session level diagnostics information."); + attrs.DisplayName = LocalizedText("SessionDiagnosticsObjectType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2029"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2030"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2029"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2031"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2029"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2032"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2030"); + node.BrowseName = ToQualifiedName("SessionDiagnostics"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2029"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2197"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Diagnostics information for an active session."); + attrs.DisplayName = LocalizedText("SessionDiagnostics"); + attrs.Type = ToNodeId("i=865"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3131"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3132"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3133"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3134"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3135"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3136"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3137"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3138"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3139"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3140"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3141"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3142"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3143"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8898"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11891"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3151"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3152"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3153"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3154"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3155"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3156"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3157"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3158"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3159"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3160"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3161"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3162"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3163"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3164"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3165"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3166"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3167"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3168"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3169"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3170"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3171"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3172"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3173"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3174"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3175"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3176"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3177"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3178"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3131"); + node.BrowseName = ToQualifiedName("SessionId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3131"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3132"); + node.BrowseName = ToQualifiedName("SessionName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionName"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3132"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3133"); + node.BrowseName = ToQualifiedName("ClientDescription"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientDescription"); + attrs.Type = ToNodeId("i=308"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3133"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3134"); + node.BrowseName = ToQualifiedName("ServerUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ServerUri"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3134"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3135"); + node.BrowseName = ToQualifiedName("EndpointUrl"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EndpointUrl"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3135"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3136"); + node.BrowseName = ToQualifiedName("LocaleIds"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LocaleIds"); + attrs.Type = ToNodeId("i=295"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3136"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3137"); + node.BrowseName = ToQualifiedName("ActualSessionTimeout"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ActualSessionTimeout"); + attrs.Type = ToNodeId("i=290"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3137"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3138"); + node.BrowseName = ToQualifiedName("MaxResponseMessageSize"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MaxResponseMessageSize"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3138"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3139"); + node.BrowseName = ToQualifiedName("ClientConnectionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientConnectionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3139"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3140"); + node.BrowseName = ToQualifiedName("ClientLastContactTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientLastContactTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3140"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3141"); + node.BrowseName = ToQualifiedName("CurrentSubscriptionsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentSubscriptionsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3141"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3142"); + node.BrowseName = ToQualifiedName("CurrentMonitoredItemsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentMonitoredItemsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3143"); + node.BrowseName = ToQualifiedName("CurrentPublishRequestsInQueue"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentPublishRequestsInQueue"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3143"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8898"); + node.BrowseName = ToQualifiedName("TotalRequestCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TotalRequestCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8898"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11891"); + node.BrowseName = ToQualifiedName("UnauthorizedRequestCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UnauthorizedRequestCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11891"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3151"); + node.BrowseName = ToQualifiedName("ReadCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ReadCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3151"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3152"); + node.BrowseName = ToQualifiedName("HistoryReadCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("HistoryReadCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3152"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3153"); + node.BrowseName = ToQualifiedName("WriteCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("WriteCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3153"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3154"); + node.BrowseName = ToQualifiedName("HistoryUpdateCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("HistoryUpdateCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3154"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3155"); + node.BrowseName = ToQualifiedName("CallCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CallCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3155"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3156"); + node.BrowseName = ToQualifiedName("CreateMonitoredItemsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CreateMonitoredItemsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3156"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3157"); + node.BrowseName = ToQualifiedName("ModifyMonitoredItemsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ModifyMonitoredItemsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3157"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3158"); + node.BrowseName = ToQualifiedName("SetMonitoringModeCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SetMonitoringModeCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3158"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3159"); + node.BrowseName = ToQualifiedName("SetTriggeringCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SetTriggeringCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3159"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3160"); + node.BrowseName = ToQualifiedName("DeleteMonitoredItemsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteMonitoredItemsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3160"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3161"); + node.BrowseName = ToQualifiedName("CreateSubscriptionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CreateSubscriptionCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3161"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3162"); + node.BrowseName = ToQualifiedName("ModifySubscriptionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ModifySubscriptionCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3162"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3163"); + node.BrowseName = ToQualifiedName("SetPublishingModeCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SetPublishingModeCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3163"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3164"); + node.BrowseName = ToQualifiedName("PublishCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PublishCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3164"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3165"); + node.BrowseName = ToQualifiedName("RepublishCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RepublishCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3165"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3166"); + node.BrowseName = ToQualifiedName("TransferSubscriptionsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransferSubscriptionsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3166"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3167"); + node.BrowseName = ToQualifiedName("DeleteSubscriptionsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteSubscriptionsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3167"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3168"); + node.BrowseName = ToQualifiedName("AddNodesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AddNodesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3168"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3169"); + node.BrowseName = ToQualifiedName("AddReferencesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AddReferencesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3169"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3170"); + node.BrowseName = ToQualifiedName("DeleteNodesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteNodesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3170"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3171"); + node.BrowseName = ToQualifiedName("DeleteReferencesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteReferencesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3171"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3172"); + node.BrowseName = ToQualifiedName("BrowseCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BrowseCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3173"); + node.BrowseName = ToQualifiedName("BrowseNextCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BrowseNextCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3173"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3174"); + node.BrowseName = ToQualifiedName("TranslateBrowsePathsToNodeIdsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TranslateBrowsePathsToNodeIdsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3174"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3175"); + node.BrowseName = ToQualifiedName("QueryFirstCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("QueryFirstCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3175"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3176"); + node.BrowseName = ToQualifiedName("QueryNextCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("QueryNextCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3176"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3177"); + node.BrowseName = ToQualifiedName("RegisterNodesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RegisterNodesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3177"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3178"); + node.BrowseName = ToQualifiedName("UnregisterNodesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2030"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UnregisterNodesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3178"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2031"); + node.BrowseName = ToQualifiedName("SessionSecurityDiagnostics"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2029"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2244"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Security related diagnostics information for an active session."); + attrs.DisplayName = LocalizedText("SessionSecurityDiagnostics"); + attrs.Type = ToNodeId("i=868"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2031"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3179"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2031"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3180"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2031"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3181"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2031"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3182"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2031"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3183"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2031"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3184"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2031"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3185"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2031"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3186"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2031"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3187"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2031"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3179"); + node.BrowseName = ToQualifiedName("SessionId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2031"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3179"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3180"); + node.BrowseName = ToQualifiedName("ClientUserIdOfSession"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2031"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientUserIdOfSession"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3180"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3181"); + node.BrowseName = ToQualifiedName("ClientUserIdHistory"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2031"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientUserIdHistory"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3181"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3182"); + node.BrowseName = ToQualifiedName("AuthenticationMechanism"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2031"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AuthenticationMechanism"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3182"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3183"); + node.BrowseName = ToQualifiedName("Encoding"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2031"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Encoding"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3183"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3184"); + node.BrowseName = ToQualifiedName("TransportProtocol"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2031"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransportProtocol"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3184"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3185"); + node.BrowseName = ToQualifiedName("SecurityMode"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2031"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecurityMode"); + attrs.Type = ToNodeId("i=302"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3185"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3186"); + node.BrowseName = ToQualifiedName("SecurityPolicyUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2031"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecurityPolicyUri"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3186"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3187"); + node.BrowseName = ToQualifiedName("ClientCertificate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2031"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientCertificate"); + attrs.Type = ObjectId::ByteString; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3187"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2032"); + node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2029"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2171"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of diagnostics for each subscription owned by the session."); + attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsArray"); + attrs.Type = ToNodeId("i=874"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2032"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2033"); + node.BrowseName = ToQualifiedName("VendorServerInfoType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("A base type for vendor specific server information."); + attrs.DisplayName = LocalizedText("VendorServerInfoType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2034"); + node.BrowseName = ToQualifiedName("ServerRedundancyType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("A base type for an object that describe how a server supports redundancy."); + attrs.DisplayName = LocalizedText("ServerRedundancyType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2034"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2035"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2035"); + node.BrowseName = ToQualifiedName("RedundancySupport"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2034"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Indicates what style of redundancy is supported by the server."); + attrs.DisplayName = LocalizedText("RedundancySupport"); + attrs.Type = ToNodeId("i=851"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2035"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2036"); + node.BrowseName = ToQualifiedName("TransparentRedundancyType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2034"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("Identifies the capabilties of server that supports transparent redundancy."); + attrs.DisplayName = LocalizedText("TransparentRedundancyType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2036"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2037"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2036"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2038"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2037"); + node.BrowseName = ToQualifiedName("CurrentServerId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2036"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The ID of the server that is currently in use."); + attrs.DisplayName = LocalizedText("CurrentServerId"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2037"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2038"); + node.BrowseName = ToQualifiedName("RedundantServerArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2036"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of servers in the same redundant set."); + attrs.DisplayName = LocalizedText("RedundantServerArray"); + attrs.Type = ToNodeId("i=853"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2038"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2039"); + node.BrowseName = ToQualifiedName("NonTransparentRedundancyType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2034"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("Identifies the capabilties of server that supports non-transparent redundancy."); + attrs.DisplayName = LocalizedText("NonTransparentRedundancyType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2039"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2040"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2040"); + node.BrowseName = ToQualifiedName("ServerUriArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2039"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of servers in the same redundant set."); + attrs.DisplayName = LocalizedText("ServerUriArray"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2040"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11945"); + node.BrowseName = ToQualifiedName("NonTransparentNetworkRedundancyType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2039"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("NonTransparentNetworkRedundancyType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11945"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11948"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11948"); + node.BrowseName = ToQualifiedName("ServerNetworkGroups"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11945"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ServerNetworkGroups"); + attrs.Type = ToNodeId("i=11944"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11948"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11564"); + node.BrowseName = ToQualifiedName("OperationLimitsType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("Identifies the operation limits imposed by the server."); + attrs.DisplayName = LocalizedText("OperationLimitsType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11564"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11565"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11564"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12161"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11564"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12162"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11564"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11567"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11564"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12163"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11564"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12164"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11564"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11569"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11564"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11570"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11564"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11571"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11564"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11572"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11564"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11573"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11564"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11574"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11565"); + node.BrowseName = ToQualifiedName("MaxNodesPerRead"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11564"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single Read request."); + attrs.DisplayName = LocalizedText("MaxNodesPerRead"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11565"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12161"); + node.BrowseName = ToQualifiedName("MaxNodesPerHistoryReadData"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11564"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single data HistoryRead request."); + attrs.DisplayName = LocalizedText("MaxNodesPerHistoryReadData"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12161"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12162"); + node.BrowseName = ToQualifiedName("MaxNodesPerHistoryReadEvents"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11564"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single event HistoryRead request."); + attrs.DisplayName = LocalizedText("MaxNodesPerHistoryReadEvents"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12162"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11567"); + node.BrowseName = ToQualifiedName("MaxNodesPerWrite"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11564"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single Write request."); + attrs.DisplayName = LocalizedText("MaxNodesPerWrite"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11567"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12163"); + node.BrowseName = ToQualifiedName("MaxNodesPerHistoryUpdateData"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11564"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single data HistoryUpdate request."); + attrs.DisplayName = LocalizedText("MaxNodesPerHistoryUpdateData"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12163"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12164"); + node.BrowseName = ToQualifiedName("MaxNodesPerHistoryUpdateEvents"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11564"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single event HistoryUpdate request."); + attrs.DisplayName = LocalizedText("MaxNodesPerHistoryUpdateEvents"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12164"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11569"); + node.BrowseName = ToQualifiedName("MaxNodesPerMethodCall"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11564"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single Call request."); + attrs.DisplayName = LocalizedText("MaxNodesPerMethodCall"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11569"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11570"); + node.BrowseName = ToQualifiedName("MaxNodesPerBrowse"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11564"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single Browse request."); + attrs.DisplayName = LocalizedText("MaxNodesPerBrowse"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11570"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11571"); + node.BrowseName = ToQualifiedName("MaxNodesPerRegisterNodes"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11564"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single RegisterNodes request."); + attrs.DisplayName = LocalizedText("MaxNodesPerRegisterNodes"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11571"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11572"); + node.BrowseName = ToQualifiedName("MaxNodesPerTranslateBrowsePathsToNodeIds"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11564"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single TranslateBrowsePathsToNodeIds request."); + attrs.DisplayName = LocalizedText("MaxNodesPerTranslateBrowsePathsToNodeIds"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11572"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11573"); + node.BrowseName = ToQualifiedName("MaxNodesPerNodeManagement"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11564"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single AddNodes, AddReferences, DeleteNodes or DeleteReferences request."); + attrs.DisplayName = LocalizedText("MaxNodesPerNodeManagement"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11573"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11574"); + node.BrowseName = ToQualifiedName("MaxMonitoredItemsPerCall"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11564"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single MonitoredItem related request."); + attrs.DisplayName = LocalizedText("MaxMonitoredItemsPerCall"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11574"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11575"); + node.BrowseName = ToQualifiedName("FileType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("An object that represents a file that can be accessed via the server."); + attrs.DisplayName = LocalizedText("FileType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11575"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11576"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11575"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11577"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11575"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11578"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11575"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11579"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11575"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11580"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11575"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11583"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11575"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11585"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11575"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11588"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11575"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11590"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11575"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11593"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11576"); + node.BrowseName = ToQualifiedName("Size"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11575"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The size of the file in bytes."); + attrs.DisplayName = LocalizedText("Size"); + attrs.Type = ObjectId::UInt64; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11576"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11577"); + node.BrowseName = ToQualifiedName("Writeable"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11575"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Whether the file is writeable."); + attrs.DisplayName = LocalizedText("Writeable"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11577"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11578"); + node.BrowseName = ToQualifiedName("UserWriteable"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11575"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Whether the file is writeable by the current user."); + attrs.DisplayName = LocalizedText("UserWriteable"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11578"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11579"); + node.BrowseName = ToQualifiedName("OpenCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11575"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The current number of open file handles."); + attrs.DisplayName = LocalizedText("OpenCount"); + attrs.Type = ObjectId::UInt16; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11579"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11581"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11580"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11581"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11582"); + node.BrowseName = ToQualifiedName("OutputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11580"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OutputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11582"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11584"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11583"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11584"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11586"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11585"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11586"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11587"); + node.BrowseName = ToQualifiedName("OutputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11585"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OutputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11587"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11589"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11588"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11589"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11591"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11590"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11591"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11592"); + node.BrowseName = ToQualifiedName("OutputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11590"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OutputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11592"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11594"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11593"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11594"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11595"); + node.BrowseName = ToQualifiedName("AddressSpaceFileType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=11575"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("A file used to store a namespace exported from the server."); + attrs.DisplayName = LocalizedText("AddressSpaceFileType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11595"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11615"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11616"); + node.BrowseName = ToQualifiedName("NamespaceMetadataType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("Provides the metadata for a namespace used by the server."); + attrs.DisplayName = LocalizedText("NamespaceMetadataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11616"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11617"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11616"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11618"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11616"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11619"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11616"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11620"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11616"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11621"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11616"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11622"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11616"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11623"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11616"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11624"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11617"); + node.BrowseName = ToQualifiedName("NamespaceUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11616"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The URI of the namespace."); + attrs.DisplayName = LocalizedText("NamespaceUri"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11618"); + node.BrowseName = ToQualifiedName("NamespaceVersion"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11616"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The human readable string representing version of the namespace."); + attrs.DisplayName = LocalizedText("NamespaceVersion"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11618"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11619"); + node.BrowseName = ToQualifiedName("NamespacePublicationDate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11616"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The publication date for the namespace."); + attrs.DisplayName = LocalizedText("NamespacePublicationDate"); + attrs.Type = ObjectId::DateTime; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11619"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11620"); + node.BrowseName = ToQualifiedName("IsNamespaceSubset"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11616"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("If TRUE then the server only supports a subset of the namespace."); + attrs.DisplayName = LocalizedText("IsNamespaceSubset"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11620"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11621"); + node.BrowseName = ToQualifiedName("StaticNodeIdIdentifierTypes"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11616"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of IdTypes for nodes which are the same in every server that exposes them."); + attrs.DisplayName = LocalizedText("StaticNodeIdIdentifierTypes"); + attrs.Type = ToNodeId("i=256"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11621"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11622"); + node.BrowseName = ToQualifiedName("StaticNumericNodeIdRange"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11616"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of ranges for numeric node ids which are the same in every server that exposes them."); + attrs.DisplayName = LocalizedText("StaticNumericNodeIdRange"); + attrs.Type = ToNodeId("i=291"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11622"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11623"); + node.BrowseName = ToQualifiedName("StaticStringNodeIdPattern"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11616"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A regular expression which matches string node ids are the same in every server that exposes them."); + attrs.DisplayName = LocalizedText("StaticStringNodeIdPattern"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11623"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11624"); + node.BrowseName = ToQualifiedName("NamespaceFile"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=11616"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=11595"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("A file containing the nodes of the namespace."); + attrs.DisplayName = LocalizedText("NamespaceFile"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11624"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11625"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11624"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11626"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11624"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11627"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11624"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11628"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11624"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11629"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11624"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11632"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11624"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11634"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11624"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11637"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11624"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11639"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11624"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11642"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11624"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11625"); + node.BrowseName = ToQualifiedName("Size"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11624"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The size of the file in bytes."); + attrs.DisplayName = LocalizedText("Size"); + attrs.Type = ObjectId::UInt64; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11625"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11626"); + node.BrowseName = ToQualifiedName("Writeable"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11624"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Whether the file is writeable."); + attrs.DisplayName = LocalizedText("Writeable"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11626"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11627"); + node.BrowseName = ToQualifiedName("UserWriteable"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11624"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Whether the file is writeable by the current user."); + attrs.DisplayName = LocalizedText("UserWriteable"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11627"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11628"); + node.BrowseName = ToQualifiedName("OpenCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11624"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The current number of open file handles."); + attrs.DisplayName = LocalizedText("OpenCount"); + attrs.Type = ObjectId::UInt16; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11628"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11630"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11629"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11630"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11631"); + node.BrowseName = ToQualifiedName("OutputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11629"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OutputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11631"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11633"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11632"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11633"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11635"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11634"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11635"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11636"); + node.BrowseName = ToQualifiedName("OutputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11634"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OutputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11636"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11638"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11637"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11638"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11640"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11639"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11640"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11641"); + node.BrowseName = ToQualifiedName("OutputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11639"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OutputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11641"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11643"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11642"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11643"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11645"); + node.BrowseName = ToQualifiedName("NamespacesType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("A container for the namespace metadata provided by the server."); + attrs.DisplayName = LocalizedText("NamespacesType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11645"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11646"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11645"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11675"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11646"); + node.BrowseName = ToQualifiedName(""); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=11645"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=11616"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText(""); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11646"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11647"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11646"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11648"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11646"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11649"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11646"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11650"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11646"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11651"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11646"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11652"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11646"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11653"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11646"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11508"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11647"); + node.BrowseName = ToQualifiedName("NamespaceUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11646"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The URI of the namespace."); + attrs.DisplayName = LocalizedText("NamespaceUri"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11647"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11648"); + node.BrowseName = ToQualifiedName("NamespaceVersion"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11646"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The human readable string representing version of the namespace."); + attrs.DisplayName = LocalizedText("NamespaceVersion"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11648"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11649"); + node.BrowseName = ToQualifiedName("NamespacePublicationDate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11646"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The publication date for the namespace."); + attrs.DisplayName = LocalizedText("NamespacePublicationDate"); + attrs.Type = ObjectId::DateTime; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11649"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11650"); + node.BrowseName = ToQualifiedName("IsNamespaceSubset"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11646"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("If TRUE then the server only supports a subset of the namespace."); + attrs.DisplayName = LocalizedText("IsNamespaceSubset"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11650"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11651"); + node.BrowseName = ToQualifiedName("StaticNodeIdIdentifierTypes"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11646"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of IdTypes for nodes which are the same in every server that exposes them."); + attrs.DisplayName = LocalizedText("StaticNodeIdIdentifierTypes"); + attrs.Type = ToNodeId("i=256"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11651"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11652"); + node.BrowseName = ToQualifiedName("StaticNumericNodeIdRange"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11646"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of ranges for numeric node ids which are the same in every server that exposes them."); + attrs.DisplayName = LocalizedText("StaticNumericNodeIdRange"); + attrs.Type = ToNodeId("i=291"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11652"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11653"); + node.BrowseName = ToQualifiedName("StaticStringNodeIdPattern"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11646"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A regular expression which matches string node ids are the same in every server that exposes them."); + attrs.DisplayName = LocalizedText("StaticStringNodeIdPattern"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11653"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11675"); + node.BrowseName = ToQualifiedName("AddressSpaceFile"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=11645"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=11595"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("A file containing the nodes of the namespace."); + attrs.DisplayName = LocalizedText("AddressSpaceFile"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11675"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11676"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11675"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11677"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11675"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11678"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11675"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11679"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11675"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11680"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11675"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11683"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11675"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11685"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11675"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11688"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11675"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11690"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=11675"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11693"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11675"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11676"); + node.BrowseName = ToQualifiedName("Size"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11675"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The size of the file in bytes."); + attrs.DisplayName = LocalizedText("Size"); + attrs.Type = ObjectId::UInt64; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11676"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11677"); + node.BrowseName = ToQualifiedName("Writeable"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11675"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Whether the file is writeable."); + attrs.DisplayName = LocalizedText("Writeable"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11677"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11678"); + node.BrowseName = ToQualifiedName("UserWriteable"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11675"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Whether the file is writeable by the current user."); + attrs.DisplayName = LocalizedText("UserWriteable"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11678"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11679"); + node.BrowseName = ToQualifiedName("OpenCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11675"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The current number of open file handles."); + attrs.DisplayName = LocalizedText("OpenCount"); + attrs.Type = ObjectId::UInt16; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11679"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11681"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11680"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11681"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11682"); + node.BrowseName = ToQualifiedName("OutputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11680"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OutputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11682"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11684"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11683"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11684"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11686"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11685"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11686"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11687"); + node.BrowseName = ToQualifiedName("OutputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11685"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OutputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11687"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11689"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11688"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11689"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11691"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11690"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11691"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11692"); + node.BrowseName = ToQualifiedName("OutputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11690"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OutputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11692"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11694"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11693"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11694"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2041"); + node.BrowseName = ToQualifiedName("BaseEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("The base type for all events."); + attrs.DisplayName = LocalizedText("BaseEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2041"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2042"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2041"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2043"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2041"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2044"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2041"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2045"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2041"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2046"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2041"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2047"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2041"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3190"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2041"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2050"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2041"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2051"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2042"); + node.BrowseName = ToQualifiedName("EventId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A globally unique identifier for the event."); + attrs.DisplayName = LocalizedText("EventId"); + attrs.Type = ObjectId::ByteString; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2042"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2043"); + node.BrowseName = ToQualifiedName("EventType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The identifier for the event type."); + attrs.DisplayName = LocalizedText("EventType"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2043"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2044"); + node.BrowseName = ToQualifiedName("SourceNode"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The source of the event."); + attrs.DisplayName = LocalizedText("SourceNode"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2044"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2045"); + node.BrowseName = ToQualifiedName("SourceName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A description of the source of the event."); + attrs.DisplayName = LocalizedText("SourceName"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2045"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2046"); + node.BrowseName = ToQualifiedName("Time"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("When the event occurred."); + attrs.DisplayName = LocalizedText("Time"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2046"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2047"); + node.BrowseName = ToQualifiedName("ReceiveTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("When the server received the event from the underlying system."); + attrs.DisplayName = LocalizedText("ReceiveTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2047"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3190"); + node.BrowseName = ToQualifiedName("LocalTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Information about the local time where the event originated."); + attrs.DisplayName = LocalizedText("LocalTime"); + attrs.Type = ToNodeId("i=8912"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3190"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2050"); + node.BrowseName = ToQualifiedName("Message"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A localized description of the event."); + attrs.DisplayName = LocalizedText("Message"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2050"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2051"); + node.BrowseName = ToQualifiedName("Severity"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Indicates how urgent an event is."); + attrs.DisplayName = LocalizedText("Severity"); + attrs.Type = ObjectId::UInt16; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2051"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2052"); + node.BrowseName = ToQualifiedName("AuditEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("A base type for events used to track client initiated changes to the server state."); + attrs.DisplayName = LocalizedText("AuditEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2052"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2053"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2052"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2054"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2052"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2055"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2052"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2056"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2052"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2057"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2053"); + node.BrowseName = ToQualifiedName("ActionTimeStamp"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2052"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("When the action triggering the event occurred."); + attrs.DisplayName = LocalizedText("ActionTimeStamp"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2053"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2054"); + node.BrowseName = ToQualifiedName("Status"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2052"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("If TRUE the action was performed. If FALSE the action failed and the server state did not change."); + attrs.DisplayName = LocalizedText("Status"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2054"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2055"); + node.BrowseName = ToQualifiedName("ServerId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2052"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The unique identifier for the server generating the event."); + attrs.DisplayName = LocalizedText("ServerId"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2055"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2056"); + node.BrowseName = ToQualifiedName("ClientAuditEntryId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2052"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The log entry id provided in the request that initiated the action."); + attrs.DisplayName = LocalizedText("ClientAuditEntryId"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2056"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2057"); + node.BrowseName = ToQualifiedName("ClientUserId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2052"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The user identity associated with the session that initiated the action."); + attrs.DisplayName = LocalizedText("ClientUserId"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2057"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2058"); + node.BrowseName = ToQualifiedName("AuditSecurityEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2052"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("A base type for events used to track security related changes."); + attrs.DisplayName = LocalizedText("AuditSecurityEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2059"); + node.BrowseName = ToQualifiedName("AuditChannelEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2058"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("A base type for events used to track related changes to a secure channel."); + attrs.DisplayName = LocalizedText("AuditChannelEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2059"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2745"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2745"); + node.BrowseName = ToQualifiedName("SecureChannelId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2059"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The identifier for the secure channel that was changed."); + attrs.DisplayName = LocalizedText("SecureChannelId"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2745"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2060"); + node.BrowseName = ToQualifiedName("AuditOpenSecureChannelEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2059"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("An event that is raised when a secure channel is opened."); + attrs.DisplayName = LocalizedText("AuditOpenSecureChannelEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2060"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2061"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2060"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2746"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2060"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2062"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2060"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2063"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2060"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2065"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2060"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2066"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2061"); + node.BrowseName = ToQualifiedName("ClientCertificate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2060"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The certificate provided by the client."); + attrs.DisplayName = LocalizedText("ClientCertificate"); + attrs.Type = ObjectId::ByteString; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2061"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2746"); + node.BrowseName = ToQualifiedName("ClientCertificateThumbprint"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2060"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The thumbprint for certificate provided by the client."); + attrs.DisplayName = LocalizedText("ClientCertificateThumbprint"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2746"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2062"); + node.BrowseName = ToQualifiedName("RequestType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2060"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The type of request (NEW or RENEW)."); + attrs.DisplayName = LocalizedText("RequestType"); + attrs.Type = ToNodeId("i=315"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2062"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2063"); + node.BrowseName = ToQualifiedName("SecurityPolicyUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2060"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The security policy used by the channel."); + attrs.DisplayName = LocalizedText("SecurityPolicyUri"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2063"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2065"); + node.BrowseName = ToQualifiedName("SecurityMode"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2060"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The security mode used by the channel."); + attrs.DisplayName = LocalizedText("SecurityMode"); + attrs.Type = ToNodeId("i=302"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2065"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2066"); + node.BrowseName = ToQualifiedName("RequestedLifetime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2060"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The lifetime of the channel requested by the client."); + attrs.DisplayName = LocalizedText("RequestedLifetime"); + attrs.Type = ToNodeId("i=290"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2066"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2069"); + node.BrowseName = ToQualifiedName("AuditSessionEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2052"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("A base type for events used to track related changes to a session."); + attrs.DisplayName = LocalizedText("AuditSessionEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2069"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2070"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2070"); + node.BrowseName = ToQualifiedName("SessionId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2069"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The unique identifier for the session,."); + attrs.DisplayName = LocalizedText("SessionId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2070"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2071"); + node.BrowseName = ToQualifiedName("AuditCreateSessionEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2069"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.Description = LocalizedText("An event that is raised when a session is created."); + attrs.DisplayName = LocalizedText("AuditCreateSessionEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2071"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2072"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2071"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2073"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2071"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2747"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2071"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2074"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2072"); + node.BrowseName = ToQualifiedName("SecureChannelId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2071"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The secure channel associated with the session."); + attrs.DisplayName = LocalizedText("SecureChannelId"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2072"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2073"); + node.BrowseName = ToQualifiedName("ClientCertificate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2071"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The certificate provided by the client."); + attrs.DisplayName = LocalizedText("ClientCertificate"); + attrs.Type = ObjectId::ByteString; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2073"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2747"); + node.BrowseName = ToQualifiedName("ClientCertificateThumbprint"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2071"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The thumbprint of the certificate provided by the client."); + attrs.DisplayName = LocalizedText("ClientCertificateThumbprint"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2747"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2074"); + node.BrowseName = ToQualifiedName("RevisedSessionTimeout"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2071"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The timeout for the session."); + attrs.DisplayName = LocalizedText("RevisedSessionTimeout"); + attrs.Type = ToNodeId("i=290"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2074"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2748"); + node.BrowseName = ToQualifiedName("AuditUrlMismatchEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2071"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditUrlMismatchEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2748"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2749"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2749"); + node.BrowseName = ToQualifiedName("EndpointUrl"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2748"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EndpointUrl"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2749"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2075"); + node.BrowseName = ToQualifiedName("AuditActivateSessionEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2069"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditActivateSessionEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2075"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2076"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2075"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2077"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2075"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11485"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2076"); + node.BrowseName = ToQualifiedName("ClientSoftwareCertificates"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2075"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientSoftwareCertificates"); + attrs.Type = ToNodeId("i=344"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2076"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2077"); + node.BrowseName = ToQualifiedName("UserIdentityToken"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2075"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UserIdentityToken"); + attrs.Type = ToNodeId("i=316"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2077"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11485"); + node.BrowseName = ToQualifiedName("SecureChannelId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2075"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecureChannelId"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11485"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2078"); + node.BrowseName = ToQualifiedName("AuditCancelEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2069"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditCancelEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2078"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2079"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2079"); + node.BrowseName = ToQualifiedName("RequestHandle"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2078"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RequestHandle"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2079"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2080"); + node.BrowseName = ToQualifiedName("AuditCertificateEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2058"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditCertificateEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2080"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2081"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2081"); + node.BrowseName = ToQualifiedName("Certificate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2080"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Certificate"); + attrs.Type = ObjectId::ByteString; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2081"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2082"); + node.BrowseName = ToQualifiedName("AuditCertificateDataMismatchEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2080"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditCertificateDataMismatchEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2082"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2083"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2082"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2084"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2083"); + node.BrowseName = ToQualifiedName("InvalidHostname"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2082"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InvalidHostname"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2083"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2084"); + node.BrowseName = ToQualifiedName("InvalidUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2082"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InvalidUri"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2084"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2085"); + node.BrowseName = ToQualifiedName("AuditCertificateExpiredEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2080"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditCertificateExpiredEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2086"); + node.BrowseName = ToQualifiedName("AuditCertificateInvalidEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2080"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditCertificateInvalidEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2087"); + node.BrowseName = ToQualifiedName("AuditCertificateUntrustedEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2080"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditCertificateUntrustedEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2088"); + node.BrowseName = ToQualifiedName("AuditCertificateRevokedEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2080"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditCertificateRevokedEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2089"); + node.BrowseName = ToQualifiedName("AuditCertificateMismatchEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2080"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditCertificateMismatchEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2090"); + node.BrowseName = ToQualifiedName("AuditNodeManagementEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2052"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditNodeManagementEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2091"); + node.BrowseName = ToQualifiedName("AuditAddNodesEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2090"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditAddNodesEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2091"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2092"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2092"); + node.BrowseName = ToQualifiedName("NodesToAdd"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2091"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("NodesToAdd"); + attrs.Type = ToNodeId("i=376"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2092"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2093"); + node.BrowseName = ToQualifiedName("AuditDeleteNodesEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2090"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditDeleteNodesEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2093"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2094"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2094"); + node.BrowseName = ToQualifiedName("NodesToDelete"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2093"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("NodesToDelete"); + attrs.Type = ToNodeId("i=382"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2094"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2095"); + node.BrowseName = ToQualifiedName("AuditAddReferencesEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2090"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditAddReferencesEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2095"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2096"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2096"); + node.BrowseName = ToQualifiedName("ReferencesToAdd"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2095"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ReferencesToAdd"); + attrs.Type = ToNodeId("i=379"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2096"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2097"); + node.BrowseName = ToQualifiedName("AuditDeleteReferencesEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2090"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditDeleteReferencesEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2097"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2098"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2098"); + node.BrowseName = ToQualifiedName("ReferencesToDelete"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2097"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ReferencesToDelete"); + attrs.Type = ToNodeId("i=385"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2099"); + node.BrowseName = ToQualifiedName("AuditUpdateEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2052"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditUpdateEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2100"); + node.BrowseName = ToQualifiedName("AuditWriteUpdateEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2099"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditWriteUpdateEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2100"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2750"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2100"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2101"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2100"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2102"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2100"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2103"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2750"); + node.BrowseName = ToQualifiedName("AttributeId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2100"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AttributeId"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2750"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2101"); + node.BrowseName = ToQualifiedName("IndexRange"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2100"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("IndexRange"); + attrs.Type = ToNodeId("i=291"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2101"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2102"); + node.BrowseName = ToQualifiedName("OldValue"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2100"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OldValue"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2102"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2103"); + node.BrowseName = ToQualifiedName("NewValue"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2100"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("NewValue"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2103"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2104"); + node.BrowseName = ToQualifiedName("AuditHistoryUpdateEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2099"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditHistoryUpdateEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2104"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2751"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2751"); + node.BrowseName = ToQualifiedName("ParameterDataTypeId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2104"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ParameterDataTypeId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2751"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2127"); + node.BrowseName = ToQualifiedName("AuditUpdateMethodEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2052"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditUpdateMethodEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2127"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2128"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2127"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2129"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2128"); + node.BrowseName = ToQualifiedName("MethodId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2127"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MethodId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2128"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2129"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2127"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2129"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2130"); + node.BrowseName = ToQualifiedName("SystemEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SystemEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2131"); + node.BrowseName = ToQualifiedName("DeviceFailureEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2130"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("DeviceFailureEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11446"); + node.BrowseName = ToQualifiedName("SystemStatusChangeEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2130"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SystemStatusChangeEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11446"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11696"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11696"); + node.BrowseName = ToQualifiedName("SystemState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11446"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SystemState"); + attrs.Type = ToNodeId("i=852"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11696"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2132"); + node.BrowseName = ToQualifiedName("BaseModelChangeEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("BaseModelChangeEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2133"); + node.BrowseName = ToQualifiedName("GeneralModelChangeEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2132"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("GeneralModelChangeEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2133"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2134"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2134"); + node.BrowseName = ToQualifiedName("Changes"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2133"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Changes"); + attrs.Type = ToNodeId("i=877"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2134"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2738"); + node.BrowseName = ToQualifiedName("SemanticChangeEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2132"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SemanticChangeEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2738"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2739"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2739"); + node.BrowseName = ToQualifiedName("Changes"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2738"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Changes"); + attrs.Type = ToNodeId("i=897"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2739"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3035"); + node.BrowseName = ToQualifiedName("EventQueueOverflowEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("EventQueueOverflowEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11436"); + node.BrowseName = ToQualifiedName("ProgressEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ProgressEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2340"); + node.BrowseName = ToQualifiedName("AggregateFunctionType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AggregateFunctionType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2137"); + node.BrowseName = ToQualifiedName("ServerVendorCapabilityType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ServerVendorCapabilityType"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2138"); + node.BrowseName = ToQualifiedName("ServerStatusType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ServerStatusType"); + attrs.Type = ToNodeId("i=862"); + attrs.Rank = -1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2138"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2139"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2138"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2140"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2138"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2141"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2138"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2142"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2138"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2752"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2138"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2753"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2139"); + node.BrowseName = ToQualifiedName("StartTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2138"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StartTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2139"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2140"); + node.BrowseName = ToQualifiedName("CurrentTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2138"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2140"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2141"); + node.BrowseName = ToQualifiedName("State"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2138"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("State"); + attrs.Type = ToNodeId("i=852"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2141"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2142"); + node.BrowseName = ToQualifiedName("BuildInfo"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2138"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=3051"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BuildInfo"); + attrs.Type = ToNodeId("i=338"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3698"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3699"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3700"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3701"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3702"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3703"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2142"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3698"); + node.BrowseName = ToQualifiedName("ProductUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2142"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ProductUri"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3698"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3699"); + node.BrowseName = ToQualifiedName("ManufacturerName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2142"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ManufacturerName"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3699"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3700"); + node.BrowseName = ToQualifiedName("ProductName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2142"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ProductName"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3700"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3701"); + node.BrowseName = ToQualifiedName("SoftwareVersion"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2142"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SoftwareVersion"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3701"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3702"); + node.BrowseName = ToQualifiedName("BuildNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2142"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BuildNumber"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3702"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3703"); + node.BrowseName = ToQualifiedName("BuildDate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2142"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BuildDate"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3703"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2752"); + node.BrowseName = ToQualifiedName("SecondsTillShutdown"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2138"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecondsTillShutdown"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2752"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2753"); + node.BrowseName = ToQualifiedName("ShutdownReason"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2138"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ShutdownReason"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2753"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3051"); + node.BrowseName = ToQualifiedName("BuildInfoType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("BuildInfoType"); + attrs.Type = ToNodeId("i=338"); + attrs.Rank = -1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3051"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3052"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3051"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3053"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3051"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3054"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3051"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3055"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3051"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3056"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3051"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3057"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3052"); + node.BrowseName = ToQualifiedName("ProductUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3051"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ProductUri"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3052"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3053"); + node.BrowseName = ToQualifiedName("ManufacturerName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3051"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ManufacturerName"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3053"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3054"); + node.BrowseName = ToQualifiedName("ProductName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3051"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ProductName"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3054"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3055"); + node.BrowseName = ToQualifiedName("SoftwareVersion"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3051"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SoftwareVersion"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3055"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3056"); + node.BrowseName = ToQualifiedName("BuildNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3051"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BuildNumber"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3056"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3057"); + node.BrowseName = ToQualifiedName("BuildDate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3051"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BuildDate"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3057"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2150"); + node.BrowseName = ToQualifiedName("ServerDiagnosticsSummaryType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ServerDiagnosticsSummaryType"); + attrs.Type = ToNodeId("i=859"); + attrs.Rank = -1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2150"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2151"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2150"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2152"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2150"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2153"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2150"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2154"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2150"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2155"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2150"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2156"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2150"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2157"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2150"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2159"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2150"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2160"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2150"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2161"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2150"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2162"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2150"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2163"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2151"); + node.BrowseName = ToQualifiedName("ServerViewCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2150"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ServerViewCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2151"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2152"); + node.BrowseName = ToQualifiedName("CurrentSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2150"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2152"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2153"); + node.BrowseName = ToQualifiedName("CumulatedSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2150"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CumulatedSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2153"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2154"); + node.BrowseName = ToQualifiedName("SecurityRejectedSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2150"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecurityRejectedSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2154"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2155"); + node.BrowseName = ToQualifiedName("RejectedSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2150"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RejectedSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2155"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2156"); + node.BrowseName = ToQualifiedName("SessionTimeoutCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2150"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionTimeoutCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2156"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2157"); + node.BrowseName = ToQualifiedName("SessionAbortCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2150"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionAbortCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2157"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2159"); + node.BrowseName = ToQualifiedName("PublishingIntervalCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2150"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PublishingIntervalCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2159"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2160"); + node.BrowseName = ToQualifiedName("CurrentSubscriptionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2150"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentSubscriptionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2160"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2161"); + node.BrowseName = ToQualifiedName("CumulatedSubscriptionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2150"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CumulatedSubscriptionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2161"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2162"); + node.BrowseName = ToQualifiedName("SecurityRejectedRequestsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2150"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecurityRejectedRequestsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2162"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2163"); + node.BrowseName = ToQualifiedName("RejectedRequestsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2150"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RejectedRequestsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2163"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2164"); + node.BrowseName = ToQualifiedName("SamplingIntervalDiagnosticsArrayType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SamplingIntervalDiagnosticsArrayType"); + attrs.Type = ToNodeId("i=856"); + attrs.Rank = 1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2165"); + node.BrowseName = ToQualifiedName("SamplingIntervalDiagnosticsType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SamplingIntervalDiagnosticsType"); + attrs.Type = ToNodeId("i=856"); + attrs.Rank = -1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2165"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2166"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2165"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11697"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2165"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11698"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2165"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11699"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2166"); + node.BrowseName = ToQualifiedName("SamplingInterval"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2165"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SamplingInterval"); + attrs.Type = ToNodeId("i=290"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2166"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11697"); + node.BrowseName = ToQualifiedName("SampledMonitoredItemsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2165"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SampledMonitoredItemsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11697"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11698"); + node.BrowseName = ToQualifiedName("MaxSampledMonitoredItemsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2165"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MaxSampledMonitoredItemsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11698"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11699"); + node.BrowseName = ToQualifiedName("DisabledMonitoredItemsSamplingCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2165"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DisabledMonitoredItemsSamplingCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11699"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2171"); + node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsArrayType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsArrayType"); + attrs.Type = ToNodeId("i=874"); + attrs.Rank = 1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2172"); + node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsType"); + attrs.Type = ToNodeId("i=874"); + attrs.Rank = -1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2173"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2174"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2175"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2176"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2177"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8888"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2179"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2180"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2181"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2182"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2183"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2184"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2185"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2186"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2187"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2188"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2189"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2190"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2191"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2998"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2193"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8889"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8890"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8891"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8892"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8893"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8894"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8895"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8896"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8897"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2172"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8902"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2173"); + node.BrowseName = ToQualifiedName("SessionId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2173"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2174"); + node.BrowseName = ToQualifiedName("SubscriptionId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SubscriptionId"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2174"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2175"); + node.BrowseName = ToQualifiedName("Priority"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Priority"); + attrs.Type = ObjectId::Byte; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2175"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2176"); + node.BrowseName = ToQualifiedName("PublishingInterval"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PublishingInterval"); + attrs.Type = ObjectId::Double; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2176"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2177"); + node.BrowseName = ToQualifiedName("MaxKeepAliveCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MaxKeepAliveCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2177"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8888"); + node.BrowseName = ToQualifiedName("MaxLifetimeCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MaxLifetimeCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8888"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2179"); + node.BrowseName = ToQualifiedName("MaxNotificationsPerPublish"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MaxNotificationsPerPublish"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2179"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2180"); + node.BrowseName = ToQualifiedName("PublishingEnabled"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PublishingEnabled"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2180"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2181"); + node.BrowseName = ToQualifiedName("ModifyCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ModifyCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2181"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2182"); + node.BrowseName = ToQualifiedName("EnableCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnableCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2182"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2183"); + node.BrowseName = ToQualifiedName("DisableCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DisableCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2183"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2184"); + node.BrowseName = ToQualifiedName("RepublishRequestCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RepublishRequestCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2184"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2185"); + node.BrowseName = ToQualifiedName("RepublishMessageRequestCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RepublishMessageRequestCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2185"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2186"); + node.BrowseName = ToQualifiedName("RepublishMessageCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RepublishMessageCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2186"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2187"); + node.BrowseName = ToQualifiedName("TransferRequestCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransferRequestCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2187"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2188"); + node.BrowseName = ToQualifiedName("TransferredToAltClientCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransferredToAltClientCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2188"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2189"); + node.BrowseName = ToQualifiedName("TransferredToSameClientCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransferredToSameClientCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2189"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2190"); + node.BrowseName = ToQualifiedName("PublishRequestCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PublishRequestCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2190"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2191"); + node.BrowseName = ToQualifiedName("DataChangeNotificationsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DataChangeNotificationsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2191"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2998"); + node.BrowseName = ToQualifiedName("EventNotificationsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EventNotificationsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2998"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2193"); + node.BrowseName = ToQualifiedName("NotificationsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("NotificationsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2193"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8889"); + node.BrowseName = ToQualifiedName("LatePublishRequestCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LatePublishRequestCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8889"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8890"); + node.BrowseName = ToQualifiedName("CurrentKeepAliveCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentKeepAliveCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8890"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8891"); + node.BrowseName = ToQualifiedName("CurrentLifetimeCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentLifetimeCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8891"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8892"); + node.BrowseName = ToQualifiedName("UnacknowledgedMessageCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UnacknowledgedMessageCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8892"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8893"); + node.BrowseName = ToQualifiedName("DiscardedMessageCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DiscardedMessageCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8893"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8894"); + node.BrowseName = ToQualifiedName("MonitoredItemCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MonitoredItemCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8894"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8895"); + node.BrowseName = ToQualifiedName("DisabledMonitoredItemCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DisabledMonitoredItemCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8895"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8896"); + node.BrowseName = ToQualifiedName("MonitoringQueueOverflowCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MonitoringQueueOverflowCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8896"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8897"); + node.BrowseName = ToQualifiedName("NextSequenceNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("NextSequenceNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8897"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8902"); + node.BrowseName = ToQualifiedName("EventQueueOverFlowCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2172"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EventQueueOverFlowCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8902"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2196"); + node.BrowseName = ToQualifiedName("SessionDiagnosticsArrayType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SessionDiagnosticsArrayType"); + attrs.Type = ToNodeId("i=865"); + attrs.Rank = 1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2197"); + node.BrowseName = ToQualifiedName("SessionDiagnosticsVariableType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SessionDiagnosticsVariableType"); + attrs.Type = ToNodeId("i=865"); + attrs.Rank = -1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2198"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2199"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2200"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2201"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2202"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2203"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2204"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3050"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2205"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2206"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2207"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2208"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2209"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8900"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11892"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2217"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2218"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2219"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2220"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2221"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2222"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2223"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2224"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2225"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2226"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2227"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2228"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2229"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2230"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2231"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2232"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2233"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2234"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2235"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2236"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2237"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2238"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2239"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2240"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2241"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2242"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2730"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2197"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2731"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2198"); + node.BrowseName = ToQualifiedName("SessionId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2198"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2199"); + node.BrowseName = ToQualifiedName("SessionName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionName"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2199"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2200"); + node.BrowseName = ToQualifiedName("ClientDescription"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientDescription"); + attrs.Type = ToNodeId("i=308"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2200"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2201"); + node.BrowseName = ToQualifiedName("ServerUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ServerUri"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2201"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2202"); + node.BrowseName = ToQualifiedName("EndpointUrl"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EndpointUrl"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2202"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2203"); + node.BrowseName = ToQualifiedName("LocaleIds"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LocaleIds"); + attrs.Type = ToNodeId("i=295"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2203"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2204"); + node.BrowseName = ToQualifiedName("ActualSessionTimeout"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ActualSessionTimeout"); + attrs.Type = ToNodeId("i=290"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2204"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3050"); + node.BrowseName = ToQualifiedName("MaxResponseMessageSize"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MaxResponseMessageSize"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3050"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2205"); + node.BrowseName = ToQualifiedName("ClientConnectionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientConnectionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2205"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2206"); + node.BrowseName = ToQualifiedName("ClientLastContactTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientLastContactTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2206"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2207"); + node.BrowseName = ToQualifiedName("CurrentSubscriptionsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentSubscriptionsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2207"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2208"); + node.BrowseName = ToQualifiedName("CurrentMonitoredItemsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentMonitoredItemsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2208"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2209"); + node.BrowseName = ToQualifiedName("CurrentPublishRequestsInQueue"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentPublishRequestsInQueue"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2209"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8900"); + node.BrowseName = ToQualifiedName("TotalRequestCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TotalRequestCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8900"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11892"); + node.BrowseName = ToQualifiedName("UnauthorizedRequestCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UnauthorizedRequestCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11892"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2217"); + node.BrowseName = ToQualifiedName("ReadCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ReadCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2217"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2218"); + node.BrowseName = ToQualifiedName("HistoryReadCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("HistoryReadCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2218"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2219"); + node.BrowseName = ToQualifiedName("WriteCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("WriteCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2219"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2220"); + node.BrowseName = ToQualifiedName("HistoryUpdateCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("HistoryUpdateCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2220"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2221"); + node.BrowseName = ToQualifiedName("CallCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CallCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2221"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2222"); + node.BrowseName = ToQualifiedName("CreateMonitoredItemsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CreateMonitoredItemsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2222"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2223"); + node.BrowseName = ToQualifiedName("ModifyMonitoredItemsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ModifyMonitoredItemsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2223"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2224"); + node.BrowseName = ToQualifiedName("SetMonitoringModeCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SetMonitoringModeCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2224"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2225"); + node.BrowseName = ToQualifiedName("SetTriggeringCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SetTriggeringCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2225"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2226"); + node.BrowseName = ToQualifiedName("DeleteMonitoredItemsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteMonitoredItemsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2226"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2227"); + node.BrowseName = ToQualifiedName("CreateSubscriptionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CreateSubscriptionCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2227"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2228"); + node.BrowseName = ToQualifiedName("ModifySubscriptionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ModifySubscriptionCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2228"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2229"); + node.BrowseName = ToQualifiedName("SetPublishingModeCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SetPublishingModeCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2229"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2230"); + node.BrowseName = ToQualifiedName("PublishCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PublishCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2230"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2231"); + node.BrowseName = ToQualifiedName("RepublishCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RepublishCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2231"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2232"); + node.BrowseName = ToQualifiedName("TransferSubscriptionsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransferSubscriptionsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2232"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2233"); + node.BrowseName = ToQualifiedName("DeleteSubscriptionsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteSubscriptionsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2233"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2234"); + node.BrowseName = ToQualifiedName("AddNodesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AddNodesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2234"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2235"); + node.BrowseName = ToQualifiedName("AddReferencesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AddReferencesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2235"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2236"); + node.BrowseName = ToQualifiedName("DeleteNodesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteNodesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2236"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2237"); + node.BrowseName = ToQualifiedName("DeleteReferencesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteReferencesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2237"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2238"); + node.BrowseName = ToQualifiedName("BrowseCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BrowseCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2238"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2239"); + node.BrowseName = ToQualifiedName("BrowseNextCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BrowseNextCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2239"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2240"); + node.BrowseName = ToQualifiedName("TranslateBrowsePathsToNodeIdsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TranslateBrowsePathsToNodeIdsCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2240"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2241"); + node.BrowseName = ToQualifiedName("QueryFirstCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("QueryFirstCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2241"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2242"); + node.BrowseName = ToQualifiedName("QueryNextCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("QueryNextCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2242"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2730"); + node.BrowseName = ToQualifiedName("RegisterNodesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RegisterNodesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2730"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2731"); + node.BrowseName = ToQualifiedName("UnregisterNodesCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2197"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UnregisterNodesCount"); + attrs.Type = ToNodeId("i=871"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2731"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2243"); + node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsArrayType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsArrayType"); + attrs.Type = ToNodeId("i=868"); + attrs.Rank = 1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2244"); + node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsType"); + attrs.Type = ToNodeId("i=868"); + attrs.Rank = -1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2244"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2245"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2244"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2246"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2244"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2247"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2244"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2248"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2244"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2249"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2244"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2250"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2244"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2251"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2244"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2252"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2244"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3058"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2245"); + node.BrowseName = ToQualifiedName("SessionId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2244"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2245"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2246"); + node.BrowseName = ToQualifiedName("ClientUserIdOfSession"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2244"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientUserIdOfSession"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2246"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2247"); + node.BrowseName = ToQualifiedName("ClientUserIdHistory"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2244"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientUserIdHistory"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2247"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2248"); + node.BrowseName = ToQualifiedName("AuthenticationMechanism"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2244"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AuthenticationMechanism"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2248"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2249"); + node.BrowseName = ToQualifiedName("Encoding"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2244"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Encoding"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2249"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2250"); + node.BrowseName = ToQualifiedName("TransportProtocol"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2244"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransportProtocol"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2250"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2251"); + node.BrowseName = ToQualifiedName("SecurityMode"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2244"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecurityMode"); + attrs.Type = ToNodeId("i=302"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2251"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2252"); + node.BrowseName = ToQualifiedName("SecurityPolicyUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2244"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecurityPolicyUri"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3058"); + node.BrowseName = ToQualifiedName("ClientCertificate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2244"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientCertificate"); + attrs.Type = ObjectId::ByteString; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3058"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11487"); + node.BrowseName = ToQualifiedName("OptionSetType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("OptionSetType"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11487"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11488"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11487"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11701"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11488"); + node.BrowseName = ToQualifiedName("OptionSetValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11487"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OptionSetValues"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11488"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11701"); + node.BrowseName = ToQualifiedName("BitMask"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11487"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BitMask"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11701"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3048"); + node.BrowseName = ToQualifiedName("EventTypes"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=86"); + node.ReferenceTypeId = ReferenceId::Organizes; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("EventTypes"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::Organizes; + ref.SourceNodeId = ToNodeId("i=3048"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2041"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2253"); + node.BrowseName = ToQualifiedName("Server"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=85"); + node.ReferenceTypeId = ReferenceId::Organizes; + node.TypeDefinition = ToNodeId("i=2004"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Server"); + attrs.EventNotifier = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2253"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2254"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2253"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2255"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2253"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2256"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2253"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2267"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2253"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2994"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2253"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2268"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2253"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2274"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2253"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2295"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2253"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2296"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2253"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11715"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2253"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11492"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2254"); + node.BrowseName = ToQualifiedName("ServerArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2253"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The list of server URIs used by the server."); + attrs.DisplayName = LocalizedText("ServerArray"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2255"); + node.BrowseName = ToQualifiedName("NamespaceArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2253"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The list of namespace URIs used by the server."); + attrs.DisplayName = LocalizedText("NamespaceArray"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2256"); + node.BrowseName = ToQualifiedName("ServerStatus"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2253"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2138"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The current status of the server."); + attrs.DisplayName = LocalizedText("ServerStatus"); + attrs.Type = ToNodeId("i=862"); + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2256"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2257"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2256"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2258"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2256"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2259"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2256"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2260"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2256"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2992"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2256"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2993"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2257"); + node.BrowseName = ToQualifiedName("StartTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2256"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StartTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2258"); + node.BrowseName = ToQualifiedName("CurrentTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2256"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2259"); + node.BrowseName = ToQualifiedName("State"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2256"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("State"); + attrs.Type = ToNodeId("i=852"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2260"); + node.BrowseName = ToQualifiedName("BuildInfo"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2256"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=3051"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BuildInfo"); + attrs.Type = ToNodeId("i=338"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2260"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2262"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2260"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2263"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2260"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2261"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2260"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2264"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2260"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2265"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2260"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2266"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2262"); + node.BrowseName = ToQualifiedName("ProductUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2260"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ProductUri"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2263"); + node.BrowseName = ToQualifiedName("ManufacturerName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2260"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ManufacturerName"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2261"); + node.BrowseName = ToQualifiedName("ProductName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2260"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ProductName"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2264"); + node.BrowseName = ToQualifiedName("SoftwareVersion"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2260"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SoftwareVersion"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2265"); + node.BrowseName = ToQualifiedName("BuildNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2260"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BuildNumber"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2266"); + node.BrowseName = ToQualifiedName("BuildDate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2260"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BuildDate"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2992"); + node.BrowseName = ToQualifiedName("SecondsTillShutdown"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2256"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecondsTillShutdown"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2993"); + node.BrowseName = ToQualifiedName("ShutdownReason"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2256"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ShutdownReason"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2267"); + node.BrowseName = ToQualifiedName("ServiceLevel"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2253"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A value indicating the level of service the server can provide. 255 indicates the best."); + attrs.DisplayName = LocalizedText("ServiceLevel"); + attrs.Type = ObjectId::Byte; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2994"); + node.BrowseName = ToQualifiedName("Auditing"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2253"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A flag indicating whether the server is currently generating audit events."); + attrs.DisplayName = LocalizedText("Auditing"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + attrs.MinimumSamplingInterval = 1000; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2268"); + node.BrowseName = ToQualifiedName("ServerCapabilities"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2253"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2013"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Describes capabilities supported by the server."); + attrs.DisplayName = LocalizedText("ServerCapabilities"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2268"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2269"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2268"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2271"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2268"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2272"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2268"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2735"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2268"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2736"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2268"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2737"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2268"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3704"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2268"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11702"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2268"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11703"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2268"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11704"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2268"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2996"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2268"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2997"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2269"); + node.BrowseName = ToQualifiedName("ServerProfileArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2268"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of profiles supported by the server."); + attrs.DisplayName = LocalizedText("ServerProfileArray"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2271"); + node.BrowseName = ToQualifiedName("LocaleIdArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2268"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of locales supported by the server."); + attrs.DisplayName = LocalizedText("LocaleIdArray"); + attrs.Type = ToNodeId("i=295"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2272"); + node.BrowseName = ToQualifiedName("MinSupportedSampleRate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2268"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The minimum sampling interval supported by the server."); + attrs.DisplayName = LocalizedText("MinSupportedSampleRate"); + attrs.Type = ToNodeId("i=290"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2735"); + node.BrowseName = ToQualifiedName("MaxBrowseContinuationPoints"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2268"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of continuation points for Browse operations per session."); + attrs.DisplayName = LocalizedText("MaxBrowseContinuationPoints"); + attrs.Type = ObjectId::UInt16; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2736"); + node.BrowseName = ToQualifiedName("MaxQueryContinuationPoints"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2268"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of continuation points for Query operations per session."); + attrs.DisplayName = LocalizedText("MaxQueryContinuationPoints"); + attrs.Type = ObjectId::UInt16; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2737"); + node.BrowseName = ToQualifiedName("MaxHistoryContinuationPoints"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2268"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of continuation points for ReadHistory operations per session."); + attrs.DisplayName = LocalizedText("MaxHistoryContinuationPoints"); + attrs.Type = ObjectId::UInt16; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3704"); + node.BrowseName = ToQualifiedName("SoftwareCertificates"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2268"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The software certificates owned by the server."); + attrs.DisplayName = LocalizedText("SoftwareCertificates"); + attrs.Type = ToNodeId("i=344"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11702"); + node.BrowseName = ToQualifiedName("MaxArrayLength"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2268"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum length for an array value supported by the server."); + attrs.DisplayName = LocalizedText("MaxArrayLength"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11703"); + node.BrowseName = ToQualifiedName("MaxStringLength"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2268"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum length for a string value supported by the server."); + attrs.DisplayName = LocalizedText("MaxStringLength"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11704"); + node.BrowseName = ToQualifiedName("OperationLimits"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2268"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=11564"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Defines the limits supported by the server for different operations."); + attrs.DisplayName = LocalizedText("OperationLimits"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11704"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11705"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11704"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12165"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11704"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12166"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11704"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11707"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11704"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12167"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11704"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12168"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11704"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11709"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11704"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11710"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11704"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11711"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11704"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11712"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11704"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11713"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11704"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11714"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11705"); + node.BrowseName = ToQualifiedName("MaxNodesPerRead"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11704"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single Read request."); + attrs.DisplayName = LocalizedText("MaxNodesPerRead"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12165"); + node.BrowseName = ToQualifiedName("MaxNodesPerHistoryReadData"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11704"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single data HistoryRead request."); + attrs.DisplayName = LocalizedText("MaxNodesPerHistoryReadData"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12166"); + node.BrowseName = ToQualifiedName("MaxNodesPerHistoryReadEvents"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11704"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single event HistoryRead request."); + attrs.DisplayName = LocalizedText("MaxNodesPerHistoryReadEvents"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11707"); + node.BrowseName = ToQualifiedName("MaxNodesPerWrite"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11704"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single Write request."); + attrs.DisplayName = LocalizedText("MaxNodesPerWrite"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12167"); + node.BrowseName = ToQualifiedName("MaxNodesPerHistoryUpdateData"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11704"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single data HistoryUpdate request."); + attrs.DisplayName = LocalizedText("MaxNodesPerHistoryUpdateData"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12168"); + node.BrowseName = ToQualifiedName("MaxNodesPerHistoryUpdateEvents"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11704"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single event HistoryUpdate request."); + attrs.DisplayName = LocalizedText("MaxNodesPerHistoryUpdateEvents"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11709"); + node.BrowseName = ToQualifiedName("MaxNodesPerMethodCall"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11704"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single Call request."); + attrs.DisplayName = LocalizedText("MaxNodesPerMethodCall"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11710"); + node.BrowseName = ToQualifiedName("MaxNodesPerBrowse"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11704"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single Browse request."); + attrs.DisplayName = LocalizedText("MaxNodesPerBrowse"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11711"); + node.BrowseName = ToQualifiedName("MaxNodesPerRegisterNodes"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11704"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single RegisterNodes request."); + attrs.DisplayName = LocalizedText("MaxNodesPerRegisterNodes"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11712"); + node.BrowseName = ToQualifiedName("MaxNodesPerTranslateBrowsePathsToNodeIds"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11704"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single TranslateBrowsePathsToNodeIds request."); + attrs.DisplayName = LocalizedText("MaxNodesPerTranslateBrowsePathsToNodeIds"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11713"); + node.BrowseName = ToQualifiedName("MaxNodesPerNodeManagement"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11704"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single AddNodes, AddReferences, DeleteNodes or DeleteReferences request."); + attrs.DisplayName = LocalizedText("MaxNodesPerNodeManagement"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11714"); + node.BrowseName = ToQualifiedName("MaxMonitoredItemsPerCall"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11704"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum number of operations in a single MonitoredItem related request."); + attrs.DisplayName = LocalizedText("MaxMonitoredItemsPerCall"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2996"); + node.BrowseName = ToQualifiedName("ModellingRules"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2268"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("A folder for the modelling rules supported by the server."); + attrs.DisplayName = LocalizedText("ModellingRules"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2997"); + node.BrowseName = ToQualifiedName("AggregateFunctions"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2268"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=61"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("A folder for the real time aggregates supported by the server."); + attrs.DisplayName = LocalizedText("AggregateFunctions"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2274"); + node.BrowseName = ToQualifiedName("ServerDiagnostics"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2253"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2020"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Reports diagnostics about the server."); + attrs.DisplayName = LocalizedText("ServerDiagnostics"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2274"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2275"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2274"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2289"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2274"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2290"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2274"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3706"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2274"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2294"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2275"); + node.BrowseName = ToQualifiedName("ServerDiagnosticsSummary"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2274"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2150"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A summary of server level diagnostics."); + attrs.DisplayName = LocalizedText("ServerDiagnosticsSummary"); + attrs.Type = ToNodeId("i=859"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2275"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2276"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2275"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2277"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2275"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2278"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2275"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2279"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2275"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3705"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2275"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2281"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2275"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2282"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2275"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2284"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2275"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2285"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2275"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2286"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2275"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2287"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2275"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2288"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2276"); + node.BrowseName = ToQualifiedName("ServerViewCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2275"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ServerViewCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2277"); + node.BrowseName = ToQualifiedName("CurrentSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2275"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2278"); + node.BrowseName = ToQualifiedName("CumulatedSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2275"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CumulatedSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2279"); + node.BrowseName = ToQualifiedName("SecurityRejectedSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2275"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecurityRejectedSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3705"); + node.BrowseName = ToQualifiedName("RejectedSessionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2275"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RejectedSessionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2281"); + node.BrowseName = ToQualifiedName("SessionTimeoutCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2275"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionTimeoutCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2282"); + node.BrowseName = ToQualifiedName("SessionAbortCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2275"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionAbortCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2284"); + node.BrowseName = ToQualifiedName("PublishingIntervalCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2275"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("PublishingIntervalCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2285"); + node.BrowseName = ToQualifiedName("CurrentSubscriptionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2275"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentSubscriptionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2286"); + node.BrowseName = ToQualifiedName("CumulatedSubscriptionCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2275"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CumulatedSubscriptionCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2287"); + node.BrowseName = ToQualifiedName("SecurityRejectedRequestsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2275"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SecurityRejectedRequestsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2288"); + node.BrowseName = ToQualifiedName("RejectedRequestsCount"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2275"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=63"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RejectedRequestsCount"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2289"); + node.BrowseName = ToQualifiedName("SamplingIntervalDiagnosticsArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2274"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2164"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of diagnostics for each sampling interval supported by the server."); + attrs.DisplayName = LocalizedText("SamplingIntervalDiagnosticsArray"); + attrs.Type = ToNodeId("i=856"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2290"); + node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2274"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2171"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of diagnostics for each active subscription."); + attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsArray"); + attrs.Type = ToNodeId("i=874"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3706"); + node.BrowseName = ToQualifiedName("SessionsDiagnosticsSummary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2274"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2026"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("A summary of session level diagnostics."); + attrs.DisplayName = LocalizedText("SessionsDiagnosticsSummary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3706"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3707"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=3706"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3708"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3707"); + node.BrowseName = ToQualifiedName("SessionDiagnosticsArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3706"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2196"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of diagnostics for each active session."); + attrs.DisplayName = LocalizedText("SessionDiagnosticsArray"); + attrs.Type = ToNodeId("i=865"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3708"); + node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3706"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2243"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A list of security related diagnostics for each active session."); + attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsArray"); + attrs.Type = ToNodeId("i=868"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2294"); + node.BrowseName = ToQualifiedName("EnabledFlag"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2274"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("If TRUE the diagnostics collection is enabled."); + attrs.DisplayName = LocalizedText("EnabledFlag"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + attrs.AccessLevel = (VariableAccessLevel) 3; + attrs.UserAccessLevel = (VariableAccessLevel) 3; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2295"); + node.BrowseName = ToQualifiedName("VendorServerInfo"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2253"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2033"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Server information provided by the vendor."); + attrs.DisplayName = LocalizedText("VendorServerInfo"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2296"); + node.BrowseName = ToQualifiedName("ServerRedundancy"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2253"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2034"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Describes the redundancy capabilities of the server."); + attrs.DisplayName = LocalizedText("ServerRedundancy"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2296"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3709"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2296"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11312"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2296"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11313"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2296"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11314"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3709"); + node.BrowseName = ToQualifiedName("RedundancySupport"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2296"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("Indicates what style of redundancy is supported by the server."); + attrs.DisplayName = LocalizedText("RedundancySupport"); + attrs.Type = ToNodeId("i=851"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11312"); + node.BrowseName = ToQualifiedName("CurrentServerId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2296"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentServerId"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11313"); + node.BrowseName = ToQualifiedName("RedundantServerArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2296"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RedundantServerArray"); + attrs.Type = ToNodeId("i=853"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11314"); + node.BrowseName = ToQualifiedName("ServerUriArray"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2296"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ServerUriArray"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11715"); + node.BrowseName = ToQualifiedName("Namespaces"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2253"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=11645"); + ObjectAttributes attrs; + attrs.Description = LocalizedText("Describes the namespaces supported by the server."); + attrs.DisplayName = LocalizedText("Namespaces"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11493"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11492"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11494"); + node.BrowseName = ToQualifiedName("OutputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11492"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OutputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11737"); + node.BrowseName = ToQualifiedName("BitFieldMaskDataType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=9"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.Description = LocalizedText("A mask of 32 bits that can be updated individually by using the top 32 bits as a mask."); + attrs.DisplayName = LocalizedText("BitFieldMaskDataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2299"); + node.BrowseName = ToQualifiedName("StateMachineType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("StateMachineType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2299"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2769"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2299"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2770"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2769"); + node.BrowseName = ToQualifiedName("CurrentState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2299"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2755"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2769"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3720"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2769"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3720"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2769"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3720"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2770"); + node.BrowseName = ToQualifiedName("LastTransition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2299"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2762"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastTransition"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2770"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3724"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2770"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3724"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2770"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3724"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2755"); + node.BrowseName = ToQualifiedName("StateVariableType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("StateVariableType"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2755"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2756"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2755"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2757"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2755"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2758"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2755"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2759"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2756"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2755"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2756"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2757"); + node.BrowseName = ToQualifiedName("Name"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2755"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Name"); + attrs.Type = ObjectId::QualifiedName; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2757"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2758"); + node.BrowseName = ToQualifiedName("Number"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2755"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Number"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2758"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2759"); + node.BrowseName = ToQualifiedName("EffectiveDisplayName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2755"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EffectiveDisplayName"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2759"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2762"); + node.BrowseName = ToQualifiedName("TransitionVariableType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionVariableType"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2762"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2763"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2762"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2764"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2762"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2765"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2762"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2766"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2762"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11456"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2763"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2762"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2763"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2764"); + node.BrowseName = ToQualifiedName("Name"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2762"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Name"); + attrs.Type = ObjectId::QualifiedName; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2764"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2765"); + node.BrowseName = ToQualifiedName("Number"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2762"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Number"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2765"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2766"); + node.BrowseName = ToQualifiedName("TransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2762"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2766"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11456"); + node.BrowseName = ToQualifiedName("EffectiveTransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2762"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EffectiveTransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11456"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2771"); + node.BrowseName = ToQualifiedName("FiniteStateMachineType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2299"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("FiniteStateMachineType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2771"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2772"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2771"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2773"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2772"); + node.BrowseName = ToQualifiedName("CurrentState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2771"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2760"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2772"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3728"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2772"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3728"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2772"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3728"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2773"); + node.BrowseName = ToQualifiedName("LastTransition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2771"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2767"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastTransition"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2773"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3732"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2773"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3732"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2773"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3732"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2760"); + node.BrowseName = ToQualifiedName("FiniteStateVariableType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=2755"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("FiniteStateVariableType"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2760"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2761"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2761"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2760"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2761"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2767"); + node.BrowseName = ToQualifiedName("FiniteTransitionVariableType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=2762"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("FiniteTransitionVariableType"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2767"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2768"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2768"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2767"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2768"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2307"); + node.BrowseName = ToQualifiedName("StateType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("StateType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2307"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2308"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2308"); + node.BrowseName = ToQualifiedName("StateNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2307"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StateNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2308"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2309"); + node.BrowseName = ToQualifiedName("InitialStateType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2307"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("InitialStateType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2310"); + node.BrowseName = ToQualifiedName("TransitionType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2310"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2312"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2312"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2310"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2312"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2311"); + node.BrowseName = ToQualifiedName("TransitionEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionEventType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2311"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2774"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2311"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2775"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2311"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2776"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2774"); + node.BrowseName = ToQualifiedName("Transition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2311"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2762"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Transition"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2774"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3754"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2774"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3754"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2774"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3754"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2775"); + node.BrowseName = ToQualifiedName("FromState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2311"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2755"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("FromState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2775"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3746"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2775"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3746"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2775"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3746"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2776"); + node.BrowseName = ToQualifiedName("ToState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2311"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2755"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ToState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2776"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3750"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2776"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3750"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2776"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3750"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2315"); + node.BrowseName = ToQualifiedName("AuditUpdateStateEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2127"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditUpdateStateEventType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2315"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2777"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2315"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2778"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2777"); + node.BrowseName = ToQualifiedName("OldStateId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2315"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OldStateId"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2777"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2778"); + node.BrowseName = ToQualifiedName("NewStateId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2315"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("NewStateId"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2778"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=338"); + node.BrowseName = ToQualifiedName("BuildInfo"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("BuildInfo"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=851"); + node.BrowseName = ToQualifiedName("RedundancySupport"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("RedundancySupport"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=851"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7611"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7611"); + node.BrowseName = ToQualifiedName("EnumStrings"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=851"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumStrings"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=7611"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=852"); + node.BrowseName = ToQualifiedName("ServerState"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ServerState"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=852"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7612"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7612"); + node.BrowseName = ToQualifiedName("EnumStrings"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=852"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumStrings"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=7612"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=853"); + node.BrowseName = ToQualifiedName("RedundantServerDataType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("RedundantServerDataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11943"); + node.BrowseName = ToQualifiedName("EndpointUrlListDataType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("EndpointUrlListDataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11944"); + node.BrowseName = ToQualifiedName("NetworkGroupDataType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("NetworkGroupDataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=856"); + node.BrowseName = ToQualifiedName("SamplingIntervalDiagnosticsDataType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SamplingIntervalDiagnosticsDataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=859"); + node.BrowseName = ToQualifiedName("ServerDiagnosticsSummaryDataType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ServerDiagnosticsSummaryDataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=862"); + node.BrowseName = ToQualifiedName("ServerStatusDataType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ServerStatusDataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=865"); + node.BrowseName = ToQualifiedName("SessionDiagnosticsDataType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SessionDiagnosticsDataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=868"); + node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsDataType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsDataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=871"); + node.BrowseName = ToQualifiedName("ServiceCounterDataType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ServiceCounterDataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=299"); + node.BrowseName = ToQualifiedName("StatusResult"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("StatusResult"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=874"); + node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsDataType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsDataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=877"); + node.BrowseName = ToQualifiedName("ModelChangeStructureDataType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ModelChangeStructureDataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=897"); + node.BrowseName = ToQualifiedName("SemanticChangeStructureDataType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SemanticChangeStructureDataType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=339"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=338"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=339"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8327"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=854"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=853"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=854"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8843"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11949"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=11943"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=11949"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11951"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11950"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=11944"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=11950"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11954"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=857"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=856"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=857"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8846"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=860"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=859"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=860"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8849"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=863"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=862"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=863"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8852"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=866"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=865"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=866"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8855"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=869"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=868"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=869"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8858"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=872"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=871"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=872"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8861"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=300"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=299"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=300"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8294"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=875"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=874"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=875"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8864"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=878"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=877"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=878"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8867"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=898"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=897"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=898"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8870"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8252"); + node.BrowseName = ToQualifiedName("Opc.Ua"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=92"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=72"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Opc.Ua"); + attrs.Type = ObjectId::ByteString; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8254"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8285"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8291"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8918"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8300"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8297"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8303"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8417"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8333"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8306"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8309"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8312"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8315"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8318"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8363"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8366"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8369"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8372"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8321"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8324"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8330"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8564"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8567"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8570"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8573"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8576"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8579"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8582"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8639"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8702"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8708"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8711"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8807"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8384"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8387"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8390"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8327"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8843"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11951"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11954"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8846"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8849"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8852"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8855"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8858"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8861"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8294"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8864"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8867"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8870"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8873"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8876"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12175"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12178"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12083"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12086"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8882"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=8252"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8879"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8254"); + node.BrowseName = ToQualifiedName("NamespaceUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A URI that uniquely identifies the dictionary."); + attrs.DisplayName = LocalizedText("NamespaceUri"); + attrs.Type = ObjectId::String; + attrs.Value = +"http://opcfoundation.org/UA/2008/02/Types.xsd"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8285"); + node.BrowseName = ToQualifiedName("Argument"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Argument"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='Argument']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8291"); + node.BrowseName = ToQualifiedName("EnumValueType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumValueType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='EnumValueType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8918"); + node.BrowseName = ToQualifiedName("TimeZoneDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TimeZoneDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='TimeZoneDataType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8300"); + node.BrowseName = ToQualifiedName("ApplicationDescription"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ApplicationDescription"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='ApplicationDescription']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8297"); + node.BrowseName = ToQualifiedName("UserTokenPolicy"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UserTokenPolicy"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='UserTokenPolicy']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8303"); + node.BrowseName = ToQualifiedName("EndpointDescription"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EndpointDescription"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='EndpointDescription']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8417"); + node.BrowseName = ToQualifiedName("RegisteredServer"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RegisteredServer"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='RegisteredServer']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8333"); + node.BrowseName = ToQualifiedName("SignedSoftwareCertificate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SignedSoftwareCertificate"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='SignedSoftwareCertificate']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8306"); + node.BrowseName = ToQualifiedName("UserIdentityToken"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UserIdentityToken"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='UserIdentityToken']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8309"); + node.BrowseName = ToQualifiedName("AnonymousIdentityToken"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AnonymousIdentityToken"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='AnonymousIdentityToken']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8312"); + node.BrowseName = ToQualifiedName("UserNameIdentityToken"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UserNameIdentityToken"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='UserNameIdentityToken']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8315"); + node.BrowseName = ToQualifiedName("X509IdentityToken"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("X509IdentityToken"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='X509IdentityToken']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8318"); + node.BrowseName = ToQualifiedName("IssuedIdentityToken"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("IssuedIdentityToken"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='IssuedIdentityToken']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8363"); + node.BrowseName = ToQualifiedName("AddNodesItem"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AddNodesItem"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='AddNodesItem']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8366"); + node.BrowseName = ToQualifiedName("AddReferencesItem"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AddReferencesItem"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='AddReferencesItem']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8369"); + node.BrowseName = ToQualifiedName("DeleteNodesItem"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteNodesItem"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='DeleteNodesItem']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8372"); + node.BrowseName = ToQualifiedName("DeleteReferencesItem"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteReferencesItem"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='DeleteReferencesItem']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8321"); + node.BrowseName = ToQualifiedName("EndpointConfiguration"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EndpointConfiguration"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='EndpointConfiguration']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8324"); + node.BrowseName = ToQualifiedName("SupportedProfile"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SupportedProfile"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='SupportedProfile']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8330"); + node.BrowseName = ToQualifiedName("SoftwareCertificate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SoftwareCertificate"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='SoftwareCertificate']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8564"); + node.BrowseName = ToQualifiedName("ContentFilterElement"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ContentFilterElement"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='ContentFilterElement']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8567"); + node.BrowseName = ToQualifiedName("ContentFilter"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ContentFilter"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='ContentFilter']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8570"); + node.BrowseName = ToQualifiedName("FilterOperand"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("FilterOperand"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='FilterOperand']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8573"); + node.BrowseName = ToQualifiedName("ElementOperand"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ElementOperand"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='ElementOperand']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8576"); + node.BrowseName = ToQualifiedName("LiteralOperand"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LiteralOperand"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='LiteralOperand']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8579"); + node.BrowseName = ToQualifiedName("AttributeOperand"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AttributeOperand"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='AttributeOperand']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8582"); + node.BrowseName = ToQualifiedName("SimpleAttributeOperand"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SimpleAttributeOperand"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='SimpleAttributeOperand']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8639"); + node.BrowseName = ToQualifiedName("HistoryEvent"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("HistoryEvent"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='HistoryEvent']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8702"); + node.BrowseName = ToQualifiedName("MonitoringFilter"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MonitoringFilter"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='MonitoringFilter']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8708"); + node.BrowseName = ToQualifiedName("EventFilter"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EventFilter"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='EventFilter']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8711"); + node.BrowseName = ToQualifiedName("AggregateConfiguration"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AggregateConfiguration"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='AggregateConfiguration']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8807"); + node.BrowseName = ToQualifiedName("HistoryEventFieldList"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("HistoryEventFieldList"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='HistoryEventFieldList']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8384"); + node.BrowseName = ToQualifiedName("ScalarTestType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ScalarTestType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='ScalarTestType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8387"); + node.BrowseName = ToQualifiedName("ArrayTestType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ArrayTestType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='ArrayTestType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8390"); + node.BrowseName = ToQualifiedName("CompositeTestType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CompositeTestType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='CompositeTestType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8327"); + node.BrowseName = ToQualifiedName("BuildInfo"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BuildInfo"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='BuildInfo']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8843"); + node.BrowseName = ToQualifiedName("RedundantServerDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RedundantServerDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='RedundantServerDataType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11951"); + node.BrowseName = ToQualifiedName("EndpointUrlListDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EndpointUrlListDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='EndpointUrlListDataType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11954"); + node.BrowseName = ToQualifiedName("NetworkGroupDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("NetworkGroupDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='NetworkGroupDataType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8846"); + node.BrowseName = ToQualifiedName("SamplingIntervalDiagnosticsDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SamplingIntervalDiagnosticsDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='SamplingIntervalDiagnosticsDataType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8849"); + node.BrowseName = ToQualifiedName("ServerDiagnosticsSummaryDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ServerDiagnosticsSummaryDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='ServerDiagnosticsSummaryDataType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8852"); + node.BrowseName = ToQualifiedName("ServerStatusDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ServerStatusDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='ServerStatusDataType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8855"); + node.BrowseName = ToQualifiedName("SessionDiagnosticsDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionDiagnosticsDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='SessionDiagnosticsDataType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8858"); + node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='SessionSecurityDiagnosticsDataType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8861"); + node.BrowseName = ToQualifiedName("ServiceCounterDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ServiceCounterDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='ServiceCounterDataType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8294"); + node.BrowseName = ToQualifiedName("StatusResult"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StatusResult"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='StatusResult']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8864"); + node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='SubscriptionDiagnosticsDataType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8867"); + node.BrowseName = ToQualifiedName("ModelChangeStructureDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ModelChangeStructureDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='ModelChangeStructureDataType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8870"); + node.BrowseName = ToQualifiedName("SemanticChangeStructureDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SemanticChangeStructureDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='SemanticChangeStructureDataType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8873"); + node.BrowseName = ToQualifiedName("Range"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Range"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='Range']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8876"); + node.BrowseName = ToQualifiedName("EUInformation"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EUInformation"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='EUInformation']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12175"); + node.BrowseName = ToQualifiedName("ComplexNumberType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ComplexNumberType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='ComplexNumberType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12178"); + node.BrowseName = ToQualifiedName("DoubleComplexNumberType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DoubleComplexNumberType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='DoubleComplexNumberType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12083"); + node.BrowseName = ToQualifiedName("AxisInformation"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AxisInformation"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='AxisInformation']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12086"); + node.BrowseName = ToQualifiedName("XVType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("XVType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='XVType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8882"); + node.BrowseName = ToQualifiedName("ProgramDiagnosticDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ProgramDiagnosticDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='ProgramDiagnosticDataType']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8879"); + node.BrowseName = ToQualifiedName("Annotation"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8252"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Annotation"); + attrs.Type = ObjectId::String; + attrs.Value = +"//xs:element[@name='Annotation']"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=340"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=338"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=340"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7692"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=855"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=853"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=855"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8208"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11957"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=11943"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=11957"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11959"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11958"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=11944"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=11958"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11962"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=858"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=856"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=858"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8211"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=861"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=859"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=861"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8214"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=864"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=862"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=864"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8217"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=867"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=865"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=867"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8220"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=870"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=868"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=870"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8223"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=873"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=871"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=873"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8226"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=301"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=299"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=301"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7659"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=876"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=874"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=876"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8229"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=879"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=877"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=879"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8232"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=899"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=897"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=899"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8235"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7617"); + node.BrowseName = ToQualifiedName("Opc.Ua"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=93"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=72"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Opc.Ua"); + attrs.Type = ObjectId::ByteString; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7619"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7650"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7656"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8914"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7665"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7662"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7668"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7782"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7698"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7671"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7674"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7677"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7680"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7683"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7728"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7731"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7734"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7737"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7686"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7689"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7695"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7929"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7932"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7935"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7938"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7941"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7944"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7947"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8004"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8067"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8073"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8076"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8172"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7749"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7752"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7755"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7692"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8208"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11959"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11962"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8211"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8214"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8217"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8220"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8223"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8226"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=7659"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8229"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8232"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8235"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8238"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8241"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12183"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12186"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12091"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12094"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8247"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=7617"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8244"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7619"); + node.BrowseName = ToQualifiedName("NamespaceUri"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A URI that uniquely identifies the dictionary."); + attrs.DisplayName = LocalizedText("NamespaceUri"); + attrs.Type = ObjectId::String; + attrs.Value = +"http://opcfoundation.org/UA/"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7650"); + node.BrowseName = ToQualifiedName("Argument"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Argument"); + attrs.Type = ObjectId::String; + attrs.Value = +"Argument"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7656"); + node.BrowseName = ToQualifiedName("EnumValueType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumValueType"); + attrs.Type = ObjectId::String; + attrs.Value = +"EnumValueType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8914"); + node.BrowseName = ToQualifiedName("TimeZoneDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TimeZoneDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"TimeZoneDataType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7665"); + node.BrowseName = ToQualifiedName("ApplicationDescription"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ApplicationDescription"); + attrs.Type = ObjectId::String; + attrs.Value = +"ApplicationDescription"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7662"); + node.BrowseName = ToQualifiedName("UserTokenPolicy"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UserTokenPolicy"); + attrs.Type = ObjectId::String; + attrs.Value = +"UserTokenPolicy"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7668"); + node.BrowseName = ToQualifiedName("EndpointDescription"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EndpointDescription"); + attrs.Type = ObjectId::String; + attrs.Value = +"EndpointDescription"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7782"); + node.BrowseName = ToQualifiedName("RegisteredServer"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RegisteredServer"); + attrs.Type = ObjectId::String; + attrs.Value = +"RegisteredServer"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7698"); + node.BrowseName = ToQualifiedName("SignedSoftwareCertificate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SignedSoftwareCertificate"); + attrs.Type = ObjectId::String; + attrs.Value = +"SignedSoftwareCertificate"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7671"); + node.BrowseName = ToQualifiedName("UserIdentityToken"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UserIdentityToken"); + attrs.Type = ObjectId::String; + attrs.Value = +"UserIdentityToken"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7674"); + node.BrowseName = ToQualifiedName("AnonymousIdentityToken"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AnonymousIdentityToken"); + attrs.Type = ObjectId::String; + attrs.Value = +"AnonymousIdentityToken"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7677"); + node.BrowseName = ToQualifiedName("UserNameIdentityToken"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UserNameIdentityToken"); + attrs.Type = ObjectId::String; + attrs.Value = +"UserNameIdentityToken"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7680"); + node.BrowseName = ToQualifiedName("X509IdentityToken"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("X509IdentityToken"); + attrs.Type = ObjectId::String; + attrs.Value = +"X509IdentityToken"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7683"); + node.BrowseName = ToQualifiedName("IssuedIdentityToken"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("IssuedIdentityToken"); + attrs.Type = ObjectId::String; + attrs.Value = +"IssuedIdentityToken"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7728"); + node.BrowseName = ToQualifiedName("AddNodesItem"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AddNodesItem"); + attrs.Type = ObjectId::String; + attrs.Value = +"AddNodesItem"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7731"); + node.BrowseName = ToQualifiedName("AddReferencesItem"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AddReferencesItem"); + attrs.Type = ObjectId::String; + attrs.Value = +"AddReferencesItem"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7734"); + node.BrowseName = ToQualifiedName("DeleteNodesItem"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteNodesItem"); + attrs.Type = ObjectId::String; + attrs.Value = +"DeleteNodesItem"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7737"); + node.BrowseName = ToQualifiedName("DeleteReferencesItem"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DeleteReferencesItem"); + attrs.Type = ObjectId::String; + attrs.Value = +"DeleteReferencesItem"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7686"); + node.BrowseName = ToQualifiedName("EndpointConfiguration"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EndpointConfiguration"); + attrs.Type = ObjectId::String; + attrs.Value = +"EndpointConfiguration"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7689"); + node.BrowseName = ToQualifiedName("SupportedProfile"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SupportedProfile"); + attrs.Type = ObjectId::String; + attrs.Value = +"SupportedProfile"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7695"); + node.BrowseName = ToQualifiedName("SoftwareCertificate"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SoftwareCertificate"); + attrs.Type = ObjectId::String; + attrs.Value = +"SoftwareCertificate"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7929"); + node.BrowseName = ToQualifiedName("ContentFilterElement"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ContentFilterElement"); + attrs.Type = ObjectId::String; + attrs.Value = +"ContentFilterElement"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7932"); + node.BrowseName = ToQualifiedName("ContentFilter"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ContentFilter"); + attrs.Type = ObjectId::String; + attrs.Value = +"ContentFilter"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7935"); + node.BrowseName = ToQualifiedName("FilterOperand"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("FilterOperand"); + attrs.Type = ObjectId::String; + attrs.Value = +"FilterOperand"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7938"); + node.BrowseName = ToQualifiedName("ElementOperand"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ElementOperand"); + attrs.Type = ObjectId::String; + attrs.Value = +"ElementOperand"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7941"); + node.BrowseName = ToQualifiedName("LiteralOperand"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LiteralOperand"); + attrs.Type = ObjectId::String; + attrs.Value = +"LiteralOperand"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7944"); + node.BrowseName = ToQualifiedName("AttributeOperand"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AttributeOperand"); + attrs.Type = ObjectId::String; + attrs.Value = +"AttributeOperand"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7947"); + node.BrowseName = ToQualifiedName("SimpleAttributeOperand"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SimpleAttributeOperand"); + attrs.Type = ObjectId::String; + attrs.Value = +"SimpleAttributeOperand"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8004"); + node.BrowseName = ToQualifiedName("HistoryEvent"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("HistoryEvent"); + attrs.Type = ObjectId::String; + attrs.Value = +"HistoryEvent"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8067"); + node.BrowseName = ToQualifiedName("MonitoringFilter"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MonitoringFilter"); + attrs.Type = ObjectId::String; + attrs.Value = +"MonitoringFilter"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8073"); + node.BrowseName = ToQualifiedName("EventFilter"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EventFilter"); + attrs.Type = ObjectId::String; + attrs.Value = +"EventFilter"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8076"); + node.BrowseName = ToQualifiedName("AggregateConfiguration"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AggregateConfiguration"); + attrs.Type = ObjectId::String; + attrs.Value = +"AggregateConfiguration"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8172"); + node.BrowseName = ToQualifiedName("HistoryEventFieldList"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("HistoryEventFieldList"); + attrs.Type = ObjectId::String; + attrs.Value = +"HistoryEventFieldList"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7749"); + node.BrowseName = ToQualifiedName("ScalarTestType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ScalarTestType"); + attrs.Type = ObjectId::String; + attrs.Value = +"ScalarTestType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7752"); + node.BrowseName = ToQualifiedName("ArrayTestType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ArrayTestType"); + attrs.Type = ObjectId::String; + attrs.Value = +"ArrayTestType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7755"); + node.BrowseName = ToQualifiedName("CompositeTestType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CompositeTestType"); + attrs.Type = ObjectId::String; + attrs.Value = +"CompositeTestType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7692"); + node.BrowseName = ToQualifiedName("BuildInfo"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BuildInfo"); + attrs.Type = ObjectId::String; + attrs.Value = +"BuildInfo"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8208"); + node.BrowseName = ToQualifiedName("RedundantServerDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("RedundantServerDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"RedundantServerDataType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11959"); + node.BrowseName = ToQualifiedName("EndpointUrlListDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EndpointUrlListDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"EndpointUrlListDataType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11962"); + node.BrowseName = ToQualifiedName("NetworkGroupDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("NetworkGroupDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"NetworkGroupDataType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8211"); + node.BrowseName = ToQualifiedName("SamplingIntervalDiagnosticsDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SamplingIntervalDiagnosticsDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"SamplingIntervalDiagnosticsDataType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8214"); + node.BrowseName = ToQualifiedName("ServerDiagnosticsSummaryDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ServerDiagnosticsSummaryDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"ServerDiagnosticsSummaryDataType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8217"); + node.BrowseName = ToQualifiedName("ServerStatusDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ServerStatusDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"ServerStatusDataType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8220"); + node.BrowseName = ToQualifiedName("SessionDiagnosticsDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionDiagnosticsDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"SessionDiagnosticsDataType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8223"); + node.BrowseName = ToQualifiedName("SessionSecurityDiagnosticsDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SessionSecurityDiagnosticsDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"SessionSecurityDiagnosticsDataType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8226"); + node.BrowseName = ToQualifiedName("ServiceCounterDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ServiceCounterDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"ServiceCounterDataType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=7659"); + node.BrowseName = ToQualifiedName("StatusResult"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StatusResult"); + attrs.Type = ObjectId::String; + attrs.Value = +"StatusResult"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8229"); + node.BrowseName = ToQualifiedName("SubscriptionDiagnosticsDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SubscriptionDiagnosticsDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"SubscriptionDiagnosticsDataType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8232"); + node.BrowseName = ToQualifiedName("ModelChangeStructureDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ModelChangeStructureDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"ModelChangeStructureDataType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8235"); + node.BrowseName = ToQualifiedName("SemanticChangeStructureDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SemanticChangeStructureDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"SemanticChangeStructureDataType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8238"); + node.BrowseName = ToQualifiedName("Range"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Range"); + attrs.Type = ObjectId::String; + attrs.Value = +"Range"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8241"); + node.BrowseName = ToQualifiedName("EUInformation"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EUInformation"); + attrs.Type = ObjectId::String; + attrs.Value = +"EUInformation"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12183"); + node.BrowseName = ToQualifiedName("ComplexNumberType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ComplexNumberType"); + attrs.Type = ObjectId::String; + attrs.Value = +"ComplexNumberType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12186"); + node.BrowseName = ToQualifiedName("DoubleComplexNumberType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DoubleComplexNumberType"); + attrs.Type = ObjectId::String; + attrs.Value = +"DoubleComplexNumberType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12091"); + node.BrowseName = ToQualifiedName("AxisInformation"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AxisInformation"); + attrs.Type = ObjectId::String; + attrs.Value = +"AxisInformation"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12094"); + node.BrowseName = ToQualifiedName("XVType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("XVType"); + attrs.Type = ObjectId::String; + attrs.Value = +"XVType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8247"); + node.BrowseName = ToQualifiedName("ProgramDiagnosticDataType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ProgramDiagnosticDataType"); + attrs.Type = ObjectId::String; + attrs.Value = +"ProgramDiagnosticDataType"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8244"); + node.BrowseName = ToQualifiedName("Annotation"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=7617"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=69"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Annotation"); + attrs.Type = ObjectId::String; + attrs.Value = +"Annotation"; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + +} } // namespace - + diff --git a/src/server/standard_address_space_part8.cpp b/src/server/standard_address_space_part8.cpp index 6377bc16..660546b2 100644 --- a/src/server/standard_address_space_part8.cpp +++ b/src/server/standard_address_space_part8.cpp @@ -16,1507 +16,1507 @@ namespace OpcUa { - void CreateAddressSpacePart8(OpcUa::NodeManagementServices& registry) +void CreateAddressSpacePart8(OpcUa::NodeManagementServices & registry) +{ + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2365"); + node.BrowseName = ToQualifiedName("DataItemType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.Description = LocalizedText("A variable that contains live automation data."); + attrs.DisplayName = LocalizedText("DataItemType"); + attrs.Type = ObjectId::String; + attrs.Rank = -2; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2365"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2366"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2365"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2367"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2366"); + node.BrowseName = ToQualifiedName("Definition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2365"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A vendor-specific, human readable string that specifies how the value of this DataItem is calculated."); + attrs.DisplayName = LocalizedText("Definition"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2366"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2367"); + node.BrowseName = ToQualifiedName("ValuePrecision"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2365"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("The maximum precision that the server can maintain for the item based on restrictions in the target environment."); + attrs.DisplayName = LocalizedText("ValuePrecision"); + attrs.Type = ObjectId::Double; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2367"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2368"); + node.BrowseName = ToQualifiedName("AnalogItemType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=2365"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AnalogItemType"); + attrs.Type = ObjectId::Number; + attrs.Rank = -2; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2368"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2370"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2368"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2369"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2368"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2371"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2370"); + node.BrowseName = ToQualifiedName("InstrumentRange"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2368"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InstrumentRange"); + attrs.Type = ToNodeId("i=884"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2370"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2369"); + node.BrowseName = ToQualifiedName("EURange"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2368"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EURange"); + attrs.Type = ToNodeId("i=884"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2369"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2371"); + node.BrowseName = ToQualifiedName("EngineeringUnits"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2368"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EngineeringUnits"); + attrs.Type = ToNodeId("i=887"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2371"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2372"); + node.BrowseName = ToQualifiedName("DiscreteItemType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=2365"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("DiscreteItemType"); + attrs.Type = ObjectId::String; + attrs.Rank = -2; + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2373"); + node.BrowseName = ToQualifiedName("TwoStateDiscreteType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=2372"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("TwoStateDiscreteType"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -2; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2373"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2374"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2373"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2375"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2374"); + node.BrowseName = ToQualifiedName("FalseState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2373"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("FalseState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2374"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2375"); + node.BrowseName = ToQualifiedName("TrueState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2373"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TrueState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2375"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2376"); + node.BrowseName = ToQualifiedName("MultiStateDiscreteType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=2372"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("MultiStateDiscreteType"); + attrs.Type = ObjectId::UInteger; + attrs.Rank = -2; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2376"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2377"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2377"); + node.BrowseName = ToQualifiedName("EnumStrings"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2376"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumStrings"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2377"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + { - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2365"); - node.BrowseName = ToQualifiedName("DataItemType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.Description = LocalizedText("A variable that contains live automation data."); - attrs.DisplayName = LocalizedText("DataItemType"); - attrs.Type = ObjectId::String; - attrs.Rank = -2; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2365"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2366"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2365"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2367"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2366"); - node.BrowseName = ToQualifiedName("Definition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2365"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A vendor-specific, human readable string that specifies how the value of this DataItem is calculated."); - attrs.DisplayName = LocalizedText("Definition"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2366"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2367"); - node.BrowseName = ToQualifiedName("ValuePrecision"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2365"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("The maximum precision that the server can maintain for the item based on restrictions in the target environment."); - attrs.DisplayName = LocalizedText("ValuePrecision"); - attrs.Type = ObjectId::Double; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2367"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2368"); - node.BrowseName = ToQualifiedName("AnalogItemType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=2365"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AnalogItemType"); - attrs.Type = ObjectId::Number; - attrs.Rank = -2; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2368"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2370"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2368"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2369"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2368"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2371"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2370"); - node.BrowseName = ToQualifiedName("InstrumentRange"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2368"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InstrumentRange"); - attrs.Type = ToNodeId("i=884"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2370"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2369"); - node.BrowseName = ToQualifiedName("EURange"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2368"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EURange"); - attrs.Type = ToNodeId("i=884"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2369"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2371"); - node.BrowseName = ToQualifiedName("EngineeringUnits"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2368"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EngineeringUnits"); - attrs.Type = ToNodeId("i=887"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2371"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2372"); - node.BrowseName = ToQualifiedName("DiscreteItemType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=2365"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("DiscreteItemType"); - attrs.Type = ObjectId::String; - attrs.Rank = -2; - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2373"); - node.BrowseName = ToQualifiedName("TwoStateDiscreteType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=2372"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("TwoStateDiscreteType"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -2; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2373"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2374"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2373"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2375"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2374"); - node.BrowseName = ToQualifiedName("FalseState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2373"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("FalseState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2374"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2375"); - node.BrowseName = ToQualifiedName("TrueState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2373"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TrueState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2375"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2376"); - node.BrowseName = ToQualifiedName("MultiStateDiscreteType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=2372"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("MultiStateDiscreteType"); - attrs.Type = ObjectId::UInteger; - attrs.Rank = -2; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2376"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2377"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2377"); - node.BrowseName = ToQualifiedName("EnumStrings"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2376"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumStrings"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2377"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11238"); - node.BrowseName = ToQualifiedName("MultiStateValueDiscreteType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=2372"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("MultiStateValueDiscreteType"); - attrs.Type = ObjectId::Number; - attrs.Rank = -2; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11238"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11241"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11238"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11461"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11241"); - node.BrowseName = ToQualifiedName("EnumValues"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11238"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumValues"); - attrs.Type = ToNodeId("i=7594"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11241"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11461"); - node.BrowseName = ToQualifiedName("ValueAsText"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11238"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ValueAsText"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11461"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12021"); - node.BrowseName = ToQualifiedName("ArrayItemType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=2365"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ArrayItemType"); - attrs.Type = ObjectId::String; - attrs.Rank = 0; - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=12021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12024"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=12021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12025"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=12021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12026"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=12021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12027"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=12021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12028"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12024"); - node.BrowseName = ToQualifiedName("InstrumentRange"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12021"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InstrumentRange"); - attrs.Type = ToNodeId("i=884"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12024"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12025"); - node.BrowseName = ToQualifiedName("EURange"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12021"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EURange"); - attrs.Type = ToNodeId("i=884"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12025"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12026"); - node.BrowseName = ToQualifiedName("EngineeringUnits"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12021"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EngineeringUnits"); - attrs.Type = ToNodeId("i=887"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12026"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12027"); - node.BrowseName = ToQualifiedName("Title"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12021"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Title"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12027"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12028"); - node.BrowseName = ToQualifiedName("AxisScaleType"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12021"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AxisScaleType"); - attrs.Type = ToNodeId("i=12077"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12028"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12029"); - node.BrowseName = ToQualifiedName("YArrayItemType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=12021"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("YArrayItemType"); - attrs.Type = ObjectId::String; - attrs.Rank = 1; - attrs.IsAbstract = false; - attrs.Dimensions = std::vector{0}; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=12029"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12037"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12037"); - node.BrowseName = ToQualifiedName("XAxisDefinition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12029"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("XAxisDefinition"); - attrs.Type = ToNodeId("i=12079"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12037"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12038"); - node.BrowseName = ToQualifiedName("XYArrayItemType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=12021"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("XYArrayItemType"); - attrs.Type = ToNodeId("i=12080"); - attrs.Rank = 1; - attrs.IsAbstract = false; - attrs.Dimensions = std::vector{0}; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=12038"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12046"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12046"); - node.BrowseName = ToQualifiedName("XAxisDefinition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12038"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("XAxisDefinition"); - attrs.Type = ToNodeId("i=12079"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12046"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12047"); - node.BrowseName = ToQualifiedName("ImageItemType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=12021"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ImageItemType"); - attrs.Type = ObjectId::String; - attrs.Rank = 2; - attrs.IsAbstract = false; - attrs.Dimensions = std::vector{0,0}; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=12047"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12055"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=12047"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12056"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12055"); - node.BrowseName = ToQualifiedName("XAxisDefinition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12047"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("XAxisDefinition"); - attrs.Type = ToNodeId("i=12079"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12055"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12056"); - node.BrowseName = ToQualifiedName("YAxisDefinition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12047"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("YAxisDefinition"); - attrs.Type = ToNodeId("i=12079"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12056"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12057"); - node.BrowseName = ToQualifiedName("CubeItemType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=12021"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("CubeItemType"); - attrs.Type = ObjectId::String; - attrs.Rank = 3; - attrs.IsAbstract = false; - attrs.Dimensions = std::vector{0,0,0}; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=12057"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12065"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=12057"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12066"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=12057"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12067"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12065"); - node.BrowseName = ToQualifiedName("XAxisDefinition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12057"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("XAxisDefinition"); - attrs.Type = ToNodeId("i=12079"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12065"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12066"); - node.BrowseName = ToQualifiedName("YAxisDefinition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12057"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("YAxisDefinition"); - attrs.Type = ToNodeId("i=12079"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12066"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12067"); - node.BrowseName = ToQualifiedName("ZAxisDefinition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12057"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ZAxisDefinition"); - attrs.Type = ToNodeId("i=12079"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12067"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12068"); - node.BrowseName = ToQualifiedName("NDimensionArrayItemType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=12021"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("NDimensionArrayItemType"); - attrs.Type = ObjectId::String; - attrs.Rank = 0; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=12068"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12076"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12076"); - node.BrowseName = ToQualifiedName("AxisDefinition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12068"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AxisDefinition"); - attrs.Type = ToNodeId("i=12079"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12076"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=884"); - node.BrowseName = ToQualifiedName("Range"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("Range"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=887"); - node.BrowseName = ToQualifiedName("EUInformation"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("EUInformation"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12077"); - node.BrowseName = ToQualifiedName("AxisScaleEnumeration"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=29"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AxisScaleEnumeration"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=12077"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12078"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12078"); - node.BrowseName = ToQualifiedName("EnumStrings"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=12077"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnumStrings"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=12078"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12171"); - node.BrowseName = ToQualifiedName("ComplexNumberType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ComplexNumberType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12172"); - node.BrowseName = ToQualifiedName("DoubleComplexNumberType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("DoubleComplexNumberType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12079"); - node.BrowseName = ToQualifiedName("AxisInformation"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AxisInformation"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12080"); - node.BrowseName = ToQualifiedName("XVType"); - node.Class = NodeClass::DataType; - node.ParentNodeId = ToNodeId("i=22"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - DataTypeAttributes attrs; - attrs.DisplayName = LocalizedText("XVType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=885"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=884"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=885"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8873"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=888"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=887"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=888"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8876"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12173"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=12171"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=12173"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12175"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12174"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=12172"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=12174"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12178"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12081"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=12079"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=12081"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12083"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12082"); - node.BrowseName = ToQualifiedName("Default XML"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=12080"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default XML"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=12082"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12086"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=886"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=884"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=886"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8238"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=889"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=887"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=889"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8241"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12181"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=12171"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=12181"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12183"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12182"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=12172"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=12182"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12186"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12089"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=12079"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=12089"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12091"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=12090"); - node.BrowseName = ToQualifiedName("Default Binary"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=12080"); - node.ReferenceTypeId = ReferenceId::HasEncoding; - node.TypeDefinition = ToNodeId("i=76"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Default Binary"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasDescription; - ref.SourceNodeId = ToNodeId("i=12090"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=12094"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11238"); + node.BrowseName = ToQualifiedName("MultiStateValueDiscreteType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=2372"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("MultiStateValueDiscreteType"); + attrs.Type = ObjectId::Number; + attrs.Rank = -2; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11238"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11241"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11238"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11461"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } - } + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11241"); + node.BrowseName = ToQualifiedName("EnumValues"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11238"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumValues"); + attrs.Type = ToNodeId("i=7594"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11241"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11461"); + node.BrowseName = ToQualifiedName("ValueAsText"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11238"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ValueAsText"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11461"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12021"); + node.BrowseName = ToQualifiedName("ArrayItemType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=2365"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ArrayItemType"); + attrs.Type = ObjectId::String; + attrs.Rank = 0; + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=12021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12024"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=12021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12025"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=12021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12026"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=12021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12027"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=12021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12028"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12024"); + node.BrowseName = ToQualifiedName("InstrumentRange"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12021"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InstrumentRange"); + attrs.Type = ToNodeId("i=884"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12024"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12025"); + node.BrowseName = ToQualifiedName("EURange"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12021"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EURange"); + attrs.Type = ToNodeId("i=884"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12025"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12026"); + node.BrowseName = ToQualifiedName("EngineeringUnits"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12021"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EngineeringUnits"); + attrs.Type = ToNodeId("i=887"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12026"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12027"); + node.BrowseName = ToQualifiedName("Title"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12021"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Title"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12027"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12028"); + node.BrowseName = ToQualifiedName("AxisScaleType"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12021"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AxisScaleType"); + attrs.Type = ToNodeId("i=12077"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12028"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12029"); + node.BrowseName = ToQualifiedName("YArrayItemType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=12021"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("YArrayItemType"); + attrs.Type = ObjectId::String; + attrs.Rank = 1; + attrs.IsAbstract = false; + attrs.Dimensions = std::vector {0}; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=12029"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12037"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12037"); + node.BrowseName = ToQualifiedName("XAxisDefinition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12029"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("XAxisDefinition"); + attrs.Type = ToNodeId("i=12079"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12037"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12038"); + node.BrowseName = ToQualifiedName("XYArrayItemType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=12021"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("XYArrayItemType"); + attrs.Type = ToNodeId("i=12080"); + attrs.Rank = 1; + attrs.IsAbstract = false; + attrs.Dimensions = std::vector {0}; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=12038"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12046"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12046"); + node.BrowseName = ToQualifiedName("XAxisDefinition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12038"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("XAxisDefinition"); + attrs.Type = ToNodeId("i=12079"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12046"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12047"); + node.BrowseName = ToQualifiedName("ImageItemType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=12021"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ImageItemType"); + attrs.Type = ObjectId::String; + attrs.Rank = 2; + attrs.IsAbstract = false; + attrs.Dimensions = std::vector {0, 0}; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=12047"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12055"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=12047"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12056"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12055"); + node.BrowseName = ToQualifiedName("XAxisDefinition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12047"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("XAxisDefinition"); + attrs.Type = ToNodeId("i=12079"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12055"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12056"); + node.BrowseName = ToQualifiedName("YAxisDefinition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12047"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("YAxisDefinition"); + attrs.Type = ToNodeId("i=12079"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12056"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12057"); + node.BrowseName = ToQualifiedName("CubeItemType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=12021"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("CubeItemType"); + attrs.Type = ObjectId::String; + attrs.Rank = 3; + attrs.IsAbstract = false; + attrs.Dimensions = std::vector {0, 0, 0}; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=12057"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12065"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=12057"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12066"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=12057"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12067"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12065"); + node.BrowseName = ToQualifiedName("XAxisDefinition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12057"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("XAxisDefinition"); + attrs.Type = ToNodeId("i=12079"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12065"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12066"); + node.BrowseName = ToQualifiedName("YAxisDefinition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12057"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("YAxisDefinition"); + attrs.Type = ToNodeId("i=12079"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12066"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12067"); + node.BrowseName = ToQualifiedName("ZAxisDefinition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12057"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ZAxisDefinition"); + attrs.Type = ToNodeId("i=12079"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12067"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12068"); + node.BrowseName = ToQualifiedName("NDimensionArrayItemType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=12021"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("NDimensionArrayItemType"); + attrs.Type = ObjectId::String; + attrs.Rank = 0; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=12068"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12076"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12076"); + node.BrowseName = ToQualifiedName("AxisDefinition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12068"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AxisDefinition"); + attrs.Type = ToNodeId("i=12079"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12076"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=884"); + node.BrowseName = ToQualifiedName("Range"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("Range"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=887"); + node.BrowseName = ToQualifiedName("EUInformation"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("EUInformation"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12077"); + node.BrowseName = ToQualifiedName("AxisScaleEnumeration"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=29"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AxisScaleEnumeration"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=12077"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12078"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12078"); + node.BrowseName = ToQualifiedName("EnumStrings"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=12077"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnumStrings"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=12078"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12171"); + node.BrowseName = ToQualifiedName("ComplexNumberType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ComplexNumberType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12172"); + node.BrowseName = ToQualifiedName("DoubleComplexNumberType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("DoubleComplexNumberType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12079"); + node.BrowseName = ToQualifiedName("AxisInformation"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AxisInformation"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12080"); + node.BrowseName = ToQualifiedName("XVType"); + node.Class = NodeClass::DataType; + node.ParentNodeId = ToNodeId("i=22"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + DataTypeAttributes attrs; + attrs.DisplayName = LocalizedText("XVType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=885"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=884"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=885"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8873"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=888"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=887"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=888"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8876"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12173"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=12171"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=12173"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12175"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12174"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=12172"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=12174"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12178"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12081"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=12079"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=12081"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12083"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12082"); + node.BrowseName = ToQualifiedName("Default XML"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=12080"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default XML"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=12082"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12086"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=886"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=884"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=886"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8238"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=889"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=887"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=889"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8241"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12181"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=12171"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=12181"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12183"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12182"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=12172"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=12182"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12186"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12089"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=12079"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=12089"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12091"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=12090"); + node.BrowseName = ToQualifiedName("Default Binary"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=12080"); + node.ReferenceTypeId = ReferenceId::HasEncoding; + node.TypeDefinition = ToNodeId("i=76"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Default Binary"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasDescription; + ref.SourceNodeId = ToNodeId("i=12090"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=12094"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + +} } // namespace - + diff --git a/src/server/standard_address_space_part9.cpp b/src/server/standard_address_space_part9.cpp index 4b823aa0..c540247f 100644 --- a/src/server/standard_address_space_part9.cpp +++ b/src/server/standard_address_space_part9.cpp @@ -16,5938 +16,5938 @@ namespace OpcUa { - void CreateAddressSpacePart9(OpcUa::NodeManagementServices& registry) - { - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8995"); - node.BrowseName = ToQualifiedName("TwoStateVariableType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=2755"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("TwoStateVariableType"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=8995"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8996"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=8995"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9000"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=8995"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9001"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=8995"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11110"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=8995"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11111"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8996"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8995"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8996"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9000"); - node.BrowseName = ToQualifiedName("TransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8995"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9000"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9001"); - node.BrowseName = ToQualifiedName("EffectiveTransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8995"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EffectiveTransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9001"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11110"); - node.BrowseName = ToQualifiedName("TrueState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8995"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TrueState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11110"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11111"); - node.BrowseName = ToQualifiedName("FalseState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8995"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("FalseState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11111"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9002"); - node.BrowseName = ToQualifiedName("ConditionVariableType"); - node.Class = NodeClass::VariableType; - node.ParentNodeId = ToNodeId("i=63"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - VariableTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ConditionVariableType"); - attrs.Type = ObjectId::String; - attrs.Rank = -2; - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9002"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9003"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9003"); - node.BrowseName = ToQualifiedName("SourceTimestamp"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9002"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SourceTimestamp"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9003"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9004"); - node.BrowseName = ToQualifiedName("HasTrueSubState"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=32"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.DisplayName = LocalizedText("HasTrueSubState"); - attrs.InverseName = LocalizedText("IsTrueSubStateOf"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9005"); - node.BrowseName = ToQualifiedName("HasFalseSubState"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=32"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.DisplayName = LocalizedText("HasFalseSubState"); - attrs.InverseName = LocalizedText("IsFalseSubStateOf"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2782"); - node.BrowseName = ToQualifiedName("ConditionType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2041"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ConditionType"); - attrs.IsAbstract = true; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2782"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11112"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2782"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11113"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2782"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9009"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2782"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9010"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2782"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3874"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2782"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9011"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2782"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9020"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2782"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9022"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2782"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9024"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2782"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9026"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2782"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9028"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2782"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9027"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2782"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9029"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2782"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=3875"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11112"); - node.BrowseName = ToQualifiedName("ConditionClassId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2782"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ConditionClassId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11112"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11113"); - node.BrowseName = ToQualifiedName("ConditionClassName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2782"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ConditionClassName"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11113"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9009"); - node.BrowseName = ToQualifiedName("ConditionName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2782"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ConditionName"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9009"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9010"); - node.BrowseName = ToQualifiedName("BranchId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2782"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("BranchId"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9010"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3874"); - node.BrowseName = ToQualifiedName("Retain"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2782"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Retain"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3874"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9011"); - node.BrowseName = ToQualifiedName("EnabledState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2782"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=8995"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnabledState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9011"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9012"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9011"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9015"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9011"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9016"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9011"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9017"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9011"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9012"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9011"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9012"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9015"); - node.BrowseName = ToQualifiedName("EffectiveDisplayName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9011"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EffectiveDisplayName"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9015"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9016"); - node.BrowseName = ToQualifiedName("TransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9011"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9016"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9017"); - node.BrowseName = ToQualifiedName("EffectiveTransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9011"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EffectiveTransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9017"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9020"); - node.BrowseName = ToQualifiedName("Quality"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2782"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=9002"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Quality"); - attrs.Type = ObjectId::StatusCode; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9020"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9021"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9020"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9021"); - node.BrowseName = ToQualifiedName("SourceTimestamp"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9020"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SourceTimestamp"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9022"); - node.BrowseName = ToQualifiedName("LastSeverity"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2782"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=9002"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastSeverity"); - attrs.Type = ObjectId::UInt16; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9022"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9023"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9022"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9023"); - node.BrowseName = ToQualifiedName("SourceTimestamp"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9022"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SourceTimestamp"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9023"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9024"); - node.BrowseName = ToQualifiedName("Comment"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2782"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=9002"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Comment"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9024"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9025"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9024"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9025"); - node.BrowseName = ToQualifiedName("SourceTimestamp"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9024"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SourceTimestamp"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9025"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9026"); - node.BrowseName = ToQualifiedName("ClientUserId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2782"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ClientUserId"); - attrs.Type = ObjectId::String; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9026"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9030"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9029"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=3876"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=3875"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=3876"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2830"); - node.BrowseName = ToQualifiedName("DialogConditionType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2782"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("DialogConditionType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2830"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9035"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2830"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9055"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2830"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2831"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2830"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9064"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2830"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9065"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2830"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9066"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2830"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9067"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2830"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9068"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2830"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9069"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9035"); - node.BrowseName = ToQualifiedName("EnabledState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2830"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=8995"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnabledState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9035"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9036"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=9004"); - ref.SourceNodeId = ToNodeId("i=9035"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9055"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9035"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9036"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9035"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9036"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9055"); - node.BrowseName = ToQualifiedName("DialogState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2830"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=8995"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DialogState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9055"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9056"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9055"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9060"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9055"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9056"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9055"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9056"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9060"); - node.BrowseName = ToQualifiedName("TransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9055"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9060"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2831"); - node.BrowseName = ToQualifiedName("Prompt"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2830"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Prompt"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2831"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9064"); - node.BrowseName = ToQualifiedName("ResponseOptionSet"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2830"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ResponseOptionSet"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9064"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9065"); - node.BrowseName = ToQualifiedName("DefaultResponse"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2830"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("DefaultResponse"); - attrs.Type = ObjectId::Int32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9065"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9066"); - node.BrowseName = ToQualifiedName("OkResponse"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2830"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("OkResponse"); - attrs.Type = ObjectId::Int32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9066"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9067"); - node.BrowseName = ToQualifiedName("CancelResponse"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2830"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CancelResponse"); - attrs.Type = ObjectId::Int32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9067"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9068"); - node.BrowseName = ToQualifiedName("LastResponse"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2830"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastResponse"); - attrs.Type = ObjectId::Int32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9068"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9070"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9069"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9070"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2881"); - node.BrowseName = ToQualifiedName("AcknowledgeableConditionType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2782"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AcknowledgeableConditionType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2881"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9073"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2881"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9093"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2881"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9102"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2881"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9111"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2881"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9113"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9073"); - node.BrowseName = ToQualifiedName("EnabledState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2881"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=8995"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnabledState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9073"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9074"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=9004"); - ref.SourceNodeId = ToNodeId("i=9073"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9093"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=9004"); - ref.SourceNodeId = ToNodeId("i=9073"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9102"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9073"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9074"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9073"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9074"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9093"); - node.BrowseName = ToQualifiedName("AckedState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2881"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=8995"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("AckedState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9093"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9094"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9093"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9098"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9093"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9094"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9093"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9094"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9098"); - node.BrowseName = ToQualifiedName("TransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9093"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9102"); - node.BrowseName = ToQualifiedName("ConfirmedState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2881"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=8995"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ConfirmedState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9102"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9103"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9102"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9107"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9102"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9103"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9102"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9103"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9107"); - node.BrowseName = ToQualifiedName("TransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9102"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9107"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9112"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9111"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9112"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9114"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9113"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9114"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2915"); - node.BrowseName = ToQualifiedName("AlarmConditionType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2881"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AlarmConditionType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2915"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9118"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2915"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9160"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2915"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11120"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2915"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9169"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2915"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9178"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2915"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9215"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2915"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9216"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9118"); - node.BrowseName = ToQualifiedName("EnabledState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2915"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=8995"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EnabledState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9118"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9119"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=9004"); - ref.SourceNodeId = ToNodeId("i=9118"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9160"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=9004"); - ref.SourceNodeId = ToNodeId("i=9118"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9169"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=9004"); - ref.SourceNodeId = ToNodeId("i=9118"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9178"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9118"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9119"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9118"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9119"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9160"); - node.BrowseName = ToQualifiedName("ActiveState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2915"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=8995"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ActiveState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9160"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9161"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9160"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9164"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9160"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9165"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9160"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9166"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9160"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9161"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9160"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9161"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9164"); - node.BrowseName = ToQualifiedName("EffectiveDisplayName"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9160"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EffectiveDisplayName"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9164"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9165"); - node.BrowseName = ToQualifiedName("TransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9160"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9165"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9166"); - node.BrowseName = ToQualifiedName("EffectiveTransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9160"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("EffectiveTransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9166"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11120"); - node.BrowseName = ToQualifiedName("InputNode"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2915"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputNode"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11120"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9169"); - node.BrowseName = ToQualifiedName("SuppressedState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2915"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=8995"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SuppressedState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9169"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9170"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9169"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9174"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9169"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9170"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9169"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9170"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9174"); - node.BrowseName = ToQualifiedName("TransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9169"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9174"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9178"); - node.BrowseName = ToQualifiedName("ShelvingState"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2915"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2929"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("ShelvingState"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9178"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9179"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9178"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9184"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9178"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9189"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9178"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9211"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9178"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9212"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9178"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9213"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9178"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9179"); - node.BrowseName = ToQualifiedName("CurrentState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9178"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2760"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9179"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9180"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9179"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9180"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9179"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9180"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9184"); - node.BrowseName = ToQualifiedName("LastTransition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9178"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2767"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastTransition"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9184"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9185"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9184"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9188"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9184"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9185"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9184"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9185"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9188"); - node.BrowseName = ToQualifiedName("TransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9184"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9188"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9189"); - node.BrowseName = ToQualifiedName("UnshelveTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9178"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UnshelveTime"); - attrs.Type = ToNodeId("i=290"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9189"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9214"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9213"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9214"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9215"); - node.BrowseName = ToQualifiedName("SuppressedOrShelved"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2915"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SuppressedOrShelved"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9215"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9216"); - node.BrowseName = ToQualifiedName("MaxTimeShelved"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2915"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("MaxTimeShelved"); - attrs.Type = ToNodeId("i=290"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9216"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2929"); - node.BrowseName = ToQualifiedName("ShelvedStateMachineType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2771"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ShelvedStateMachineType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2929"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9115"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2929"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2930"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2929"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2932"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2929"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2933"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2929"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2935"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2929"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2936"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2929"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2940"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2929"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2942"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2929"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2943"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2929"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2945"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2929"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2947"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2929"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2948"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=2929"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2949"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9115"); - node.BrowseName = ToQualifiedName("UnshelveTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2929"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("UnshelveTime"); - attrs.Type = ToNodeId("i=290"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9115"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2930"); - node.BrowseName = ToQualifiedName("Unshelved"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2929"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2307"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Unshelved"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2930"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=6098"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=6098"); - node.BrowseName = ToQualifiedName("StateNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2930"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StateNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=6098"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2932"); - node.BrowseName = ToQualifiedName("TimedShelved"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2929"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2307"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("TimedShelved"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2932"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=6100"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=6100"); - node.BrowseName = ToQualifiedName("StateNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2932"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StateNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=6100"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2933"); - node.BrowseName = ToQualifiedName("OneShotShelved"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2929"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2307"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("OneShotShelved"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2933"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=6101"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=6101"); - node.BrowseName = ToQualifiedName("StateNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2933"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StateNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=6101"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2935"); - node.BrowseName = ToQualifiedName("UnshelvedToTimedShelved"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2929"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("UnshelvedToTimedShelved"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2935"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11322"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=2935"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2930"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=2935"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2932"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=54"); - ref.SourceNodeId = ToNodeId("i=2935"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2915"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=53"); - ref.SourceNodeId = ToNodeId("i=2935"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2949"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11322"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2935"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11322"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2936"); - node.BrowseName = ToQualifiedName("UnshelvedToOneShotShelved"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2929"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("UnshelvedToOneShotShelved"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2936"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11323"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=2936"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2930"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=2936"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2933"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=54"); - ref.SourceNodeId = ToNodeId("i=2936"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2915"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=53"); - ref.SourceNodeId = ToNodeId("i=2936"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2948"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11323"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2936"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11323"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2940"); - node.BrowseName = ToQualifiedName("TimedShelvedToUnshelved"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2929"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("TimedShelvedToUnshelved"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2940"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11324"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=2940"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2932"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=2940"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2930"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=54"); - ref.SourceNodeId = ToNodeId("i=2940"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2915"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=53"); - ref.SourceNodeId = ToNodeId("i=2940"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2947"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11324"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2940"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11324"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2942"); - node.BrowseName = ToQualifiedName("TimedShelvedToOneShotShelved"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2929"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("TimedShelvedToOneShotShelved"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2942"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11325"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=2942"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2932"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=2942"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2933"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=54"); - ref.SourceNodeId = ToNodeId("i=2942"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2915"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=53"); - ref.SourceNodeId = ToNodeId("i=2942"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2948"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11325"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2942"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11325"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2943"); - node.BrowseName = ToQualifiedName("OneShotShelvedToUnshelved"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2929"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("OneShotShelvedToUnshelved"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2943"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11326"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=2943"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2933"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=2943"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2930"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=54"); - ref.SourceNodeId = ToNodeId("i=2943"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2915"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=53"); - ref.SourceNodeId = ToNodeId("i=2943"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2947"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11326"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2943"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11326"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2945"); - node.BrowseName = ToQualifiedName("OneShotShelvedToTimedShelved"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=2929"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("OneShotShelvedToTimedShelved"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2945"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11327"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=2945"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2933"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=2945"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2932"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=54"); - ref.SourceNodeId = ToNodeId("i=2945"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2915"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=53"); - ref.SourceNodeId = ToNodeId("i=2945"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=2949"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11327"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2945"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11327"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2991"); - node.BrowseName = ToQualifiedName("InputArguments"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2949"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("InputArguments"); - attrs.Type = ToNodeId("i=296"); - attrs.Rank = 1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=2991"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2955"); - node.BrowseName = ToQualifiedName("LimitAlarmType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2915"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("LimitAlarmType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2955"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11124"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2955"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11125"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2955"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11126"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2955"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11127"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11124"); - node.BrowseName = ToQualifiedName("HighHighLimit"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2955"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("HighHighLimit"); - attrs.Type = ObjectId::Double; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11124"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11125"); - node.BrowseName = ToQualifiedName("HighLimit"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2955"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("HighLimit"); - attrs.Type = ObjectId::Double; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11125"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11126"); - node.BrowseName = ToQualifiedName("LowLimit"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2955"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LowLimit"); - attrs.Type = ObjectId::Double; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11126"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11127"); - node.BrowseName = ToQualifiedName("LowLowLimit"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2955"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LowLowLimit"); - attrs.Type = ObjectId::Double; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11127"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9318"); - node.BrowseName = ToQualifiedName("ExclusiveLimitStateMachineType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2771"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ExclusiveLimitStateMachineType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9329"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9331"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9333"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9335"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9337"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9338"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9339"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9318"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9340"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9329"); - node.BrowseName = ToQualifiedName("HighHigh"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=9318"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2307"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("HighHigh"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9329"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9330"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9330"); - node.BrowseName = ToQualifiedName("StateNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9329"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StateNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9330"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9331"); - node.BrowseName = ToQualifiedName("High"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=9318"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2307"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("High"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9331"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9332"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9332"); - node.BrowseName = ToQualifiedName("StateNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9331"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StateNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9332"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9333"); - node.BrowseName = ToQualifiedName("Low"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=9318"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2307"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("Low"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9333"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9334"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9334"); - node.BrowseName = ToQualifiedName("StateNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9333"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StateNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9334"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9335"); - node.BrowseName = ToQualifiedName("LowLow"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=9318"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2307"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("LowLow"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9335"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9336"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9336"); - node.BrowseName = ToQualifiedName("StateNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9335"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("StateNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9336"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9337"); - node.BrowseName = ToQualifiedName("LowLowToLow"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=9318"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("LowLowToLow"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9337"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11340"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=9337"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9335"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=9337"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9333"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11340"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9337"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11340"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9338"); - node.BrowseName = ToQualifiedName("LowToLowLow"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=9318"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("LowToLowLow"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9338"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11341"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=9338"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9333"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=9338"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9335"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11341"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9338"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11341"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9339"); - node.BrowseName = ToQualifiedName("HighHighToHigh"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=9318"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("HighHighToHigh"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9339"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11342"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=9339"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9329"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=9339"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9331"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11342"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9339"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11342"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9340"); - node.BrowseName = ToQualifiedName("HighToHighHigh"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=9318"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2310"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("HighToHighHigh"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9340"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11343"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=51"); - ref.SourceNodeId = ToNodeId("i=9340"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9331"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=52"); - ref.SourceNodeId = ToNodeId("i=9340"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9329"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11343"); - node.BrowseName = ToQualifiedName("TransitionNumber"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9340"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionNumber"); - attrs.Type = ObjectId::UInt32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11343"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9341"); - node.BrowseName = ToQualifiedName("ExclusiveLimitAlarmType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2955"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ExclusiveLimitAlarmType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9341"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9398"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9341"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9455"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9398"); - node.BrowseName = ToQualifiedName("ActiveState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9341"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=8995"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ActiveState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9398"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9399"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=9004"); - ref.SourceNodeId = ToNodeId("i=9398"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9455"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9398"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9399"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9398"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9399"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9455"); - node.BrowseName = ToQualifiedName("LimitState"); - node.Class = NodeClass::Object; - node.ParentNodeId = ToNodeId("i=9341"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=9318"); - ObjectAttributes attrs; - attrs.DisplayName = LocalizedText("LimitState"); - attrs.EventNotifier = 0; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9455"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9456"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9455"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9461"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9455"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9456"); - node.BrowseName = ToQualifiedName("CurrentState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9455"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2760"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("CurrentState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9456"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9457"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9456"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9457"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9456"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9457"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9461"); - node.BrowseName = ToQualifiedName("LastTransition"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9455"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=2767"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LastTransition"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9461"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9462"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9461"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9465"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9461"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9462"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9461"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9462"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9465"); - node.BrowseName = ToQualifiedName("TransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9461"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9465"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9906"); - node.BrowseName = ToQualifiedName("NonExclusiveLimitAlarmType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2955"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("NonExclusiveLimitAlarmType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9906"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9963"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9906"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10020"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9906"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10029"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9906"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10038"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasComponent; - ref.SourceNodeId = ToNodeId("i=9906"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10047"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9963"); - node.BrowseName = ToQualifiedName("ActiveState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9906"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=8995"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ActiveState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9963"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9964"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=9004"); - ref.SourceNodeId = ToNodeId("i=9963"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10020"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=9004"); - ref.SourceNodeId = ToNodeId("i=9963"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10029"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=9004"); - ref.SourceNodeId = ToNodeId("i=9963"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10038"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ToNodeId("i=9004"); - ref.SourceNodeId = ToNodeId("i=9963"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10047"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9963"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9964"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9963"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9964"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10020"); - node.BrowseName = ToQualifiedName("HighHighState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9906"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=8995"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("HighHighState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=10020"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10021"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=10020"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10025"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=10020"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10021"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=10020"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=10021"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10025"); - node.BrowseName = ToQualifiedName("TransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=10020"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=10025"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10029"); - node.BrowseName = ToQualifiedName("HighState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9906"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=8995"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("HighState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=10029"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10030"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=10029"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10034"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=10029"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10030"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=10029"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=10030"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10034"); - node.BrowseName = ToQualifiedName("TransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=10029"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=10034"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10038"); - node.BrowseName = ToQualifiedName("LowState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9906"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=8995"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LowState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=10038"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10039"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=10038"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10043"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=10038"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10039"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=10038"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=10039"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10043"); - node.BrowseName = ToQualifiedName("TransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=10038"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=10043"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10047"); - node.BrowseName = ToQualifiedName("LowLowState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9906"); - node.ReferenceTypeId = ReferenceId::HasComponent; - node.TypeDefinition = ToNodeId("i=8995"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("LowLowState"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=10047"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10048"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=10047"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10052"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=10047"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10048"); - node.BrowseName = ToQualifiedName("Id"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=10047"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Id"); - attrs.Type = ObjectId::Boolean; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=10048"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10052"); - node.BrowseName = ToQualifiedName("TransitionTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=10047"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("TransitionTime"); - attrs.Type = ToNodeId("i=294"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=10052"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=80"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10060"); - node.BrowseName = ToQualifiedName("NonExclusiveLevelAlarmType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=9906"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("NonExclusiveLevelAlarmType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9482"); - node.BrowseName = ToQualifiedName("ExclusiveLevelAlarmType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=9341"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ExclusiveLevelAlarmType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10368"); - node.BrowseName = ToQualifiedName("NonExclusiveDeviationAlarmType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=9906"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("NonExclusiveDeviationAlarmType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=10368"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=10522"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10522"); - node.BrowseName = ToQualifiedName("SetpointNode"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=10368"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SetpointNode"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=10522"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9764"); - node.BrowseName = ToQualifiedName("ExclusiveDeviationAlarmType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=9341"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ExclusiveDeviationAlarmType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=9764"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=9905"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9905"); - node.BrowseName = ToQualifiedName("SetpointNode"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=9764"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SetpointNode"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=9905"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10214"); - node.BrowseName = ToQualifiedName("NonExclusiveRateOfChangeAlarmType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=9906"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("NonExclusiveRateOfChangeAlarmType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9623"); - node.BrowseName = ToQualifiedName("ExclusiveRateOfChangeAlarmType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=9341"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ExclusiveRateOfChangeAlarmType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10523"); - node.BrowseName = ToQualifiedName("DiscreteAlarmType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2915"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("DiscreteAlarmType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10637"); - node.BrowseName = ToQualifiedName("OffNormalAlarmType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=10523"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("OffNormalAlarmType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=10637"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11158"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11158"); - node.BrowseName = ToQualifiedName("NormalState"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=10637"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("NormalState"); - attrs.Type = ObjectId::NodeId; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11158"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11753"); - node.BrowseName = ToQualifiedName("SystemOffNormalAlarmType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=10637"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SystemOffNormalAlarmType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=10751"); - node.BrowseName = ToQualifiedName("TripAlarmType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=10637"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("TripAlarmType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11163"); - node.BrowseName = ToQualifiedName("BaseConditionClassType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=58"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("BaseConditionClassType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11164"); - node.BrowseName = ToQualifiedName("ProcessConditionClassType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=11163"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("ProcessConditionClassType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11165"); - node.BrowseName = ToQualifiedName("MaintenanceConditionClassType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=11163"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("MaintenanceConditionClassType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11166"); - node.BrowseName = ToQualifiedName("SystemConditionClassType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=11163"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("SystemConditionClassType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2790"); - node.BrowseName = ToQualifiedName("AuditConditionEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2127"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditConditionEventType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2803"); - node.BrowseName = ToQualifiedName("AuditConditionEnableEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2790"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditConditionEnableEventType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2829"); - node.BrowseName = ToQualifiedName("AuditConditionCommentEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2790"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditConditionCommentEventType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2829"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=4170"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=2829"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11851"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=4170"); - node.BrowseName = ToQualifiedName("EventId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2829"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A globally unique identifier for the event."); - attrs.DisplayName = LocalizedText("EventId"); - attrs.Type = ObjectId::ByteString; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=4170"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11851"); - node.BrowseName = ToQualifiedName("Comment"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=2829"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Comment"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11851"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8927"); - node.BrowseName = ToQualifiedName("AuditConditionRespondEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2790"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditConditionRespondEventType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=8927"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11852"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11852"); - node.BrowseName = ToQualifiedName("SelectedResponse"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8927"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("SelectedResponse"); - attrs.Type = ObjectId::Int32; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11852"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8944"); - node.BrowseName = ToQualifiedName("AuditConditionAcknowledgeEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2790"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditConditionAcknowledgeEventType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=8944"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8945"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=8944"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11853"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8945"); - node.BrowseName = ToQualifiedName("EventId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8944"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A globally unique identifier for the event."); - attrs.DisplayName = LocalizedText("EventId"); - attrs.Type = ObjectId::ByteString; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8945"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11853"); - node.BrowseName = ToQualifiedName("Comment"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8944"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Comment"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11853"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8961"); - node.BrowseName = ToQualifiedName("AuditConditionConfirmEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2790"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditConditionConfirmEventType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=8961"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=8962"); - refs.push_back(ref); - } - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=8961"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11854"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=8962"); - node.BrowseName = ToQualifiedName("EventId"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8961"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.Description = LocalizedText("A globally unique identifier for the event."); - attrs.DisplayName = LocalizedText("EventId"); - attrs.Type = ObjectId::ByteString; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=8962"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11854"); - node.BrowseName = ToQualifiedName("Comment"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=8961"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("Comment"); - attrs.Type = ObjectId::LocalizedText; - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11854"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11093"); - node.BrowseName = ToQualifiedName("AuditConditionShelvingEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2790"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("AuditConditionShelvingEventType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasProperty; - ref.SourceNodeId = ToNodeId("i=11093"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=11855"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=11855"); - node.BrowseName = ToQualifiedName("ShelvingTime"); - node.Class = NodeClass::Variable; - node.ParentNodeId = ToNodeId("i=11093"); - node.ReferenceTypeId = ReferenceId::HasProperty; - node.TypeDefinition = ToNodeId("i=68"); - VariableAttributes attrs; - attrs.DisplayName = LocalizedText("ShelvingTime"); - attrs.Type = ToNodeId("i=290"); - attrs.Rank = -1; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - std::vector refs; - { - AddReferencesItem ref; - ref.IsForward = true; - ref.ReferenceTypeId = ReferenceId::HasModellingRule; - ref.SourceNodeId = ToNodeId("i=11855"); - ref.TargetNodeClass = NodeClass::DataType; - ref.TargetNodeId = ToNodeId("i=78"); - refs.push_back(ref); - } - registry.AddReferences(refs); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2787"); - node.BrowseName = ToQualifiedName("RefreshStartEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2130"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("RefreshStartEventType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2788"); - node.BrowseName = ToQualifiedName("RefreshEndEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2130"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("RefreshEndEventType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=2789"); - node.BrowseName = ToQualifiedName("RefreshRequiredEventType"); - node.Class = NodeClass::ObjectType; - node.ParentNodeId = ToNodeId("i=2130"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ObjectTypeAttributes attrs; - attrs.DisplayName = LocalizedText("RefreshRequiredEventType"); - attrs.IsAbstract = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - { - AddNodesItem node; - node.RequestedNewNodeId = ToNodeId("i=9006"); - node.BrowseName = ToQualifiedName("HasCondition"); - node.Class = NodeClass::ReferenceType; - node.ParentNodeId = ToNodeId("i=32"); - node.ReferenceTypeId = ReferenceId::HasSubtype; - ReferenceTypeAttributes attrs; - attrs.DisplayName = LocalizedText("HasCondition"); - attrs.InverseName = LocalizedText("IsConditionOf"); - attrs.IsAbstract = false; - attrs.Symmetric = false; - node.Attributes = attrs; - registry.AddNodes(std::vector{node}); - } - - } +void CreateAddressSpacePart9(OpcUa::NodeManagementServices & registry) +{ + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8995"); + node.BrowseName = ToQualifiedName("TwoStateVariableType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=2755"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("TwoStateVariableType"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=8995"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8996"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=8995"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9000"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=8995"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9001"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=8995"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11110"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=8995"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11111"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8996"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8995"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8996"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9000"); + node.BrowseName = ToQualifiedName("TransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8995"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9000"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9001"); + node.BrowseName = ToQualifiedName("EffectiveTransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8995"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EffectiveTransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9001"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11110"); + node.BrowseName = ToQualifiedName("TrueState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8995"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TrueState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11110"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11111"); + node.BrowseName = ToQualifiedName("FalseState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8995"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("FalseState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11111"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9002"); + node.BrowseName = ToQualifiedName("ConditionVariableType"); + node.Class = NodeClass::VariableType; + node.ParentNodeId = ToNodeId("i=63"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + VariableTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ConditionVariableType"); + attrs.Type = ObjectId::String; + attrs.Rank = -2; + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9002"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9003"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9003"); + node.BrowseName = ToQualifiedName("SourceTimestamp"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9002"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SourceTimestamp"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9003"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9004"); + node.BrowseName = ToQualifiedName("HasTrueSubState"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=32"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.DisplayName = LocalizedText("HasTrueSubState"); + attrs.InverseName = LocalizedText("IsTrueSubStateOf"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9005"); + node.BrowseName = ToQualifiedName("HasFalseSubState"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=32"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.DisplayName = LocalizedText("HasFalseSubState"); + attrs.InverseName = LocalizedText("IsFalseSubStateOf"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2782"); + node.BrowseName = ToQualifiedName("ConditionType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2041"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ConditionType"); + attrs.IsAbstract = true; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2782"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11112"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2782"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11113"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2782"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9009"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2782"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9010"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2782"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3874"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2782"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9011"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2782"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9020"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2782"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9022"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2782"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9024"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2782"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9026"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2782"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9028"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2782"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9027"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2782"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9029"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2782"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=3875"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11112"); + node.BrowseName = ToQualifiedName("ConditionClassId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2782"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ConditionClassId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11112"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11113"); + node.BrowseName = ToQualifiedName("ConditionClassName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2782"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ConditionClassName"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11113"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9009"); + node.BrowseName = ToQualifiedName("ConditionName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2782"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ConditionName"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9009"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9010"); + node.BrowseName = ToQualifiedName("BranchId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2782"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("BranchId"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9010"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3874"); + node.BrowseName = ToQualifiedName("Retain"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2782"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Retain"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3874"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9011"); + node.BrowseName = ToQualifiedName("EnabledState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2782"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=8995"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnabledState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9011"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9012"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9011"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9015"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9011"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9016"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9011"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9017"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9011"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9012"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9011"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9012"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9015"); + node.BrowseName = ToQualifiedName("EffectiveDisplayName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9011"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EffectiveDisplayName"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9015"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9016"); + node.BrowseName = ToQualifiedName("TransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9011"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9016"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9017"); + node.BrowseName = ToQualifiedName("EffectiveTransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9011"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EffectiveTransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9017"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9020"); + node.BrowseName = ToQualifiedName("Quality"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2782"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=9002"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Quality"); + attrs.Type = ObjectId::StatusCode; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9020"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9021"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9020"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9021"); + node.BrowseName = ToQualifiedName("SourceTimestamp"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9020"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SourceTimestamp"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9022"); + node.BrowseName = ToQualifiedName("LastSeverity"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2782"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=9002"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastSeverity"); + attrs.Type = ObjectId::UInt16; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9022"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9023"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9022"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9023"); + node.BrowseName = ToQualifiedName("SourceTimestamp"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9022"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SourceTimestamp"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9023"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9024"); + node.BrowseName = ToQualifiedName("Comment"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2782"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=9002"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Comment"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9024"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9025"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9024"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9025"); + node.BrowseName = ToQualifiedName("SourceTimestamp"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9024"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SourceTimestamp"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9025"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9026"); + node.BrowseName = ToQualifiedName("ClientUserId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2782"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ClientUserId"); + attrs.Type = ObjectId::String; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9026"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9030"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9029"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=3876"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=3875"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=3876"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2830"); + node.BrowseName = ToQualifiedName("DialogConditionType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2782"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("DialogConditionType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2830"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9035"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2830"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9055"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2830"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2831"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2830"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9064"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2830"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9065"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2830"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9066"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2830"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9067"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2830"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9068"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2830"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9069"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9035"); + node.BrowseName = ToQualifiedName("EnabledState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2830"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=8995"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnabledState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9035"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9036"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=9004"); + ref.SourceNodeId = ToNodeId("i=9035"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9055"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9035"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9036"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9035"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9036"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9055"); + node.BrowseName = ToQualifiedName("DialogState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2830"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=8995"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DialogState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9055"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9056"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9055"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9060"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9055"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9056"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9055"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9056"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9060"); + node.BrowseName = ToQualifiedName("TransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9055"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9060"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2831"); + node.BrowseName = ToQualifiedName("Prompt"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2830"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Prompt"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2831"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9064"); + node.BrowseName = ToQualifiedName("ResponseOptionSet"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2830"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ResponseOptionSet"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9064"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9065"); + node.BrowseName = ToQualifiedName("DefaultResponse"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2830"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("DefaultResponse"); + attrs.Type = ObjectId::Int32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9065"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9066"); + node.BrowseName = ToQualifiedName("OkResponse"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2830"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("OkResponse"); + attrs.Type = ObjectId::Int32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9066"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9067"); + node.BrowseName = ToQualifiedName("CancelResponse"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2830"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CancelResponse"); + attrs.Type = ObjectId::Int32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9067"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9068"); + node.BrowseName = ToQualifiedName("LastResponse"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2830"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastResponse"); + attrs.Type = ObjectId::Int32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9068"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9070"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9069"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9070"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2881"); + node.BrowseName = ToQualifiedName("AcknowledgeableConditionType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2782"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AcknowledgeableConditionType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2881"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9073"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2881"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9093"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2881"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9102"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2881"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9111"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2881"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9113"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9073"); + node.BrowseName = ToQualifiedName("EnabledState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2881"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=8995"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnabledState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9073"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9074"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=9004"); + ref.SourceNodeId = ToNodeId("i=9073"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9093"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=9004"); + ref.SourceNodeId = ToNodeId("i=9073"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9102"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9073"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9074"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9073"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9074"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9093"); + node.BrowseName = ToQualifiedName("AckedState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2881"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=8995"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("AckedState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9093"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9094"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9093"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9098"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9093"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9094"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9093"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9094"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9098"); + node.BrowseName = ToQualifiedName("TransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9093"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9102"); + node.BrowseName = ToQualifiedName("ConfirmedState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2881"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=8995"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ConfirmedState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9102"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9103"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9102"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9107"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9102"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9103"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9102"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9103"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9107"); + node.BrowseName = ToQualifiedName("TransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9102"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9107"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9112"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9111"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9112"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9114"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9113"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9114"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2915"); + node.BrowseName = ToQualifiedName("AlarmConditionType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2881"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AlarmConditionType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2915"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9118"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2915"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9160"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2915"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11120"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2915"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9169"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2915"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9178"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2915"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9215"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2915"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9216"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9118"); + node.BrowseName = ToQualifiedName("EnabledState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2915"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=8995"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EnabledState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9118"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9119"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=9004"); + ref.SourceNodeId = ToNodeId("i=9118"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9160"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=9004"); + ref.SourceNodeId = ToNodeId("i=9118"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9169"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=9004"); + ref.SourceNodeId = ToNodeId("i=9118"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9178"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9118"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9119"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9118"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9119"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9160"); + node.BrowseName = ToQualifiedName("ActiveState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2915"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=8995"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ActiveState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9160"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9161"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9160"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9164"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9160"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9165"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9160"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9166"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9160"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9161"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9160"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9161"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9164"); + node.BrowseName = ToQualifiedName("EffectiveDisplayName"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9160"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EffectiveDisplayName"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9164"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9165"); + node.BrowseName = ToQualifiedName("TransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9160"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9165"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9166"); + node.BrowseName = ToQualifiedName("EffectiveTransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9160"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("EffectiveTransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9166"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11120"); + node.BrowseName = ToQualifiedName("InputNode"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2915"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputNode"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11120"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9169"); + node.BrowseName = ToQualifiedName("SuppressedState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2915"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=8995"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SuppressedState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9169"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9170"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9169"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9174"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9169"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9170"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9169"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9170"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9174"); + node.BrowseName = ToQualifiedName("TransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9169"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9174"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9178"); + node.BrowseName = ToQualifiedName("ShelvingState"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2915"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2929"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("ShelvingState"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9178"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9179"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9178"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9184"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9178"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9189"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9178"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9211"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9178"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9212"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9178"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9213"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9178"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9179"); + node.BrowseName = ToQualifiedName("CurrentState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9178"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2760"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9179"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9180"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9179"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9180"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9179"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9180"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9184"); + node.BrowseName = ToQualifiedName("LastTransition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9178"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2767"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastTransition"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9184"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9185"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9184"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9188"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9184"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9185"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9184"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9185"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9188"); + node.BrowseName = ToQualifiedName("TransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9184"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9188"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9189"); + node.BrowseName = ToQualifiedName("UnshelveTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9178"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UnshelveTime"); + attrs.Type = ToNodeId("i=290"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9189"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9214"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9213"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9214"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9215"); + node.BrowseName = ToQualifiedName("SuppressedOrShelved"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2915"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SuppressedOrShelved"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9215"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9216"); + node.BrowseName = ToQualifiedName("MaxTimeShelved"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2915"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("MaxTimeShelved"); + attrs.Type = ToNodeId("i=290"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9216"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2929"); + node.BrowseName = ToQualifiedName("ShelvedStateMachineType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2771"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ShelvedStateMachineType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2929"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9115"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2929"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2930"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2929"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2932"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2929"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2933"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2929"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2935"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2929"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2936"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2929"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2940"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2929"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2942"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2929"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2943"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2929"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2945"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2929"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2947"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2929"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2948"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=2929"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2949"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9115"); + node.BrowseName = ToQualifiedName("UnshelveTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2929"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("UnshelveTime"); + attrs.Type = ToNodeId("i=290"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9115"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2930"); + node.BrowseName = ToQualifiedName("Unshelved"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2929"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2307"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Unshelved"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2930"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=6098"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=6098"); + node.BrowseName = ToQualifiedName("StateNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2930"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StateNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=6098"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2932"); + node.BrowseName = ToQualifiedName("TimedShelved"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2929"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2307"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("TimedShelved"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2932"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=6100"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=6100"); + node.BrowseName = ToQualifiedName("StateNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2932"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StateNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=6100"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2933"); + node.BrowseName = ToQualifiedName("OneShotShelved"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2929"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2307"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("OneShotShelved"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2933"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=6101"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=6101"); + node.BrowseName = ToQualifiedName("StateNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2933"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StateNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=6101"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2935"); + node.BrowseName = ToQualifiedName("UnshelvedToTimedShelved"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2929"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("UnshelvedToTimedShelved"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2935"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11322"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=2935"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2930"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=2935"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2932"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=54"); + ref.SourceNodeId = ToNodeId("i=2935"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2915"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=53"); + ref.SourceNodeId = ToNodeId("i=2935"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2949"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11322"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2935"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11322"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2936"); + node.BrowseName = ToQualifiedName("UnshelvedToOneShotShelved"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2929"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("UnshelvedToOneShotShelved"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2936"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11323"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=2936"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2930"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=2936"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2933"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=54"); + ref.SourceNodeId = ToNodeId("i=2936"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2915"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=53"); + ref.SourceNodeId = ToNodeId("i=2936"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2948"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11323"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2936"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11323"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2940"); + node.BrowseName = ToQualifiedName("TimedShelvedToUnshelved"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2929"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("TimedShelvedToUnshelved"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2940"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11324"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=2940"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2932"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=2940"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2930"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=54"); + ref.SourceNodeId = ToNodeId("i=2940"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2915"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=53"); + ref.SourceNodeId = ToNodeId("i=2940"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2947"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11324"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2940"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11324"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2942"); + node.BrowseName = ToQualifiedName("TimedShelvedToOneShotShelved"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2929"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("TimedShelvedToOneShotShelved"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2942"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11325"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=2942"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2932"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=2942"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2933"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=54"); + ref.SourceNodeId = ToNodeId("i=2942"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2915"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=53"); + ref.SourceNodeId = ToNodeId("i=2942"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2948"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11325"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2942"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11325"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2943"); + node.BrowseName = ToQualifiedName("OneShotShelvedToUnshelved"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2929"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("OneShotShelvedToUnshelved"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2943"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11326"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=2943"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2933"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=2943"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2930"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=54"); + ref.SourceNodeId = ToNodeId("i=2943"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2915"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=53"); + ref.SourceNodeId = ToNodeId("i=2943"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2947"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11326"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2943"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11326"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2945"); + node.BrowseName = ToQualifiedName("OneShotShelvedToTimedShelved"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=2929"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("OneShotShelvedToTimedShelved"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2945"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11327"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=2945"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2933"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=2945"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2932"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=54"); + ref.SourceNodeId = ToNodeId("i=2945"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2915"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=53"); + ref.SourceNodeId = ToNodeId("i=2945"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=2949"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11327"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2945"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11327"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2991"); + node.BrowseName = ToQualifiedName("InputArguments"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2949"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("InputArguments"); + attrs.Type = ToNodeId("i=296"); + attrs.Rank = 1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=2991"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2955"); + node.BrowseName = ToQualifiedName("LimitAlarmType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2915"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("LimitAlarmType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2955"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11124"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2955"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11125"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2955"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11126"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2955"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11127"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11124"); + node.BrowseName = ToQualifiedName("HighHighLimit"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2955"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("HighHighLimit"); + attrs.Type = ObjectId::Double; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11124"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11125"); + node.BrowseName = ToQualifiedName("HighLimit"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2955"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("HighLimit"); + attrs.Type = ObjectId::Double; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11125"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11126"); + node.BrowseName = ToQualifiedName("LowLimit"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2955"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LowLimit"); + attrs.Type = ObjectId::Double; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11126"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11127"); + node.BrowseName = ToQualifiedName("LowLowLimit"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2955"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LowLowLimit"); + attrs.Type = ObjectId::Double; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11127"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9318"); + node.BrowseName = ToQualifiedName("ExclusiveLimitStateMachineType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2771"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ExclusiveLimitStateMachineType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9329"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9331"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9333"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9335"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9337"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9338"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9339"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9318"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9340"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9329"); + node.BrowseName = ToQualifiedName("HighHigh"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=9318"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2307"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("HighHigh"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9329"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9330"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9330"); + node.BrowseName = ToQualifiedName("StateNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9329"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StateNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9330"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9331"); + node.BrowseName = ToQualifiedName("High"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=9318"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2307"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("High"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9331"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9332"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9332"); + node.BrowseName = ToQualifiedName("StateNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9331"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StateNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9332"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9333"); + node.BrowseName = ToQualifiedName("Low"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=9318"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2307"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("Low"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9333"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9334"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9334"); + node.BrowseName = ToQualifiedName("StateNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9333"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StateNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9334"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9335"); + node.BrowseName = ToQualifiedName("LowLow"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=9318"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2307"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("LowLow"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9335"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9336"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9336"); + node.BrowseName = ToQualifiedName("StateNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9335"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("StateNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9336"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9337"); + node.BrowseName = ToQualifiedName("LowLowToLow"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=9318"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("LowLowToLow"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9337"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11340"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=9337"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9335"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=9337"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9333"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11340"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9337"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11340"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9338"); + node.BrowseName = ToQualifiedName("LowToLowLow"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=9318"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("LowToLowLow"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9338"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11341"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=9338"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9333"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=9338"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9335"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11341"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9338"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11341"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9339"); + node.BrowseName = ToQualifiedName("HighHighToHigh"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=9318"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("HighHighToHigh"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9339"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11342"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=9339"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9329"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=9339"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9331"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11342"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9339"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11342"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9340"); + node.BrowseName = ToQualifiedName("HighToHighHigh"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=9318"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2310"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("HighToHighHigh"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9340"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11343"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=51"); + ref.SourceNodeId = ToNodeId("i=9340"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9331"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=52"); + ref.SourceNodeId = ToNodeId("i=9340"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9329"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11343"); + node.BrowseName = ToQualifiedName("TransitionNumber"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9340"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionNumber"); + attrs.Type = ObjectId::UInt32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11343"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9341"); + node.BrowseName = ToQualifiedName("ExclusiveLimitAlarmType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2955"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ExclusiveLimitAlarmType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9341"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9398"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9341"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9455"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9398"); + node.BrowseName = ToQualifiedName("ActiveState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9341"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=8995"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ActiveState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9398"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9399"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=9004"); + ref.SourceNodeId = ToNodeId("i=9398"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9455"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9398"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9399"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9398"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9399"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9455"); + node.BrowseName = ToQualifiedName("LimitState"); + node.Class = NodeClass::Object; + node.ParentNodeId = ToNodeId("i=9341"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=9318"); + ObjectAttributes attrs; + attrs.DisplayName = LocalizedText("LimitState"); + attrs.EventNotifier = 0; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9455"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9456"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9455"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9461"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9455"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9456"); + node.BrowseName = ToQualifiedName("CurrentState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9455"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2760"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("CurrentState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9456"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9457"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9456"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9457"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9456"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9457"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9461"); + node.BrowseName = ToQualifiedName("LastTransition"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9455"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=2767"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LastTransition"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9461"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9462"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9461"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9465"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9461"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9462"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9461"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9462"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9465"); + node.BrowseName = ToQualifiedName("TransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9461"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9465"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9906"); + node.BrowseName = ToQualifiedName("NonExclusiveLimitAlarmType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2955"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("NonExclusiveLimitAlarmType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9906"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9963"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9906"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10020"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9906"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10029"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9906"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10038"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasComponent; + ref.SourceNodeId = ToNodeId("i=9906"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10047"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9963"); + node.BrowseName = ToQualifiedName("ActiveState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9906"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=8995"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ActiveState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9963"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9964"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=9004"); + ref.SourceNodeId = ToNodeId("i=9963"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10020"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=9004"); + ref.SourceNodeId = ToNodeId("i=9963"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10029"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=9004"); + ref.SourceNodeId = ToNodeId("i=9963"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10038"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ToNodeId("i=9004"); + ref.SourceNodeId = ToNodeId("i=9963"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10047"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9963"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9964"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9963"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9964"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10020"); + node.BrowseName = ToQualifiedName("HighHighState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9906"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=8995"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("HighHighState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=10020"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10021"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=10020"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10025"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=10020"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10021"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=10020"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=10021"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10025"); + node.BrowseName = ToQualifiedName("TransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=10020"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=10025"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10029"); + node.BrowseName = ToQualifiedName("HighState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9906"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=8995"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("HighState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=10029"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10030"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=10029"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10034"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=10029"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10030"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=10029"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=10030"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10034"); + node.BrowseName = ToQualifiedName("TransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=10029"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=10034"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10038"); + node.BrowseName = ToQualifiedName("LowState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9906"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=8995"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LowState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=10038"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10039"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=10038"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10043"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=10038"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10039"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=10038"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=10039"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10043"); + node.BrowseName = ToQualifiedName("TransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=10038"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=10043"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10047"); + node.BrowseName = ToQualifiedName("LowLowState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9906"); + node.ReferenceTypeId = ReferenceId::HasComponent; + node.TypeDefinition = ToNodeId("i=8995"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("LowLowState"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=10047"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10048"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=10047"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10052"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=10047"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10048"); + node.BrowseName = ToQualifiedName("Id"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=10047"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Id"); + attrs.Type = ObjectId::Boolean; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=10048"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10052"); + node.BrowseName = ToQualifiedName("TransitionTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=10047"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("TransitionTime"); + attrs.Type = ToNodeId("i=294"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=10052"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=80"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10060"); + node.BrowseName = ToQualifiedName("NonExclusiveLevelAlarmType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=9906"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("NonExclusiveLevelAlarmType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9482"); + node.BrowseName = ToQualifiedName("ExclusiveLevelAlarmType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=9341"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ExclusiveLevelAlarmType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10368"); + node.BrowseName = ToQualifiedName("NonExclusiveDeviationAlarmType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=9906"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("NonExclusiveDeviationAlarmType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=10368"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=10522"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10522"); + node.BrowseName = ToQualifiedName("SetpointNode"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=10368"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SetpointNode"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=10522"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9764"); + node.BrowseName = ToQualifiedName("ExclusiveDeviationAlarmType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=9341"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ExclusiveDeviationAlarmType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=9764"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=9905"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9905"); + node.BrowseName = ToQualifiedName("SetpointNode"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=9764"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SetpointNode"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=9905"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10214"); + node.BrowseName = ToQualifiedName("NonExclusiveRateOfChangeAlarmType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=9906"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("NonExclusiveRateOfChangeAlarmType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9623"); + node.BrowseName = ToQualifiedName("ExclusiveRateOfChangeAlarmType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=9341"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ExclusiveRateOfChangeAlarmType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10523"); + node.BrowseName = ToQualifiedName("DiscreteAlarmType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2915"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("DiscreteAlarmType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10637"); + node.BrowseName = ToQualifiedName("OffNormalAlarmType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=10523"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("OffNormalAlarmType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=10637"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11158"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11158"); + node.BrowseName = ToQualifiedName("NormalState"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=10637"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("NormalState"); + attrs.Type = ObjectId::NodeId; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11158"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11753"); + node.BrowseName = ToQualifiedName("SystemOffNormalAlarmType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=10637"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SystemOffNormalAlarmType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=10751"); + node.BrowseName = ToQualifiedName("TripAlarmType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=10637"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("TripAlarmType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11163"); + node.BrowseName = ToQualifiedName("BaseConditionClassType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=58"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("BaseConditionClassType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11164"); + node.BrowseName = ToQualifiedName("ProcessConditionClassType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=11163"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("ProcessConditionClassType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11165"); + node.BrowseName = ToQualifiedName("MaintenanceConditionClassType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=11163"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("MaintenanceConditionClassType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11166"); + node.BrowseName = ToQualifiedName("SystemConditionClassType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=11163"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("SystemConditionClassType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2790"); + node.BrowseName = ToQualifiedName("AuditConditionEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2127"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditConditionEventType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2803"); + node.BrowseName = ToQualifiedName("AuditConditionEnableEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2790"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditConditionEnableEventType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2829"); + node.BrowseName = ToQualifiedName("AuditConditionCommentEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2790"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditConditionCommentEventType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2829"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=4170"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=2829"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11851"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=4170"); + node.BrowseName = ToQualifiedName("EventId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2829"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A globally unique identifier for the event."); + attrs.DisplayName = LocalizedText("EventId"); + attrs.Type = ObjectId::ByteString; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=4170"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11851"); + node.BrowseName = ToQualifiedName("Comment"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=2829"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Comment"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11851"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8927"); + node.BrowseName = ToQualifiedName("AuditConditionRespondEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2790"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditConditionRespondEventType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=8927"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11852"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11852"); + node.BrowseName = ToQualifiedName("SelectedResponse"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8927"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("SelectedResponse"); + attrs.Type = ObjectId::Int32; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11852"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8944"); + node.BrowseName = ToQualifiedName("AuditConditionAcknowledgeEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2790"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditConditionAcknowledgeEventType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=8944"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8945"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=8944"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11853"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8945"); + node.BrowseName = ToQualifiedName("EventId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8944"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A globally unique identifier for the event."); + attrs.DisplayName = LocalizedText("EventId"); + attrs.Type = ObjectId::ByteString; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8945"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11853"); + node.BrowseName = ToQualifiedName("Comment"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8944"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Comment"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11853"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8961"); + node.BrowseName = ToQualifiedName("AuditConditionConfirmEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2790"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditConditionConfirmEventType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=8961"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=8962"); + refs.push_back(ref); + } + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=8961"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11854"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=8962"); + node.BrowseName = ToQualifiedName("EventId"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8961"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.Description = LocalizedText("A globally unique identifier for the event."); + attrs.DisplayName = LocalizedText("EventId"); + attrs.Type = ObjectId::ByteString; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=8962"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11854"); + node.BrowseName = ToQualifiedName("Comment"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=8961"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("Comment"); + attrs.Type = ObjectId::LocalizedText; + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11854"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11093"); + node.BrowseName = ToQualifiedName("AuditConditionShelvingEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2790"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("AuditConditionShelvingEventType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasProperty; + ref.SourceNodeId = ToNodeId("i=11093"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=11855"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=11855"); + node.BrowseName = ToQualifiedName("ShelvingTime"); + node.Class = NodeClass::Variable; + node.ParentNodeId = ToNodeId("i=11093"); + node.ReferenceTypeId = ReferenceId::HasProperty; + node.TypeDefinition = ToNodeId("i=68"); + VariableAttributes attrs; + attrs.DisplayName = LocalizedText("ShelvingTime"); + attrs.Type = ToNodeId("i=290"); + attrs.Rank = -1; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + std::vector refs; + { + AddReferencesItem ref; + ref.IsForward = true; + ref.ReferenceTypeId = ReferenceId::HasModellingRule; + ref.SourceNodeId = ToNodeId("i=11855"); + ref.TargetNodeClass = NodeClass::DataType; + ref.TargetNodeId = ToNodeId("i=78"); + refs.push_back(ref); + } + registry.AddReferences(refs); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2787"); + node.BrowseName = ToQualifiedName("RefreshStartEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2130"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("RefreshStartEventType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2788"); + node.BrowseName = ToQualifiedName("RefreshEndEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2130"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("RefreshEndEventType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=2789"); + node.BrowseName = ToQualifiedName("RefreshRequiredEventType"); + node.Class = NodeClass::ObjectType; + node.ParentNodeId = ToNodeId("i=2130"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ObjectTypeAttributes attrs; + attrs.DisplayName = LocalizedText("RefreshRequiredEventType"); + attrs.IsAbstract = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + + { + AddNodesItem node; + node.RequestedNewNodeId = ToNodeId("i=9006"); + node.BrowseName = ToQualifiedName("HasCondition"); + node.Class = NodeClass::ReferenceType; + node.ParentNodeId = ToNodeId("i=32"); + node.ReferenceTypeId = ReferenceId::HasSubtype; + ReferenceTypeAttributes attrs; + attrs.DisplayName = LocalizedText("HasCondition"); + attrs.InverseName = LocalizedText("IsConditionOf"); + attrs.IsAbstract = false; + attrs.Symmetric = false; + node.Attributes = attrs; + registry.AddNodes(std::vector {node}); + } + +} } // namespace - + diff --git a/src/server/standard_address_space_parts.h b/src/server/standard_address_space_parts.h index e0711b64..fa5ab603 100644 --- a/src/server/standard_address_space_parts.h +++ b/src/server/standard_address_space_parts.h @@ -1,16 +1,16 @@ -#pragma once +#pragma once #include namespace OpcUa { - void CreateAddressSpacePart3(OpcUa::NodeManagementServices& registry); - void CreateAddressSpacePart4(OpcUa::NodeManagementServices& registry); - void CreateAddressSpacePart5(OpcUa::NodeManagementServices& registry); - void CreateAddressSpacePart8(OpcUa::NodeManagementServices& registry); - void CreateAddressSpacePart9(OpcUa::NodeManagementServices& registry); - void CreateAddressSpacePart10(OpcUa::NodeManagementServices& registry); - void CreateAddressSpacePart11(OpcUa::NodeManagementServices& registry); - void CreateAddressSpacePart13(OpcUa::NodeManagementServices& registry); +void CreateAddressSpacePart3(OpcUa::NodeManagementServices & registry); +void CreateAddressSpacePart4(OpcUa::NodeManagementServices & registry); +void CreateAddressSpacePart5(OpcUa::NodeManagementServices & registry); +void CreateAddressSpacePart8(OpcUa::NodeManagementServices & registry); +void CreateAddressSpacePart9(OpcUa::NodeManagementServices & registry); +void CreateAddressSpacePart10(OpcUa::NodeManagementServices & registry); +void CreateAddressSpacePart11(OpcUa::NodeManagementServices & registry); +void CreateAddressSpacePart13(OpcUa::NodeManagementServices & registry); } diff --git a/src/server/subscription_service_addon.cpp b/src/server/subscription_service_addon.cpp index 06292625..0e83fa60 100644 --- a/src/server/subscription_service_addon.cpp +++ b/src/server/subscription_service_addon.cpp @@ -21,99 +21,99 @@ namespace { - class SubscriptionAddon: - public Common::Addon, - public OpcUa::Server::SubscriptionService +class SubscriptionAddon: + public Common::Addon, + public OpcUa::Server::SubscriptionService +{ +public: + void Initialize(Common::AddonsManager & manager, const Common::AddonParameters & parameters) + { + ApplyAddonParameters(parameters); + Services = manager.GetAddon(OpcUa::Server::ServicesRegistryAddonId); + OpcUa::Server::AddressSpace::SharedPtr addressSpace = manager.GetAddon(OpcUa::Server::AddressSpaceRegistryAddonId); + OpcUa::Server::AsioAddon::SharedPtr asio = manager.GetAddon(OpcUa::Server::AsioAddonId); + Subscriptions = OpcUa::Server::CreateSubscriptionService(addressSpace, asio->GetIoService(), Debug); + Services->RegisterSubscriptionServices(Subscriptions); + } + + void Stop() + { + Services->UnregisterSubscriptionServices(); + Subscriptions.reset(); + Services.reset(); + } + +public: + void TriggerEvent(OpcUa::NodeId node, OpcUa::Event event) + { + Subscriptions->TriggerEvent(node, event); + } + +public: + OpcUa::SubscriptionData CreateSubscription(const OpcUa::CreateSubscriptionRequest & request, std::function callback) { - public: - void Initialize(Common::AddonsManager& manager, const Common::AddonParameters& parameters) - { - ApplyAddonParameters(parameters); - Services = manager.GetAddon(OpcUa::Server::ServicesRegistryAddonId); - OpcUa::Server::AddressSpace::SharedPtr addressSpace = manager.GetAddon(OpcUa::Server::AddressSpaceRegistryAddonId); - OpcUa::Server::AsioAddon::SharedPtr asio = manager.GetAddon(OpcUa::Server::AsioAddonId); - Subscriptions = OpcUa::Server::CreateSubscriptionService(addressSpace, asio->GetIoService(), Debug); - Services->RegisterSubscriptionServices(Subscriptions); - } - - void Stop() - { - Services->UnregisterSubscriptionServices(); - Subscriptions.reset(); - Services.reset(); - } - - public: - void TriggerEvent(OpcUa::NodeId node, OpcUa::Event event) - { - Subscriptions->TriggerEvent(node, event); - } - - public: - OpcUa::SubscriptionData CreateSubscription(const OpcUa::CreateSubscriptionRequest& request, std::function callback) - { - return Subscriptions->CreateSubscription(request, callback); - } - - OpcUa::ModifySubscriptionResponse ModifySubscription(const OpcUa::ModifySubscriptionParameters& parameters) - { - return Subscriptions->ModifySubscription(parameters); - } - - std::vector DeleteSubscriptions(const std::vector& subscriptions) - { - return Subscriptions->DeleteSubscriptions(subscriptions); - } - - void Publish(const OpcUa::PublishRequest& request) - { - Subscriptions->Publish(request); - } - - OpcUa::RepublishResponse Republish(const OpcUa::RepublishParameters& request) - { - return Subscriptions->Republish(request); - } - - std::vector CreateMonitoredItems(const OpcUa::MonitoredItemsParameters& parameters) - { - return Subscriptions->CreateMonitoredItems(parameters); - } - - std::vector DeleteMonitoredItems(const OpcUa::DeleteMonitoredItemsParameters& parameters) - { - return Subscriptions->DeleteMonitoredItems(parameters); - } - - - private: - void ApplyAddonParameters(const Common::AddonParameters& addons) - { - for (const Common::Parameter parameter : addons.Parameters) + return Subscriptions->CreateSubscription(request, callback); + } + + OpcUa::ModifySubscriptionResponse ModifySubscription(const OpcUa::ModifySubscriptionParameters & parameters) + { + return Subscriptions->ModifySubscription(parameters); + } + + std::vector DeleteSubscriptions(const std::vector & subscriptions) + { + return Subscriptions->DeleteSubscriptions(subscriptions); + } + + void Publish(const OpcUa::PublishRequest & request) + { + Subscriptions->Publish(request); + } + + OpcUa::RepublishResponse Republish(const OpcUa::RepublishParameters & request) + { + return Subscriptions->Republish(request); + } + + std::vector CreateMonitoredItems(const OpcUa::MonitoredItemsParameters & parameters) + { + return Subscriptions->CreateMonitoredItems(parameters); + } + + std::vector DeleteMonitoredItems(const OpcUa::DeleteMonitoredItemsParameters & parameters) + { + return Subscriptions->DeleteMonitoredItems(parameters); + } + + +private: + void ApplyAddonParameters(const Common::AddonParameters & addons) + { + for (const Common::Parameter parameter : addons.Parameters) { if (parameter.Name == "debug" && !parameter.Value.empty() && parameter.Value != "0") - { - std::cout << "SubscriptionService | Debug mode enabled." << std::endl; - Debug = true; - } + { + std::cout << "SubscriptionService | Debug mode enabled." << std::endl; + Debug = true; + } } - } + } - private: - SubscriptionService::SharedPtr Subscriptions; - OpcUa::Server::ServicesRegistry::SharedPtr Services; - bool Debug = false; - }; +private: + SubscriptionService::SharedPtr Subscriptions; + OpcUa::Server::ServicesRegistry::SharedPtr Services; + bool Debug = false; +}; } namespace OpcUa { - namespace Server - { - Common::Addon::UniquePtr SubscriptionServiceAddonFactory::CreateAddon() - { - return Common::Addon::UniquePtr(new SubscriptionAddon()); - } - } +namespace Server +{ +Common::Addon::UniquePtr SubscriptionServiceAddonFactory::CreateAddon() +{ + return Common::Addon::UniquePtr(new SubscriptionAddon()); +} +} } diff --git a/src/server/subscription_service_internal.cpp b/src/server/subscription_service_internal.cpp index b829c5a6..b0dec08c 100644 --- a/src/server/subscription_service_internal.cpp +++ b/src/server/subscription_service_internal.cpp @@ -13,257 +13,282 @@ namespace { - OpcUa::ByteString GenerateEventId() - { - //stupid id generator - OpcUa::ByteString str; - for (int i = 0; i < 8; i++) - { - int32_t val = rand() % std::numeric_limits::max(); - str.Data.push_back(val); - } - return str; - } +OpcUa::ByteString GenerateEventId() +{ + //stupid id generator + OpcUa::ByteString str; + + for (int i = 0; i < 8; i++) + { + int32_t val = rand() % std::numeric_limits::max(); + str.Data.push_back(val); + } + + return str; +} } namespace OpcUa { - namespace Internal - { +namespace Internal +{ - SubscriptionServiceInternal::SubscriptionServiceInternal(Server::AddressSpace::SharedPtr addressspace, boost::asio::io_service& ioService, bool debug) - : io(ioService) - , AddressSpace(addressspace) - , Debug(debug) - { - } +SubscriptionServiceInternal::SubscriptionServiceInternal(Server::AddressSpace::SharedPtr addressspace, boost::asio::io_service & ioService, bool debug) + : io(ioService) + , AddressSpace(addressspace) + , Debug(debug) +{ +} - SubscriptionServiceInternal::~SubscriptionServiceInternal() - { - } +SubscriptionServiceInternal::~SubscriptionServiceInternal() +{ +} - Server::AddressSpace& SubscriptionServiceInternal::GetAddressSpace() - { - return *AddressSpace; - } +Server::AddressSpace & SubscriptionServiceInternal::GetAddressSpace() +{ + return *AddressSpace; +} - boost::asio::io_service& SubscriptionServiceInternal::GetIOService() - { - return io; - } +boost::asio::io_service & SubscriptionServiceInternal::GetIOService() +{ + return io; +} - void SubscriptionServiceInternal::DeleteAllSubscriptions() - { - if (Debug) std::cout << "SubscriptionService | Deleting all subscriptions." << std::endl; +void SubscriptionServiceInternal::DeleteAllSubscriptions() +{ + if (Debug) { std::cout << "SubscriptionService | Deleting all subscriptions." << std::endl; } - std::vector ids(SubscriptionsMap.size()); - { - boost::shared_lock lock(DbMutex); - std::transform(SubscriptionsMap.begin(), SubscriptionsMap.end(), ids.begin(), [](const SubscriptionsIdMap::value_type& i){return i.first;}); - } + std::vector ids(SubscriptionsMap.size()); + { + boost::shared_lock lock(DbMutex); + std::transform(SubscriptionsMap.begin(), SubscriptionsMap.end(), ids.begin(), [](const SubscriptionsIdMap::value_type & i) {return i.first;}); + } - DeleteSubscriptions(ids); - } + DeleteSubscriptions(ids); +} + +std::vector SubscriptionServiceInternal::DeleteSubscriptions(const std::vector & subscriptions) +{ + boost::unique_lock lock(DbMutex); - std::vector SubscriptionServiceInternal::DeleteSubscriptions(const std::vector& subscriptions) + std::vector result; + + for (const uint32_t & subid : subscriptions) { - boost::unique_lock lock(DbMutex); + SubscriptionsIdMap::iterator itsub = SubscriptionsMap.find(subid); - std::vector result; - for (const uint32_t& subid: subscriptions) - { - SubscriptionsIdMap::iterator itsub = SubscriptionsMap.find(subid); - if ( itsub == SubscriptionsMap.end()) + if (itsub == SubscriptionsMap.end()) { std::cout << "SubscriptionService | Error, got request to delete non existing Subscription: " << subid << std::endl; result.push_back(StatusCode::BadSubscriptionIdInvalid); } - else + + else { - if (Debug) std::cout << "SubscriptionService | Deleting Subscription: " << subid << std::endl; + if (Debug) { std::cout << "SubscriptionService | Deleting Subscription: " << subid << std::endl; } + itsub->second->Stop(); SubscriptionsMap.erase(subid); result.push_back(StatusCode::Good); } - } - return result; } - ModifySubscriptionResponse SubscriptionServiceInternal::ModifySubscription(const ModifySubscriptionParameters& parameters) - { - boost::unique_lock lock(DbMutex); + return result; +} - ModifySubscriptionResponse response; +ModifySubscriptionResponse SubscriptionServiceInternal::ModifySubscription(const ModifySubscriptionParameters & parameters) +{ + boost::unique_lock lock(DbMutex); - uint32_t subid = parameters.SubscriptionId; - SubscriptionsIdMap::iterator itsub = SubscriptionsMap.find(subid); - if (itsub == SubscriptionsMap.end()) - { - std::cout << "SubscriptionService | Error, got request to modify non existing Subscription: " << subid << std::endl; - response.Header.ServiceResult = StatusCode::BadSubscriptionIdInvalid; - return response; - } - if (Debug) std::cout << "SubscriptionService | Modify Subscription with Id: " << subid << std::endl; - - std::shared_ptr sub = itsub->second; - response.Parameters = sub->ModifySubscription(parameters); - return response; - } + ModifySubscriptionResponse response; - SubscriptionData SubscriptionServiceInternal::CreateSubscription(const CreateSubscriptionRequest& request, std::function callback) + uint32_t subid = parameters.SubscriptionId; + SubscriptionsIdMap::iterator itsub = SubscriptionsMap.find(subid); + + if (itsub == SubscriptionsMap.end()) { - boost::unique_lock lock(DbMutex); - - SubscriptionData data; - data.SubscriptionId = ++LastSubscriptionId; - data.RevisedLifetimeCount = request.Parameters.RequestedLifetimeCount; - data.RevisedPublishingInterval = request.Parameters.RequestedPublishingInterval; - data.RevisedMaxKeepAliveCount = request.Parameters.RequestedMaxKeepAliveCount; - if (Debug) std::cout << "SubscriptionService | Creating Subscription with Id: " << data.SubscriptionId << std::endl; - - std::shared_ptr sub(new InternalSubscription(*this, data, request.Header.SessionAuthenticationToken, callback, Debug)); - sub->Start(); - SubscriptionsMap[data.SubscriptionId] = sub; - return data; + std::cout << "SubscriptionService | Error, got request to modify non existing Subscription: " << subid << std::endl; + response.Header.ServiceResult = StatusCode::BadSubscriptionIdInvalid; + return response; } - std::vector SubscriptionServiceInternal::CreateMonitoredItems(const MonitoredItemsParameters& params) - { - boost::unique_lock lock(DbMutex); + if (Debug) { std::cout << "SubscriptionService | Modify Subscription with Id: " << subid << std::endl; } + + std::shared_ptr sub = itsub->second; + response.Parameters = sub->ModifySubscription(parameters); + return response; +} + +SubscriptionData SubscriptionServiceInternal::CreateSubscription(const CreateSubscriptionRequest & request, std::function callback) +{ + boost::unique_lock lock(DbMutex); + + SubscriptionData data; + data.SubscriptionId = ++LastSubscriptionId; + data.RevisedLifetimeCount = request.Parameters.RequestedLifetimeCount; + data.RevisedPublishingInterval = request.Parameters.RequestedPublishingInterval; + data.RevisedMaxKeepAliveCount = request.Parameters.RequestedMaxKeepAliveCount; - std::vector data; + if (Debug) { std::cout << "SubscriptionService | Creating Subscription with Id: " << data.SubscriptionId << std::endl; } - SubscriptionsIdMap::iterator itsub = SubscriptionsMap.find(params.SubscriptionId); - if ( itsub == SubscriptionsMap.end()) //SubscriptionId does not exist, return errors for all items - { - for (int j=0; j<(int)params.ItemsToCreate.size(); j++) + std::shared_ptr sub(new InternalSubscription(*this, data, request.Header.SessionAuthenticationToken, callback, Debug)); + sub->Start(); + SubscriptionsMap[data.SubscriptionId] = sub; + return data; +} + +std::vector SubscriptionServiceInternal::CreateMonitoredItems(const MonitoredItemsParameters & params) +{ + boost::unique_lock lock(DbMutex); + + std::vector data; + + SubscriptionsIdMap::iterator itsub = SubscriptionsMap.find(params.SubscriptionId); + + if (itsub == SubscriptionsMap.end()) //SubscriptionId does not exist, return errors for all items + { + for (int j = 0; j < (int)params.ItemsToCreate.size(); j++) { MonitoredItemCreateResult res; res.Status = StatusCode::BadSubscriptionIdInvalid; data.push_back(res); } - return data; - } - - for (const MonitoredItemCreateRequest& req: params.ItemsToCreate) //FIXME: loop could be in InternalSubscription - { - MonitoredItemCreateResult result = itsub->second->CreateMonitoredItem(req); - data.push_back(result); - } - return data; + return data; } - std::vector SubscriptionServiceInternal::DeleteMonitoredItems(const DeleteMonitoredItemsParameters& params) + for (const MonitoredItemCreateRequest & req : params.ItemsToCreate) //FIXME: loop could be in InternalSubscription { - boost::unique_lock lock(DbMutex); + MonitoredItemCreateResult result = itsub->second->CreateMonitoredItem(req); + data.push_back(result); + } - std::vector results; + return data; - SubscriptionsIdMap::iterator itsub = SubscriptionsMap.find(params.SubscriptionId); - if ( itsub == SubscriptionsMap.end()) //SubscriptionId does not exist, return errors for all items - { - for (int j=0; j<(int)params.MonitoredItemIds.size(); j++) +} + +std::vector SubscriptionServiceInternal::DeleteMonitoredItems(const DeleteMonitoredItemsParameters & params) +{ + boost::unique_lock lock(DbMutex); + + std::vector results; + + SubscriptionsIdMap::iterator itsub = SubscriptionsMap.find(params.SubscriptionId); + + if (itsub == SubscriptionsMap.end()) //SubscriptionId does not exist, return errors for all items + { + for (int j = 0; j < (int)params.MonitoredItemIds.size(); j++) { results.push_back(StatusCode::BadSubscriptionIdInvalid); } - return results; - } - results = itsub->second->DeleteMonitoredItemsIds(params.MonitoredItemIds); return results; } - void SubscriptionServiceInternal::Publish(const PublishRequest& request) + results = itsub->second->DeleteMonitoredItemsIds(params.MonitoredItemIds); + return results; +} + +void SubscriptionServiceInternal::Publish(const PublishRequest & request) +{ + boost::unique_lock lock(DbMutex); + + if (PublishRequestQueues[request.Header.SessionAuthenticationToken] < 100) + { + PublishRequestQueues[request.Header.SessionAuthenticationToken] += 1; + } + + //FIXME: else spec says we should return error to warn client + + for (SubscriptionAcknowledgement ack : request.SubscriptionAcknowledgements) { - boost::unique_lock lock(DbMutex); - - if ( PublishRequestQueues[request.Header.SessionAuthenticationToken] < 100 ) - { - PublishRequestQueues[request.Header.SessionAuthenticationToken] += 1; - } - //FIXME: else spec says we should return error to warn client - - for (SubscriptionAcknowledgement ack: request.SubscriptionAcknowledgements) - { - SubscriptionsIdMap::iterator sub_it = SubscriptionsMap.find(ack.SubscriptionId); - if ( sub_it != SubscriptionsMap.end()) + SubscriptionsIdMap::iterator sub_it = SubscriptionsMap.find(ack.SubscriptionId); + + if (sub_it != SubscriptionsMap.end()) { sub_it->second->NewAcknowlegment(ack); } - } } +} + +RepublishResponse SubscriptionServiceInternal::Republish(const RepublishParameters & params) +{ + boost::shared_lock lock(DbMutex); - RepublishResponse SubscriptionServiceInternal::Republish(const RepublishParameters& params) + SubscriptionsIdMap::iterator sub_it = SubscriptionsMap.find(params.SubscriptionId); + + if (sub_it == SubscriptionsMap.end()) { - boost::shared_lock lock(DbMutex); - - SubscriptionsIdMap::iterator sub_it = SubscriptionsMap.find(params.SubscriptionId); - if ( sub_it == SubscriptionsMap.end()) - { - RepublishResponse response; - response.Header.ServiceResult = StatusCode::BadSubscriptionIdInvalid; - return response; - } - return sub_it->second->Republish(params); + RepublishResponse response; + response.Header.ServiceResult = StatusCode::BadSubscriptionIdInvalid; + return response; } + return sub_it->second->Republish(params); +} + + +bool SubscriptionServiceInternal::PopPublishRequest(NodeId node) +{ + std::map::iterator queue_it = PublishRequestQueues.find(node); - bool SubscriptionServiceInternal::PopPublishRequest(NodeId node) + if (queue_it == PublishRequestQueues.end()) { - std::map::iterator queue_it = PublishRequestQueues.find(node); - if ( queue_it == PublishRequestQueues.end() ) - { - std::cout << "SubscriptionService | Error request for publish queue for unknown session: " << node << " queue are available for: "; - for ( auto i: PublishRequestQueues ){ + std::cout << "SubscriptionService | Error request for publish queue for unknown session: " << node << " queue are available for: "; + + for (auto i : PublishRequestQueues) + { std::cout << " " << i.first ; } - std::cout << std::endl; - return false; - } - else - { - if ( queue_it->second == 0 ) + + std::cout << std::endl; + return false; + } + + else + { + if (queue_it->second == 0) { std::cout << "SubscriptionService | Missing publish request, cannot send response for session: " << node << std::endl; return false; } - else + + else { --queue_it->second; return true; } - } } +} - void SubscriptionServiceInternal::TriggerEvent(NodeId node, Event event) - { - boost::shared_lock lock(DbMutex); - - //A new id must be generated every time we trigger an event, - //if user have not set it manually we force something - if ( event.EventId.Data.empty() ) - { - event.EventId = GenerateEventId(); - } +void SubscriptionServiceInternal::TriggerEvent(NodeId node, Event event) +{ + boost::shared_lock lock(DbMutex); - for (auto sub : SubscriptionsMap) - { - sub.second->TriggerEvent(node, event); - } + //A new id must be generated every time we trigger an event, + //if user have not set it manually we force something + if (event.EventId.Data.empty()) + { + event.EventId = GenerateEventId(); + } + for (auto sub : SubscriptionsMap) + { + sub.second->TriggerEvent(node, event); } - } // namespace Internal +} - namespace Server - { +} // namespace Internal - SubscriptionService::UniquePtr CreateSubscriptionService(std::shared_ptr addressspace, boost::asio::io_service& io, bool debug) - { - return SubscriptionService::UniquePtr(new Internal::SubscriptionServiceInternal(addressspace, io, debug)); - } +namespace Server +{ - } +SubscriptionService::UniquePtr CreateSubscriptionService(std::shared_ptr addressspace, boost::asio::io_service & io, bool debug) +{ + return SubscriptionService::UniquePtr(new Internal::SubscriptionServiceInternal(addressspace, io, debug)); +} + +} } diff --git a/src/server/subscription_service_internal.h b/src/server/subscription_service_internal.h index 30f1a625..3bc429c7 100644 --- a/src/server/subscription_service_internal.h +++ b/src/server/subscription_service_internal.h @@ -33,47 +33,47 @@ namespace OpcUa { - namespace Internal - { - - class InternalSubscription; - - typedef std::map > SubscriptionsIdMap; // Map SubscptioinId, SubscriptionData - - - class SubscriptionServiceInternal : public Server::SubscriptionService - { - public: - SubscriptionServiceInternal(Server::AddressSpace::SharedPtr addressspace, boost::asio::io_service& io, bool debug); +namespace Internal +{ - ~SubscriptionServiceInternal(); +class InternalSubscription; - virtual std::vector DeleteSubscriptions(const std::vector& subscriptions); - virtual ModifySubscriptionResponse ModifySubscription(const ModifySubscriptionParameters& parameters); - virtual SubscriptionData CreateSubscription(const CreateSubscriptionRequest& request, std::function callback); - virtual std::vector CreateMonitoredItems(const MonitoredItemsParameters& params); - virtual std::vector DeleteMonitoredItems(const DeleteMonitoredItemsParameters& params); - virtual void Publish(const PublishRequest& request); - virtual RepublishResponse Republish(const RepublishParameters& request); +typedef std::map > SubscriptionsIdMap; // Map SubscptioinId, SubscriptionData - void DeleteAllSubscriptions(); - boost::asio::io_service& GetIOService(); - bool PopPublishRequest(NodeId node); - void TriggerEvent(NodeId node, Event event); - Server::AddressSpace& GetAddressSpace(); - private: - boost::asio::io_service& io; - Server::AddressSpace::SharedPtr AddressSpace; - bool Debug; - mutable boost::shared_mutex DbMutex; - SubscriptionsIdMap SubscriptionsMap; // Map SubscptioinId, SubscriptionData - uint32_t LastSubscriptionId = 2; - std::map PublishRequestQueues; - }; +class SubscriptionServiceInternal : public Server::SubscriptionService +{ +public: + SubscriptionServiceInternal(Server::AddressSpace::SharedPtr addressspace, boost::asio::io_service & io, bool debug); + + ~SubscriptionServiceInternal(); + + virtual std::vector DeleteSubscriptions(const std::vector & subscriptions); + virtual ModifySubscriptionResponse ModifySubscription(const ModifySubscriptionParameters & parameters); + virtual SubscriptionData CreateSubscription(const CreateSubscriptionRequest & request, std::function callback); + virtual std::vector CreateMonitoredItems(const MonitoredItemsParameters & params); + virtual std::vector DeleteMonitoredItems(const DeleteMonitoredItemsParameters & params); + virtual void Publish(const PublishRequest & request); + virtual RepublishResponse Republish(const RepublishParameters & request); + + void DeleteAllSubscriptions(); + boost::asio::io_service & GetIOService(); + bool PopPublishRequest(NodeId node); + void TriggerEvent(NodeId node, Event event); + Server::AddressSpace & GetAddressSpace(); + +private: + boost::asio::io_service & io; + Server::AddressSpace::SharedPtr AddressSpace; + bool Debug; + mutable boost::shared_mutex DbMutex; + SubscriptionsIdMap SubscriptionsMap; // Map SubscptioinId, SubscriptionData + uint32_t LastSubscriptionId = 2; + std::map PublishRequestQueues; +}; - } +} } diff --git a/src/server/tcp_server.cpp b/src/server/tcp_server.cpp index 8ec19999..cf6c9a1a 100644 --- a/src/server/tcp_server.cpp +++ b/src/server/tcp_server.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -47,126 +47,129 @@ namespace { - using namespace OpcUa; - using namespace OpcUa::Binary; - using namespace OpcUa::Server; +using namespace OpcUa; +using namespace OpcUa::Binary; +using namespace OpcUa::Server; - - class SocketHolder + +class SocketHolder +{ +public: + explicit SocketHolder(int socket) + : Socket(socket) + { + } + + ~SocketHolder() { - public: - explicit SocketHolder(int socket) - : Socket(socket) - { - } - - ~SocketHolder() - { - if (close(Socket) < 0) + if (close(Socket) < 0) { std::cerr << "Unable to close server socket." << strerror(errno) << std::endl; } - } + } + + bool operator < (int sock) const + { + return Socket < sock; + } - bool operator < (int sock) const - { - return Socket < sock; - } +private: + int Socket; +}; - private: - int Socket; - }; +class Client : public Common::ThreadObserver +{ +public: + Client(std::shared_ptr channel, std::shared_ptr processor, std::function onFinish) + : Channel(channel) + , Processor(processor) + , OnFinish(onFinish) + { + std::clog << "Starting new client thread." << std::endl; + std::function func = std::bind(&Client::Run, std::ref(*this)); + ClientThread.reset(new Common::Thread(func)); + } + + ~Client() + { + ClientThread->Join(); + ClientThread.reset(); + std::clog << "Client thread stopped." << std::endl; + } + +protected: + virtual void OnSuccess() + { + std::cerr << "Server thread was exited successfully." << std::endl; + } - class Client : public Common::ThreadObserver + virtual void OnError(const std::exception & exc) { - public: - Client(std::shared_ptr channel, std::shared_ptr processor, std::function onFinish) - : Channel(channel) - , Processor(processor) - , OnFinish(onFinish) - { - std::clog << "Starting new client thread." << std::endl; - std::function func = std::bind(&Client::Run, std::ref(*this)); - ClientThread.reset(new Common::Thread(func)); - } - - ~Client() - { - ClientThread->Join(); - ClientThread.reset(); - std::clog << "Client thread stopped." << std::endl; - } - - protected: - virtual void OnSuccess() - { - std::cerr << "Server thread was exited successfully." << std::endl; - } - - virtual void OnError(const std::exception& exc) - { - std::cerr << "Server thread has exited with error:" << exc.what() << std::endl; - } - - private: - void Run() - { - try + std::cerr << "Server thread has exited with error:" << exc.what() << std::endl; + } + +private: + void Run() + { + try { std::cout << "start process" << std::endl; - Processor->Process(Channel); + Processor->Process(Channel); } - catch (const std::exception& exc) + + catch (const std::exception & exc) { std::cerr << "unable to process client connection. " << exc.what() << std::endl; } - std::thread t(OnFinish); - t.detach(); - } - private: - std::shared_ptr Channel; - std::shared_ptr Processor; - std::function OnFinish; - std::unique_ptr ClientThread; - }; + std::thread t(OnFinish); + t.detach(); + } +private: + std::shared_ptr Channel; + std::shared_ptr Processor; + std::function OnFinish; + std::unique_ptr ClientThread; +}; - class TcpServerConnection : private Common::ThreadObserver + +class TcpServerConnection : private Common::ThreadObserver +{ +public: + TcpServerConnection(const TcpParameters & params, std::shared_ptr processor) + : Port(params.Port) + , Stopped(true) + , Socket(-1) + , Processor(processor) { - public: - TcpServerConnection(const TcpParameters& params, std::shared_ptr processor) - : Port(params.Port) - , Stopped(true) - , Socket(-1) - , Processor(processor) - { - } - - virtual ~TcpServerConnection() - { - try + } + + virtual ~TcpServerConnection() + { + try { Stop(); } - catch (const std::exception& exc) + + catch (const std::exception & exc) { std::cerr << "Error unable to stop server. " << exc.what() << std::endl; } - } + } - virtual void Start() - { - if (!ServerThread) + virtual void Start() + { + if (!ServerThread) { StartNewThread(); } - } + } - virtual void Stop() - { - if (ServerThread) + virtual void Stop() + { + if (ServerThread) { std::clog << "Shutting down opc ua binary server" << std::endl; Stopped = true; @@ -174,73 +177,78 @@ namespace ServerThread->Join(); ServerThread.reset(); } - } - - protected: - virtual void OnSuccess() - { - std::cerr << "Server thread was exited successfully." << std::endl; - } - - virtual void OnError(const std::exception& exc) - { - std::cerr << "Server thread has exited with error:" << exc.what() << std::endl; - //throw 20; - } - - private: - void StartNewThread() - { - std::clog << "Starting new server thread." << std::endl; - Stopped = false; - std::function func = std::bind(&TcpServerConnection::Run, std::ref(*this)); - ServerThread.reset(new Common::Thread(func, this)); - } - - void Run() - { - Socket = socket(AF_INET, SOCK_STREAM, 0); - if (Stopped) + } + +protected: + virtual void OnSuccess() + { + std::cerr << "Server thread was exited successfully." << std::endl; + } + + virtual void OnError(const std::exception & exc) + { + std::cerr << "Server thread has exited with error:" << exc.what() << std::endl; + //throw 20; + } + +private: + void StartNewThread() + { + std::clog << "Starting new server thread." << std::endl; + Stopped = false; + std::function func = std::bind(&TcpServerConnection::Run, std::ref(*this)); + ServerThread.reset(new Common::Thread(func, this)); + } + + void Run() + { + Socket = socket(AF_INET, SOCK_STREAM, 0); + + if (Stopped) { return; } - if (Socket < 0) + + if (Socket < 0) { throw std::logic_error(std::string("Unable to create server socket. ") + strerror(errno)); } - SocketHolder holder(Socket); - std::cout << "Listening on: " << Port << std::endl; + SocketHolder holder(Socket); + std::cout << "Listening on: " << Port << std::endl; - sockaddr_in addr; - addr.sin_family = AF_INET; - addr.sin_port = htons(Port); - addr.sin_addr.s_addr = htonl(INADDR_ANY); - if (bind(Socket, (sockaddr*)&addr, sizeof(addr)) < 0) + sockaddr_in addr; + addr.sin_family = AF_INET; + addr.sin_port = htons(Port); + addr.sin_addr.s_addr = htonl(INADDR_ANY); + + if (bind(Socket, (sockaddr *)&addr, sizeof(addr)) < 0) { if (Stopped) - { - return; - } + { + return; + } + throw std::logic_error(std::string("Unable bind socket. ") + strerror(errno)); } - const unsigned ServerQueueSize = 5; - listen (Socket, ServerQueueSize); - - - while (!Stopped) + const unsigned ServerQueueSize = 5; + listen(Socket, ServerQueueSize); + + + while (!Stopped) { int clientSocket = accept(Socket, NULL, NULL); + if (Stopped) - { - return; - } + { + return; + } if (clientSocket < 0) - { - throw std::logic_error(std::string("Unable to accept client connection. ") + strerror(errno)); - } + { + throw std::logic_error(std::string("Unable to accept client connection. ") + strerror(errno)); + } std::unique_lock lock(ClientsMutex); std::shared_ptr clientChannel(new SocketChannel(clientSocket)); @@ -248,70 +256,73 @@ namespace ClientThreads.insert(std::make_pair(clientSocket, clientThread)); } - ClientThreads.clear(); - } + ClientThreads.clear(); + } - void Erase(int client) - { - std::unique_lock lock(ClientsMutex); - if (!Stopped) + void Erase(int client) + { + std::unique_lock lock(ClientsMutex); + + if (!Stopped) { ClientThreads.erase(client); } - } - - private: - const unsigned short Port; - volatile bool Stopped; - volatile int Socket; - std::shared_ptr Processor; - std::unique_ptr ServerThread; - std::mutex ClientsMutex; - std::map> ClientThreads; - }; - - class TcpServer : public OpcUa::Server::TcpServer - { - public: - DEFINE_CLASS_POINTERS(TcpServer) + } + +private: + const unsigned short Port; + volatile bool Stopped; + volatile int Socket; + std::shared_ptr Processor; + std::unique_ptr ServerThread; + std::mutex ClientsMutex; + std::map> ClientThreads; +}; + +class TcpServer : public OpcUa::Server::TcpServer +{ +public: + DEFINE_CLASS_POINTERS(TcpServer) - void Listen(const OpcUa::Server::TcpParameters& params, std::shared_ptr processor) override - { - if (Servers.find(params.Port) != std::end(Servers)) + void Listen(const OpcUa::Server::TcpParameters & params, std::shared_ptr processor) override + { + if (Servers.find(params.Port) != std::end(Servers)) { // TODO add portnumber into message. throw std::logic_error("Server already started at this port."); } - std::shared_ptr listener(new TcpServerConnection(params, processor)); - listener->Start(); - Servers.insert(std::make_pair(params.Port, listener)); - } + std::shared_ptr listener(new TcpServerConnection(params, processor)); + listener->Start(); + Servers.insert(std::make_pair(params.Port, listener)); + } - void StopListen(const OpcUa::Server::TcpParameters& params) override - { - ServersMap::iterator serverIt = Servers.find(params.Port); - if (serverIt == std::end(Servers)) + void StopListen(const OpcUa::Server::TcpParameters & params) override + { + ServersMap::iterator serverIt = Servers.find(params.Port); + + if (serverIt == std::end(Servers)) { return; } - try + try { serverIt->second->Stop(); Servers.erase(serverIt); } - catch (const std::exception& exc) + + catch (const std::exception & exc) { // TODO add port number to the message std::clog << "Stopping TcpServerAddon failed with error: " << exc.what() << std::endl; } - } + } - private: - typedef std::map> ServersMap; - ServersMap Servers; - }; +private: + typedef std::map> ServersMap; + ServersMap Servers; +}; } // namespace diff --git a/src/server/tcp_server.h b/src/server/tcp_server.h index 727eee73..7f09717c 100644 --- a/src/server/tcp_server.h +++ b/src/server/tcp_server.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -18,29 +18,29 @@ namespace OpcUa { - namespace Server - { - struct TcpParameters - { - unsigned short Port; +namespace Server +{ +struct TcpParameters +{ + unsigned short Port; - TcpParameters() - : Port(0) - { - } - }; + TcpParameters() + : Port(0) + { + } +}; - class TcpServer : public Common::Interface - { - public: - DEFINE_CLASS_POINTERS(TcpServer) +class TcpServer : public Common::Interface +{ +public: + DEFINE_CLASS_POINTERS(TcpServer) - virtual void Listen(const OpcUa::Server::TcpParameters& params, std::shared_ptr processor) = 0; - virtual void StopListen(const OpcUa::Server::TcpParameters& params) = 0; - }; + virtual void Listen(const OpcUa::Server::TcpParameters & params, std::shared_ptr processor) = 0; + virtual void StopListen(const OpcUa::Server::TcpParameters & params) = 0; +}; - TcpServer::UniquePtr CreateTcpServer(); +TcpServer::UniquePtr CreateTcpServer(); - } // namespace UaServer +} // namespace UaServer } // namespace OpcUa diff --git a/src/server/timer.h b/src/server/timer.h index 667a2fe2..2958666f 100644 --- a/src/server/timer.h +++ b/src/server/timer.h @@ -27,53 +27,58 @@ namespace OpcUa { - class PeriodicTimer +class PeriodicTimer +{ +public: + PeriodicTimer(boost::asio::io_service & io) + : Timer(io) + , IsCanceled(true) + , Stopped(true) { - public: - PeriodicTimer(boost::asio::io_service& io) - : Timer(io) - , IsCanceled(true) - , Stopped(true) - { - } + } - ~PeriodicTimer() - { - Cancel(); - } + ~PeriodicTimer() + { + Cancel(); + } - void Start(const boost::asio::deadline_timer::duration_type& t, std::function handler) - { - std::unique_lock lock(Mutex); - if (!Stopped) - return; + void Start(const boost::asio::deadline_timer::duration_type & t, std::function handler) + { + std::unique_lock lock(Mutex); - Stopped = false; - IsCanceled = false; - Timer.expires_from_now(t); - Timer.async_wait([this, handler, t](const boost::system::error_code& error){ - OnTimer(error, handler, t); - }); - } + if (!Stopped) + { return; } - void Cancel() + Stopped = false; + IsCanceled = false; + Timer.expires_from_now(t); + Timer.async_wait([this, handler, t](const boost::system::error_code & error) { - std::unique_lock lock(Mutex); - if (Stopped) - return; + OnTimer(error, handler, t); + }); + } + + void Cancel() + { + std::unique_lock lock(Mutex); - IsCanceled = true; - Timer.cancel(); - StopEvent.wait(lock, [this](){ - return static_cast(Stopped); - }); - } + if (Stopped) + { return; } - private: - void OnTimer(const boost::system::error_code& error, std::function handler, boost::asio::deadline_timer::duration_type t) + IsCanceled = true; + Timer.cancel(); + StopEvent.wait(lock, [this]() { - std::unique_lock lock(Mutex); - if (IsCanceled || error) + return static_cast(Stopped); + }); + } + +private: + void OnTimer(const boost::system::error_code & error, std::function handler, boost::asio::deadline_timer::duration_type t) + { + std::unique_lock lock(Mutex); + + if (IsCanceled || error) { Stopped = true; IsCanceled = true; @@ -81,19 +86,20 @@ namespace OpcUa return; } - handler(); + handler(); - Timer.expires_from_now(t); - Timer.async_wait([this, handler, t](const boost::system::error_code& error){ - OnTimer(error, handler, t); - }); - } + Timer.expires_from_now(t); + Timer.async_wait([this, handler, t](const boost::system::error_code & error) + { + OnTimer(error, handler, t); + }); + } - private: - std::mutex Mutex; - std::condition_variable StopEvent; - boost::asio::deadline_timer Timer; - std::atomic IsCanceled; - std::atomic Stopped; - }; +private: + std::mutex Mutex; + std::condition_variable StopEvent; + boost::asio::deadline_timer Timer; + std::atomic IsCanceled; + std::atomic Stopped; +}; } diff --git a/src/server/xml_address_space_addon.cpp b/src/server/xml_address_space_addon.cpp index 1a292516..80fe4f71 100644 --- a/src/server/xml_address_space_addon.cpp +++ b/src/server/xml_address_space_addon.cpp @@ -17,57 +17,59 @@ namespace OpcUa { - namespace Internal - { +namespace Internal +{ + +void XmlAddressSpaceAddon::Initialize(Common::AddonsManager & addons, const Common::AddonParameters & params) +{ + Registry = addons.GetAddon(Server::AddressSpaceRegistryAddonId); - void XmlAddressSpaceAddon::Initialize(Common::AddonsManager& addons, const Common::AddonParameters& params) + if (!Registry) { - Registry = addons.GetAddon(Server::AddressSpaceRegistryAddonId); - if (!Registry) - { - std::stringstream stream; - stream << "Unable to find addon '" << Server::AddressSpaceRegistryAddonId << "'. " << std::endl; - throw std::logic_error(stream.str()); - } + std::stringstream stream; + stream << "Unable to find addon '" << Server::AddressSpaceRegistryAddonId << "'. " << std::endl; + throw std::logic_error(stream.str()); + } - for (const Common::Parameter& param : params.Parameters) - { - if (param.Name == "file_name") + for (const Common::Parameter & param : params.Parameters) + { + if (param.Name == "file_name") { try - { - Load(param.Value.c_str(), *Registry); - } - catch (const std::exception& err) - { - std::cerr << "Unable to load address space from the file '" << param.Value << "'. " << err.what() << std::endl; - } + { + Load(param.Value.c_str(), *Registry); + } + + catch (const std::exception & err) + { + std::cerr << "Unable to load address space from the file '" << param.Value << "'. " << err.what() << std::endl; + } } - } } +} - void XmlAddressSpaceAddon::Stop() - { - Registry.reset(); - } +void XmlAddressSpaceAddon::Stop() +{ + Registry.reset(); +} - void XmlAddressSpaceAddon::Load(const char* path) - { - Load(path, *Registry); - } +void XmlAddressSpaceAddon::Load(const char * path) +{ + Load(path, *Registry); +} - void XmlAddressSpaceAddon::Load(const char* file, OpcUa::NodeManagementServices& registry) +void XmlAddressSpaceAddon::Load(const char * file, OpcUa::NodeManagementServices & registry) +{ + if (!Registry) { - if (!Registry) - { - std::stringstream stream; - stream << "Unable to find addon '" << Server::AddressSpaceRegistryAddonId << "'. " << std::endl; - throw std::logic_error(stream.str()); - } - - XmlAddressSpaceLoader xml(*Registry); - xml.Load(file); + std::stringstream stream; + stream << "Unable to find addon '" << Server::AddressSpaceRegistryAddonId << "'. " << std::endl; + throw std::logic_error(stream.str()); } - } // namespace Internal + XmlAddressSpaceLoader xml(*Registry); + xml.Load(file); +} + +} // namespace Internal } // namespace OpcUa diff --git a/src/server/xml_address_space_loader.cpp b/src/server/xml_address_space_loader.cpp index 38293d17..60be9af7 100644 --- a/src/server/xml_address_space_loader.cpp +++ b/src/server/xml_address_space_loader.cpp @@ -26,955 +26,1150 @@ namespace { - using namespace OpcUa; +using namespace OpcUa; - ReferenceId GetReferenceId(const std::string& referenceName) - { - if (referenceName == "organizes") - return ReferenceId::Organizes; - if (referenceName == "references_to") - return ReferenceId::References; - if (referenceName == "has_child") - return ReferenceId::HasChild; - if (referenceName == "has_event_source") - return ReferenceId::HasEventSource; - if (referenceName == "has_modelling_rule") - return ReferenceId::HasModellingRule; - if (referenceName == "has_encoding") - return ReferenceId::HasEncoding; - if (referenceName == "has_description") - return ReferenceId::HasDescription; - if (referenceName == "has_type_definition") - return ReferenceId::HasTypeDefinition; - if (referenceName == "generates_event") - return ReferenceId::GeneratesEvent; - if (referenceName == "aggregates") - return ReferenceId::Aggregates; - if (referenceName == "has_subtype") - return ReferenceId::HasSubtype; - if (referenceName == "has_property") - return ReferenceId::HasProperty; - if (referenceName == "has_component") - return ReferenceId::HasComponent; - if (referenceName == "has_notifier") - return ReferenceId::HasNotifier; - if (referenceName == "has_ordered_component") - return ReferenceId::HasOrderedComponent; - if (referenceName == "has_model_parent") - return ReferenceId::HasModelParent; - if (referenceName == "from_state") - return ReferenceId::FromState; - if (referenceName == "to_state") - return ReferenceId::ToState; - if (referenceName == "has_clause") - return ReferenceId::HasCause; - if (referenceName == "has_effect") - return ReferenceId::HasEffect; - if (referenceName == "has_historical_configuration") - return ReferenceId::HasHistoricalConfiguration; - if (referenceName == "has_historical_event_configuration") - return ReferenceId::HasHistoricalEventConfiguration; - if (referenceName == "has_substate_machine") - return ReferenceId::HasSubStateMachine; - if (referenceName == "has_event_history") - return ReferenceId::HasEventHistory; - if (referenceName == "always_generates_event") - return ReferenceId::AlwaysGeneratesEvent; - if (referenceName == "has_true_substate") - return ReferenceId::HasTrueSubState; - if (referenceName == "has_false_substate") - return ReferenceId::HasFalseSubState; - if (referenceName == "has_condition") - return ReferenceId::HasCondition; - if (referenceName == "non_hierarchical_references") - return ReferenceId::NonHierarchicalReferences; - if (referenceName == "hierarchical_references") - return ReferenceId::HierarchicalReferences; - if (referenceName == "has_cause") - return ReferenceId::HasCause; - if (referenceName == "has_sub_state_machine") - return ReferenceId::HasSubStateMachine; - if (referenceName == "has_true_sub_state") - return ReferenceId::HasTrueSubState; - if (referenceName == "has_false_sub_state") - return ReferenceId::HasFalseSubState; - - throw std::logic_error(std::string("Unknown reference name '") + referenceName + std::string(referenceName)); - } +ReferenceId GetReferenceId(const std::string & referenceName) +{ + if (referenceName == "organizes") + { return ReferenceId::Organizes; } - struct Reference - { - ReferenceId Id; - NodeId TargetNode; - bool IsForward; - NodeClass TargetClass; - QualifiedName TargetBrowseName; - LocalizedText TargetDisplayName; - NodeId TargetType; + if (referenceName == "references_to") + { return ReferenceId::References; } - Reference() - : Id(ReferenceId::Unknown) - , IsForward(true) - , TargetClass(NodeClass::Unspecified) - { - } - }; + if (referenceName == "has_child") + { return ReferenceId::HasChild; } - struct Attribute - { - AttributeId Id; - Variant Value; - Attribute() - : Id(AttributeId::Unknown) - { - } + if (referenceName == "has_event_source") + { return ReferenceId::HasEventSource; } - Attribute(AttributeId id, Variant value) - : Id(id) - , Value(value) - { - } - }; + if (referenceName == "has_modelling_rule") + { return ReferenceId::HasModellingRule; } - struct INode - { - NodeId Id; - std::map Attributes; - std::vector References; - bool IsExternal; + if (referenceName == "has_encoding") + { return ReferenceId::HasEncoding; } - INode() - : IsExternal(false) - { - } - }; + if (referenceName == "has_description") + { return ReferenceId::HasDescription; } + + if (referenceName == "has_type_definition") + { return ReferenceId::HasTypeDefinition; } + + if (referenceName == "generates_event") + { return ReferenceId::GeneratesEvent; } + + if (referenceName == "aggregates") + { return ReferenceId::Aggregates; } + + if (referenceName == "has_subtype") + { return ReferenceId::HasSubtype; } + + if (referenceName == "has_property") + { return ReferenceId::HasProperty; } + + if (referenceName == "has_component") + { return ReferenceId::HasComponent; } + + if (referenceName == "has_notifier") + { return ReferenceId::HasNotifier; } + + if (referenceName == "has_ordered_component") + { return ReferenceId::HasOrderedComponent; } + + if (referenceName == "has_model_parent") + { return ReferenceId::HasModelParent; } + + if (referenceName == "from_state") + { return ReferenceId::FromState; } + + if (referenceName == "to_state") + { return ReferenceId::ToState; } - struct XmlDocDeleter + if (referenceName == "has_clause") + { return ReferenceId::HasCause; } + + if (referenceName == "has_effect") + { return ReferenceId::HasEffect; } + + if (referenceName == "has_historical_configuration") + { return ReferenceId::HasHistoricalConfiguration; } + + if (referenceName == "has_historical_event_configuration") + { return ReferenceId::HasHistoricalEventConfiguration; } + + if (referenceName == "has_substate_machine") + { return ReferenceId::HasSubStateMachine; } + + if (referenceName == "has_event_history") + { return ReferenceId::HasEventHistory; } + + if (referenceName == "always_generates_event") + { return ReferenceId::AlwaysGeneratesEvent; } + + if (referenceName == "has_true_substate") + { return ReferenceId::HasTrueSubState; } + + if (referenceName == "has_false_substate") + { return ReferenceId::HasFalseSubState; } + + if (referenceName == "has_condition") + { return ReferenceId::HasCondition; } + + if (referenceName == "non_hierarchical_references") + { return ReferenceId::NonHierarchicalReferences; } + + if (referenceName == "hierarchical_references") + { return ReferenceId::HierarchicalReferences; } + + if (referenceName == "has_cause") + { return ReferenceId::HasCause; } + + if (referenceName == "has_sub_state_machine") + { return ReferenceId::HasSubStateMachine; } + + if (referenceName == "has_true_sub_state") + { return ReferenceId::HasTrueSubState; } + + if (referenceName == "has_false_sub_state") + { return ReferenceId::HasFalseSubState; } + + throw std::logic_error(std::string("Unknown reference name '") + referenceName + std::string(referenceName)); +} + +struct Reference +{ + ReferenceId Id; + NodeId TargetNode; + bool IsForward; + NodeClass TargetClass; + QualifiedName TargetBrowseName; + LocalizedText TargetDisplayName; + NodeId TargetType; + + Reference() + : Id(ReferenceId::Unknown) + , IsForward(true) + , TargetClass(NodeClass::Unspecified) { - void operator() (xmlDocPtr doc) - { - xmlFreeDoc(doc); - } - }; + } +}; - struct LibXmlFree +struct Attribute +{ + AttributeId Id; + Variant Value; + Attribute() + : Id(AttributeId::Unknown) { - void operator() (void* ptr) - { - xmlFree(ptr); - } - }; + } + + Attribute(AttributeId id, Variant value) + : Id(id) + , Value(value) + { + } +}; + +struct INode +{ + NodeId Id; + std::map Attributes; + std::vector References; + bool IsExternal; - int xmlStrcmp(const xmlChar* xmlStr, const char* str) + INode() + : IsExternal(false) { - return ::xmlStrcmp(xmlStr, (const xmlChar*)str); } +}; - bool IsXmlNode(const xmlNode& node) +struct XmlDocDeleter +{ + void operator()(xmlDocPtr doc) { - return node.type == XML_ELEMENT_NODE; + xmlFreeDoc(doc); } +}; - bool IsXmlNode(const xmlNode& node, const char* name, bool debug = false) +struct LibXmlFree +{ + void operator()(void * ptr) { - if (node.type != XML_ELEMENT_NODE) + xmlFree(ptr); + } +}; + +int xmlStrcmp(const xmlChar * xmlStr, const char * str) +{ + return ::xmlStrcmp(xmlStr, (const xmlChar *)str); +} + +bool IsXmlNode(const xmlNode & node) +{ + return node.type == XML_ELEMENT_NODE; +} + +bool IsXmlNode(const xmlNode & node, const char * name, bool debug = false) +{ + if (node.type != XML_ELEMENT_NODE) { return false; } - if (xmlStrcmp(node.name, name)) + if (xmlStrcmp(node.name, name)) { return false; } - return true; - } - std::string GetNodeName(xmlNode& node) - { - if (!node.name) + return true; +} + +std::string GetNodeName(xmlNode & node) +{ + if (!node.name) { return std::string(); } - return (const char*)node.name; - } - std::string GetProperty(xmlNode& node, const char* propName) - { - std::unique_ptr attrValue(xmlGetProp(&node, (const xmlChar*)propName), LibXmlFree()); - const xmlChar* propValue = attrValue.get(); - if (propValue) + return (const char *)node.name; +} + +std::string GetProperty(xmlNode & node, const char * propName) +{ + std::unique_ptr attrValue(xmlGetProp(&node, (const xmlChar *)propName), LibXmlFree()); + const xmlChar * propValue = attrValue.get(); + + if (propValue) { - return (const char*)propValue; + return (const char *)propValue; } - return std::string(); - } - std::string GetNodeValue(xmlNode& node) - { - const std::string nodeValue = GetProperty(node, "value"); - if (!nodeValue.empty()) + return std::string(); +} + +std::string GetNodeValue(xmlNode & node) +{ + const std::string nodeValue = GetProperty(node, "value"); + + if (!nodeValue.empty()) { return nodeValue; } - std::unique_ptr content(xmlNodeGetContent(&node)); - if (!content) + std::unique_ptr content(xmlNodeGetContent(&node)); + + if (!content) { return std::string(); } - return (const char*)content.get(); - } - ObjectId GetObjectIdOfType(const std::string& nodeValue) - { - if (nodeValue == "bool") + return (const char *)content.get(); +} + +ObjectId GetObjectIdOfType(const std::string & nodeValue) +{ + if (nodeValue == "bool") { return ObjectId::Boolean; } - if (nodeValue == "sbyte") + + if (nodeValue == "sbyte") { return ObjectId::SByte; } - if (nodeValue == "byte") + + if (nodeValue == "byte") { return ObjectId::Byte; } - if (nodeValue == "int16") + + if (nodeValue == "int16") { return ObjectId::Int16; } - if (nodeValue == "uint16") + + if (nodeValue == "uint16") { return ObjectId::UInt16; } - if (nodeValue == "int32") + + if (nodeValue == "int32") { return ObjectId::Int32; } - if (nodeValue == "uint32") + + if (nodeValue == "uint32") { return ObjectId::UInt32; } - if (nodeValue == "string") + + if (nodeValue == "string") { return ObjectId::String; } - if (nodeValue == "enum") + + if (nodeValue == "enum") { return ObjectId::Enumeration; } - if (nodeValue == "int") + + if (nodeValue == "int") { return ObjectId::Integer; } - if (nodeValue == "byte_string") + + if (nodeValue == "byte_string") { return ObjectId::ByteString; } - if (nodeValue == "guid") + + if (nodeValue == "guid") { return ObjectId::Guid; } - if (nodeValue == "date_time") + + if (nodeValue == "date_time") { return ObjectId::DateTime; } - std::stringstream stream; - stream << "Unknown data type '" << nodeValue << "'."; - throw std::logic_error(stream.str()); - } + std::stringstream stream; + stream << "Unknown data type '" << nodeValue << "'."; + throw std::logic_error(stream.str()); +} - inline ObjectId GetObjectIdOfType(xmlNode& node) - { - return GetObjectIdOfType(GetNodeValue(node)); - } +inline ObjectId GetObjectIdOfType(xmlNode & node) +{ + return GetObjectIdOfType(GetNodeValue(node)); +} - inline VariantType ConvertToVariantType(ObjectId id) - { - switch (id) - { - case ObjectId::Null: return VariantType::NUL; - case ObjectId::Boolean: return VariantType::BOOLEAN; - case ObjectId::SByte: return VariantType::SBYTE; - case ObjectId::Byte: return VariantType::BYTE; - case ObjectId::Int16: return VariantType::INT16; - case ObjectId::UInt16: return VariantType::UINT16; - - case ObjectId::Integer: - case ObjectId::Enumeration: - case ObjectId::Int32: return VariantType::INT32; - - case ObjectId::UInt32: return VariantType::UINT32; - case ObjectId::Int64: return VariantType::INT64; - case ObjectId::UInt64: return VariantType::UINT64; - case ObjectId::Float: return VariantType::FLOAT; - case ObjectId::Double: return VariantType::DOUBLE; - case ObjectId::String: return VariantType::STRING; - case ObjectId::ByteString: return VariantType::BYTE_STRING; - case ObjectId::DateTime: return VariantType::DATE_TIME; - case ObjectId::Guid: return VariantType::GUId; - - default: - std::stringstream stream; - stream << "Cannot convert ObjectId '" << (unsigned)id << "' to VariantType."; - throw std::logic_error(stream.str()); +inline VariantType ConvertToVariantType(ObjectId id) +{ + switch (id) + { + case ObjectId::Null: + return VariantType::NUL; + + case ObjectId::Boolean: + return VariantType::BOOLEAN; + + case ObjectId::SByte: + return VariantType::SBYTE; + + case ObjectId::Byte: + return VariantType::BYTE; + + case ObjectId::Int16: + return VariantType::INT16; + + case ObjectId::UInt16: + return VariantType::UINT16; + + case ObjectId::Integer: + case ObjectId::Enumeration: + case ObjectId::Int32: + return VariantType::INT32; + + case ObjectId::UInt32: + return VariantType::UINT32; + + case ObjectId::Int64: + return VariantType::INT64; + + case ObjectId::UInt64: + return VariantType::UINT64; + + case ObjectId::Float: + return VariantType::FLOAT; + + case ObjectId::Double: + return VariantType::DOUBLE; + + case ObjectId::String: + return VariantType::STRING; + + case ObjectId::ByteString: + return VariantType::BYTE_STRING; + + case ObjectId::DateTime: + return VariantType::DATE_TIME; + + case ObjectId::Guid: + return VariantType::GUId; + + default: + std::stringstream stream; + stream << "Cannot convert ObjectId '" << (unsigned)id << "' to VariantType."; + throw std::logic_error(stream.str()); } - } +} - inline ObjectId ConvertToObjectId(VariantType type) - { - switch (type) - { - case VariantType::NUL: return ObjectId::Null; - case VariantType::BOOLEAN: return ObjectId::Boolean; - case VariantType::SBYTE: return ObjectId::SByte; - case VariantType::BYTE: return ObjectId::Byte; - case VariantType::INT16: return ObjectId::Int16; - case VariantType::UINT16: return ObjectId::UInt16; - case VariantType::INT32: return ObjectId::Int32; - case VariantType::UINT32: return ObjectId::UInt32; - case VariantType::INT64: return ObjectId::Int64; - case VariantType::UINT64: return ObjectId::UInt64; - case VariantType::FLOAT: return ObjectId::Float; - case VariantType::DOUBLE: return ObjectId::Double; - case VariantType::STRING: return ObjectId::String; - case VariantType::BYTE_STRING: return ObjectId::ByteString; - case VariantType::DATE_TIME: return ObjectId::DateTime; - case VariantType::GUId: return ObjectId::Guid; - - default: - std::stringstream stream; - stream << "Cannot convert VariantType '"<< (unsigned)type << "' to ObjectId."; - throw std::logic_error(stream.str()); +inline ObjectId ConvertToObjectId(VariantType type) +{ + switch (type) + { + case VariantType::NUL: + return ObjectId::Null; + + case VariantType::BOOLEAN: + return ObjectId::Boolean; + + case VariantType::SBYTE: + return ObjectId::SByte; + + case VariantType::BYTE: + return ObjectId::Byte; + + case VariantType::INT16: + return ObjectId::Int16; + + case VariantType::UINT16: + return ObjectId::UInt16; + + case VariantType::INT32: + return ObjectId::Int32; + + case VariantType::UINT32: + return ObjectId::UInt32; + + case VariantType::INT64: + return ObjectId::Int64; + + case VariantType::UINT64: + return ObjectId::UInt64; + + case VariantType::FLOAT: + return ObjectId::Float; + + case VariantType::DOUBLE: + return ObjectId::Double; + + case VariantType::STRING: + return ObjectId::String; + + case VariantType::BYTE_STRING: + return ObjectId::ByteString; + + case VariantType::DATE_TIME: + return ObjectId::DateTime; + + case VariantType::GUId: + return ObjectId::Guid; + + default: + std::stringstream stream; + stream << "Cannot convert VariantType '" << (unsigned)type << "' to ObjectId."; + throw std::logic_error(stream.str()); } - } +} - inline VariantType GetVariantType(xmlNode& node) - { - const ObjectId typeId = GetObjectIdOfType(GetProperty(node, "type")); - return ConvertToVariantType(typeId); - } +inline VariantType GetVariantType(xmlNode & node) +{ + const ObjectId typeId = GetObjectIdOfType(GetProperty(node, "type")); + return ConvertToVariantType(typeId); +} - NodeClass GetNodeClass(xmlNode& node) - { - const std::string nodeValue = GetNodeValue(node); - if (nodeValue == "object") +NodeClass GetNodeClass(xmlNode & node) +{ + const std::string nodeValue = GetNodeValue(node); + + if (nodeValue == "object") { return NodeClass::Object; } - if (nodeValue == "variable") + + if (nodeValue == "variable") { return NodeClass::Variable; } - if (nodeValue == "method") + + if (nodeValue == "method") { return NodeClass::Method; } - if (nodeValue == "object_type") + + if (nodeValue == "object_type") { return NodeClass::ObjectType; } - if (nodeValue == "variable_type") + + if (nodeValue == "variable_type") { return NodeClass::VariableType; } - if (nodeValue == "reference_type") + + if (nodeValue == "reference_type") { return NodeClass::ReferenceType; } - if (nodeValue == "data_type") + + if (nodeValue == "data_type") { return NodeClass::DataType; } - if (nodeValue == "data_type") + + if (nodeValue == "data_type") { return NodeClass::View; } - std::stringstream stream; - stream << "Unknown node class '" << nodeValue << "'. Line " << node.line << "."; - throw std::logic_error(stream.str()); - } - bool IsNumericNodeType(xmlNode& node) - { - const std::string propValue = GetProperty(node, "type"); - return propValue == "numeric"; - } + std::stringstream stream; + stream << "Unknown node class '" << nodeValue << "'. Line " << node.line << "."; + throw std::logic_error(stream.str()); +} - uint32_t GetNamespaceIndex(xmlNode& node) - { - const std::string propValue = GetProperty(node, "ns"); - return atoi(propValue.c_str()); - } +bool IsNumericNodeType(xmlNode & node) +{ + const std::string propValue = GetProperty(node, "type"); + return propValue == "numeric"; +} - NodeId GetNodeId(xmlNode& node) - { - std::string nodeValue = GetNodeValue(node); - if (nodeValue.empty()) +uint32_t GetNamespaceIndex(xmlNode & node) +{ + const std::string propValue = GetProperty(node, "ns"); + return atoi(propValue.c_str()); +} + +NodeId GetNodeId(xmlNode & node) +{ + std::string nodeValue = GetNodeValue(node); + + if (nodeValue.empty()) { std::stringstream stream; stream << "Empty node id. Line " << node.line << "."; throw std::logic_error(stream.str()); } - uint32_t nsIndex = GetNamespaceIndex(node); - if (IsNumericNodeType(node)) + + uint32_t nsIndex = GetNamespaceIndex(node); + + if (IsNumericNodeType(node)) { return NumericNodeId(atoi(nodeValue.c_str()), nsIndex); } - return StringNodeId(nodeValue, nsIndex); - } - bool GetBool(std::string str) - { - if (!str.empty() && (str == "false" || str == "0")) + return StringNodeId(nodeValue, nsIndex); +} + +bool GetBool(std::string str) +{ + if (!str.empty() && (str == "false" || str == "0")) { return false; } - return !str.empty(); - } - std::string GetText(xmlNode& node) - { - const std::string nodeValue = GetNodeValue(node); - if (nodeValue.empty()) + return !str.empty(); +} + +std::string GetText(xmlNode & node) +{ + const std::string nodeValue = GetNodeValue(node); + + if (nodeValue.empty()) { std::stringstream stream; stream << "Empty browse name. Line " << node.line << "."; throw std::logic_error(stream.str()); } - return nodeValue; - } + return nodeValue; +} - QualifiedName GetQualifiedName(xmlNode& node) - { - return QualifiedName(GetNamespaceIndex(node), GetText(node)); - } - LocalizedText GetLocalizedText(xmlNode& node) - { - const std::string nodeValue = GetNodeValue(node); - if (nodeValue.empty()) +QualifiedName GetQualifiedName(xmlNode & node) +{ + return QualifiedName(GetNamespaceIndex(node), GetText(node)); +} + +LocalizedText GetLocalizedText(xmlNode & node) +{ + const std::string nodeValue = GetNodeValue(node); + + if (nodeValue.empty()) { std::stringstream stream; stream << "Empty browse name. Line " << node.line << "."; throw std::logic_error(stream.str()); } - return LocalizedText(nodeValue); - } - uint32_t GetUInt32(xmlNode& node) - { - const std::string nodeValue = GetNodeValue(node); - if (nodeValue.empty()) + return LocalizedText(nodeValue); +} + +uint32_t GetUInt32(xmlNode & node) +{ + const std::string nodeValue = GetNodeValue(node); + + if (nodeValue.empty()) { std::stringstream stream; stream << "Empty opcua attribute value. Line " << node.line << "."; throw std::logic_error(stream.str()); } - return atoi(nodeValue.c_str()); - } - int32_t GetInt32(xmlNode& node) - { - const std::string nodeValue = GetNodeValue(node); - if (nodeValue.empty()) + return atoi(nodeValue.c_str()); +} + +int32_t GetInt32(xmlNode & node) +{ + const std::string nodeValue = GetNodeValue(node); + + if (nodeValue.empty()) { std::stringstream stream; stream << "Empty opcua attribute value. Line " << node.line << "."; throw std::logic_error(stream.str()); } - return atoi(nodeValue.c_str()); - } + return atoi(nodeValue.c_str()); +} - bool GetBool(xmlNode& node) - { - const std::string nodeValue = GetNodeValue(node); - return GetBool(nodeValue); - } - Variant GetVariantValue(OpcUa::VariantType type, xmlNode& node) - { - const std::string nodeValue = GetNodeValue(node); - switch (type) - { - case VariantType::SBYTE: - return Variant((int8_t)strtol(nodeValue.c_str(), nullptr, 0)); - case VariantType::BYTE: - return Variant((uint8_t)strtol(nodeValue.c_str(), nullptr, 0)); - case VariantType::INT16: - return Variant((int16_t)strtol(nodeValue.c_str(), nullptr, 0)); - case VariantType::UINT16: - return Variant((uint16_t)strtol(nodeValue.c_str(), nullptr, 0)); - case VariantType::INT32: - return Variant((int32_t)strtol(nodeValue.c_str(), nullptr, 0)); - case VariantType::UINT32: - return Variant((uint32_t)strtol(nodeValue.c_str(), nullptr, 0)); - case VariantType::INT64: - return Variant((int64_t)strtoll(nodeValue.c_str(), nullptr, 0)); - case VariantType::UINT64: - return Variant((int64_t)strtoll(nodeValue.c_str(), nullptr, 0)); - case VariantType::FLOAT: - return Variant(strtof(nodeValue.c_str(), nullptr)); - case VariantType::DOUBLE: - return Variant(strtod(nodeValue.c_str(), nullptr)); - // TODO check for other types. - case VariantType::NUL: - return Variant(); - - case VariantType::STRING: - default: - break; - } - return Variant(nodeValue); - } +bool GetBool(xmlNode & node) +{ + const std::string nodeValue = GetNodeValue(node); + return GetBool(nodeValue); +} - OpcUa::AttributeId GetAttributeId(xmlNode& node) - { - if (IsXmlNode(node, "id")) - return AttributeId::NodeId; - else if (IsXmlNode(node, "class")) - return AttributeId::NodeClass; - else if (IsXmlNode(node, "browse_name")) - return AttributeId::BrowseName; - else if (IsXmlNode(node, "display_name")) - return AttributeId::DisplayName; - else if (IsXmlNode(node, "description")) - return AttributeId::Description; - else if (IsXmlNode(node, "write_mask")) - return AttributeId::WriteMask; - else if (IsXmlNode(node, "user_write_mask")) - return AttributeId::UserWriteMask; - else if (IsXmlNode(node, "is_abstract")) - return AttributeId::IsAbstract; - else if (IsXmlNode(node, "symmetric")) - return AttributeId::Symmetric; - else if (IsXmlNode(node, "inverse_name")) - return AttributeId::InverseName; - else if (IsXmlNode(node, "contains_no_loops")) - return AttributeId::ContainsNoLoops; - else if (IsXmlNode(node, "event_notifier")) - return AttributeId::EventNotifier; - else if (IsXmlNode(node, "value")) - return AttributeId::Value; - else if (IsXmlNode(node, "value_rank")) - return AttributeId::ValueRank; - else if (IsXmlNode(node, "data_type")) - return AttributeId::DataType; - else if (IsXmlNode(node, "array_dimensions")) - return AttributeId::ArrayDimensions; - else if (IsXmlNode(node, "access_level")) - return AttributeId::AccessLevel; - else if (IsXmlNode(node, "user_access_level")) - return AttributeId::UserAccessLevel; - else if (IsXmlNode(node, "minimum_sampling_interval")) - return AttributeId::MinimumSamplingInterval; - else if (IsXmlNode(node, "historizing")) - return AttributeId::Historizing; - else if (IsXmlNode(node, "executable")) - return AttributeId::Executable; - else if (IsXmlNode(node, "user_executable")) - return AttributeId::UserExecutable; - - return AttributeId::Unknown; - } +Variant GetVariantValue(OpcUa::VariantType type, xmlNode & node) +{ + const std::string nodeValue = GetNodeValue(node); - Variant GetAttributeValue(OpcUa::AttributeId id, xmlNode& node) - { - switch (id) + switch (type) { - case AttributeId::NodeId: - return Variant(GetNodeId(node)); + case VariantType::SBYTE: + return Variant((int8_t)strtol(nodeValue.c_str(), nullptr, 0)); - case AttributeId::NodeClass: - return Variant((int32_t)GetNodeClass(node)); + case VariantType::BYTE: + return Variant((uint8_t)strtol(nodeValue.c_str(), nullptr, 0)); - case AttributeId::DisplayName: - return Variant(GetLocalizedText(node)); + case VariantType::INT16: + return Variant((int16_t)strtol(nodeValue.c_str(), nullptr, 0)); - case AttributeId::BrowseName: - return Variant(GetQualifiedName(node)); + case VariantType::UINT16: + return Variant((uint16_t)strtol(nodeValue.c_str(), nullptr, 0)); - case AttributeId::Description: - case AttributeId::InverseName: - return Variant(GetText(node)); + case VariantType::INT32: + return Variant((int32_t)strtol(nodeValue.c_str(), nullptr, 0)); - case AttributeId::EventNotifier: - return Variant(std::vector{0}); + case VariantType::UINT32: + return Variant((uint32_t)strtol(nodeValue.c_str(), nullptr, 0)); - case AttributeId::ValueRank: - return Variant(GetInt32(node)); + case VariantType::INT64: + return Variant((int64_t)strtoll(nodeValue.c_str(), nullptr, 0)); - case AttributeId::WriteMask: - case AttributeId::UserWriteMask: - case AttributeId::ArrayDimensions: - case AttributeId::AccessLevel: - case AttributeId::UserAccessLevel: - case AttributeId::MinimumSamplingInterval: - return Variant(GetUInt32(node)); + case VariantType::UINT64: + return Variant((int64_t)strtoll(nodeValue.c_str(), nullptr, 0)); - case AttributeId::IsAbstract: - case AttributeId::Symmetric: - case AttributeId::ContainsNoLoops: - case AttributeId::Historizing: - case AttributeId::Executable: - case AttributeId::UserExecutable: - return Variant(GetBool(node)); + case VariantType::FLOAT: + return Variant(strtof(nodeValue.c_str(), nullptr)); - case AttributeId::Value: - break; + case VariantType::DOUBLE: + return Variant(strtod(nodeValue.c_str(), nullptr)); - case AttributeId::DataType: - return Variant(GetObjectIdOfType(node)); + // TODO check for other types. + case VariantType::NUL: + return Variant(); - default: - return Variant(GetText(node)); + case VariantType::STRING: + default: + break; } - const VariantType type = GetVariantType(node); - return GetVariantValue(type, node); - } - class AttributesCollector : private Internal::XmlProcessor - { - public: - AttributesCollector(INode& node, bool debug) - : OpcUaNode(node) - , Debug(debug) + return Variant(nodeValue); +} + +OpcUa::AttributeId GetAttributeId(xmlNode & node) +{ + if (IsXmlNode(node, "id")) + { return AttributeId::NodeId; } + + else if (IsXmlNode(node, "class")) + { return AttributeId::NodeClass; } + + else if (IsXmlNode(node, "browse_name")) + { return AttributeId::BrowseName; } + + else if (IsXmlNode(node, "display_name")) + { return AttributeId::DisplayName; } + + else if (IsXmlNode(node, "description")) + { return AttributeId::Description; } + + else if (IsXmlNode(node, "write_mask")) + { return AttributeId::WriteMask; } + + else if (IsXmlNode(node, "user_write_mask")) + { return AttributeId::UserWriteMask; } + + else if (IsXmlNode(node, "is_abstract")) + { return AttributeId::IsAbstract; } + + else if (IsXmlNode(node, "symmetric")) + { return AttributeId::Symmetric; } + + else if (IsXmlNode(node, "inverse_name")) + { return AttributeId::InverseName; } + + else if (IsXmlNode(node, "contains_no_loops")) + { return AttributeId::ContainsNoLoops; } + + else if (IsXmlNode(node, "event_notifier")) + { return AttributeId::EventNotifier; } + + else if (IsXmlNode(node, "value")) + { return AttributeId::Value; } + + else if (IsXmlNode(node, "value_rank")) + { return AttributeId::ValueRank; } + + else if (IsXmlNode(node, "data_type")) + { return AttributeId::DataType; } + + else if (IsXmlNode(node, "array_dimensions")) + { return AttributeId::ArrayDimensions; } + + else if (IsXmlNode(node, "access_level")) + { return AttributeId::AccessLevel; } + + else if (IsXmlNode(node, "user_access_level")) + { return AttributeId::UserAccessLevel; } + + else if (IsXmlNode(node, "minimum_sampling_interval")) + { return AttributeId::MinimumSamplingInterval; } + + else if (IsXmlNode(node, "historizing")) + { return AttributeId::Historizing; } + + else if (IsXmlNode(node, "executable")) + { return AttributeId::Executable; } + + else if (IsXmlNode(node, "user_executable")) + { return AttributeId::UserExecutable; } + + return AttributeId::Unknown; +} + +Variant GetAttributeValue(OpcUa::AttributeId id, xmlNode & node) +{ + switch (id) { + case AttributeId::NodeId: + return Variant(GetNodeId(node)); + + case AttributeId::NodeClass: + return Variant((int32_t)GetNodeClass(node)); + + case AttributeId::DisplayName: + return Variant(GetLocalizedText(node)); + + case AttributeId::BrowseName: + return Variant(GetQualifiedName(node)); + + case AttributeId::Description: + case AttributeId::InverseName: + return Variant(GetText(node)); + + case AttributeId::EventNotifier: + return Variant(std::vector {0}); + + case AttributeId::ValueRank: + return Variant(GetInt32(node)); + + case AttributeId::WriteMask: + case AttributeId::UserWriteMask: + case AttributeId::ArrayDimensions: + case AttributeId::AccessLevel: + case AttributeId::UserAccessLevel: + case AttributeId::MinimumSamplingInterval: + return Variant(GetUInt32(node)); + + case AttributeId::IsAbstract: + case AttributeId::Symmetric: + case AttributeId::ContainsNoLoops: + case AttributeId::Historizing: + case AttributeId::Executable: + case AttributeId::UserExecutable: + return Variant(GetBool(node)); + + case AttributeId::Value: + break; + + case AttributeId::DataType: + return Variant(GetObjectIdOfType(node)); + + default: + return Variant(GetText(node)); } - virtual void Process(xmlNode& node) - { - for (xmlNodePtr subNode = node.children; subNode; subNode = subNode->next) + const VariantType type = GetVariantType(node); + return GetVariantValue(type, node); +} + +class AttributesCollector : private Internal::XmlProcessor +{ +public: + AttributesCollector(INode & node, bool debug) + : OpcUaNode(node) + , Debug(debug) + { + } + + virtual void Process(xmlNode & node) + { + for (xmlNodePtr subNode = node.children; subNode; subNode = subNode->next) { if (!IsXmlNode(*subNode)) - { - continue; - } + { + continue; + } + const AttributeId attribute = GetAttributeId(*subNode); + if (attribute == AttributeId::NodeId) - { - OpcUaNode.Id = GetNodeId(*subNode); - continue; - } + { + OpcUaNode.Id = GetNodeId(*subNode); + continue; + } const Variant value = GetAttributeValue(attribute, *subNode); AddAttribute(attribute, value); } - // If tag 'data_type' is absent in the xml then need to add data type which will be based on type of value. - if (!HasAttribute(AttributeId::DataType) && HasAttribute(AttributeId::Value)) + // If tag 'data_type' is absent in the xml then need to add data type which will be based on type of value. + if (!HasAttribute(AttributeId::DataType) && HasAttribute(AttributeId::Value)) { AddAttribute(AttributeId::DataType, GetDataType(AttributeId::Value)); } - } + } - private: - bool IsAttributes(const xmlNode& node) const - { - return IsXmlNode(node, "attributes"); - } +private: + bool IsAttributes(const xmlNode & node) const + { + return IsXmlNode(node, "attributes"); + } - template - void AddAttribute(AttributeId attr, const T& value) - { - OpcUaNode.Attributes.insert(std::make_pair(attr, Variant(value))); - } + template + void AddAttribute(AttributeId attr, const T & value) + { + OpcUaNode.Attributes.insert(std::make_pair(attr, Variant(value))); + } - bool HasAttribute(AttributeId attr) const - { - return OpcUaNode.Attributes.find(AttributeId::DataType) != OpcUaNode.Attributes.end(); - } + bool HasAttribute(AttributeId attr) const + { + return OpcUaNode.Attributes.find(AttributeId::DataType) != OpcUaNode.Attributes.end(); + } - ObjectId GetDataType(AttributeId attr) const - { - auto attrPos = OpcUaNode.Attributes.find(attr); - if (attrPos == OpcUaNode.Attributes.end()) + ObjectId GetDataType(AttributeId attr) const + { + auto attrPos = OpcUaNode.Attributes.find(attr); + + if (attrPos == OpcUaNode.Attributes.end()) { return ObjectId::Null; } - return ConvertToObjectId(attrPos->second.Type()); - } - private: - INode& OpcUaNode; - const bool Debug; - }; + return ConvertToObjectId(attrPos->second.Type()); + } - class ReferencesCollector : private Internal::XmlProcessor +private: + INode & OpcUaNode; + const bool Debug; +}; + +class ReferencesCollector : private Internal::XmlProcessor +{ +public: + ReferencesCollector(INode & node, bool debug) + : OpcUaNode(node) + , Debug(debug) { - public: - ReferencesCollector(INode& node, bool debug) - : OpcUaNode(node) - , Debug(debug) - { - } + } - virtual void Process(xmlNode& node) - { - for (xmlNodePtr refNode = node.children; refNode; refNode = refNode->next) + virtual void Process(xmlNode & node) + { + for (xmlNodePtr refNode = node.children; refNode; refNode = refNode->next) { if (!IsXmlNode(*refNode)) - { - continue; - } + { + continue; + } try - { - AddReferenceToNode(*refNode); - } - catch (const std::exception& exc) - { - std::cerr << exc.what() << std::endl; - } + { + AddReferenceToNode(*refNode); + } + + catch (const std::exception & exc) + { + std::cerr << exc.what() << std::endl; + } } - } + } - private: - void AddReferenceToNode(xmlNode& refNode) - { - const std::string refName = GetNodeName(refNode); - const NodeId targetNode = GetNodeId(refNode); - Reference reference; - reference.Id = GetReferenceId(refName); +private: + void AddReferenceToNode(xmlNode & refNode) + { + const std::string refName = GetNodeName(refNode); + const NodeId targetNode = GetNodeId(refNode); + Reference reference; + reference.Id = GetReferenceId(refName); - for (xmlNodePtr subNode = refNode.children; subNode; subNode = subNode->next) + for (xmlNodePtr subNode = refNode.children; subNode; subNode = subNode->next) { if (!IsXmlNode(*subNode)) - { - continue; - } + { + continue; + } + + const std::string & nodeName = GetNodeName(*subNode); - const std::string& nodeName = GetNodeName(*subNode); if (nodeName == "id") - { - reference.TargetNode = GetNodeId(*subNode); - } + { + reference.TargetNode = GetNodeId(*subNode); + } + else if (nodeName == "class") - { - reference.TargetClass = GetNodeClass(*subNode); - } + { + reference.TargetClass = GetNodeClass(*subNode); + } + else if (nodeName == "browse_name") - { - reference.TargetBrowseName = GetQualifiedName(*subNode); - } + { + reference.TargetBrowseName = GetQualifiedName(*subNode); + } + else if (nodeName == "display_name") - { - reference.TargetDisplayName = GetLocalizedText(*subNode); - } + { + reference.TargetDisplayName = GetLocalizedText(*subNode); + } + else if (nodeName == "is_forward") - { - reference.IsForward = GetBool(GetNodeValue(*subNode)); - } + { + reference.IsForward = GetBool(GetNodeValue(*subNode)); + } + else if (nodeName == "type_definition") - { - reference.TargetType = GetNodeId(*subNode); - } + { + reference.TargetType = GetNodeId(*subNode); + } } - EnsureValid(reference, refNode.line); - OpcUaNode.References.push_back(reference); - } + EnsureValid(reference, refNode.line); + OpcUaNode.References.push_back(reference); + } - private: - void EnsureValid(const Reference& ref, int lineNum) const - { - std::stringstream stream; - if (ref.Id == ReferenceId::Unknown) +private: + void EnsureValid(const Reference & ref, int lineNum) const + { + std::stringstream stream; + + if (ref.Id == ReferenceId::Unknown) { stream << "Unknown reference type. line" << lineNum << "."; throw std::logic_error(stream.str()); } - if (ref.TargetNode == NodeId()) + + if (ref.TargetNode == NodeId()) { stream << "Empty target node Id. line" << lineNum << "."; throw std::logic_error(stream.str()); } - } + } - private: - INode& OpcUaNode; - const bool Debug; - }; +private: + INode & OpcUaNode; + const bool Debug; +}; - class NodesCollector : private Internal::XmlProcessor +class NodesCollector : private Internal::XmlProcessor +{ +public: + NodesCollector(std::map & nodes, bool debug) + : Nodes(nodes) + , Debug(debug) { - public: - NodesCollector(std::map& nodes, bool debug) - : Nodes(nodes) - , Debug(debug) - { - } + } - virtual void Process(xmlNode& node) - { - if (!IsXmlNode(node)) + virtual void Process(xmlNode & node) + { + if (!IsXmlNode(node)) { return; } - INode opcuaNode; - if (IsXmlNode(node, "node")) + INode opcuaNode; + + if (IsXmlNode(node, "node")) { opcuaNode.IsExternal = false; } - else if (IsXmlNode(node, "external")) + + else if (IsXmlNode(node, "external")) { opcuaNode.IsExternal = true; } - else + + else { if (Debug) - { - std::cerr << "Unknown node '" << node.name << "' at line " << node.line << "." << std::endl; - } + { + std::cerr << "Unknown node '" << node.name << "' at line " << node.line << "." << std::endl; + } + return; } - FillNode(node, opcuaNode); - EnsureNodeIsValid(opcuaNode, node); - Nodes.insert(std::make_pair(opcuaNode.Id, opcuaNode)); - } + FillNode(node, opcuaNode); + EnsureNodeIsValid(opcuaNode, node); + Nodes.insert(std::make_pair(opcuaNode.Id, opcuaNode)); + } - private: - void EnsureNodeIsValid(const INode& opcuaNode, const xmlNode& node) const - { - if (opcuaNode.Id == NodeId()) +private: + void EnsureNodeIsValid(const INode & opcuaNode, const xmlNode & node) const + { + if (opcuaNode.Id == NodeId()) { std::stringstream stream; stream << "INode at line '" << node.line << "' has no Id."; throw std::logic_error(stream.str()); } - } + } - void FillNode(const xmlNode& node, INode& opcuaNode) const - { - AttributesCollector attributeCollector(opcuaNode, Debug); - ReferencesCollector referencCollector(opcuaNode, Debug); + void FillNode(const xmlNode & node, INode & opcuaNode) const + { + AttributesCollector attributeCollector(opcuaNode, Debug); + ReferencesCollector referencCollector(opcuaNode, Debug); - for (xmlNodePtr subNode = node.children; subNode; subNode = subNode->next) + for (xmlNodePtr subNode = node.children; subNode; subNode = subNode->next) { if (IsXmlNode(*subNode, "attributes")) - { - attributeCollector.Process(*subNode); - continue; - } + { + attributeCollector.Process(*subNode); + continue; + } + else if (IsXmlNode(*subNode, "references")) - { - referencCollector.Process(*subNode); - } + { + referencCollector.Process(*subNode); + } + else if (Debug) - { - std::cerr << "Unknown node '" << subNode->name << "' at line " << subNode->line << "." << std::endl; - } + { + std::cerr << "Unknown node '" << subNode->name << "' at line " << subNode->line << "." << std::endl; + } } - } + } - private: - std::map& Nodes; - const bool Debug; - }; +private: + std::map & Nodes; + const bool Debug; +}; - class ConfigurationProcessor +class ConfigurationProcessor +{ +public: + ConfigurationProcessor(bool debug) + : Debug(debug) { - public: - ConfigurationProcessor(bool debug) - : Debug(debug) - { - } + } - std::map Process(xmlDoc& doc) - { - xmlNodePtr rootNode = xmlDocGetRootElement(&doc); - EnsureRootNodeValid(*rootNode); + std::map Process(xmlDoc & doc) + { + xmlNodePtr rootNode = xmlDocGetRootElement(&doc); + EnsureRootNodeValid(*rootNode); + + std::map nodes; + NodesCollector nodesBuilder(nodes, Debug); - std::map nodes; - NodesCollector nodesBuilder(nodes, Debug); - for (xmlNodePtr cur = rootNode->children; cur; cur = cur->next) + for (xmlNodePtr cur = rootNode->children; cur; cur = cur->next) { nodesBuilder.Process(*cur); } - return nodes; - } + return nodes; + } - private: - void EnsureRootNodeValid(xmlNode& rootNode) - { - if (rootNode.type != XML_ELEMENT_NODE) +private: + void EnsureRootNodeValid(xmlNode & rootNode) + { + if (rootNode.type != XML_ELEMENT_NODE) { throw std::logic_error("Root element is not a node.'"); } - if (xmlStrcmp(rootNode.name, "address_space")) + + if (xmlStrcmp(rootNode.name, "address_space")) { - throw std::logic_error(std::string("Invalid root element '") + (const char*)rootNode.name + std::string("'.")); + throw std::logic_error(std::string("Invalid root element '") + (const char *)rootNode.name + std::string("'.")); } - std::unique_ptr versionBuf(xmlGetProp(&rootNode, (const xmlChar*)"version"), LibXmlFree()); - const xmlChar* version = versionBuf.get(); - if (!version) + + std::unique_ptr versionBuf(xmlGetProp(&rootNode, (const xmlChar *)"version"), LibXmlFree()); + const xmlChar * version = versionBuf.get(); + + if (!version) { throw std::logic_error("Address space element has no 'version' attribute."); } - if (xmlStrcmp(version, "1")) + + if (xmlStrcmp(version, "1")) { - throw std::logic_error(std::string("Unknown version '") + (const char*)version + std::string("'of address space.")); + throw std::logic_error(std::string("Unknown version '") + (const char *)version + std::string("'of address space.")); } - } + } - private: - const bool Debug; - }; +private: + const bool Debug; +}; - std::map ParseConfig(const char* configPath, bool debug) - { - std::unique_ptr doc(xmlParseFile(configPath), XmlDocDeleter()); - if (!doc) +std::map ParseConfig(const char * configPath, bool debug) +{ + std::unique_ptr doc(xmlParseFile(configPath), XmlDocDeleter()); + + if (!doc) { throw std::logic_error(std::string("Cannot load file '") + std::string(configPath) + std::string("'")); } - ConfigurationProcessor xmlConfiguration(debug); - return xmlConfiguration.Process(*doc); - } + + ConfigurationProcessor xmlConfiguration(debug); + return xmlConfiguration.Process(*doc); +} - class NodesRegistrator +class NodesRegistrator +{ +public: + NodesRegistrator(OpcUa::NodeManagementServices & registry, bool debug) + : Registry(registry) + , Debug(debug) { - public: - NodesRegistrator(OpcUa::NodeManagementServices& registry, bool debug) - : Registry(registry) - , Debug(debug) - { - } + } - void RegisterNodes(const std::map& nodes) - { - for (const auto& node : nodes) + void RegisterNodes(const std::map & nodes) + { + for (const auto & node : nodes) { if (!node.second.IsExternal) - { - RegisterNode(node.second); - } + { + RegisterNode(node.second); + } + AddReferences(node.second); } - } + } - private: - void RegisterNode(const INode& node) - { - //Registry.AddAttribute(node.Id, AttributeId::NodeId, Variant(node.Id)); - for (const std::pair& attr : node.Attributes) +private: + void RegisterNode(const INode & node) + { + //Registry.AddAttribute(node.Id, AttributeId::NodeId, Variant(node.Id)); + for (const std::pair & attr : node.Attributes) { //Registry.AddAttribute(node.Id, attr.first, attr.second); } - } + } - void AddReferences(const INode& node) - { - for (const Reference& ref : node.References) + void AddReferences(const INode & node) + { + for (const Reference & ref : node.References) { ReferenceDescription desc; desc.BrowseName = ref.TargetBrowseName; @@ -986,31 +1181,31 @@ namespace desc.TargetNodeTypeDefinition = ref.TargetType; //Registry.AddReference(node.Id, desc); } - } + } - private: - OpcUa::NodeManagementServices& Registry; - const bool Debug; - }; +private: + OpcUa::NodeManagementServices & Registry; + const bool Debug; +}; } // namespace namespace OpcUa { - namespace Internal - { +namespace Internal +{ - XmlAddressSpaceLoader::XmlAddressSpaceLoader(OpcUa::NodeManagementServices& registry, bool debug) - : Registry(registry) - , Debug(debug) - { - } +XmlAddressSpaceLoader::XmlAddressSpaceLoader(OpcUa::NodeManagementServices & registry, bool debug) + : Registry(registry) + , Debug(debug) +{ +} - void XmlAddressSpaceLoader::Load(const char* fileName) - { - std::map nodes = ParseConfig(fileName, Debug); - NodesRegistrator reg(Registry, Debug); - reg.RegisterNodes(nodes); - } +void XmlAddressSpaceLoader::Load(const char * fileName) +{ + std::map nodes = ParseConfig(fileName, Debug); + NodesRegistrator reg(Registry, Debug); + reg.RegisterNodes(nodes); +} - } // namespace Internal +} // namespace Internal } // namespace OpcUa diff --git a/src/server/xml_address_space_loader.h b/src/server/xml_address_space_loader.h index 5fb48336..3e629b31 100644 --- a/src/server/xml_address_space_loader.h +++ b/src/server/xml_address_space_loader.h @@ -19,63 +19,63 @@ namespace OpcUa { - namespace Internal - { +namespace Internal +{ - class XmlAddressSpaceLoader : private Common::Interface - { - public: - DEFINE_CLASS_POINTERS(XmlAddressSpaceLoader) +class XmlAddressSpaceLoader : private Common::Interface +{ +public: + DEFINE_CLASS_POINTERS(XmlAddressSpaceLoader) - public: - explicit XmlAddressSpaceLoader(OpcUa::NodeManagementServices& registry, bool debug = false); +public: + explicit XmlAddressSpaceLoader(OpcUa::NodeManagementServices & registry, bool debug = false); - void Load(const char* fileName); + void Load(const char * fileName); - void Load(const std::string& fileName) - { - Load(fileName.c_str()); - } + void Load(const std::string & fileName) + { + Load(fileName.c_str()); + } - private: - OpcUa::NodeManagementServices& Registry; - const bool Debug; - }; +private: + OpcUa::NodeManagementServices & Registry; + const bool Debug; +}; - class XmlAddressSpaceAddon : public OpcUa::Server::XmlAddressSpace - { - public: - DEFINE_CLASS_POINTERS(XmlAddressSpaceAddon) +class XmlAddressSpaceAddon : public OpcUa::Server::XmlAddressSpace +{ +public: + DEFINE_CLASS_POINTERS(XmlAddressSpaceAddon) - public: - virtual void Initialize(Common::AddonsManager& addons, const Common::AddonParameters& params); - virtual void Stop(); +public: + virtual void Initialize(Common::AddonsManager & addons, const Common::AddonParameters & params); + virtual void Stop(); - virtual void Load(const char* path); + virtual void Load(const char * path); - private: - void Load(const char* file, OpcUa::NodeManagementServices& registry); +private: + void Load(const char * file, OpcUa::NodeManagementServices & registry); - private: - NodeManagementServices::SharedPtr Registry; - }; +private: + NodeManagementServices::SharedPtr Registry; +}; - class XmlAddressSpaceAddonFactory : public Common::AddonFactory - { - public: - DEFINE_CLASS_POINTERS(XmlAddressSpaceAddonFactory) +class XmlAddressSpaceAddonFactory : public Common::AddonFactory +{ +public: + DEFINE_CLASS_POINTERS(XmlAddressSpaceAddonFactory) - public: - virtual Common::Addon::UniquePtr CreateAddon() - { - return Common::Addon::UniquePtr(new XmlAddressSpaceAddon()); - } - }; +public: + virtual Common::Addon::UniquePtr CreateAddon() + { + return Common::Addon::UniquePtr(new XmlAddressSpaceAddon()); + } +}; - const char XmlAddressSpaceAddonId[] = "xml_address_space_loader"; +const char XmlAddressSpaceAddonId[] = "xml_address_space_loader"; - } // namespace Internal +} // namespace Internal } // namespace OpcUa diff --git a/src/server/xml_processor.h b/src/server/xml_processor.h index 354e455e..57e86a5f 100644 --- a/src/server/xml_processor.h +++ b/src/server/xml_processor.h @@ -17,16 +17,16 @@ namespace OpcUa { - namespace Internal - { +namespace Internal +{ - class XmlProcessor : private Common::Interface - { - public: - virtual void Process(xmlNode& node) = 0; - }; +class XmlProcessor : private Common::Interface +{ +public: + virtual void Process(xmlNode & node) = 0; +}; - } // namespace Internal +} // namespace Internal } // namespace OpcUa diff --git a/src/serverapp/daemon.cpp b/src/serverapp/daemon.cpp index 72f9be44..cd65a42b 100644 --- a/src/serverapp/daemon.cpp +++ b/src/serverapp/daemon.cpp @@ -14,26 +14,26 @@ namespace OpcUa { - Daemon::Daemon() - { - SetTerminateHandlers(); - } - - Daemon::~Daemon() - { - } - - void Daemon::WaitForTerminate() - { - std::unique_lock lock(Mutex); - ExitEvent.wait(lock, [this](){ return Terminating; }); - } - - void Daemon::Terminate() - { - Terminating = true; - ExitEvent.notify_all(); - } +Daemon::Daemon() +{ + SetTerminateHandlers(); +} + +Daemon::~Daemon() +{ +} + +void Daemon::WaitForTerminate() +{ + std::unique_lock lock(Mutex); + ExitEvent.wait(lock, [this]() { return Terminating; }); +} + +void Daemon::Terminate() +{ + Terminating = true; + ExitEvent.notify_all(); +} } diff --git a/src/serverapp/daemon.h b/src/serverapp/daemon.h index 64e4cf1d..ed6c548a 100644 --- a/src/serverapp/daemon.h +++ b/src/serverapp/daemon.h @@ -15,28 +15,28 @@ namespace OpcUa { - class Daemon - { - public: - DEFINE_CLASS_POINTERS(Daemon) +class Daemon +{ +public: + DEFINE_CLASS_POINTERS(Daemon) - public: - Daemon(); - ~Daemon(); +public: + Daemon(); + ~Daemon(); - void Daemonize(const std::string& str); - void WaitForTerminate(); + void Daemonize(const std::string & str); + void WaitForTerminate(); - void Terminate(); + void Terminate(); - private: - void SetTerminateHandlers(); +private: + void SetTerminateHandlers(); - private: - std::mutex Mutex; - std::condition_variable ExitEvent; - volatile bool Terminating = false; - }; +private: + std::mutex Mutex; + std::condition_variable ExitEvent; + volatile bool Terminating = false; +}; } // namespace OpcUa diff --git a/src/serverapp/daemon_lin.cpp b/src/serverapp/daemon_lin.cpp index 966a4c20..ec57d88e 100644 --- a/src/serverapp/daemon_lin.cpp +++ b/src/serverapp/daemon_lin.cpp @@ -28,77 +28,85 @@ namespace { - OpcUa::Daemon* DaemonInstance = 0; +OpcUa::Daemon * DaemonInstance = 0; - void TerminateSignal(int signum) - { - std::cout << "terminating.." << std::endl; - if (DaemonInstance) +void TerminateSignal(int signum) +{ + std::cout << "terminating.." << std::endl; + + if (DaemonInstance) { DaemonInstance->Terminate(); DaemonInstance = nullptr; } - } +} } namespace OpcUa { - void Daemon::SetTerminateHandlers() - { - if (signal(SIGTERM, TerminateSignal) == SIG_ERR) +void Daemon::SetTerminateHandlers() +{ + if (signal(SIGTERM, TerminateSignal) == SIG_ERR) { std::cerr << "unable to set SIGTERM handler" << std::endl; } - if (signal(SIGINT, TerminateSignal) == SIG_ERR) + + if (signal(SIGINT, TerminateSignal) == SIG_ERR) { std::cerr << "unable to set SIGINT handler" << std::endl; } - if (signal(SIGSTOP, TerminateSignal) == SIG_ERR) + + if (signal(SIGSTOP, TerminateSignal) == SIG_ERR) { std::cerr << "unable to set SIGSTOP handler" << std::endl; } - DaemonInstance = this; - } - void Daemon::Daemonize(const std::string& logFile) - { - pid_t pid, sid; + DaemonInstance = this; +} + +void Daemon::Daemonize(const std::string & logFile) +{ + pid_t pid, sid; + + pid = fork(); - pid = fork(); - if (pid < 0) + if (pid < 0) { std::cerr << "Failed to fork: " << strerror(errno) << std::endl; exit(EXIT_FAILURE); } - if (pid > 0) + + if (pid > 0) { exit(EXIT_SUCCESS); } - umask(0); + umask(0); - sid = setsid(); - if (sid < 0) + sid = setsid(); + + if (sid < 0) { std::cerr << "setsid() failed: " << strerror(errno) << std::endl; exit(EXIT_FAILURE); } - if ((chdir("/")) < 0) + if ((chdir("/")) < 0) { std::cerr << "Cannot change dir. " << strerror(errno) << std::endl; exit(EXIT_FAILURE); } - if (!logFile.empty()) + if (!logFile.empty()) { - FILE* tmp = fopen(logFile.c_str(), "w"); + FILE * tmp = fopen(logFile.c_str(), "w"); + if (!tmp) - { - std::cerr << "Cannot open log file " << logFile << ". " << strerror(errno) << std::endl; - exit(EXIT_FAILURE); - } + { + std::cerr << "Cannot open log file " << logFile << ". " << strerror(errno) << std::endl; + exit(EXIT_FAILURE); + } close(STDIN_FILENO); close(STDOUT_FILENO); @@ -107,5 +115,5 @@ namespace OpcUa dup2(fileno(tmp), STDOUT_FILENO); dup2(fileno(tmp), STDERR_FILENO); } - } +} } diff --git a/src/serverapp/daemon_win.cpp b/src/serverapp/daemon_win.cpp index 87e0fa46..95718622 100644 --- a/src/serverapp/daemon_win.cpp +++ b/src/serverapp/daemon_win.cpp @@ -8,7 +8,7 @@ /// http://www.gnu.org/licenses/lgpl.html) /// -#include +#include #include "daemon.h" #include @@ -19,50 +19,52 @@ namespace { - OpcUa::Daemon* DaemonInstance = 0; +OpcUa::Daemon * DaemonInstance = 0; - BOOL CtrlHandler( DWORD fdwCtrlType ) - { - switch( fdwCtrlType ) - { - // Handle the CTRL-C signal. - case CTRL_C_EVENT: - case CTRL_CLOSE_EVENT: - case CTRL_BREAK_EVENT: - case CTRL_LOGOFF_EVENT: - case CTRL_SHUTDOWN_EVENT: +BOOL CtrlHandler(DWORD fdwCtrlType) +{ + switch (fdwCtrlType) + { + // Handle the CTRL-C signal. + case CTRL_C_EVENT: + case CTRL_CLOSE_EVENT: + case CTRL_BREAK_EVENT: + case CTRL_LOGOFF_EVENT: + case CTRL_SHUTDOWN_EVENT: - if (DaemonInstance) + if (DaemonInstance) { std::cout << "terminating.." << std::endl; DaemonInstance->Terminate(); DaemonInstance = nullptr; } - return TRUE; - default: - return FALSE; - } - } + return TRUE; + + default: + return FALSE; + } +} } namespace OpcUa { - void Daemon::Daemonize(const std::string& logFile) - { - // TODO Implement windows srvice behavior. - } +void Daemon::Daemonize(const std::string & logFile) +{ + // TODO Implement windows srvice behavior. +} - void Daemon::SetTerminateHandlers() - { - if(!SetConsoleCtrlHandler( (PHANDLER_ROUTINE) CtrlHandler, TRUE)) +void Daemon::SetTerminateHandlers() +{ + if (!SetConsoleCtrlHandler((PHANDLER_ROUTINE) CtrlHandler, TRUE)) { std::cerr << "Cannot set terminate handler. Application may not response on exit event." << std::endl; } - DaemonInstance = this; - } + + DaemonInstance = this; +} } diff --git a/src/serverapp/server_main.cpp b/src/serverapp/server_main.cpp index c3bd9537..47f0f861 100644 --- a/src/serverapp/server_main.cpp +++ b/src/serverapp/server_main.cpp @@ -29,42 +29,47 @@ int CALLBACK WinMain(_In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _ #else */ -int main(int argc, char** argv) +int main(int argc, char ** argv) { //#endif try - { - const char** arv = (const char**)argv; - OpcUa::Server::CommandLine options(argc, arv); - if (!options.NeedStartServer()) { + const char ** arv = (const char **)argv; + OpcUa::Server::CommandLine options(argc, arv); + + if (!options.NeedStartServer()) + { + return 0; + } + + OpcUa::Daemon daemon; + + if (options.IsDaemonMode()) + { + daemon.Daemonize(options.GetLogFile()); + } + + Common::AddonsManager::UniquePtr manager = Common::CreateAddonsManager(); + OpcUa::Server::LoadConfiguration(options.GetConfigDir(), *manager); + + manager->Start(); + daemon.WaitForTerminate(); + manager->Stop(); + return 0; } - OpcUa::Daemon daemon; - if (options.IsDaemonMode()) + catch (const std::exception & exc) { - daemon.Daemonize(options.GetLogFile()); + std::cout << exc.what() << std::endl; } - Common::AddonsManager::UniquePtr manager = Common::CreateAddonsManager(); - OpcUa::Server::LoadConfiguration(options.GetConfigDir(), *manager); - - manager->Start(); - daemon.WaitForTerminate(); - manager->Stop(); - - return 0; - } - catch (const std::exception& exc) - { - std::cout << exc.what() << std::endl; - } catch (...) - { - std::cout << "Unknown error." << std::endl; - } + { + std::cout << "Unknown error." << std::endl; + } + return -1; } diff --git a/src/serverapp/server_options.cpp b/src/serverapp/server_options.cpp index 1ca8e2aa..a9b19fd4 100644 --- a/src/serverapp/server_options.cpp +++ b/src/serverapp/server_options.cpp @@ -24,77 +24,79 @@ namespace { - namespace po = boost::program_options; - using namespace OpcUa; +namespace po = boost::program_options; +using namespace OpcUa; - const char* DefaultLogFilePath = "/var/log/opcua/server.log"; +const char * DefaultLogFilePath = "/var/log/opcua/server.log"; - const char* OPTION_HELP = "help"; - const char* OPTION_CONFIG = "config-dir"; - const char* OPTION_DAEMON = "daemon"; - const char* OPTION_LOGFILE = "log-file"; +const char * OPTION_HELP = "help"; +const char * OPTION_CONFIG = "config-dir"; +const char * OPTION_DAEMON = "daemon"; +const char * OPTION_LOGFILE = "log-file"; - std::string GetConfigOptionValue(const po::variables_map& vm) - { - if (vm.count(OPTION_CONFIG)) +std::string GetConfigOptionValue(const po::variables_map & vm) +{ + if (vm.count(OPTION_CONFIG)) { return vm[OPTION_CONFIG].as(); } - return CONFIG_PATH; - } + + return CONFIG_PATH; +} - bool GetDaemonMode(const po::variables_map& vm) - { - return vm.count(OPTION_DAEMON) != 0; - } +bool GetDaemonMode(const po::variables_map & vm) +{ + return vm.count(OPTION_DAEMON) != 0; +} - std::string GetLogFile(const po::variables_map& vm) - { - if (vm.count(OPTION_LOGFILE)) +std::string GetLogFile(const po::variables_map & vm) +{ + if (vm.count(OPTION_LOGFILE)) { return vm[OPTION_LOGFILE].as(); } - return DefaultLogFilePath; - } + + return DefaultLogFilePath; +} } namespace OpcUa { - namespace Server - { +namespace Server +{ - CommandLine::CommandLine(int argc, const char** argv) - : StartPossible(true) - , IsDaemon(false) +CommandLine::CommandLine(int argc, const char ** argv) + : StartPossible(true) + , IsDaemon(false) +{ + // Declare the supported options. + po::options_description desc("Parameters"); + desc.add_options() + (OPTION_HELP, "Print help message and exit.") + (OPTION_CONFIG, po::value(), (std::string("Path to directory with configuration files. Default: ") + CONFIG_PATH).c_str()) + (OPTION_LOGFILE, po::value(), "Set path to the log file. Default 'var/log/opcua/server.log") + (OPTION_DAEMON, "Start in daemon mode.") + ; + + po::variables_map vm; + po::store(po::parse_command_line(argc, argv, desc), vm); + po::notify(vm); + + if (vm.count(OPTION_HELP)) { - // Declare the supported options. - po::options_description desc("Parameters"); - desc.add_options() - (OPTION_HELP, "Print help message and exit.") - (OPTION_CONFIG, po::value(), (std::string("Path to directory with configuration files. Default: ") + CONFIG_PATH).c_str()) - (OPTION_LOGFILE, po::value(), "Set path to the log file. Default 'var/log/opcua/server.log") - (OPTION_DAEMON, "Start in daemon mode.") - ; - - po::variables_map vm; - po::store(po::parse_command_line(argc, argv, desc), vm); - po::notify(vm); - - if (vm.count(OPTION_HELP)) - { - desc.print(std::cout); - StartPossible = false; - return; - } - - IsDaemon = GetDaemonMode(vm); - ConfigDir = GetConfigOptionValue(vm); - LogFile = ::GetLogFile(vm); + desc.print(std::cout); + StartPossible = false; + return; } - } // namespace UaServer + IsDaemon = GetDaemonMode(vm); + ConfigDir = GetConfigOptionValue(vm); + LogFile = ::GetLogFile(vm); +} + +} // namespace UaServer } // namespace OpcUa diff --git a/src/serverapp/server_options.h b/src/serverapp/server_options.h index 47821c57..7ea60225 100644 --- a/src/serverapp/server_options.h +++ b/src/serverapp/server_options.h @@ -21,42 +21,42 @@ namespace OpcUa { - namespace Server +namespace Server +{ + +class CommandLine +{ +public: + CommandLine(int argc, const char ** argv); + + bool NeedStartServer() const + { + return StartPossible; + } + + bool IsDaemonMode() const { + return IsDaemon; + } - class CommandLine - { - public: - CommandLine(int argc, const char** argv); - - bool NeedStartServer() const - { - return StartPossible; - } - - bool IsDaemonMode() const - { - return IsDaemon; - } - - std::string GetConfigDir() const - { - return ConfigDir; - } - - std::string GetLogFile() const - { - return LogFile; - } - - private: - bool StartPossible; - bool IsDaemon; - std::string ConfigDir; - std::string LogFile; - }; + std::string GetConfigDir() const + { + return ConfigDir; + } + std::string GetLogFile() const + { + return LogFile; } + +private: + bool StartPossible; + bool IsDaemon; + std::string ConfigDir; + std::string LogFile; +}; + +} } #endif // _OPC_UA_Server_OPTIONS_H_ diff --git a/tests/client/binary_handshake.cpp b/tests/client/binary_handshake.cpp index 3c02fe6b..3f2f70b9 100644 --- a/tests/client/binary_handshake.cpp +++ b/tests/client/binary_handshake.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -23,17 +23,17 @@ namespace { - class OpcBinaryHandshake : public ::testing::Test +class OpcBinaryHandshake : public ::testing::Test +{ +protected: + virtual void SetUp() { - protected: - virtual void SetUp() - { - } + } - virtual void TearDown() - { - } - }; + virtual void TearDown() + { + } +}; } using namespace OpcUa::Binary; @@ -66,7 +66,7 @@ TEST_F(OpcBinaryHandshake, SayingHello) hello.EndpointUrl = GetEndpoint(); OpcUa::Binary::Header hdr(OpcUa::Binary::MT_HELLO, OpcUa::Binary::CHT_SINGLE); - hdr.AddSize(RawSize(hello)); + hdr.AddSize(RawSize(hello)); os << hdr << hello << flush; @@ -134,7 +134,7 @@ TEST_F(OpcBinaryHandshake, GetEndpoints) // CreateSession //---------------------------------------------------------------------- -EndpointDescription GetEndpoint(OpcUa::Binary::IOStream& stream) +EndpointDescription GetEndpoint(OpcUa::Binary::IOStream & stream) { OpcUa::Binary::GetEndpointsRequest request; request.EndpointUrl = GetEndpointUrl(); @@ -142,10 +142,12 @@ EndpointDescription GetEndpoint(OpcUa::Binary::IOStream& stream) OpcUa::Binary::GetEndpointsResponse response; stream >> response; + if (response.Endpoints.empty()) - { - throw std::logic_error("Server returned empty list of endpoints"); - } + { + throw std::logic_error("Server returned empty list of endpoints"); + } + return response.Endpoints.front(); } @@ -173,7 +175,7 @@ TEST_F(OpcBinaryHandshake, GetCreateSession) request.ServerURI = endpoint.ServerDescription.URI; request.EndpointUrl = endpoint.EndpointUrl; request.SessionName = "libiocuamappings session test"; - request.ClientNonce = std::vector(32,0); + request.ClientNonce = std::vector(32, 0); // request.ClientCertificate = GetCertificate(); request.RequestedSessionTimeout = 3600000; request.MaxResponseMessageSize = 65536; @@ -192,7 +194,7 @@ TEST_F(OpcBinaryHandshake, GetCreateSession) // ActivateSession //---------------------------------------------------------------------- -OpcUa::Binary::CreateSessionResponse CreateSession(OpcUa::Binary::IOStream& stream) +OpcUa::Binary::CreateSessionResponse CreateSession(OpcUa::Binary::IOStream & stream) { EndpointDescription endpoint = GetEndpoint(stream); @@ -206,7 +208,7 @@ OpcUa::Binary::CreateSessionResponse CreateSession(OpcUa::Binary::IOStream& stre request.ServerURI = endpoint.ServerDescription.URI; request.EndpointUrl = endpoint.EndpointUrl; // TODO make just endpoint.URL; request.SessionName = "libiocuamappings session test"; - request.ClientNonce = std::vector(32,0); + request.ClientNonce = std::vector(32, 0); // request.ClientCertificate = GetCertificate(); request.RequestedSessionTimeout = 3600000; request.MaxResponseMessageSize = 65536; @@ -279,7 +281,7 @@ TEST_F(OpcBinaryHandshake, CloseSession) // Browse //---------------------------------------------------------------------- -void CloseSession(OpcUa::Binary::IOStream& stream, const OpcUa::Binary::CreateSessionResponse& session) +void CloseSession(OpcUa::Binary::IOStream & stream, const OpcUa::Binary::CreateSessionResponse & session) { CloseSessionRequest closeSession; closeSession.Header.SessionAuthenticationToken = session.AuthenticationToken; @@ -289,7 +291,7 @@ void CloseSession(OpcUa::Binary::IOStream& stream, const OpcUa::Binary::CreateSe stream >> closeResponse; } -void ActivateSession(OpcUa::Binary::IOStream& stream, const OpcUa::Binary::CreateSessionResponse& session) +void ActivateSession(OpcUa::Binary::IOStream & stream, const OpcUa::Binary::CreateSessionResponse & session) { using namespace OpcUa::Binary; ActivateSessionRequest activate; @@ -330,7 +332,7 @@ TEST_F(OpcBinaryHandshake, Browse) desc.NodeClasses = NodeClass::Unspecified; desc.ResultMask = BrowseResultMask::All; browse.NodesToBrowse.push_back(desc); - + stream << browse << flush; BrowseResponse response; @@ -340,8 +342,8 @@ TEST_F(OpcBinaryHandshake, Browse) BrowseNextRequest browseNext; browseNext.Header.SessionAuthenticationToken = session.AuthenticationToken; - browseNext.ReleaseContinuationPoints= false; - browseNext.ContinuationPoints.push_back(response.Results[0].ContinuationPoint); + browseNext.ReleaseContinuationPoints = false; + browseNext.ContinuationPoints.push_back(response.Results[0].ContinuationPoint); stream << browseNext << flush; @@ -387,7 +389,7 @@ TEST_F(OpcBinaryHandshake, Read) request.MaxAge = 0; request.TimestampsType = TimestampsToReturn::Neither; request.AttributesToRead.push_back(value); - + stream << request << flush; ReadResponse response; @@ -424,7 +426,7 @@ TEST_F(OpcBinaryHandshake, Write) WriteValue value; value.Node.Encoding = EV_FOUR_BYTE; - value.Node.FourByteData.Identifier = static_cast(ObjectId::RootFolder); + value.Node.FourByteData.Identifier = static_cast(ObjectId::RootFolder); value.Attribute = AttributeId::DisplayName; value.Data.Encoding = DATA_VALUE; value.Data.Value.Type = VariantType::STRING; diff --git a/tests/client/common.h b/tests/client/common.h index 8ec30b9c..123b5e48 100644 --- a/tests/client/common.h +++ b/tests/client/common.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -21,28 +21,31 @@ inline std::string GetHost() { - if (const char* uri = getenv("TEST_Server_URI")) - { - return OpcUa::Internal::Uri(uri).Host(); - } + if (const char * uri = getenv("TEST_Server_URI")) + { + return OpcUa::Internal::Uri(uri).Host(); + } + return "localhost"; } inline int GetPort() { - if (const char* uri = getenv("TEST_Server_URI")) - { - return OpcUa::Internal::Uri(uri).Port(); - } + if (const char * uri = getenv("TEST_Server_URI")) + { + return OpcUa::Internal::Uri(uri).Port(); + } + return 4841; } inline std::string GetEndpoint() { - if (char* endpoint = getenv("TEST_Server_URI")) - { - return endpoint; - } + if (char * endpoint = getenv("TEST_Server_URI")) + { + return endpoint; + } + return "opc.tcp://localhost:4841"; } diff --git a/tests/client/computer_attribute.cpp b/tests/client/computer_attribute.cpp index b8650fdd..f6b38a9e 100644 --- a/tests/client/computer_attribute.cpp +++ b/tests/client/computer_attribute.cpp @@ -28,10 +28,11 @@ class Attribute : public ::testing::Test virtual void SetUp() { Server = Connect(GetEndpoint()); + if (!Server) - { - return; - } + { + return; + } RemoteSessionParameters session; session.ClientDescription.Name.Text = "opcua view service test"; @@ -48,11 +49,12 @@ class Attribute : public ::testing::Test virtual void TearDown() { Service = std::unique_ptr(); + if (Server) - { - Server->CloseSession(); - Server.reset(); - } + { + Server->CloseSession(); + Server.reset(); + } } protected: diff --git a/tests/client/computer_connect.cpp b/tests/client/computer_connect.cpp index 6b0659b1..dd62c66d 100644 --- a/tests/client/computer_connect.cpp +++ b/tests/client/computer_connect.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// diff --git a/tests/client/computer_endpoints.cpp b/tests/client/computer_endpoints.cpp index d31f7415..fe8d21b9 100644 --- a/tests/client/computer_endpoints.cpp +++ b/tests/client/computer_endpoints.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// diff --git a/tests/client/computer_session.cpp b/tests/client/computer_session.cpp index 7aa2ceab..21409eee 100644 --- a/tests/client/computer_session.cpp +++ b/tests/client/computer_session.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// diff --git a/tests/client/computer_view.cpp b/tests/client/computer_view.cpp index 9787a538..e03a1596 100644 --- a/tests/client/computer_view.cpp +++ b/tests/client/computer_view.cpp @@ -53,10 +53,12 @@ class View : public ::testing::Test virtual void TearDown() { Service = std::unique_ptr(); + if (Server) - { - Server->CloseSession(); - } + { + Server->CloseSession(); + } + Server.reset(); } @@ -95,16 +97,20 @@ TEST_F(View, BrowseFinishes) Service->Browse(Query); std::vector browsedRefs; unsigned count = 0; + while (true) - { - const std::vector refs = Service->BrowseNext(); - if (refs.empty()) { - break; + const std::vector refs = Service->BrowseNext(); + + if (refs.empty()) + { + break; + } + + browsedRefs.insert(browsedRefs.end(), refs.begin(), refs.end()); + ++count; } - browsedRefs.insert(browsedRefs.end(), refs.begin(), refs.end()); - ++count; - } + EXPECT_TRUE(count > 0); EXPECT_EQ(browsedRefs.size(), count); } diff --git a/tests/core/common/addons_manager_test.cpp b/tests/core/common/addons_manager_test.cpp index c9022387..dc91833f 100644 --- a/tests/core/common/addons_manager_test.cpp +++ b/tests/core/common/addons_manager_test.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -24,7 +24,7 @@ class AddonsManagerTestCase : public CPPUNIT_NS::TestFixture CPPUNIT_TEST(TestOneManager); CPPUNIT_TEST_SUITE_END(); - public: +public: virtual void setUp() { Addons = Common::CreateAddonsManager(); @@ -43,7 +43,7 @@ class AddonsManagerTestCase : public CPPUNIT_NS::TestFixture void TestTwoManagers(); }; -CPPUNIT_TEST_SUITE_REGISTRATION( AddonsManagerTestCase ); +CPPUNIT_TEST_SUITE_REGISTRATION(AddonsManagerTestCase); unsigned InitializedAddonsCount = 0; @@ -61,13 +61,13 @@ class PropertyTreeAddon : public Common::Addon { } - virtual void Initialize(Common::AddonsManager&, const Common::AddonParameters&) + virtual void Initialize(Common::AddonsManager &, const Common::AddonParameters &) { CPPUNIT_ASSERT(InitializedAddonsCount == 0); InitializedAddonsCount++; Initialized = true; } - + virtual void Stop() { Stopped = true; @@ -106,13 +106,13 @@ class DeviceIOManagerAddon : public Common::Addon { } - virtual void Initialize(Common::AddonsManager&, const Common::AddonParameters&) + virtual void Initialize(Common::AddonsManager &, const Common::AddonParameters &) { CPPUNIT_ASSERT(InitializedAddonsCount == 1); InitializedAddonsCount++; Initialized = true; } - + virtual void Stop() { Stopped = true; @@ -122,7 +122,7 @@ class DeviceIOManagerAddon : public Common::Addon { return Initialized; } - + bool IsStopped() const { return Stopped; @@ -159,7 +159,7 @@ void AddonsManagerTestCase::TestOneManager() CPPUNIT_ASSERT_NO_THROW(propertyTree = Common::GetAddon(*Addons, PropertyTree::ManagerId)); CPPUNIT_ASSERT(propertyTree); CPPUNIT_ASSERT(propertyTree->IsInitialized()); - + CPPUNIT_ASSERT_NO_THROW(Addons->Stop()); CPPUNIT_ASSERT(propertyTree->IsStopped()); @@ -191,7 +191,7 @@ void AddonsManagerTestCase::TestTwoManagers() CPPUNIT_ASSERT_NO_THROW(propertyTree = Common::GetAddon(*Addons, PropertyTree::ManagerId)); CPPUNIT_ASSERT(propertyTree); CPPUNIT_ASSERT(propertyTree->IsInitialized()); - + std::shared_ptr deviceManager; CPPUNIT_ASSERT_NO_THROW(deviceManager = Common::GetAddon(*Addons, DeviceManager::ManagerId)); CPPUNIT_ASSERT(deviceManager); diff --git a/tests/core/common/error_test.cpp b/tests/core/common/error_test.cpp index dbfabdbc..7b4be62d 100644 --- a/tests/core/common/error_test.cpp +++ b/tests/core/common/error_test.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -24,7 +24,7 @@ class ErrorTestCase : public CPPUNIT_NS::TestFixture void Test(); }; -CPPUNIT_TEST_SUITE_REGISTRATION( ErrorTestCase ); +CPPUNIT_TEST_SUITE_REGISTRATION(ErrorTestCase); void ErrorTestCase::Test() { diff --git a/tests/core/common/main.cpp b/tests/core/common/main.cpp index 815769db..7b0463a3 100644 --- a/tests/core/common/main.cpp +++ b/tests/core/common/main.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -17,29 +17,32 @@ #include #include -int main(int argc, char** argv) +int main(int argc, char ** argv) { try - { - CPPUNIT_NS::TestResult controller; - CPPUNIT_NS::TestResultCollector result; - controller.addListener(&result); - CPPUNIT_NS::BriefTestProgressListener progress; - controller.addListener(&progress); - CPPUNIT_NS::TestRunner runner; - runner.addTest(CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest()); - runner.run(controller); - CPPUNIT_NS::CompilerOutputter outputter(&result, CPPUNIT_NS::stdCOut()); - outputter.write(); - return result.wasSuccessful() ? 0 : -1; - } - catch(const std::exception& exc) - { - std::cout << exc.what() << std::endl; - } - catch(...) - { - std::cout << "Unknown exception." << std::endl; - } + { + CPPUNIT_NS::TestResult controller; + CPPUNIT_NS::TestResultCollector result; + controller.addListener(&result); + CPPUNIT_NS::BriefTestProgressListener progress; + controller.addListener(&progress); + CPPUNIT_NS::TestRunner runner; + runner.addTest(CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest()); + runner.run(controller); + CPPUNIT_NS::CompilerOutputter outputter(&result, CPPUNIT_NS::stdCOut()); + outputter.write(); + return result.wasSuccessful() ? 0 : -1; + } + + catch (const std::exception & exc) + { + std::cout << exc.what() << std::endl; + } + + catch (...) + { + std::cout << "Unknown exception." << std::endl; + } + return -1; } diff --git a/tests/core/common/thread_test.cpp b/tests/core/common/thread_test.cpp index e0c3d6e4..2477bc14 100644 --- a/tests/core/common/thread_test.cpp +++ b/tests/core/common/thread_test.cpp @@ -18,39 +18,39 @@ using namespace testing; namespace { - class TestThreadObserver : public Common::ThreadObserver +class TestThreadObserver : public Common::ThreadObserver +{ +public: + TestThreadObserver() + : OnSuccessCallCount(0) + , OnErrorCallCount(0) { - public: - TestThreadObserver() - : OnSuccessCallCount(0) - , OnErrorCallCount(0) - { - } - - virtual void OnSuccess() override - { - ++OnSuccessCallCount; - } - - virtual void OnError(const std::exception& exc) override - { - ++OnErrorCallCount; - } - - public: - volatile unsigned OnSuccessCallCount; - volatile unsigned OnErrorCallCount; - }; - - void DoNothing() + } + + virtual void OnSuccess() override { + ++OnSuccessCallCount; } - void ThrowsException() + virtual void OnError(const std::exception & exc) override { - throw std::logic_error("oppps!"); + ++OnErrorCallCount; } +public: + volatile unsigned OnSuccessCallCount; + volatile unsigned OnErrorCallCount; +}; + +void DoNothing() +{ +} + +void ThrowsException() +{ + throw std::logic_error("oppps!"); +} + } TEST(Thread, CallsOnSuccess) diff --git a/tests/core/test_addon_manager.cpp b/tests/core/test_addon_manager.cpp index 9391657d..dcff7207 100644 --- a/tests/core/test_addon_manager.cpp +++ b/tests/core/test_addon_manager.cpp @@ -25,7 +25,7 @@ namespace #define DYNAMIC_ADDON_PATH "./libtest_dynamic_addon.so" #endif -const char* modulePath = DYNAMIC_ADDON_PATH; +const char * modulePath = DYNAMIC_ADDON_PATH; } diff --git a/tests/core/test_config_file.cpp b/tests/core/test_config_file.cpp index 318abdb4..e4b5edc2 100644 --- a/tests/core/test_config_file.cpp +++ b/tests/core/test_config_file.cpp @@ -19,8 +19,8 @@ using namespace testing; #define TEST_CORE_CONFIG_PATH "./tests/core/configs/" #endif -const char* TestConfigFile = TEST_CORE_CONFIG_PATH "test.conf"; -const char* TestConfigPath = TEST_CORE_CONFIG_PATH; +const char * TestConfigFile = TEST_CORE_CONFIG_PATH "test.conf"; +const char * TestConfigPath = TEST_CORE_CONFIG_PATH; TEST(ModulesConfiguration, ParsesConfigurationFile) { @@ -87,9 +87,9 @@ TEST(ModulesConfiguration, SavesConfigurationFile) addon.Parameters.Groups.push_back(group); Common::SaveConfiguration(Common::ModulesConfiguration({addon}), "test_config.config"); - const Common::Configuration& config = Common::ParseConfiguration("test_config.config"); + const Common::Configuration & config = Common::ParseConfiguration("test_config.config"); ASSERT_EQ(config.Modules.size(), 1); - const Common::ModuleConfiguration& module = config.Modules[0]; + const Common::ModuleConfiguration & module = config.Modules[0]; ASSERT_EQ(module.Id, "test_addon"); ASSERT_EQ(module.Path, "path"); ASSERT_EQ(module.Dependencies.size(), 2); diff --git a/tests/core/test_dynamic_addon.cpp b/tests/core/test_dynamic_addon.cpp index 8ce69277..d7c66219 100644 --- a/tests/core/test_dynamic_addon.cpp +++ b/tests/core/test_dynamic_addon.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -12,37 +12,37 @@ namespace { - class TestDynamicAddonImpl : public OpcCoreTests::TestDynamicAddon +class TestDynamicAddonImpl : public OpcCoreTests::TestDynamicAddon +{ +public: + virtual void Initialize(Common::AddonsManager &, const Common::AddonParameters & params) { - public: - virtual void Initialize(Common::AddonsManager&, const Common::AddonParameters& params) - { - Params = params; - } + Params = params; + } - virtual void Stop() - { - } + virtual void Stop() + { + } - virtual const char* GetStringWithHello() const - { - return "hello"; - } - - virtual Common::AddonParameters GetParameters() const - { - return Params; - } - private: - Common::AddonParameters Params; - }; + virtual const char * GetStringWithHello() const + { + return "hello"; + } + + virtual Common::AddonParameters GetParameters() const + { + return Params; + } +private: + Common::AddonParameters Params; +}; } -extern "C" +extern "C" #ifdef _WIN32 __declspec(dllexport) #endif // _WIN32 -Common::Addon* CreateAddon(const char* configuration) +Common::Addon * CreateAddon(const char * configuration) { return new TestDynamicAddonImpl(); } diff --git a/tests/core/test_dynamic_addon.h b/tests/core/test_dynamic_addon.h index 691d7b58..14403b4e 100644 --- a/tests/core/test_dynamic_addon.h +++ b/tests/core/test_dynamic_addon.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -18,14 +18,14 @@ namespace OpcCoreTests { - class TestDynamicAddon : public Common::Addon - { - public: - DEFINE_CLASS_POINTERS(TestDynamicAddon); - public: - virtual const char* GetStringWithHello() const = 0; - virtual Common::AddonParameters GetParameters() const = 0; - }; +class TestDynamicAddon : public Common::Addon +{ +public: + DEFINE_CLASS_POINTERS(TestDynamicAddon); +public: + virtual const char * GetStringWithHello() const = 0; + virtual Common::AddonParameters GetParameters() const = 0; +}; } diff --git a/tests/core/test_dynamic_addon_factory.cpp b/tests/core/test_dynamic_addon_factory.cpp index 0e63681b..80c2bc34 100644 --- a/tests/core/test_dynamic_addon_factory.cpp +++ b/tests/core/test_dynamic_addon_factory.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -19,7 +19,7 @@ #define DYNAMIC_ADDON_PATH "./libtest_dynamic_addon.so" #endif -const char* modulePath = DYNAMIC_ADDON_PATH; +const char * modulePath = DYNAMIC_ADDON_PATH; TEST(DynamicAddonFactory, CanCreateAddons) { diff --git a/tests/core/test_dynamic_addon_id.h b/tests/core/test_dynamic_addon_id.h index cf3ff02a..d64a7f94 100644 --- a/tests/core/test_dynamic_addon_id.h +++ b/tests/core/test_dynamic_addon_id.h @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// @@ -18,7 +18,7 @@ namespace OpcCoreTests { - const char TestDynamicAddonId[] = "test_dynamic_addon"; +const char TestDynamicAddonId[] = "test_dynamic_addon"; } diff --git a/tests/core/test_uri.cpp b/tests/core/test_uri.cpp index 7b623b6f..52d1d933 100644 --- a/tests/core/test_uri.cpp +++ b/tests/core/test_uri.cpp @@ -4,7 +4,7 @@ /// @license GNU LGPL /// /// Distributed under the GNU LGPL License -/// (See accompanying file LICENSE or copy at +/// (See accompanying file LICENSE or copy at /// http://www.gnu.org/licenses/lgpl.html) /// diff --git a/tests/gmock/fused-src/gmock/gmock.h b/tests/gmock/fused-src/gmock/gmock.h index e8dd7fc3..97d6dec1 100644 --- a/tests/gmock/fused-src/gmock/gmock.h +++ b/tests/gmock/fused-src/gmock/gmock.h @@ -265,24 +265,27 @@ #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_ -namespace testing { +namespace testing +{ template class Matcher; -namespace internal { +namespace internal +{ // An IgnoredValue object can be implicitly constructed from ANY value. // This is used in implementing the IgnoreResult(a) action. -class IgnoredValue { - public: +class IgnoredValue +{ +public: // This constructor template allows any value to be implicitly // converted to IgnoredValue. The object has no data member and // doesn't try to remember anything about the argument. We // deliberately omit the 'explicit' keyword in order to allow the // conversion to be implicit. template - IgnoredValue(const T& /* ignored */) {} // NOLINT(runtime/explicit) + IgnoredValue(const T & /* ignored */) {} // NOLINT(runtime/explicit) }; // MatcherTuple::type is a tuple type where each field is a Matcher @@ -291,72 +294,83 @@ template struct MatcherTuple; template <> -struct MatcherTuple< ::std::tr1::tuple<> > { +struct MatcherTuple< ::std::tr1::tuple<> > +{ typedef ::std::tr1::tuple< > type; }; template -struct MatcherTuple< ::std::tr1::tuple > { +struct MatcherTuple< ::std::tr1::tuple > +{ typedef ::std::tr1::tuple > type; }; template -struct MatcherTuple< ::std::tr1::tuple > { +struct MatcherTuple< ::std::tr1::tuple > +{ typedef ::std::tr1::tuple, Matcher > type; }; template -struct MatcherTuple< ::std::tr1::tuple > { +struct MatcherTuple< ::std::tr1::tuple > +{ typedef ::std::tr1::tuple, Matcher, Matcher > type; }; template -struct MatcherTuple< ::std::tr1::tuple > { +struct MatcherTuple< ::std::tr1::tuple > +{ typedef ::std::tr1::tuple, Matcher, Matcher, - Matcher > type; + Matcher > type; }; template -struct MatcherTuple< ::std::tr1::tuple > { +struct MatcherTuple< ::std::tr1::tuple > +{ typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, - Matcher > type; + Matcher > type; }; template -struct MatcherTuple< ::std::tr1::tuple > { + typename A6> +struct MatcherTuple< ::std::tr1::tuple > +{ typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, - Matcher, Matcher > type; + Matcher, Matcher > type; }; template -struct MatcherTuple< ::std::tr1::tuple > { + typename A6, typename A7> +struct MatcherTuple< ::std::tr1::tuple > +{ typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, - Matcher, Matcher, Matcher > type; + Matcher, Matcher, Matcher > type; }; template -struct MatcherTuple< ::std::tr1::tuple > { + typename A6, typename A7, typename A8> +struct MatcherTuple< ::std::tr1::tuple > +{ typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, - Matcher, Matcher, Matcher, Matcher > type; + Matcher, Matcher, Matcher, Matcher > type; }; template -struct MatcherTuple< ::std::tr1::tuple > { + typename A6, typename A7, typename A8, typename A9> +struct MatcherTuple< ::std::tr1::tuple > +{ typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, - Matcher, Matcher, Matcher, Matcher, Matcher > type; + Matcher, Matcher, Matcher, Matcher, Matcher > type; }; template + typename A6, typename A7, typename A8, typename A9, typename A10> struct MatcherTuple< ::std::tr1::tuple > { + A10> > +{ typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, - Matcher, Matcher, Matcher, Matcher, Matcher, - Matcher > type; + Matcher, Matcher, Matcher, Matcher, Matcher, + Matcher > type; }; // Template struct Function, where F must be a function type, contains @@ -376,7 +390,8 @@ template struct Function; template -struct Function { +struct Function +{ typedef R Result; typedef ::std::tr1::tuple<> ArgumentTuple; typedef typename MatcherTuple::type ArgumentMatcherTuple; @@ -386,7 +401,8 @@ struct Function { template struct Function - : Function { +: Function +{ typedef A1 Argument1; typedef ::std::tr1::tuple ArgumentTuple; typedef typename MatcherTuple::type ArgumentMatcherTuple; @@ -396,7 +412,8 @@ struct Function template struct Function - : Function { +: Function +{ typedef A2 Argument2; typedef ::std::tr1::tuple ArgumentTuple; typedef typename MatcherTuple::type ArgumentMatcherTuple; @@ -406,7 +423,8 @@ struct Function template struct Function - : Function { +: Function +{ typedef A3 Argument3; typedef ::std::tr1::tuple ArgumentTuple; typedef typename MatcherTuple::type ArgumentMatcherTuple; @@ -416,7 +434,8 @@ struct Function template struct Function - : Function { +: Function +{ typedef A4 Argument4; typedef ::std::tr1::tuple ArgumentTuple; typedef typename MatcherTuple::type ArgumentMatcherTuple; @@ -425,9 +444,10 @@ struct Function }; template + typename A5> struct Function - : Function { +: Function +{ typedef A5 Argument5; typedef ::std::tr1::tuple ArgumentTuple; typedef typename MatcherTuple::type ArgumentMatcherTuple; @@ -436,9 +456,10 @@ struct Function }; template + typename A5, typename A6> struct Function - : Function { +: Function +{ typedef A6 Argument6; typedef ::std::tr1::tuple ArgumentTuple; typedef typename MatcherTuple::type ArgumentMatcherTuple; @@ -447,9 +468,10 @@ struct Function }; template + typename A5, typename A6, typename A7> struct Function - : Function { +: Function +{ typedef A7 Argument7; typedef ::std::tr1::tuple ArgumentTuple; typedef typename MatcherTuple::type ArgumentMatcherTuple; @@ -458,9 +480,10 @@ struct Function }; template + typename A5, typename A6, typename A7, typename A8> struct Function - : Function { +: Function +{ typedef A8 Argument8; typedef ::std::tr1::tuple ArgumentTuple; typedef typename MatcherTuple::type ArgumentMatcherTuple; @@ -469,9 +492,10 @@ struct Function }; template + typename A5, typename A6, typename A7, typename A8, typename A9> struct Function - : Function { +: Function +{ typedef A9 Argument9; typedef ::std::tr1::tuple ArgumentTuple; typedef typename MatcherTuple::type ArgumentMatcherTuple; @@ -481,13 +505,14 @@ struct Function }; template + typename A5, typename A6, typename A7, typename A8, typename A9, + typename A10> struct Function - : Function { +: Function +{ typedef A10 Argument10; typedef ::std::tr1::tuple ArgumentTuple; + A10> ArgumentTuple; typedef typename MatcherTuple::type ArgumentMatcherTuple; typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10); typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8, @@ -500,45 +525,51 @@ struct Function #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_ -namespace testing { -namespace internal { +namespace testing +{ +namespace internal +{ // Converts an identifier name to a space-separated list of lower-case // words. Each maximum substring of the form [A-Za-z][a-z]*|\d+ is // treated as one word. For example, both "FooBar123" and // "foo_bar_123" are converted to "foo bar 123". -GTEST_API_ string ConvertIdentifierNameToWords(const char* id_name); +GTEST_API_ string ConvertIdentifierNameToWords(const char * id_name); // PointeeOf::type is the type of a value pointed to by a // Pointer, which can be either a smart pointer or a raw pointer. The // following default implementation is for the case where Pointer is a // smart pointer. template -struct PointeeOf { +struct PointeeOf +{ // Smart pointer classes define type element_type as the type of // their pointees. typedef typename Pointer::element_type type; }; // This specialization is for the raw pointer case. template -struct PointeeOf { typedef T type; }; // NOLINT +struct PointeeOf { typedef T type; }; // NOLINT // GetRawPointer(p) returns the raw pointer underlying p when p is a // smart pointer, or returns p itself when p is already a raw pointer. // The following default implementation is for the smart pointer case. template -inline const typename Pointer::element_type* GetRawPointer(const Pointer& p) { +inline const typename Pointer::element_type * GetRawPointer(const Pointer & p) +{ return p.get(); } // This overloaded version is for the raw pointer case. template -inline Element* GetRawPointer(Element* p) { return p; } +inline Element * GetRawPointer(Element * p) { return p; } // This comparator allows linked_ptr to be stored in sets. template -struct LinkedPtrLessThan { - bool operator()(const ::testing::internal::linked_ptr& lhs, - const ::testing::internal::linked_ptr& rhs) const { +struct LinkedPtrLessThan +{ + bool operator()(const ::testing::internal::linked_ptr & lhs, + const ::testing::internal::linked_ptr & rhs) const + { return lhs.get() < rhs.get(); } }; @@ -577,12 +608,14 @@ struct LinkedPtrLessThan { // or none of them. This categorization is useful for determining // when a matcher argument type can be safely converted to another // type in the implementation of SafeMatcherCast. -enum TypeKind { +enum TypeKind +{ kBool, kInteger, kFloatingPoint, kOther }; // KindOf::value is the kind of type T. -template struct KindOf { +template struct KindOf +{ enum { value = kOther }; // The default kind. }; @@ -641,35 +674,35 @@ struct LosslessArithmeticConvertibleImpl : public false_type {}; // Converting bool to bool is lossless. template <> struct LosslessArithmeticConvertibleImpl - : public true_type {}; // NOLINT + : public true_type {}; // NOLINT // Converting bool to any integer type is lossless. template struct LosslessArithmeticConvertibleImpl - : public true_type {}; // NOLINT + : public true_type {}; // NOLINT // Converting bool to any floating-point type is lossless. template struct LosslessArithmeticConvertibleImpl - : public true_type {}; // NOLINT + : public true_type {}; // NOLINT // Converting an integer to bool is lossy. template struct LosslessArithmeticConvertibleImpl - : public false_type {}; // NOLINT + : public false_type {}; // NOLINT // Converting an integer to another non-bool integer is lossless iff // the target type's range encloses the source type's range. template struct LosslessArithmeticConvertibleImpl - : public bool_constant< - // When converting from a smaller size to a larger size, we are - // fine as long as we are not converting from signed to unsigned. - ((sizeof(From) < sizeof(To)) && - (!GMOCK_IS_SIGNED_(From) || GMOCK_IS_SIGNED_(To))) || - // When converting between the same size, the signedness must match. - ((sizeof(From) == sizeof(To)) && - (GMOCK_IS_SIGNED_(From) == GMOCK_IS_SIGNED_(To)))> {}; // NOLINT + : public bool_constant < +// When converting from a smaller size to a larger size, we are +// fine as long as we are not converting from signed to unsigned. + ((sizeof(From) < sizeof(To)) && + (!GMOCK_IS_SIGNED_(From) || GMOCK_IS_SIGNED_(To))) || + // When converting between the same size, the signedness must match. + ((sizeof(From) == sizeof(To)) && + (GMOCK_IS_SIGNED_(From) == GMOCK_IS_SIGNED_(To))) > {}; // NOLINT #undef GMOCK_IS_SIGNED_ @@ -677,24 +710,24 @@ struct LosslessArithmeticConvertibleImpl // the format of a floating-point number is implementation-defined. template struct LosslessArithmeticConvertibleImpl - : public false_type {}; // NOLINT + : public false_type {}; // NOLINT // Converting a floating-point to bool is lossy. template struct LosslessArithmeticConvertibleImpl - : public false_type {}; // NOLINT + : public false_type {}; // NOLINT // Converting a floating-point to an integer is lossy. template struct LosslessArithmeticConvertibleImpl - : public false_type {}; // NOLINT + : public false_type {}; // NOLINT // Converting a floating-point to another floating-point is lossless // iff the target type is at least as big as the source type. template -struct LosslessArithmeticConvertibleImpl< - kFloatingPoint, From, kFloatingPoint, To> - : public bool_constant {}; // NOLINT +struct LosslessArithmeticConvertibleImpl < + kFloatingPoint, From, kFloatingPoint, To > +: public bool_constant < sizeof(From) <= sizeof(To) > {}; // NOLINT // LosslessArithmeticConvertible::value is true iff arithmetic // type From can be losslessly converted to arithmetic type To. @@ -705,59 +738,68 @@ struct LosslessArithmeticConvertibleImpl< // implementation-defined when the above pre-condition is violated. template struct LosslessArithmeticConvertible - : public LosslessArithmeticConvertibleImpl< - GMOCK_KIND_OF_(From), From, GMOCK_KIND_OF_(To), To> {}; // NOLINT + : public LosslessArithmeticConvertibleImpl < + GMOCK_KIND_OF_(From), From, GMOCK_KIND_OF_(To), To > {}; // NOLINT // This interface knows how to report a Google Mock failure (either // non-fatal or fatal). -class FailureReporterInterface { - public: +class FailureReporterInterface +{ +public: // The type of a failure (either non-fatal or fatal). - enum FailureType { + enum FailureType + { kNonfatal, kFatal }; virtual ~FailureReporterInterface() {} // Reports a failure that occurred at the given source file location. - virtual void ReportFailure(FailureType type, const char* file, int line, - const string& message) = 0; + virtual void ReportFailure(FailureType type, const char * file, int line, + const string & message) = 0; }; // Returns the failure reporter used by Google Mock. -GTEST_API_ FailureReporterInterface* GetFailureReporter(); +GTEST_API_ FailureReporterInterface * GetFailureReporter(); // Asserts that condition is true; aborts the process with the given // message if condition is false. We cannot use LOG(FATAL) or CHECK() // as Google Mock might be used to mock the log sink itself. We // inline this function to prevent it from showing up in the stack // trace. -inline void Assert(bool condition, const char* file, int line, - const string& msg) { - if (!condition) { - GetFailureReporter()->ReportFailure(FailureReporterInterface::kFatal, - file, line, msg); - } +inline void Assert(bool condition, const char * file, int line, + const string & msg) +{ + if (!condition) + { + GetFailureReporter()->ReportFailure(FailureReporterInterface::kFatal, + file, line, msg); + } } -inline void Assert(bool condition, const char* file, int line) { +inline void Assert(bool condition, const char * file, int line) +{ Assert(condition, file, line, "Assertion failed."); } // Verifies that condition is true; generates a non-fatal failure if // condition is false. -inline void Expect(bool condition, const char* file, int line, - const string& msg) { - if (!condition) { - GetFailureReporter()->ReportFailure(FailureReporterInterface::kNonfatal, - file, line, msg); - } +inline void Expect(bool condition, const char * file, int line, + const string & msg) +{ + if (!condition) + { + GetFailureReporter()->ReportFailure(FailureReporterInterface::kNonfatal, + file, line, msg); + } } -inline void Expect(bool condition, const char* file, int line) { +inline void Expect(bool condition, const char * file, int line) +{ Expect(condition, file, line, "Expectation failed."); } // Severity level of a log. -enum LogSeverity { +enum LogSeverity +{ kInfo = 0, kWarning = 1 }; @@ -783,7 +825,7 @@ GTEST_API_ bool LogIsVisible(LogSeverity severity); // function calls will be inlined by the compiler and need to be // conservative. GTEST_API_ void Log(LogSeverity severity, - const string& message, + const string & message, int stack_frames_to_skip); // TODO(wan@google.com): group all type utilities together. @@ -792,7 +834,7 @@ GTEST_API_ void Log(LogSeverity severity, // is_reference::value is non-zero iff T is a reference type. template struct is_reference : public false_type {}; -template struct is_reference : public true_type {}; +template struct is_reference : public true_type {}; // type_equals::value is non-zero iff T1 and T2 are the same type. template struct type_equals : public false_type {}; @@ -800,19 +842,21 @@ template struct type_equals : public true_type {}; // remove_reference::type removes the reference from type T, if any. template struct remove_reference { typedef T type; }; // NOLINT -template struct remove_reference { typedef T type; }; // NOLINT +template struct remove_reference { typedef T type; }; // NOLINT // DecayArray::type turns an array type U[N] to const U* and preserves // other types. Useful for saving a copy of a function argument. template struct DecayArray { typedef T type; }; // NOLINT -template struct DecayArray { - typedef const T* type; +template struct DecayArray +{ + typedef const T * type; }; // Sometimes people use arrays whose size is not available at the use site // (e.g. extern const char kNamePrefix[]). This specialization covers that // case. -template struct DecayArray { - typedef const T* type; +template struct DecayArray +{ + typedef const T * type; }; // Invalid() returns an invalid value of type T. This is useful @@ -820,9 +864,10 @@ template struct DecayArray { // will not really be executed (or we don't care if the statement // crashes). template -inline T Invalid() { - return const_cast::type&>( - *static_cast::type*>(NULL)); +inline T Invalid() +{ + return const_cast::type &>( + *static_cast::type *>(NULL)); } template <> inline void Invalid() {} @@ -844,24 +889,27 @@ inline void Invalid() {} // This generic version is used when RawContainer itself is already an // STL-style container. template -class StlContainerView { - public: +class StlContainerView +{ +public: typedef RawContainer type; - typedef const type& const_reference; + typedef const type & const_reference; - static const_reference ConstReference(const RawContainer& container) { + static const_reference ConstReference(const RawContainer & container) + { // Ensures that RawContainer is not a const type. testing::StaticAssertTypeEq(); + GTEST_REMOVE_CONST_(RawContainer)>(); return container; } - static type Copy(const RawContainer& container) { return container; } + static type Copy(const RawContainer & container) { return container; } }; // This specialization is used when RawContainer is a native array type. template -class StlContainerView { - public: +class StlContainerView +{ +public: typedef GTEST_REMOVE_CONST_(Element) RawElement; typedef internal::NativeArray type; // NativeArray can represent a native array either by value or by @@ -871,7 +919,8 @@ class StlContainerView { // ConstReference() has to return a reference to a local variable. typedef const type const_reference; - static const_reference ConstReference(const Element (&array)[N]) { + static const_reference ConstReference(const Element(&array)[N]) + { // Ensures that Element is not a const type. testing::StaticAssertTypeEq(); #if GTEST_OS_SYMBIAN @@ -888,14 +937,15 @@ class StlContainerView { // ConstReference(const char * (&)[4])') // (and though the N parameter type is mismatched in the above explicit // conversion of it doesn't help - only the conversion of the array). - return type(const_cast(&array[0]), N, kReference); + return type(const_cast(&array[0]), N, kReference); #else return type(array, N, kReference); #endif // GTEST_OS_SYMBIAN } - static type Copy(const Element (&array)[N]) { + static type Copy(const Element(&array)[N]) + { #if GTEST_OS_SYMBIAN - return type(const_cast(&array[0]), N, kCopy); + return type(const_cast(&array[0]), N, kCopy); #else return type(array, N, kCopy); #endif // GTEST_OS_SYMBIAN @@ -905,19 +955,22 @@ class StlContainerView { // This specialization is used when RawContainer is a native array // represented as a (pointer, size) tuple. template -class StlContainerView< ::std::tr1::tuple > { - public: +class StlContainerView< ::std::tr1::tuple > +{ +public: typedef GTEST_REMOVE_CONST_( - typename internal::PointeeOf::type) RawElement; + typename internal::PointeeOf::type) RawElement; typedef internal::NativeArray type; typedef const type const_reference; static const_reference ConstReference( - const ::std::tr1::tuple& array) { + const ::std::tr1::tuple & array) + { using ::std::tr1::get; return type(get<0>(array), get<1>(array), kReference); } - static type Copy(const ::std::tr1::tuple& array) { + static type Copy(const ::std::tr1::tuple & array) + { using ::std::tr1::get; return type(get<0>(array), get<1>(array), kCopy); } @@ -925,19 +978,21 @@ class StlContainerView< ::std::tr1::tuple > { // The following specialization prevents the user from instantiating // StlContainer with a reference type. -template class StlContainerView; +template class StlContainerView; // A type transform to remove constness from the first part of a pair. // Pairs like that are used as the value_type of associative containers, // and this transform produces a similar but assignable pair. template -struct RemoveConstFromKey { +struct RemoveConstFromKey +{ typedef T type; }; // Partially specialized to remove constness from std::pair. template -struct RemoveConstFromKey > { +struct RemoveConstFromKey > +{ typedef std::pair type; }; @@ -951,7 +1006,8 @@ struct BooleanConstant {}; #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_ -namespace testing { +namespace testing +{ // To implement an action Foo, define: // 1. a class FooAction that implements the ActionInterface interface, and @@ -962,7 +1018,8 @@ namespace testing { // consistency for extension developers. It also eases ownership // management as Action objects can now be copied like plain values. -namespace internal { +namespace internal +{ template class ActionAdaptor; @@ -973,11 +1030,13 @@ class ActionAdaptor; // std::string. For any other type T, this value is undefined and the // function will abort the process. template -class BuiltInDefaultValue { - public: +class BuiltInDefaultValue +{ +public: // This function returns true iff type T has a built-in default value. static bool Exists() { return false; } - static T Get() { + static T Get() + { Assert(false, __FILE__, __LINE__, "Default action undefined for the function return type."); return internal::Invalid(); @@ -989,8 +1048,9 @@ class BuiltInDefaultValue { // This partial specialization says that we use the same built-in // default value for T and const T. template -class BuiltInDefaultValue { - public: +class BuiltInDefaultValue +{ +public: static bool Exists() { return BuiltInDefaultValue::Exists(); } static T Get() { return BuiltInDefaultValue::Get(); } }; @@ -998,10 +1058,11 @@ class BuiltInDefaultValue { // This partial specialization defines the default values for pointer // types. template -class BuiltInDefaultValue { - public: +class BuiltInDefaultValue +{ +public: static bool Exists() { return true; } - static T* Get() { return NULL; } + static T * Get() { return NULL; } }; // The following specializations define the default values for @@ -1014,7 +1075,7 @@ class BuiltInDefaultValue { static type Get() { return value; } \ } -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void, ); // NOLINT +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void,); // NOLINT #if GTEST_HAS_GLOBAL_STRING GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::string, ""); #endif // GTEST_HAS_GLOBAL_STRING @@ -1063,17 +1124,20 @@ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(double, 0); // // Sets the default value for type T to be foo. // DefaultValue::Set(foo); template -class DefaultValue { - public: +class DefaultValue +{ +public: // Sets the default value for type T; requires T to be // copy-constructable and have a public destructor. - static void Set(T x) { + static void Set(T x) + { delete value_; value_ = new T(x); } // Unsets the default value for type T. - static void Clear() { + static void Clear() + { delete value_; value_ = NULL; } @@ -1083,34 +1147,39 @@ class DefaultValue { // Returns true if T has a default return value set by the user or there // exists a built-in default value. - static bool Exists() { + static bool Exists() + { return IsSet() || internal::BuiltInDefaultValue::Exists(); } // Returns the default value for type T if the user has set one; // otherwise returns the built-in default value if there is one; // otherwise aborts the process. - static T Get() { + static T Get() + { return value_ == NULL ? - internal::BuiltInDefaultValue::Get() : *value_; + internal::BuiltInDefaultValue::Get() : *value_; } - private: - static const T* value_; +private: + static const T * value_; }; // This partial specialization allows a user to set default values for // reference types. template -class DefaultValue { - public: +class DefaultValue +{ +public: // Sets the default value for type T&. - static void Set(T& x) { // NOLINT + static void Set(T & x) // NOLINT + { address_ = &x; } // Unsets the default value for type T&. - static void Clear() { + static void Clear() + { address_ = NULL; } @@ -1119,43 +1188,47 @@ class DefaultValue { // Returns true if T has a default return value set by the user or there // exists a built-in default value. - static bool Exists() { - return IsSet() || internal::BuiltInDefaultValue::Exists(); + static bool Exists() + { + return IsSet() || internal::BuiltInDefaultValue::Exists(); } // Returns the default value for type T& if the user has set one; // otherwise returns the built-in default value if there is one; // otherwise aborts the process. - static T& Get() { + static T & Get() + { return address_ == NULL ? - internal::BuiltInDefaultValue::Get() : *address_; + internal::BuiltInDefaultValue::Get() : *address_; } - private: - static T* address_; +private: + static T * address_; }; // This specialization allows DefaultValue::Get() to // compile. template <> -class DefaultValue { - public: +class DefaultValue +{ +public: static bool Exists() { return true; } static void Get() {} }; // Points to the user-set default value for type T. template -const T* DefaultValue::value_ = NULL; +const T * DefaultValue::value_ = NULL; // Points to the user-set default value for type T&. template -T* DefaultValue::address_ = NULL; +T * DefaultValue::address_ = NULL; // Implement this interface to define an action for function type F. template -class ActionInterface { - public: +class ActionInterface +{ +public: typedef typename internal::Function::Result Result; typedef typename internal::Function::ArgumentTuple ArgumentTuple; @@ -1166,9 +1239,9 @@ class ActionInterface { // action can have side effects and be stateful. For example, a // get-the-next-element-from-the-collection action will need to // remember the current element. - virtual Result Perform(const ArgumentTuple& args) = 0; + virtual Result Perform(const ArgumentTuple & args) = 0; - private: +private: GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionInterface); }; @@ -1182,8 +1255,9 @@ class ActionInterface { // concrete action (including its current state), and an Action // object as a handle to it. template -class Action { - public: +class Action +{ +public: typedef typename internal::Function::Result Result; typedef typename internal::Function::ArgumentTuple ArgumentTuple; @@ -1193,17 +1267,17 @@ class Action { // Constructs an Action from its implementation. A NULL impl is // used to represent the "do-default" action. - explicit Action(ActionInterface* impl) : impl_(impl) {} + explicit Action(ActionInterface * impl) : impl_(impl) {} // Copy constructor. - Action(const Action& action) : impl_(action.impl_) {} + Action(const Action & action) : impl_(action.impl_) {} // This constructor allows us to turn an Action object into an // Action, as long as F's arguments can be implicitly converted // to Func's and Func's return type can be implicitly converted to // F's. template - explicit Action(const Action& action); + explicit Action(const Action & action); // Returns true iff this is the DoDefault() action. bool IsDoDefault() const { return impl_.get() == NULL; } @@ -1214,18 +1288,19 @@ class Action { // another concrete action, not that the concrete action it binds to // cannot change state. (Think of the difference between a const // pointer and a pointer to const.) - Result Perform(const ArgumentTuple& args) const { + Result Perform(const ArgumentTuple & args) const + { internal::Assert( - !IsDoDefault(), __FILE__, __LINE__, - "You are using DoDefault() inside a composite action like " - "DoAll() or WithArgs(). This is not supported for technical " - "reasons. Please instead spell out the default action, or " - "assign the default action to an Action variable and use " - "the variable in various places."); + !IsDoDefault(), __FILE__, __LINE__, + "You are using DoDefault() inside a composite action like " + "DoAll() or WithArgs(). This is not supported for technical " + "reasons. Please instead spell out the default action, or " + "assign the default action to an Action variable and use " + "the variable in various places."); return impl_->Perform(args); } - private: +private: template friend class internal::ActionAdaptor; @@ -1254,29 +1329,33 @@ class Action { // the definition of Return(void) and SetArgumentPointee(value) for // complete examples. template -class PolymorphicAction { - public: - explicit PolymorphicAction(const Impl& impl) : impl_(impl) {} +class PolymorphicAction +{ +public: + explicit PolymorphicAction(const Impl & impl) : impl_(impl) {} template - operator Action() const { + operator Action() const + { return Action(new MonomorphicImpl(impl_)); } - private: +private: template - class MonomorphicImpl : public ActionInterface { - public: + class MonomorphicImpl : public ActionInterface + { + public: typedef typename internal::Function::Result Result; typedef typename internal::Function::ArgumentTuple ArgumentTuple; - explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {} + explicit MonomorphicImpl(const Impl & impl) : impl_(impl) {} - virtual Result Perform(const ArgumentTuple& args) { + virtual Result Perform(const ArgumentTuple & args) + { return impl_.template Perform(args); } - private: + private: Impl impl_; GTEST_DISALLOW_ASSIGN_(MonomorphicImpl); @@ -1290,7 +1369,8 @@ class PolymorphicAction { // Creates an Action from its implementation and returns it. The // created Action object owns the implementation. template -Action MakeAction(ActionInterface* impl) { +Action MakeAction(ActionInterface * impl) +{ return Action(impl); } @@ -1302,27 +1382,31 @@ Action MakeAction(ActionInterface* impl) { // vs // PolymorphicAction(foo); template -inline PolymorphicAction MakePolymorphicAction(const Impl& impl) { +inline PolymorphicAction MakePolymorphicAction(const Impl & impl) +{ return PolymorphicAction(impl); } -namespace internal { +namespace internal +{ // Allows an Action object to pose as an Action, as long as F2 // and F1 are compatible. template -class ActionAdaptor : public ActionInterface { - public: +class ActionAdaptor : public ActionInterface +{ +public: typedef typename internal::Function::Result Result; typedef typename internal::Function::ArgumentTuple ArgumentTuple; - explicit ActionAdaptor(const Action& from) : impl_(from.impl_) {} + explicit ActionAdaptor(const Action & from) : impl_(from.impl_) {} - virtual Result Perform(const ArgumentTuple& args) { + virtual Result Perform(const ArgumentTuple & args) + { return impl_->Perform(args); } - private: +private: const internal::linked_ptr > impl_; GTEST_DISALLOW_ASSIGN_(ActionAdaptor); @@ -1353,8 +1437,9 @@ class ActionAdaptor : public ActionInterface { // good place for that. // template -class ReturnAction { - public: +class ReturnAction +{ +public: // Constructs a ReturnAction object from the value to be returned. // 'value' is passed by value instead of by const reference in order // to allow Return("string literal") to compile. @@ -1363,7 +1448,8 @@ class ReturnAction { // This template type conversion operator allows Return(x) to be // used in ANY function that returns x's type. template - operator Action() const { + operator Action() const + { // Assert statement belongs here because this is the best place to verify // conditions on F. It produces the clearest error messages // in most compilers. @@ -1374,16 +1460,17 @@ class ReturnAction { // in the Impl class. But both definitions must be the same. typedef typename Function::Result Result; GTEST_COMPILE_ASSERT_( - !internal::is_reference::value, - use_ReturnRef_instead_of_Return_to_return_a_reference); + !internal::is_reference::value, + use_ReturnRef_instead_of_Return_to_return_a_reference); return Action(new Impl(value_)); } - private: +private: // Implements the Return(x) action for a particular function type F. template - class Impl : public ActionInterface { - public: + class Impl : public ActionInterface + { + public: typedef typename Function::Result Result; typedef typename Function::ArgumentTuple ArgumentTuple; @@ -1395,11 +1482,11 @@ class ReturnAction { // Result without considering explicit constructors, thus resolving the // ambiguity. value_ is then initialized using its copy constructor. explicit Impl(R value) - : value_(::testing::internal::ImplicitCast_(value)) {} + : value_(::testing::internal::ImplicitCast_(value)) {} - virtual Result Perform(const ArgumentTuple&) { return value_; } + virtual Result Perform(const ArgumentTuple &) { return value_; } - private: + private: GTEST_COMPILE_ASSERT_(!internal::is_reference::value, Result_cannot_be_a_reference_type); Result value_; @@ -1413,11 +1500,13 @@ class ReturnAction { }; // Implements the ReturnNull() action. -class ReturnNullAction { - public: +class ReturnNullAction +{ +public: // Allows ReturnNull() to be used in any pointer-returning function. template - static Result Perform(const ArgumentTuple&) { + static Result Perform(const ArgumentTuple &) + { GTEST_COMPILE_ASSERT_(internal::is_pointer::value, ReturnNull_can_be_used_to_return_a_pointer_only); return NULL; @@ -1425,11 +1514,13 @@ class ReturnNullAction { }; // Implements the Return() action. -class ReturnVoidAction { - public: +class ReturnVoidAction +{ +public: // Allows Return() to be used in any void-returning function. template - static void Perform(const ArgumentTuple&) { + static void Perform(const ArgumentTuple &) + { CompileAssertTypesEqual(); } }; @@ -1438,15 +1529,17 @@ class ReturnVoidAction { // in any function that returns a reference to the type of x, // regardless of the argument types. template -class ReturnRefAction { - public: +class ReturnRefAction +{ +public: // Constructs a ReturnRefAction object from the reference to be returned. - explicit ReturnRefAction(T& ref) : ref_(ref) {} // NOLINT + explicit ReturnRefAction(T & ref) : ref_(ref) {} // NOLINT // This template type conversion operator allows ReturnRef(x) to be // used in ANY function that returns a reference to x's type. template - operator Action() const { + operator Action() const + { typedef typename Function::Result Result; // Asserts that the function return type is a reference. This // catches the user error of using ReturnRef(x) when Return(x) @@ -1456,27 +1549,29 @@ class ReturnRefAction { return Action(new Impl(ref_)); } - private: +private: // Implements the ReturnRef(x) action for a particular function type F. template - class Impl : public ActionInterface { - public: + class Impl : public ActionInterface + { + public: typedef typename Function::Result Result; typedef typename Function::ArgumentTuple ArgumentTuple; - explicit Impl(T& ref) : ref_(ref) {} // NOLINT + explicit Impl(T & ref) : ref_(ref) {} // NOLINT - virtual Result Perform(const ArgumentTuple&) { + virtual Result Perform(const ArgumentTuple &) + { return ref_; } - private: - T& ref_; + private: + T & ref_; GTEST_DISALLOW_ASSIGN_(Impl); }; - T& ref_; + T & ref_; GTEST_DISALLOW_ASSIGN_(ReturnRefAction); }; @@ -1485,41 +1580,45 @@ class ReturnRefAction { // used in any function that returns a reference to the type of x, // regardless of the argument types. template -class ReturnRefOfCopyAction { - public: +class ReturnRefOfCopyAction +{ +public: // Constructs a ReturnRefOfCopyAction object from the reference to // be returned. - explicit ReturnRefOfCopyAction(const T& value) : value_(value) {} // NOLINT + explicit ReturnRefOfCopyAction(const T & value) : value_(value) {} // NOLINT // This template type conversion operator allows ReturnRefOfCopy(x) to be // used in ANY function that returns a reference to x's type. template - operator Action() const { + operator Action() const + { typedef typename Function::Result Result; // Asserts that the function return type is a reference. This // catches the user error of using ReturnRefOfCopy(x) when Return(x) // should be used, and generates some helpful error message. GTEST_COMPILE_ASSERT_( - internal::is_reference::value, - use_Return_instead_of_ReturnRefOfCopy_to_return_a_value); + internal::is_reference::value, + use_Return_instead_of_ReturnRefOfCopy_to_return_a_value); return Action(new Impl(value_)); } - private: +private: // Implements the ReturnRefOfCopy(x) action for a particular function type F. template - class Impl : public ActionInterface { - public: + class Impl : public ActionInterface + { + public: typedef typename Function::Result Result; typedef typename Function::ArgumentTuple ArgumentTuple; - explicit Impl(const T& value) : value_(value) {} // NOLINT + explicit Impl(const T & value) : value_(value) {} // NOLINT - virtual Result Perform(const ArgumentTuple&) { + virtual Result Perform(const ArgumentTuple &) + { return value_; } - private: + private: T value_; GTEST_DISALLOW_ASSIGN_(Impl); @@ -1531,8 +1630,9 @@ class ReturnRefOfCopyAction { }; // Implements the polymorphic DoDefault() action. -class DoDefaultAction { - public: +class DoDefaultAction +{ +public: // This template type conversion operator allows DoDefault() to be // used in any function. template @@ -1542,17 +1642,19 @@ class DoDefaultAction { // Implements the Assign action to set a given pointer referent to a // particular value. template -class AssignAction { - public: - AssignAction(T1* ptr, T2 value) : ptr_(ptr), value_(value) {} +class AssignAction +{ +public: + AssignAction(T1 * ptr, T2 value) : ptr_(ptr), value_(value) {} template - void Perform(const ArgumentTuple& /* args */) const { + void Perform(const ArgumentTuple & /* args */) const + { *ptr_ = value_; } - private: - T1* const ptr_; +private: + T1 * const ptr_; const T2 value_; GTEST_DISALLOW_ASSIGN_(AssignAction); @@ -1563,18 +1665,20 @@ class AssignAction { // Implements the SetErrnoAndReturn action to simulate return from // various system calls and libc functions. template -class SetErrnoAndReturnAction { - public: +class SetErrnoAndReturnAction +{ +public: SetErrnoAndReturnAction(int errno_value, T result) - : errno_(errno_value), - result_(result) {} + : errno_(errno_value), + result_(result) {} template - Result Perform(const ArgumentTuple& /* args */) const { + Result Perform(const ArgumentTuple & /* args */) const + { errno = errno_; return result_; } - private: +private: const int errno_; const T result_; @@ -1588,42 +1692,47 @@ class SetErrnoAndReturnAction { // template parameter kIsProto is true iff type A is ProtocolMessage, // proto2::Message, or a sub-class of those. template -class SetArgumentPointeeAction { - public: +class SetArgumentPointeeAction +{ +public: // Constructs an action that sets the variable pointed to by the // N-th function argument to 'value'. - explicit SetArgumentPointeeAction(const A& value) : value_(value) {} + explicit SetArgumentPointeeAction(const A & value) : value_(value) {} template - void Perform(const ArgumentTuple& args) const { + void Perform(const ArgumentTuple & args) const + { CompileAssertTypesEqual(); *::std::tr1::get(args) = value_; } - private: +private: const A value_; GTEST_DISALLOW_ASSIGN_(SetArgumentPointeeAction); }; template -class SetArgumentPointeeAction { - public: +class SetArgumentPointeeAction +{ +public: // Constructs an action that sets the variable pointed to by the // N-th function argument to 'proto'. Both ProtocolMessage and // proto2::Message have the CopyFrom() method, so the same // implementation works for both. - explicit SetArgumentPointeeAction(const Proto& proto) : proto_(new Proto) { + explicit SetArgumentPointeeAction(const Proto & proto) : proto_(new Proto) + { proto_->CopyFrom(proto); } template - void Perform(const ArgumentTuple& args) const { + void Perform(const ArgumentTuple & args) const + { CompileAssertTypesEqual(); ::std::tr1::get(args)->CopyFrom(*proto_); } - private: +private: const internal::linked_ptr proto_; GTEST_DISALLOW_ASSIGN_(SetArgumentPointeeAction); @@ -1635,19 +1744,20 @@ class SetArgumentPointeeAction { // Action as long as f's type is compatible with F (i.e. f can be // assigned to a tr1::function). template -class InvokeWithoutArgsAction { - public: +class InvokeWithoutArgsAction +{ +public: // The c'tor makes a copy of function_impl (either a function // pointer or a functor). explicit InvokeWithoutArgsAction(FunctionImpl function_impl) - : function_impl_(function_impl) {} + : function_impl_(function_impl) {} // Allows InvokeWithoutArgs(f) to be used as any action whose type is // compatible with f. template - Result Perform(const ArgumentTuple&) { return function_impl_(); } + Result Perform(const ArgumentTuple &) { return function_impl_(); } - private: +private: FunctionImpl function_impl_; GTEST_DISALLOW_ASSIGN_(InvokeWithoutArgsAction); @@ -1655,18 +1765,20 @@ class InvokeWithoutArgsAction { // Implements the InvokeWithoutArgs(object_ptr, &Class::Method) action. template -class InvokeMethodWithoutArgsAction { - public: - InvokeMethodWithoutArgsAction(Class* obj_ptr, MethodPtr method_ptr) - : obj_ptr_(obj_ptr), method_ptr_(method_ptr) {} +class InvokeMethodWithoutArgsAction +{ +public: + InvokeMethodWithoutArgsAction(Class * obj_ptr, MethodPtr method_ptr) + : obj_ptr_(obj_ptr), method_ptr_(method_ptr) {} template - Result Perform(const ArgumentTuple&) const { + Result Perform(const ArgumentTuple &) const + { return (obj_ptr_->*method_ptr_)(); } - private: - Class* const obj_ptr_; +private: + Class * const obj_ptr_; const MethodPtr method_ptr_; GTEST_DISALLOW_ASSIGN_(InvokeMethodWithoutArgsAction); @@ -1674,12 +1786,14 @@ class InvokeMethodWithoutArgsAction { // Implements the IgnoreResult(action) action. template -class IgnoreResultAction { - public: - explicit IgnoreResultAction(const A& action) : action_(action) {} +class IgnoreResultAction +{ +public: + explicit IgnoreResultAction(const A & action) : action_(action) {} template - operator Action() const { + operator Action() const + { // Assert statement belongs here because this is the best place to verify // conditions on F. It produces the clearest error messages // in most compilers. @@ -1696,25 +1810,27 @@ class IgnoreResultAction { return Action(new Impl(action_)); } - private: +private: template - class Impl : public ActionInterface { - public: + class Impl : public ActionInterface + { + public: typedef typename internal::Function::Result Result; typedef typename internal::Function::ArgumentTuple ArgumentTuple; - explicit Impl(const A& action) : action_(action) {} + explicit Impl(const A & action) : action_(action) {} - virtual void Perform(const ArgumentTuple& args) { + virtual void Perform(const ArgumentTuple & args) + { // Performs the action and ignores its result. action_.Perform(args); } - private: + private: // Type OriginalFunction is the same as F except that its return // type is IgnoredValue. typedef typename internal::Function::MakeResultIgnoredValue - OriginalFunction; + OriginalFunction; const Action action_; @@ -1734,58 +1850,64 @@ class IgnoreResultAction { // InvokeArgument(...) action. The idea was from "reference // wrappers" in tr1, which we don't have in our source tree yet. template -class ReferenceWrapper { - public: +class ReferenceWrapper +{ +public: // Constructs a ReferenceWrapper object from a T&. - explicit ReferenceWrapper(T& l_value) : pointer_(&l_value) {} // NOLINT + explicit ReferenceWrapper(T & l_value) : pointer_(&l_value) {} // NOLINT // Allows a ReferenceWrapper object to be implicitly converted to // a T&. - operator T&() const { return *pointer_; } - private: - T* pointer_; + operator T & () const { return *pointer_; } +private: + T * pointer_; }; // Allows the expression ByRef(x) to be printed as a reference to x. template -void PrintTo(const ReferenceWrapper& ref, ::std::ostream* os) { - T& value = ref; - UniversalPrinter::Print(value, os); +void PrintTo(const ReferenceWrapper & ref, ::std::ostream * os) +{ + T & value = ref; + UniversalPrinter::Print(value, os); } // Does two actions sequentially. Used for implementing the DoAll(a1, // a2, ...) action. template -class DoBothAction { - public: +class DoBothAction +{ +public: DoBothAction(Action1 action1, Action2 action2) - : action1_(action1), action2_(action2) {} + : action1_(action1), action2_(action2) {} // This template type conversion operator allows DoAll(a1, ..., a_n) // to be used in ANY function of compatible type. template - operator Action() const { + operator Action() const + { return Action(new Impl(action1_, action2_)); } - private: +private: // Implements the DoAll(...) action for a particular function type F. template - class Impl : public ActionInterface { - public: + class Impl : public ActionInterface + { + public: typedef typename Function::Result Result; typedef typename Function::ArgumentTuple ArgumentTuple; typedef typename Function::MakeResultVoid VoidResult; - Impl(const Action& action1, const Action& action2) - : action1_(action1), action2_(action2) {} + Impl(const Action & action1, const Action & action2) + : action1_(action1), action2_(action2) {} - virtual Result Perform(const ArgumentTuple& args) { + virtual Result Perform(const ArgumentTuple & args) + { action1_.Perform(args); return action2_.Perform(args); } - private: + private: const Action action1_; const Action action2_; @@ -1838,30 +1960,34 @@ typedef internal::IgnoredValue Unused; // To's. template template -Action::Action(const Action& from) - : impl_(new internal::ActionAdaptor(from)) {} +Action::Action(const Action & from) + : impl_(new internal::ActionAdaptor(from)) {} // Creates an action that returns 'value'. 'value' is passed by value // instead of const reference - otherwise Return("string literal") // will trigger a compiler error about using array as initializer. template -internal::ReturnAction Return(R value) { +internal::ReturnAction Return(R value) +{ return internal::ReturnAction(value); } // Creates an action that returns NULL. -inline PolymorphicAction ReturnNull() { +inline PolymorphicAction ReturnNull() +{ return MakePolymorphicAction(internal::ReturnNullAction()); } // Creates an action that returns from a void function. -inline PolymorphicAction Return() { +inline PolymorphicAction Return() +{ return MakePolymorphicAction(internal::ReturnVoidAction()); } // Creates an action that returns the reference to a variable. template -inline internal::ReturnRefAction ReturnRef(R& x) { // NOLINT +inline internal::ReturnRefAction ReturnRef(R & x) // NOLINT +{ return internal::ReturnRefAction(x); } @@ -1869,24 +1995,27 @@ inline internal::ReturnRefAction ReturnRef(R& x) { // NOLINT // argument. The copy is created when the action is constructed and // lives as long as the action. template -inline internal::ReturnRefOfCopyAction ReturnRefOfCopy(const R& x) { +inline internal::ReturnRefOfCopyAction ReturnRefOfCopy(const R & x) +{ return internal::ReturnRefOfCopyAction(x); } // Creates an action that does the default action for the give mock function. -inline internal::DoDefaultAction DoDefault() { +inline internal::DoDefaultAction DoDefault() +{ return internal::DoDefaultAction(); } // Creates an action that sets the variable pointed by the N-th // (0-based) function argument to 'value'. template -PolymorphicAction< - internal::SetArgumentPointeeAction< - N, T, internal::IsAProtocolMessage::value> > -SetArgPointee(const T& x) { - return MakePolymorphicAction(internal::SetArgumentPointeeAction< - N, T, internal::IsAProtocolMessage::value>(x)); +PolymorphicAction < +internal::SetArgumentPointeeAction < +N, T, internal::IsAProtocolMessage::value > > +SetArgPointee(const T & x) +{ + return MakePolymorphicAction(internal::SetArgumentPointeeAction < + N, T, internal::IsAProtocolMessage::value > (x)); } #if !((GTEST_GCC_VER_ && GTEST_GCC_VER_ < 40000) || GTEST_OS_SYMBIAN) @@ -1894,35 +2023,39 @@ SetArgPointee(const T& x) { // GCC prior to the version 4.0 and Symbian C++ compiler cannot distinguish // this overload from the templated version and emit a compile error. template -PolymorphicAction< - internal::SetArgumentPointeeAction > -SetArgPointee(const char* p) { - return MakePolymorphicAction(internal::SetArgumentPointeeAction< - N, const char*, false>(p)); +PolymorphicAction < +internal::SetArgumentPointeeAction > +SetArgPointee(const char * p) +{ + return MakePolymorphicAction(internal::SetArgumentPointeeAction < + N, const char *, false > (p)); } template -PolymorphicAction< - internal::SetArgumentPointeeAction > -SetArgPointee(const wchar_t* p) { - return MakePolymorphicAction(internal::SetArgumentPointeeAction< - N, const wchar_t*, false>(p)); +PolymorphicAction < +internal::SetArgumentPointeeAction > +SetArgPointee(const wchar_t * p) +{ + return MakePolymorphicAction(internal::SetArgumentPointeeAction < + N, const wchar_t *, false > (p)); } #endif // The following version is DEPRECATED. template -PolymorphicAction< - internal::SetArgumentPointeeAction< - N, T, internal::IsAProtocolMessage::value> > -SetArgumentPointee(const T& x) { - return MakePolymorphicAction(internal::SetArgumentPointeeAction< - N, T, internal::IsAProtocolMessage::value>(x)); +PolymorphicAction < +internal::SetArgumentPointeeAction < +N, T, internal::IsAProtocolMessage::value > > +SetArgumentPointee(const T & x) +{ + return MakePolymorphicAction(internal::SetArgumentPointeeAction < + N, T, internal::IsAProtocolMessage::value > (x)); } // Creates an action that sets a pointer referent to a given value. template -PolymorphicAction > Assign(T1* ptr, T2 val) { +PolymorphicAction > Assign(T1 * ptr, T2 val) +{ return MakePolymorphicAction(internal::AssignAction(ptr, val)); } @@ -1931,9 +2064,10 @@ PolymorphicAction > Assign(T1* ptr, T2 val) { // Creates an action that sets errno and returns the appropriate error. template PolymorphicAction > -SetErrnoAndReturn(int errval, T result) { +SetErrnoAndReturn(int errval, T result) +{ return MakePolymorphicAction( - internal::SetErrnoAndReturnAction(errval, result)); + internal::SetErrnoAndReturnAction(errval, result)); } #endif // !GTEST_OS_WINDOWS_MOBILE @@ -1943,26 +2077,29 @@ SetErrnoAndReturn(int errval, T result) { // Creates an action that invokes 'function_impl' with no argument. template PolymorphicAction > -InvokeWithoutArgs(FunctionImpl function_impl) { +InvokeWithoutArgs(FunctionImpl function_impl) +{ return MakePolymorphicAction( - internal::InvokeWithoutArgsAction(function_impl)); + internal::InvokeWithoutArgsAction(function_impl)); } // Creates an action that invokes the given method on the given object // with no argument. template PolymorphicAction > -InvokeWithoutArgs(Class* obj_ptr, MethodPtr method_ptr) { +InvokeWithoutArgs(Class * obj_ptr, MethodPtr method_ptr) +{ return MakePolymorphicAction( - internal::InvokeMethodWithoutArgsAction( - obj_ptr, method_ptr)); + internal::InvokeMethodWithoutArgsAction( + obj_ptr, method_ptr)); } // Creates an action that performs an_action and throws away its // result. In other words, it changes the return type of an_action to // void. an_action MUST NOT return void, or the code won't compile. template -inline internal::IgnoreResultAction IgnoreResult(const A& an_action) { +inline internal::IgnoreResultAction IgnoreResult(const A & an_action) +{ return internal::IgnoreResultAction(an_action); } @@ -1974,7 +2111,8 @@ inline internal::IgnoreResultAction IgnoreResult(const A& an_action) { // // ByRef(derived) template -inline internal::ReferenceWrapper ByRef(T& l_value) { // NOLINT +inline internal::ReferenceWrapper ByRef(T & l_value) // NOLINT +{ return internal::ReferenceWrapper(l_value); } @@ -2024,7 +2162,8 @@ inline internal::ReferenceWrapper ByRef(T& l_value) { // NOLINT #include #include // NOLINT -namespace testing { +namespace testing +{ // To implement a cardinality Foo, define: // 1. a class FooCardinality that implements the @@ -2037,8 +2176,9 @@ namespace testing { // management as Cardinality objects can now be copied like plain values. // The implementation of a cardinality. -class CardinalityInterface { - public: +class CardinalityInterface +{ +public: virtual ~CardinalityInterface() {} // Conservative estimate on the lower/upper bound of the number of @@ -2053,7 +2193,7 @@ class CardinalityInterface { virtual bool IsSaturatedByCallCount(int call_count) const = 0; // Describes self to an ostream. - virtual void DescribeTo(::std::ostream* os) const = 0; + virtual void DescribeTo(::std::ostream * os) const = 0; }; // A Cardinality is a copyable and IMMUTABLE (except by assignment) @@ -2061,14 +2201,15 @@ class CardinalityInterface { // be called. The implementation of Cardinality is just a linked_ptr // to const CardinalityInterface, so copying is fairly cheap. // Don't inherit from Cardinality! -class GTEST_API_ Cardinality { - public: +class GTEST_API_ Cardinality +{ +public: // Constructs a null cardinality. Needed for storing Cardinality // objects in STL containers. Cardinality() {} // Constructs a Cardinality from its implementation. - explicit Cardinality(const CardinalityInterface* impl) : impl_(impl) {} + explicit Cardinality(const CardinalityInterface * impl) : impl_(impl) {} // Conservative estimate on the lower/upper bound of the number of // calls allowed. @@ -2076,30 +2217,33 @@ class GTEST_API_ Cardinality { int ConservativeUpperBound() const { return impl_->ConservativeUpperBound(); } // Returns true iff call_count calls will satisfy this cardinality. - bool IsSatisfiedByCallCount(int call_count) const { + bool IsSatisfiedByCallCount(int call_count) const + { return impl_->IsSatisfiedByCallCount(call_count); } // Returns true iff call_count calls will saturate this cardinality. - bool IsSaturatedByCallCount(int call_count) const { + bool IsSaturatedByCallCount(int call_count) const + { return impl_->IsSaturatedByCallCount(call_count); } // Returns true iff call_count calls will over-saturate this // cardinality, i.e. exceed the maximum number of allowed calls. - bool IsOverSaturatedByCallCount(int call_count) const { + bool IsOverSaturatedByCallCount(int call_count) const + { return impl_->IsSaturatedByCallCount(call_count) && - !impl_->IsSatisfiedByCallCount(call_count); + !impl_->IsSatisfiedByCallCount(call_count); } // Describes self to an ostream - void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); } + void DescribeTo(::std::ostream * os) const { impl_->DescribeTo(os); } // Describes the given actual call count to an ostream. static void DescribeActualCallCountTo(int actual_call_count, - ::std::ostream* os); + ::std::ostream * os); - private: +private: internal::linked_ptr impl_; }; @@ -2119,7 +2263,8 @@ GTEST_API_ Cardinality Between(int min, int max); GTEST_API_ Cardinality Exactly(int n); // Creates a cardinality from its implementation. -inline Cardinality MakeCardinality(const CardinalityInterface* c) { +inline Cardinality MakeCardinality(const CardinalityInterface * c) +{ return Cardinality(c); } @@ -2167,8 +2312,10 @@ inline Cardinality MakeCardinality(const CardinalityInterface* c) { #define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ -namespace testing { -namespace internal { +namespace testing +{ +namespace internal +{ // InvokeHelper knows how to unpack an N-tuple and invoke an N-ary // function or method with the unpacked values, where F is a function @@ -2177,234 +2324,267 @@ template class InvokeHelper; template -class InvokeHelper > { - public: +class InvokeHelper > +{ +public: template - static R Invoke(Function function, const ::std::tr1::tuple<>&) { + static R Invoke(Function function, const ::std::tr1::tuple<> &) + { return function(); } template - static R InvokeMethod(Class* obj_ptr, + static R InvokeMethod(Class * obj_ptr, MethodPtr method_ptr, - const ::std::tr1::tuple<>&) { + const ::std::tr1::tuple<> &) + { return (obj_ptr->*method_ptr)(); } }; template -class InvokeHelper > { - public: +class InvokeHelper > +{ +public: template - static R Invoke(Function function, const ::std::tr1::tuple& args) { + static R Invoke(Function function, const ::std::tr1::tuple & args) + { using ::std::tr1::get; return function(get<0>(args)); } template - static R InvokeMethod(Class* obj_ptr, + static R InvokeMethod(Class * obj_ptr, MethodPtr method_ptr, - const ::std::tr1::tuple& args) { + const ::std::tr1::tuple & args) + { using ::std::tr1::get; return (obj_ptr->*method_ptr)(get<0>(args)); } }; template -class InvokeHelper > { - public: +class InvokeHelper > +{ +public: template - static R Invoke(Function function, const ::std::tr1::tuple& args) { + static R Invoke(Function function, const ::std::tr1::tuple & args) + { using ::std::tr1::get; return function(get<0>(args), get<1>(args)); } template - static R InvokeMethod(Class* obj_ptr, + static R InvokeMethod(Class * obj_ptr, MethodPtr method_ptr, - const ::std::tr1::tuple& args) { + const ::std::tr1::tuple & args) + { using ::std::tr1::get; return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args)); } }; template -class InvokeHelper > { - public: +class InvokeHelper > +{ +public: template static R Invoke(Function function, const ::std::tr1::tuple& args) { + A3> & args) + { using ::std::tr1::get; return function(get<0>(args), get<1>(args), get<2>(args)); } template - static R InvokeMethod(Class* obj_ptr, + static R InvokeMethod(Class * obj_ptr, MethodPtr method_ptr, - const ::std::tr1::tuple& args) { + const ::std::tr1::tuple & args) + { using ::std::tr1::get; return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args)); } }; template -class InvokeHelper > { - public: +class InvokeHelper > +{ +public: template static R Invoke(Function function, const ::std::tr1::tuple& args) { + A4> & args) + { using ::std::tr1::get; return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args)); } template - static R InvokeMethod(Class* obj_ptr, + static R InvokeMethod(Class * obj_ptr, MethodPtr method_ptr, - const ::std::tr1::tuple& args) { + const ::std::tr1::tuple & args) + { using ::std::tr1::get; return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), - get<3>(args)); + get<3>(args)); } }; template -class InvokeHelper > { - public: + typename A5> +class InvokeHelper > +{ +public: template static R Invoke(Function function, const ::std::tr1::tuple& args) { + A5> & args) + { using ::std::tr1::get; return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args)); + get<4>(args)); } template - static R InvokeMethod(Class* obj_ptr, + static R InvokeMethod(Class * obj_ptr, MethodPtr method_ptr, - const ::std::tr1::tuple& args) { + const ::std::tr1::tuple & args) + { using ::std::tr1::get; return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), - get<3>(args), get<4>(args)); + get<3>(args), get<4>(args)); } }; template -class InvokeHelper > { - public: + typename A5, typename A6> +class InvokeHelper > +{ +public: template static R Invoke(Function function, const ::std::tr1::tuple& args) { + A5, A6> & args) + { using ::std::tr1::get; return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args)); + get<4>(args), get<5>(args)); } template - static R InvokeMethod(Class* obj_ptr, + static R InvokeMethod(Class * obj_ptr, MethodPtr method_ptr, - const ::std::tr1::tuple& args) { + const ::std::tr1::tuple & args) + { using ::std::tr1::get; return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), - get<3>(args), get<4>(args), get<5>(args)); + get<3>(args), get<4>(args), get<5>(args)); } }; template -class InvokeHelper > { - public: + typename A5, typename A6, typename A7> +class InvokeHelper > +{ +public: template static R Invoke(Function function, const ::std::tr1::tuple& args) { + A5, A6, A7> & args) + { using ::std::tr1::get; return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args), get<6>(args)); + get<4>(args), get<5>(args), get<6>(args)); } template - static R InvokeMethod(Class* obj_ptr, + static R InvokeMethod(Class * obj_ptr, MethodPtr method_ptr, const ::std::tr1::tuple& args) { + A7> & args) + { using ::std::tr1::get; return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), - get<3>(args), get<4>(args), get<5>(args), get<6>(args)); + get<3>(args), get<4>(args), get<5>(args), get<6>(args)); } }; template -class InvokeHelper > { - public: + typename A5, typename A6, typename A7, typename A8> +class InvokeHelper > +{ +public: template static R Invoke(Function function, const ::std::tr1::tuple& args) { + A5, A6, A7, A8> & args) + { using ::std::tr1::get; return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args), get<6>(args), get<7>(args)); + get<4>(args), get<5>(args), get<6>(args), get<7>(args)); } template - static R InvokeMethod(Class* obj_ptr, + static R InvokeMethod(Class * obj_ptr, MethodPtr method_ptr, const ::std::tr1::tuple& args) { + A8> & args) + { using ::std::tr1::get; return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), - get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args)); + get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args)); } }; template -class InvokeHelper > { - public: + typename A5, typename A6, typename A7, typename A8, typename A9> +class InvokeHelper > +{ +public: template static R Invoke(Function function, const ::std::tr1::tuple& args) { + A5, A6, A7, A8, A9> & args) + { using ::std::tr1::get; return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args)); + get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args)); } template - static R InvokeMethod(Class* obj_ptr, + static R InvokeMethod(Class * obj_ptr, MethodPtr method_ptr, const ::std::tr1::tuple& args) { + A9> & args) + { using ::std::tr1::get; return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), - get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args), - get<8>(args)); + get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args), + get<8>(args)); } }; template + typename A5, typename A6, typename A7, typename A8, typename A9, + typename A10> class InvokeHelper > { - public: + A10> > +{ +public: template static R Invoke(Function function, const ::std::tr1::tuple& args) { + A5, A6, A7, A8, A9, A10> & args) + { using ::std::tr1::get; return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), - get<9>(args)); + get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), + get<9>(args)); } template - static R InvokeMethod(Class* obj_ptr, + static R InvokeMethod(Class * obj_ptr, MethodPtr method_ptr, const ::std::tr1::tuple& args) { + A9, A10> & args) + { using ::std::tr1::get; return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), - get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args), - get<8>(args), get<9>(args)); + get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args), + get<8>(args), get<9>(args)); } }; @@ -2419,8 +2599,9 @@ class InvokeHelper -class CallableHelper { - public: +class CallableHelper +{ +public: // Calls a nullary callable. template static R Call(Function function) { return function(); } @@ -2443,68 +2624,77 @@ class CallableHelper { // Calls a binary callable. template - static R Call(Function function, A1 a1, A2 a2) { + static R Call(Function function, A1 a1, A2 a2) + { return function(a1, a2); } // Calls a ternary callable. template - static R Call(Function function, A1 a1, A2 a2, A3 a3) { + static R Call(Function function, A1 a1, A2 a2, A3 a3) + { return function(a1, a2, a3); } // Calls a 4-ary callable. template - static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4) { + typename A4> + static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4) + { return function(a1, a2, a3, a4); } // Calls a 5-ary callable. template - static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { + typename A4, typename A5> + static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) + { return function(a1, a2, a3, a4, a5); } // Calls a 6-ary callable. template - static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { + typename A4, typename A5, typename A6> + static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) + { return function(a1, a2, a3, a4, a5, a6); } // Calls a 7-ary callable. template + typename A4, typename A5, typename A6, typename A7> static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, - A7 a7) { + A7 a7) + { return function(a1, a2, a3, a4, a5, a6, a7); } // Calls a 8-ary callable. template + typename A4, typename A5, typename A6, typename A7, typename A8> static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, - A7 a7, A8 a8) { + A7 a7, A8 a8) + { return function(a1, a2, a3, a4, a5, a6, a7, a8); } // Calls a 9-ary callable. template + typename A4, typename A5, typename A6, typename A7, typename A8, + typename A9> static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, - A7 a7, A8 a8, A9 a9) { + A7 a7, A8 a8, A9 a9) + { return function(a1, a2, a3, a4, a5, a6, a7, a8, a9); } // Calls a 10-ary callable. template + typename A4, typename A5, typename A6, typename A7, typename A8, + typename A9, typename A10> static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, - A7 a7, A8 a8, A9 a9, A10 a10) { + A7 a7, A8 a8, A9 a9, A10 a10) + { return function(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); } }; // class CallableHelper @@ -2533,208 +2723,233 @@ class CallableHelper { // to be in an ascending or descending order. template -class SelectArgs { - public: + int k4, int k5, int k6, int k7, int k8, int k9, int k10> +class SelectArgs +{ +public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), - GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), - GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9), - GMOCK_FIELD_(ArgumentTuple, k10)); + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), + GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), + GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), + GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9), + GMOCK_FIELD_(ArgumentTuple, k10)); typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { + static SelectedArgs Select(const ArgumentTuple & args) + { using ::std::tr1::get; return SelectedArgs(get(args), get(args), get(args), - get(args), get(args), get(args), get(args), - get(args), get(args), get(args)); + get(args), get(args), get(args), get(args), + get(args), get(args), get(args)); } }; template -class SelectArgs { - public: +class SelectArgs < Result, ArgumentTuple, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 > +{ +public: typedef Result type(); typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& /* args */) { + static SelectedArgs Select(const ArgumentTuple & /* args */) + { using ::std::tr1::get; return SelectedArgs(); } }; template -class SelectArgs { - public: +class SelectArgs < Result, ArgumentTuple, + k1, -1, -1, -1, -1, -1, -1, -1, -1, -1 > +{ +public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1)); typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { + static SelectedArgs Select(const ArgumentTuple & args) + { using ::std::tr1::get; return SelectedArgs(get(args)); } }; template -class SelectArgs { - public: +class SelectArgs < Result, ArgumentTuple, + k1, k2, -1, -1, -1, -1, -1, -1, -1, -1 > +{ +public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2)); + GMOCK_FIELD_(ArgumentTuple, k2)); typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { + static SelectedArgs Select(const ArgumentTuple & args) + { using ::std::tr1::get; return SelectedArgs(get(args), get(args)); } }; template -class SelectArgs { - public: +class SelectArgs < Result, ArgumentTuple, + k1, k2, k3, -1, -1, -1, -1, -1, -1, -1 > +{ +public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3)); + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3)); typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { + static SelectedArgs Select(const ArgumentTuple & args) + { using ::std::tr1::get; return SelectedArgs(get(args), get(args), get(args)); } }; template -class SelectArgs { - public: + int k4> +class SelectArgs < Result, ArgumentTuple, + k1, k2, k3, k4, -1, -1, -1, -1, -1, -1 > +{ +public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4)); + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), + GMOCK_FIELD_(ArgumentTuple, k4)); typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { + static SelectedArgs Select(const ArgumentTuple & args) + { using ::std::tr1::get; return SelectedArgs(get(args), get(args), get(args), - get(args)); + get(args)); } }; template -class SelectArgs { - public: + int k4, int k5> +class SelectArgs < Result, ArgumentTuple, + k1, k2, k3, k4, k5, -1, -1, -1, -1, -1 > +{ +public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5)); + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), + GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5)); typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { + static SelectedArgs Select(const ArgumentTuple & args) + { using ::std::tr1::get; return SelectedArgs(get(args), get(args), get(args), - get(args), get(args)); + get(args), get(args)); } }; template -class SelectArgs { - public: + int k4, int k5, int k6> +class SelectArgs < Result, ArgumentTuple, + k1, k2, k3, k4, k5, k6, -1, -1, -1, -1 > +{ +public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), - GMOCK_FIELD_(ArgumentTuple, k6)); + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), + GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), + GMOCK_FIELD_(ArgumentTuple, k6)); typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { + static SelectedArgs Select(const ArgumentTuple & args) + { using ::std::tr1::get; return SelectedArgs(get(args), get(args), get(args), - get(args), get(args), get(args)); + get(args), get(args), get(args)); } }; template -class SelectArgs { - public: + int k4, int k5, int k6, int k7> +class SelectArgs < Result, ArgumentTuple, + k1, k2, k3, k4, k5, k6, k7, -1, -1, -1 > +{ +public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), - GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7)); + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), + GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), + GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7)); typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { + static SelectedArgs Select(const ArgumentTuple & args) + { using ::std::tr1::get; return SelectedArgs(get(args), get(args), get(args), - get(args), get(args), get(args), get(args)); + get(args), get(args), get(args), get(args)); } }; template -class SelectArgs { - public: + int k4, int k5, int k6, int k7, int k8> +class SelectArgs < Result, ArgumentTuple, + k1, k2, k3, k4, k5, k6, k7, k8, -1, -1 > +{ +public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), - GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), - GMOCK_FIELD_(ArgumentTuple, k8)); + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), + GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), + GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), + GMOCK_FIELD_(ArgumentTuple, k8)); typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { + static SelectedArgs Select(const ArgumentTuple & args) + { using ::std::tr1::get; return SelectedArgs(get(args), get(args), get(args), - get(args), get(args), get(args), get(args), - get(args)); + get(args), get(args), get(args), get(args), + get(args)); } }; template -class SelectArgs { - public: + int k4, int k5, int k6, int k7, int k8, int k9> +class SelectArgs < Result, ArgumentTuple, + k1, k2, k3, k4, k5, k6, k7, k8, k9, -1 > +{ +public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), - GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), - GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9)); + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), + GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), + GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), + GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9)); typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { + static SelectedArgs Select(const ArgumentTuple & args) + { using ::std::tr1::get; return SelectedArgs(get(args), get(args), get(args), - get(args), get(args), get(args), get(args), - get(args), get(args)); + get(args), get(args), get(args), get(args), + get(args), get(args)); } }; #undef GMOCK_FIELD_ // Implements the WithArgs action. -template -class WithArgsAction { - public: - explicit WithArgsAction(const InnerAction& action) : action_(action) {} +template < typename InnerAction, int k1 = -1, int k2 = -1, int k3 = -1, + int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1, int k8 = -1, + int k9 = -1, int k10 = -1 > +class WithArgsAction +{ +public: + explicit WithArgsAction(const InnerAction & action) : action_(action) {} template operator Action() const { return MakeAction(new Impl(action_)); } - private: +private: template - class Impl : public ActionInterface { - public: + class Impl : public ActionInterface + { + public: typedef typename Function::Result Result; typedef typename Function::ArgumentTuple ArgumentTuple; - explicit Impl(const InnerAction& action) : action_(action) {} + explicit Impl(const InnerAction & action) : action_(action) {} - virtual Result Perform(const ArgumentTuple& args) { + virtual Result Perform(const ArgumentTuple & args) + { return action_.Perform(SelectArgs::Select(args)); + k5, k6, k7, k8, k9, k10>::Select(args)); } - private: + private: typedef typename SelectArgs::type InnerFunctionType; + k1, k2, k3, k4, k5, k6, k7, k8, k9, k10>::type InnerFunctionType; Action action_; }; @@ -2762,9 +2977,11 @@ struct ExcessiveArg {}; // A helper class needed for implementing the ACTION* macros. template -class ActionHelper { - public: - static Result Perform(Impl* impl, const ::std::tr1::tuple<>& args) { +class ActionHelper +{ +public: + static Result Perform(Impl * impl, const ::std::tr1::tuple<> & args) + { using ::std::tr1::get; return impl->template gmock_PerformImpl<>(args, ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), @@ -2773,7 +2990,8 @@ class ActionHelper { } template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + static Result Perform(Impl * impl, const ::std::tr1::tuple & args) + { using ::std::tr1::get; return impl->template gmock_PerformImpl(args, get<0>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), @@ -2782,7 +3000,8 @@ class ActionHelper { } template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + static Result Perform(Impl * impl, const ::std::tr1::tuple & args) + { using ::std::tr1::get; return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), @@ -2791,7 +3010,8 @@ class ActionHelper { } template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + static Result Perform(Impl * impl, const ::std::tr1::tuple & args) + { using ::std::tr1::get; return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), ExcessiveArg(), ExcessiveArg(), @@ -2800,8 +3020,9 @@ class ActionHelper { } template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + static Result Perform(Impl * impl, const ::std::tr1::tuple & args) + { using ::std::tr1::get; return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), ExcessiveArg(), @@ -2810,8 +3031,9 @@ class ActionHelper { } template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + static Result Perform(Impl * impl, const ::std::tr1::tuple & args) + { using ::std::tr1::get; return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args), @@ -2820,9 +3042,10 @@ class ActionHelper { } template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + typename A5> + static Result Perform(Impl * impl, const ::std::tr1::tuple & args) + { using ::std::tr1::get; return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args), @@ -2831,9 +3054,10 @@ class ActionHelper { } template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + typename A5, typename A6> + static Result Perform(Impl * impl, const ::std::tr1::tuple & args) + { using ::std::tr1::get; return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args), @@ -2842,36 +3066,39 @@ class ActionHelper { } template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + typename A5, typename A6, typename A7> + static Result Perform(Impl * impl, const ::std::tr1::tuple & args) + { using ::std::tr1::get; return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args), get<6>(args), get<7>(args), ExcessiveArg(), - ExcessiveArg()); + A7>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), + get<4>(args), get<5>(args), get<6>(args), get<7>(args), ExcessiveArg(), + ExcessiveArg()); } template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + typename A5, typename A6, typename A7, typename A8> + static Result Perform(Impl * impl, const ::std::tr1::tuple & args) + { using ::std::tr1::get; return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), - ExcessiveArg()); + A8>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), + get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), + ExcessiveArg()); } template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + typename A5, typename A6, typename A7, typename A8, typename A9> + static Result Perform(Impl * impl, const ::std::tr1::tuple & args) + { using ::std::tr1::get; return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), - get<9>(args)); + A9>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), + get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), + get<9>(args)); } }; @@ -2886,160 +3113,179 @@ class ActionHelper { // function templates, so we have to overload it. template inline internal::WithArgsAction -WithArgs(const InnerAction& action) { +WithArgs(const InnerAction & action) +{ return internal::WithArgsAction(action); } template inline internal::WithArgsAction -WithArgs(const InnerAction& action) { +WithArgs(const InnerAction & action) +{ return internal::WithArgsAction(action); } template inline internal::WithArgsAction -WithArgs(const InnerAction& action) { +WithArgs(const InnerAction & action) +{ return internal::WithArgsAction(action); } template inline internal::WithArgsAction -WithArgs(const InnerAction& action) { +WithArgs(const InnerAction & action) +{ return internal::WithArgsAction(action); } template inline internal::WithArgsAction -WithArgs(const InnerAction& action) { +WithArgs(const InnerAction & action) +{ return internal::WithArgsAction(action); } template inline internal::WithArgsAction -WithArgs(const InnerAction& action) { +WithArgs(const InnerAction & action) +{ return internal::WithArgsAction(action); } template + typename InnerAction> inline internal::WithArgsAction -WithArgs(const InnerAction& action) { +WithArgs(const InnerAction & action) +{ return internal::WithArgsAction(action); + k7>(action); } template + typename InnerAction> inline internal::WithArgsAction -WithArgs(const InnerAction& action) { +WithArgs(const InnerAction & action) +{ return internal::WithArgsAction(action); + k8>(action); } template + int k9, typename InnerAction> inline internal::WithArgsAction -WithArgs(const InnerAction& action) { +WithArgs(const InnerAction & action) +{ return internal::WithArgsAction(action); + k9>(action); } template + int k9, int k10, typename InnerAction> inline internal::WithArgsAction -WithArgs(const InnerAction& action) { + k9, k10> + WithArgs(const InnerAction & action) +{ return internal::WithArgsAction(action); + k9, k10>(action); } // Creates an action that does actions a1, a2, ..., sequentially in // each invocation. template inline internal::DoBothAction -DoAll(Action1 a1, Action2 a2) { +DoAll(Action1 a1, Action2 a2) +{ return internal::DoBothAction(a1, a2); } template inline internal::DoBothAction > -DoAll(Action1 a1, Action2 a2, Action3 a3) { + Action3> > + DoAll(Action1 a1, Action2 a2, Action3 a3) +{ return DoAll(a1, DoAll(a2, a3)); } template + typename Action4> inline internal::DoBothAction > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4) { + internal::DoBothAction > > + DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4) +{ return DoAll(a1, DoAll(a2, a3, a4)); } template + typename Action4, typename Action5> inline internal::DoBothAction > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5) { + internal::DoBothAction > > > + DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5) +{ return DoAll(a1, DoAll(a2, a3, a4, a5)); } template + typename Action4, typename Action5, typename Action6> inline internal::DoBothAction > > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6) { + internal::DoBothAction > > > > + DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6) +{ return DoAll(a1, DoAll(a2, a3, a4, a5, a6)); } template + typename Action4, typename Action5, typename Action6, typename Action7> inline internal::DoBothAction > > > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, - Action7 a7) { + internal::DoBothAction > > > > > + DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, + Action7 a7) +{ return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7)); } template + typename Action4, typename Action5, typename Action6, typename Action7, + typename Action8> inline internal::DoBothAction > > > > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, - Action7 a7, Action8 a8) { + internal::DoBothAction > > > > > > + DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, + Action7 a7, Action8 a8) +{ return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8)); } template + typename Action4, typename Action5, typename Action6, typename Action7, + typename Action8, typename Action9> inline internal::DoBothAction > > > > > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, - Action7 a7, Action8 a8, Action9 a9) { + internal::DoBothAction > > > > > > > + DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, + Action7 a7, Action8 a8, Action9 a9) +{ return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9)); } template + typename Action4, typename Action5, typename Action6, typename Action7, + typename Action8, typename Action9, typename Action10> inline internal::DoBothAction > > > > > > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, - Action7 a7, Action8 a8, Action9 a9, Action10 a10) { + internal::DoBothAction > > > > > > > > + DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, + Action7 a7, Action8 a8, Action9 a9, Action10 a10) +{ return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9, a10)); } @@ -4342,7 +4588,8 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, p9##_type>::gmock_Impl::gmock_PerformImpl(\ GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const -namespace testing { +namespace testing +{ // The ACTION*() macros trigger warning C4100 (unreferenced formal // parameter) in MSVC with -W4. Unfortunately they cannot be fixed in @@ -4386,79 +4633,90 @@ namespace testing { ACTION_TEMPLATE(InvokeArgument, HAS_1_TEMPLATE_PARAMS(int, k), - AND_0_VALUE_PARAMS()) { + AND_0_VALUE_PARAMS()) +{ return internal::CallableHelper::Call( - ::std::tr1::get(args)); + ::std::tr1::get(args)); } ACTION_TEMPLATE(InvokeArgument, HAS_1_TEMPLATE_PARAMS(int, k), - AND_1_VALUE_PARAMS(p0)) { + AND_1_VALUE_PARAMS(p0)) +{ return internal::CallableHelper::Call( - ::std::tr1::get(args), p0); + ::std::tr1::get(args), p0); } ACTION_TEMPLATE(InvokeArgument, HAS_1_TEMPLATE_PARAMS(int, k), - AND_2_VALUE_PARAMS(p0, p1)) { + AND_2_VALUE_PARAMS(p0, p1)) +{ return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1); + ::std::tr1::get(args), p0, p1); } ACTION_TEMPLATE(InvokeArgument, HAS_1_TEMPLATE_PARAMS(int, k), - AND_3_VALUE_PARAMS(p0, p1, p2)) { + AND_3_VALUE_PARAMS(p0, p1, p2)) +{ return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2); + ::std::tr1::get(args), p0, p1, p2); } ACTION_TEMPLATE(InvokeArgument, HAS_1_TEMPLATE_PARAMS(int, k), - AND_4_VALUE_PARAMS(p0, p1, p2, p3)) { + AND_4_VALUE_PARAMS(p0, p1, p2, p3)) +{ return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2, p3); + ::std::tr1::get(args), p0, p1, p2, p3); } ACTION_TEMPLATE(InvokeArgument, HAS_1_TEMPLATE_PARAMS(int, k), - AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) { + AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) +{ return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2, p3, p4); + ::std::tr1::get(args), p0, p1, p2, p3, p4); } ACTION_TEMPLATE(InvokeArgument, HAS_1_TEMPLATE_PARAMS(int, k), - AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) { + AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) +{ return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2, p3, p4, p5); + ::std::tr1::get(args), p0, p1, p2, p3, p4, p5); } ACTION_TEMPLATE(InvokeArgument, HAS_1_TEMPLATE_PARAMS(int, k), - AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) { + AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) +{ return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6); + ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6); } ACTION_TEMPLATE(InvokeArgument, HAS_1_TEMPLATE_PARAMS(int, k), - AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) { + AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) +{ return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6, p7); + ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6, p7); } ACTION_TEMPLATE(InvokeArgument, HAS_1_TEMPLATE_PARAMS(int, k), - AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) { + AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) +{ return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6, p7, p8); + ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6, p7, p8); } ACTION_TEMPLATE(InvokeArgument, HAS_1_TEMPLATE_PARAMS(int, k), - AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) { + AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) +{ return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); + ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } // Various overloads for ReturnNew(). @@ -4468,67 +4726,78 @@ ACTION_TEMPLATE(InvokeArgument, // a1, a2, ..., and a_k. The caller assumes ownership of the returned value. ACTION_TEMPLATE(ReturnNew, HAS_1_TEMPLATE_PARAMS(typename, T), - AND_0_VALUE_PARAMS()) { + AND_0_VALUE_PARAMS()) +{ return new T(); } ACTION_TEMPLATE(ReturnNew, HAS_1_TEMPLATE_PARAMS(typename, T), - AND_1_VALUE_PARAMS(p0)) { + AND_1_VALUE_PARAMS(p0)) +{ return new T(p0); } ACTION_TEMPLATE(ReturnNew, HAS_1_TEMPLATE_PARAMS(typename, T), - AND_2_VALUE_PARAMS(p0, p1)) { + AND_2_VALUE_PARAMS(p0, p1)) +{ return new T(p0, p1); } ACTION_TEMPLATE(ReturnNew, HAS_1_TEMPLATE_PARAMS(typename, T), - AND_3_VALUE_PARAMS(p0, p1, p2)) { + AND_3_VALUE_PARAMS(p0, p1, p2)) +{ return new T(p0, p1, p2); } ACTION_TEMPLATE(ReturnNew, HAS_1_TEMPLATE_PARAMS(typename, T), - AND_4_VALUE_PARAMS(p0, p1, p2, p3)) { + AND_4_VALUE_PARAMS(p0, p1, p2, p3)) +{ return new T(p0, p1, p2, p3); } ACTION_TEMPLATE(ReturnNew, HAS_1_TEMPLATE_PARAMS(typename, T), - AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) { + AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) +{ return new T(p0, p1, p2, p3, p4); } ACTION_TEMPLATE(ReturnNew, HAS_1_TEMPLATE_PARAMS(typename, T), - AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) { + AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) +{ return new T(p0, p1, p2, p3, p4, p5); } ACTION_TEMPLATE(ReturnNew, HAS_1_TEMPLATE_PARAMS(typename, T), - AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) { + AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) +{ return new T(p0, p1, p2, p3, p4, p5, p6); } ACTION_TEMPLATE(ReturnNew, HAS_1_TEMPLATE_PARAMS(typename, T), - AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) { + AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) +{ return new T(p0, p1, p2, p3, p4, p5, p6, p7); } ACTION_TEMPLATE(ReturnNew, HAS_1_TEMPLATE_PARAMS(typename, T), - AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) { + AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) +{ return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8); } ACTION_TEMPLATE(ReturnNew, HAS_1_TEMPLATE_PARAMS(typename, T), - AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) { + AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) +{ return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } @@ -4708,7 +4977,8 @@ ACTION_TEMPLATE(ReturnNew, #include // NOLINT -- must be after gtest.h #endif -namespace testing { +namespace testing +{ // To implement a matcher Foo for type T, define: // 1. a class FooMatcherImpl that implements the @@ -4729,25 +4999,28 @@ namespace testing { // bool InterestedInWhy(bool result) const; // to indicate whether the listener is interested in why the match // result is 'result'. -class MatchResultListener { - public: +class MatchResultListener +{ +public: // Creates a listener object with the given underlying ostream. The // listener does not own the ostream, and does not dereference it // in the constructor or destructor. - explicit MatchResultListener(::std::ostream* os) : stream_(os) {} + explicit MatchResultListener(::std::ostream * os) : stream_(os) {} virtual ~MatchResultListener() = 0; // Makes this class abstract. // Streams x to the underlying ostream; does nothing if the ostream // is NULL. template - MatchResultListener& operator<<(const T& x) { + MatchResultListener & operator<<(const T & x) + { if (stream_ != NULL) - *stream_ << x; + { *stream_ << x; } + return *this; } // Returns the underlying ostream. - ::std::ostream* stream() { return stream_; } + ::std::ostream * stream() { return stream_; } // Returns true iff the listener is interested in an explanation of // the match result. A matcher's MatchAndExplain() method can use @@ -4755,19 +5028,21 @@ class MatchResultListener { // intends to hear it. bool IsInterested() const { return stream_ != NULL; } - private: - ::std::ostream* const stream_; +private: + ::std::ostream * const stream_; GTEST_DISALLOW_COPY_AND_ASSIGN_(MatchResultListener); }; -inline MatchResultListener::~MatchResultListener() { +inline MatchResultListener::~MatchResultListener() +{ } // An instance of a subclass of this knows how to describe itself as a // matcher. -class MatcherDescriberInterface { - public: +class MatcherDescriberInterface +{ +public: virtual ~MatcherDescriberInterface() {} // Describes this matcher to an ostream. The function should print @@ -4775,7 +5050,7 @@ class MatcherDescriberInterface { // matcher should have. The subject of the verb phrase is the value // being matched. For example, the DescribeTo() method of the Gt(7) // matcher prints "is greater than 7". - virtual void DescribeTo(::std::ostream* os) const = 0; + virtual void DescribeTo(::std::ostream * os) const = 0; // Describes the negation of this matcher to an ostream. For // example, if the description of this matcher is "is greater than @@ -4783,7 +5058,8 @@ class MatcherDescriberInterface { // You are not required to override this when implementing // MatcherInterface, but it is highly advised so that your matcher // can produce good error messages. - virtual void DescribeNegationTo(::std::ostream* os) const { + virtual void DescribeNegationTo(::std::ostream * os) const + { *os << "not ("; DescribeTo(os); *os << ")"; @@ -4792,8 +5068,9 @@ class MatcherDescriberInterface { // The implementation of a matcher. template -class MatcherInterface : public MatcherDescriberInterface { - public: +class MatcherInterface : public MatcherDescriberInterface +{ +public: // Returns true iff the matcher matches x; also explains the match // result to 'listener' if necessary (see the next paragraph), in // the form of a non-restrictive relative clause ("which ...", @@ -4825,7 +5102,7 @@ class MatcherInterface : public MatcherDescriberInterface { // can talk to 'listener' without checking its validity first. // However, in order to implement dummy listeners efficiently, // listener->stream() may be NULL. - virtual bool MatchAndExplain(T x, MatchResultListener* listener) const = 0; + virtual bool MatchAndExplain(T x, MatchResultListener * listener) const = 0; // Inherits these methods from MatcherDescriberInterface: // virtual void DescribeTo(::std::ostream* os) const = 0; @@ -4833,8 +5110,9 @@ class MatcherInterface : public MatcherDescriberInterface { }; // A match result listener that stores the explanation in a string. -class StringMatchResultListener : public MatchResultListener { - public: +class StringMatchResultListener : public MatchResultListener +{ +public: StringMatchResultListener() : MatchResultListener(&ss_) {} // Returns the explanation accumulated so far. @@ -4843,32 +5121,35 @@ class StringMatchResultListener : public MatchResultListener { // Clears the explanation accumulated so far. void Clear() { ss_.str(""); } - private: +private: ::std::stringstream ss_; GTEST_DISALLOW_COPY_AND_ASSIGN_(StringMatchResultListener); }; -namespace internal { +namespace internal +{ // A match result listener that ignores the explanation. -class DummyMatchResultListener : public MatchResultListener { - public: +class DummyMatchResultListener : public MatchResultListener +{ +public: DummyMatchResultListener() : MatchResultListener(NULL) {} - private: +private: GTEST_DISALLOW_COPY_AND_ASSIGN_(DummyMatchResultListener); }; // A match result listener that forwards the explanation to a given // ostream. The difference between this and MatchResultListener is // that the former is concrete. -class StreamMatchResultListener : public MatchResultListener { - public: - explicit StreamMatchResultListener(::std::ostream* os) - : MatchResultListener(os) {} +class StreamMatchResultListener : public MatchResultListener +{ +public: + explicit StreamMatchResultListener(::std::ostream * os) + : MatchResultListener(os) {} - private: +private: GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamMatchResultListener); }; @@ -4876,30 +5157,35 @@ class StreamMatchResultListener : public MatchResultListener { // from it. We put functionalities common to all Matcher // specializations here to avoid code duplication. template -class MatcherBase { - public: +class MatcherBase +{ +public: // Returns true iff the matcher matches x; also explains the match // result to 'listener'. - bool MatchAndExplain(T x, MatchResultListener* listener) const { + bool MatchAndExplain(T x, MatchResultListener * listener) const + { return impl_->MatchAndExplain(x, listener); } // Returns true iff this matcher matches x. - bool Matches(T x) const { + bool Matches(T x) const + { DummyMatchResultListener dummy; return MatchAndExplain(x, &dummy); } // Describes this matcher to an ostream. - void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); } + void DescribeTo(::std::ostream * os) const { impl_->DescribeTo(os); } // Describes the negation of this matcher to an ostream. - void DescribeNegationTo(::std::ostream* os) const { + void DescribeNegationTo(::std::ostream * os) const + { impl_->DescribeNegationTo(os); } // Explains why x matches, or doesn't match, the matcher. - void ExplainMatchResultTo(T x, ::std::ostream* os) const { + void ExplainMatchResultTo(T x, ::std::ostream * os) const + { StreamMatchResultListener listener(os); MatchAndExplain(x, &listener); } @@ -4907,20 +5193,21 @@ class MatcherBase { // Returns the describer for this matcher object; retains ownership // of the describer, which is only guaranteed to be alive when // this matcher object is alive. - const MatcherDescriberInterface* GetDescriber() const { + const MatcherDescriberInterface * GetDescriber() const + { return impl_.get(); } - protected: +protected: MatcherBase() {} // Constructs a matcher from its implementation. - explicit MatcherBase(const MatcherInterface* impl) - : impl_(impl) {} + explicit MatcherBase(const MatcherInterface * impl) + : impl_(impl) {} virtual ~MatcherBase() {} - private: +private: // shared_ptr (util/gtl/shared_ptr.h) and linked_ptr have similar // interfaces. The former dynamically allocates a chunk of memory // to hold the reference count, while the latter tracks all @@ -4943,16 +5230,17 @@ class MatcherBase { // MatcherInterface, so copying is fairly cheap. Don't inherit // from Matcher! template -class Matcher : public internal::MatcherBase { - public: +class Matcher : public internal::MatcherBase +{ +public: // Constructs a null matcher. Needed for storing Matcher objects in STL // containers. A default-constructed matcher is not yet initialized. You // cannot use it until a valid value has been assigned to it. Matcher() {} // Constructs a matcher from its implementation. - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} + explicit Matcher(const MatcherInterface * impl) + : internal::MatcherBase(impl) {} // Implicit constructor here allows people to write // EXPECT_CALL(foo, Bar(5)) instead of EXPECT_CALL(foo, Bar(Eq(5))) sometimes @@ -4963,37 +5251,39 @@ class Matcher : public internal::MatcherBase { // instead of Eq(str) and "foo" instead of Eq("foo") when a string // matcher is expected. template <> -class GTEST_API_ Matcher - : public internal::MatcherBase { - public: +class GTEST_API_ Matcher + : public internal::MatcherBase +{ +public: Matcher() {} - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} + explicit Matcher(const MatcherInterface * impl) + : internal::MatcherBase(impl) {} // Allows the user to write str instead of Eq(str) sometimes, where // str is a string object. - Matcher(const internal::string& s); // NOLINT + Matcher(const internal::string & s); // NOLINT // Allows the user to write "foo" instead of Eq("foo") sometimes. - Matcher(const char* s); // NOLINT + Matcher(const char * s); // NOLINT }; template <> class GTEST_API_ Matcher - : public internal::MatcherBase { - public: + : public internal::MatcherBase +{ +public: Matcher() {} - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} + explicit Matcher(const MatcherInterface * impl) + : internal::MatcherBase(impl) {} // Allows the user to write str instead of Eq(str) sometimes, where // str is a string object. - Matcher(const internal::string& s); // NOLINT + Matcher(const internal::string & s); // NOLINT // Allows the user to write "foo" instead of Eq("foo") sometimes. - Matcher(const char* s); // NOLINT + Matcher(const char * s); // NOLINT }; #if GTEST_HAS_STRING_PIECE_ @@ -5001,20 +5291,21 @@ class GTEST_API_ Matcher // instead of Eq(str) and "foo" instead of Eq("foo") when a StringPiece // matcher is expected. template <> -class GTEST_API_ Matcher - : public internal::MatcherBase { - public: +class GTEST_API_ Matcher + : public internal::MatcherBase +{ +public: Matcher() {} - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} + explicit Matcher(const MatcherInterface * impl) + : internal::MatcherBase(impl) {} // Allows the user to write str instead of Eq(str) sometimes, where // str is a string object. - Matcher(const internal::string& s); // NOLINT + Matcher(const internal::string & s); // NOLINT // Allows the user to write "foo" instead of Eq("foo") sometimes. - Matcher(const char* s); // NOLINT + Matcher(const char * s); // NOLINT // Allows the user to pass StringPieces directly. Matcher(StringPiece s); // NOLINT @@ -5022,19 +5313,20 @@ class GTEST_API_ Matcher template <> class GTEST_API_ Matcher - : public internal::MatcherBase { - public: + : public internal::MatcherBase +{ +public: Matcher() {} - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} + explicit Matcher(const MatcherInterface * impl) + : internal::MatcherBase(impl) {} // Allows the user to write str instead of Eq(str) sometimes, where // str is a string object. - Matcher(const internal::string& s); // NOLINT + Matcher(const internal::string & s); // NOLINT // Allows the user to write "foo" instead of Eq("foo") sometimes. - Matcher(const char* s); // NOLINT + Matcher(const char * s); // NOLINT // Allows the user to pass StringPieces directly. Matcher(StringPiece s); // NOLINT @@ -5054,42 +5346,48 @@ class GTEST_API_ Matcher // // See the definition of NotNull() for a complete example. template -class PolymorphicMatcher { - public: - explicit PolymorphicMatcher(const Impl& an_impl) : impl_(an_impl) {} +class PolymorphicMatcher +{ +public: + explicit PolymorphicMatcher(const Impl & an_impl) : impl_(an_impl) {} // Returns a mutable reference to the underlying matcher // implementation object. - Impl& mutable_impl() { return impl_; } + Impl & mutable_impl() { return impl_; } // Returns an immutable reference to the underlying matcher // implementation object. - const Impl& impl() const { return impl_; } + const Impl & impl() const { return impl_; } template - operator Matcher() const { + operator Matcher() const + { return Matcher(new MonomorphicImpl(impl_)); } - private: +private: template - class MonomorphicImpl : public MatcherInterface { - public: - explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {} + class MonomorphicImpl : public MatcherInterface + { + public: + explicit MonomorphicImpl(const Impl & impl) : impl_(impl) {} - virtual void DescribeTo(::std::ostream* os) const { + virtual void DescribeTo(::std::ostream * os) const + { impl_.DescribeTo(os); } - virtual void DescribeNegationTo(::std::ostream* os) const { + virtual void DescribeNegationTo(::std::ostream * os) const + { impl_.DescribeNegationTo(os); } - virtual bool MatchAndExplain(T x, MatchResultListener* listener) const { + virtual bool MatchAndExplain(T x, MatchResultListener * listener) const + { return impl_.MatchAndExplain(x, listener); } - private: + private: const Impl impl_; GTEST_DISALLOW_ASSIGN_(MonomorphicImpl); @@ -5108,7 +5406,8 @@ class PolymorphicMatcher { // vs // Matcher(foo); template -inline Matcher MakeMatcher(const MatcherInterface* impl) { +inline Matcher MakeMatcher(const MatcherInterface * impl) +{ return Matcher(impl); } @@ -5120,13 +5419,15 @@ inline Matcher MakeMatcher(const MatcherInterface* impl) { // vs // PolymorphicMatcher(foo); template -inline PolymorphicMatcher MakePolymorphicMatcher(const Impl& impl) { +inline PolymorphicMatcher MakePolymorphicMatcher(const Impl & impl) +{ return PolymorphicMatcher(impl); } // Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION // and MUST NOT BE USED IN USER CODE!!! -namespace internal { +namespace internal +{ // The MatcherCastImpl class template is a helper for implementing // MatcherCast(). We need this helper in order to partially @@ -5139,9 +5440,11 @@ namespace internal { // Matcher but is not one yet; for example, Eq(value)) or a value (for // example, "hello"). template -class MatcherCastImpl { - public: - static Matcher Cast(M polymorphic_matcher_or_value) { +class MatcherCastImpl +{ +public: + static Matcher Cast(M polymorphic_matcher_or_value) + { // M can be a polymorhic matcher, in which case we want to use // its conversion operator to create Matcher. Or it can be a value // that should be passed to the Matcher's constructor. @@ -5156,13 +5459,14 @@ class MatcherCastImpl { // a user-defined conversion from M to T if one exists (assuming M is // a value). return CastImpl( - polymorphic_matcher_or_value, - BooleanConstant< - internal::ImplicitlyConvertible >::value>()); + polymorphic_matcher_or_value, + BooleanConstant < + internal::ImplicitlyConvertible >::value > ()); } - private: - static Matcher CastImpl(M value, BooleanConstant) { +private: + static Matcher CastImpl(M value, BooleanConstant) + { // M can't be implicitly converted to Matcher, so M isn't a polymorphic // matcher. It must be a value then. Use direct initialization to create // a matcher. @@ -5170,7 +5474,8 @@ class MatcherCastImpl { } static Matcher CastImpl(M polymorphic_matcher_or_value, - BooleanConstant) { + BooleanConstant) + { // M is implicitly convertible to Matcher, which means that either // M is a polymorhpic matcher or Matcher has an implicit constructor // from M. In both cases using the implicit conversion will produce a @@ -5187,32 +5492,38 @@ class MatcherCastImpl { // is already a Matcher. This only compiles when type T can be // statically converted to type U. template -class MatcherCastImpl > { - public: - static Matcher Cast(const Matcher& source_matcher) { +class MatcherCastImpl > +{ +public: + static Matcher Cast(const Matcher & source_matcher) + { return Matcher(new Impl(source_matcher)); } - private: - class Impl : public MatcherInterface { - public: - explicit Impl(const Matcher& source_matcher) - : source_matcher_(source_matcher) {} +private: + class Impl : public MatcherInterface + { + public: + explicit Impl(const Matcher & source_matcher) + : source_matcher_(source_matcher) {} // We delegate the matching logic to the source matcher. - virtual bool MatchAndExplain(T x, MatchResultListener* listener) const { + virtual bool MatchAndExplain(T x, MatchResultListener * listener) const + { return source_matcher_.MatchAndExplain(static_cast(x), listener); } - virtual void DescribeTo(::std::ostream* os) const { + virtual void DescribeTo(::std::ostream * os) const + { source_matcher_.DescribeTo(os); } - virtual void DescribeNegationTo(::std::ostream* os) const { + virtual void DescribeNegationTo(::std::ostream * os) const + { source_matcher_.DescribeNegationTo(os); } - private: + private: const Matcher source_matcher_; GTEST_DISALLOW_ASSIGN_(Impl); @@ -5222,9 +5533,10 @@ class MatcherCastImpl > { // This even more specialized version is used for efficiently casting // a matcher to its own type. template -class MatcherCastImpl > { - public: - static Matcher Cast(const Matcher& matcher) { return matcher; } +class MatcherCastImpl > +{ +public: + static Matcher Cast(const Matcher & matcher) { return matcher; } }; } // namespace internal @@ -5234,7 +5546,8 @@ class MatcherCastImpl > { // matcher m and returns a Matcher. It compiles only when T can be // statically converted to the argument type of m. template -inline Matcher MatcherCast(M matcher) { +inline Matcher MatcherCast(M matcher) +{ return internal::MatcherCastImpl::Cast(matcher); } @@ -5246,12 +5559,14 @@ inline Matcher MatcherCast(M matcher) { // template ... (const Matcher&) // for function templates but can for member function templates. template -class SafeMatcherCastImpl { - public: +class SafeMatcherCastImpl +{ +public: // This overload handles polymorphic matchers and values only since // monomorphic matchers are handled by the next one. template - static inline Matcher Cast(M polymorphic_matcher_or_value) { + static inline Matcher Cast(M polymorphic_matcher_or_value) + { return internal::MatcherCastImpl::Cast(polymorphic_matcher_or_value); } @@ -5265,15 +5580,16 @@ class SafeMatcherCastImpl { // underlying Matcher may be interested in the argument's address, which // is not preserved in the conversion from T to U. template - static inline Matcher Cast(const Matcher& matcher) { + static inline Matcher Cast(const Matcher & matcher) + { // Enforce that T can be implicitly converted to U. GTEST_COMPILE_ASSERT_((internal::ImplicitlyConvertible::value), T_must_be_implicitly_convertible_to_U); // Enforce that we are not converting a non-reference type T to a reference // type U. GTEST_COMPILE_ASSERT_( - internal::is_reference::value || !internal::is_reference::value, - cannot_convert_non_referentce_arg_to_reference); + internal::is_reference::value || !internal::is_reference::value, + cannot_convert_non_referentce_arg_to_reference); // In case both T and U are arithmetic types, enforce that the // conversion is not lossy. typedef GTEST_REMOVE_REFERENCE_AND_CONST_(T) RawT; @@ -5281,15 +5597,16 @@ class SafeMatcherCastImpl { const bool kTIsOther = GMOCK_KIND_OF_(RawT) == internal::kOther; const bool kUIsOther = GMOCK_KIND_OF_(RawU) == internal::kOther; GTEST_COMPILE_ASSERT_( - kTIsOther || kUIsOther || - (internal::LosslessArithmeticConvertible::value), - conversion_of_arithmetic_types_must_be_lossless); + kTIsOther || kUIsOther || + (internal::LosslessArithmeticConvertible::value), + conversion_of_arithmetic_types_must_be_lossless); return MatcherCast(matcher); } }; template -inline Matcher SafeMatcherCast(const M& polymorphic_matcher) { +inline Matcher SafeMatcherCast(const M & polymorphic_matcher) +{ return SafeMatcherCastImpl::Cast(polymorphic_matcher); } @@ -5299,20 +5616,24 @@ Matcher A(); // Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION // and MUST NOT BE USED IN USER CODE!!! -namespace internal { +namespace internal +{ // If the explanation is not empty, prints it to the ostream. -inline void PrintIfNotEmpty(const internal::string& explanation, - ::std::ostream* os) { - if (explanation != "" && os != NULL) { - *os << ", " << explanation; - } +inline void PrintIfNotEmpty(const internal::string & explanation, + ::std::ostream * os) +{ + if (explanation != "" && os != NULL) + { + *os << ", " << explanation; + } } // Returns true if the given type name is easy to read by a human. // This is used to decide whether printing the type of a value might // be helpful. -inline bool IsReadableTypeName(const string& type_name) { +inline bool IsReadableTypeName(const string & type_name) +{ // We consider a type name readable if it's short or doesn't contain // a template or function type. return (type_name.length() <= 20 || @@ -5325,22 +5646,26 @@ inline bool IsReadableTypeName(const string& type_name) { // Value cannot be passed by const reference, because some matchers take a // non-const argument. template -bool MatchPrintAndExplain(Value& value, const Matcher& matcher, - MatchResultListener* listener) { - if (!listener->IsInterested()) { - // If the listener is not interested, we do not need to construct the - // inner explanation. - return matcher.Matches(value); - } +bool MatchPrintAndExplain(Value & value, const Matcher & matcher, + MatchResultListener * listener) +{ + if (!listener->IsInterested()) + { + // If the listener is not interested, we do not need to construct the + // inner explanation. + return matcher.Matches(value); + } StringMatchResultListener inner_listener; const bool match = matcher.MatchAndExplain(value, &inner_listener); UniversalPrint(value, listener->stream()); #if GTEST_HAS_RTTI - const string& type_name = GetTypeName(); + const string & type_name = GetTypeName(); + if (IsReadableTypeName(type_name)) - *listener->stream() << " (of type " << type_name << ")"; + { *listener->stream() << " (of type " << type_name << ")"; } + #endif PrintIfNotEmpty(inner_listener.str(), listener->stream()); @@ -5350,17 +5675,19 @@ bool MatchPrintAndExplain(Value& value, const Matcher& matcher, // An internal helper class for doing compile-time loop on a tuple's // fields. template -class TuplePrefix { - public: +class TuplePrefix +{ +public: // TuplePrefix::Matches(matcher_tuple, value_tuple) returns true // iff the first N fields of matcher_tuple matches the first N // fields of value_tuple, respectively. template - static bool Matches(const MatcherTuple& matcher_tuple, - const ValueTuple& value_tuple) { + static bool Matches(const MatcherTuple & matcher_tuple, + const ValueTuple & value_tuple) + { using ::std::tr1::get; - return TuplePrefix::Matches(matcher_tuple, value_tuple) - && get(matcher_tuple).Matches(get(value_tuple)); + return TuplePrefix < N - 1 >::Matches(matcher_tuple, value_tuple) + && get < N - 1 > (matcher_tuple).Matches(get < N - 1 > (value_tuple)); } // TuplePrefix::ExplainMatchFailuresTo(matchers, values, os) @@ -5368,54 +5695,59 @@ class TuplePrefix { // against the first N fields of values. If there is no failure, // nothing will be streamed to os. template - static void ExplainMatchFailuresTo(const MatcherTuple& matchers, - const ValueTuple& values, - ::std::ostream* os) { + static void ExplainMatchFailuresTo(const MatcherTuple & matchers, + const ValueTuple & values, + ::std::ostream * os) + { using ::std::tr1::tuple_element; using ::std::tr1::get; // First, describes failures in the first N - 1 fields. - TuplePrefix::ExplainMatchFailuresTo(matchers, values, os); + TuplePrefix < N - 1 >::ExplainMatchFailuresTo(matchers, values, os); // Then describes the failure (if any) in the (N - 1)-th (0-based) // field. - typename tuple_element::type matcher = - get(matchers); - typedef typename tuple_element::type Value; - Value value = get(values); + typename tuple_element < N - 1, MatcherTuple >::type matcher = + get < N - 1 > (matchers); + typedef typename tuple_element < N - 1, ValueTuple >::type Value; + Value value = get < N - 1 > (values); StringMatchResultListener listener; - if (!matcher.MatchAndExplain(value, &listener)) { - // TODO(wan): include in the message the name of the parameter - // as used in MOCK_METHOD*() when possible. - *os << " Expected arg #" << N - 1 << ": "; - get(matchers).DescribeTo(os); - *os << "\n Actual: "; - // We remove the reference in type Value to prevent the - // universal printer from printing the address of value, which - // isn't interesting to the user most of the time. The - // matcher's MatchAndExplain() method handles the case when - // the address is interesting. - internal::UniversalPrint(value, os); - PrintIfNotEmpty(listener.str(), os); - *os << "\n"; - } + + if (!matcher.MatchAndExplain(value, &listener)) + { + // TODO(wan): include in the message the name of the parameter + // as used in MOCK_METHOD*() when possible. + *os << " Expected arg #" << N - 1 << ": "; + get < N - 1 > (matchers).DescribeTo(os); + *os << "\n Actual: "; + // We remove the reference in type Value to prevent the + // universal printer from printing the address of value, which + // isn't interesting to the user most of the time. The + // matcher's MatchAndExplain() method handles the case when + // the address is interesting. + internal::UniversalPrint(value, os); + PrintIfNotEmpty(listener.str(), os); + *os << "\n"; + } } }; // The base case. template <> -class TuplePrefix<0> { - public: +class TuplePrefix<0> +{ +public: template - static bool Matches(const MatcherTuple& /* matcher_tuple */, - const ValueTuple& /* value_tuple */) { + static bool Matches(const MatcherTuple & /* matcher_tuple */, + const ValueTuple & /* value_tuple */) + { return true; } template - static void ExplainMatchFailuresTo(const MatcherTuple& /* matchers */, - const ValueTuple& /* values */, - ::std::ostream* /* os */) {} + static void ExplainMatchFailuresTo(const MatcherTuple & /* matchers */, + const ValueTuple & /* values */, + ::std::ostream * /* os */) {} }; // TupleMatches(matcher_tuple, value_tuple) returns true iff all @@ -5424,8 +5756,9 @@ class TuplePrefix<0> { // value_tuple have different number of fields or incompatible field // types. template -bool TupleMatches(const MatcherTuple& matcher_tuple, - const ValueTuple& value_tuple) { +bool TupleMatches(const MatcherTuple & matcher_tuple, + const ValueTuple & value_tuple) +{ using ::std::tr1::tuple_size; // Makes sure that matcher_tuple and value_tuple have the same // number of fields. @@ -5433,18 +5766,19 @@ bool TupleMatches(const MatcherTuple& matcher_tuple, tuple_size::value, matcher_and_value_have_different_numbers_of_fields); return TuplePrefix::value>:: - Matches(matcher_tuple, value_tuple); + Matches(matcher_tuple, value_tuple); } // Describes failures in matching matchers against values. If there // is no failure, nothing will be streamed to os. template -void ExplainMatchFailureTupleTo(const MatcherTuple& matchers, - const ValueTuple& values, - ::std::ostream* os) { +void ExplainMatchFailureTupleTo(const MatcherTuple & matchers, + const ValueTuple & values, + ::std::ostream * os) +{ using ::std::tr1::tuple_size; TuplePrefix::value>::ExplainMatchFailuresTo( - matchers, values, os); + matchers, values, os); } // TransformTupleValues and its helper. @@ -5452,28 +5786,34 @@ void ExplainMatchFailureTupleTo(const MatcherTuple& matchers, // TransformTupleValuesHelper hides the internal machinery that // TransformTupleValues uses to implement a tuple traversal. template -class TransformTupleValuesHelper { - private: +class TransformTupleValuesHelper +{ +private: typedef typename ::std::tr1::tuple_size TupleSize; - public: +public: // For each member of tuple 't', taken in order, evaluates '*out++ = f(t)'. // Returns the final value of 'out' in case the caller needs it. - static OutIter Run(Func f, const Tuple& t, OutIter out) { + static OutIter Run(Func f, const Tuple & t, OutIter out) + { return IterateOverTuple()(f, t, out); } - private: +private: template - struct IterateOverTuple { - OutIter operator() (Func f, const Tup& t, OutIter out) const { - *out++ = f(::std::tr1::get(t)); - return IterateOverTuple()(f, t, out); + struct IterateOverTuple + { + OutIter operator()(Func f, const Tup & t, OutIter out) const + { + *out++ = f(::std::tr1::get < TupleSize::value - kRemainingSize > (t)); + return IterateOverTuple < Tup, kRemainingSize - 1 > ()(f, t, out); } }; template - struct IterateOverTuple { - OutIter operator() (Func /* f */, const Tup& /* t */, OutIter out) const { + struct IterateOverTuple + { + OutIter operator()(Func /* f */, const Tup & /* t */, OutIter out) const + { return out; } }; @@ -5483,18 +5823,21 @@ class TransformTupleValuesHelper { // appending each result to the 'out' iterator. Returns the final value // of 'out'. template -OutIter TransformTupleValues(Func f, const Tuple& t, OutIter out) { +OutIter TransformTupleValues(Func f, const Tuple & t, OutIter out) +{ return TransformTupleValuesHelper::Run(f, t, out); } // Implements A(). template -class AnyMatcherImpl : public MatcherInterface { - public: +class AnyMatcherImpl : public MatcherInterface +{ +public: virtual bool MatchAndExplain( - T /* x */, MatchResultListener* /* listener */) const { return true; } - virtual void DescribeTo(::std::ostream* os) const { *os << "is anything"; } - virtual void DescribeNegationTo(::std::ostream* os) const { + T /* x */, MatchResultListener * /* listener */) const { return true; } + virtual void DescribeTo(::std::ostream * os) const { *os << "is anything"; } + virtual void DescribeNegationTo(::std::ostream * os) const + { // This is mostly for completeness' safe, as it's not very useful // to write Not(A()). However we cannot completely rule out // such a possibility, and it doesn't hurt to be prepared. @@ -5506,8 +5849,9 @@ class AnyMatcherImpl : public MatcherInterface { // type. This is a polymorphic matcher, so we need a template type // conversion operator to make it appearing as a Matcher for any // type T. -class AnythingMatcher { - public: +class AnythingMatcher +{ +public: template operator Matcher() const { return A(); } }; @@ -5572,32 +5916,38 @@ GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Ne, !=, "isn't equal to", "is equal to"); // Implements the polymorphic IsNull() matcher, which matches any raw or smart // pointer that is NULL. -class IsNullMatcher { - public: +class IsNullMatcher +{ +public: template - bool MatchAndExplain(const Pointer& p, - MatchResultListener* /* listener */) const { + bool MatchAndExplain(const Pointer & p, + MatchResultListener * /* listener */) const + { return GetRawPointer(p) == NULL; } - void DescribeTo(::std::ostream* os) const { *os << "is NULL"; } - void DescribeNegationTo(::std::ostream* os) const { + void DescribeTo(::std::ostream * os) const { *os << "is NULL"; } + void DescribeNegationTo(::std::ostream * os) const + { *os << "isn't NULL"; } }; // Implements the polymorphic NotNull() matcher, which matches any raw or smart // pointer that is not NULL. -class NotNullMatcher { - public: +class NotNullMatcher +{ +public: template - bool MatchAndExplain(const Pointer& p, - MatchResultListener* /* listener */) const { + bool MatchAndExplain(const Pointer & p, + MatchResultListener * /* listener */) const + { return GetRawPointer(p) != NULL; } - void DescribeTo(::std::ostream* os) const { *os << "isn't NULL"; } - void DescribeNegationTo(::std::ostream* os) const { + void DescribeTo(::std::ostream * os) const { *os << "isn't NULL"; } + void DescribeNegationTo(::std::ostream * os) const + { *os << "is NULL"; } }; @@ -5619,20 +5969,22 @@ template class RefMatcher; template -class RefMatcher { +class RefMatcher +{ // Google Mock is a generic framework and thus needs to support // mocking any function types, including those that take non-const // reference arguments. Therefore the template parameter T (and // Super below) can be instantiated to either a const type or a // non-const type. - public: +public: // RefMatcher() takes a T& instead of const T&, as we want the // compiler to catch using Ref(const_value) as a matcher for a // non-const reference. - explicit RefMatcher(T& x) : object_(x) {} // NOLINT + explicit RefMatcher(T & x) : object_(x) {} // NOLINT template - operator Matcher() const { + operator Matcher() const + { // By passing object_ (type T&) to Impl(), which expects a Super&, // we make sure that Super is a super type of T. In particular, // this catches using Ref(const_value) as a matcher for a @@ -5641,69 +5993,78 @@ class RefMatcher { return MakeMatcher(new Impl(object_)); } - private: +private: template - class Impl : public MatcherInterface { - public: - explicit Impl(Super& x) : object_(x) {} // NOLINT + class Impl : public MatcherInterface + { + public: + explicit Impl(Super & x) : object_(x) {} // NOLINT // MatchAndExplain() takes a Super& (as opposed to const Super&) // in order to match the interface MatcherInterface. virtual bool MatchAndExplain( - Super& x, MatchResultListener* listener) const { - *listener << "which is located @" << static_cast(&x); + Super & x, MatchResultListener * listener) const + { + *listener << "which is located @" << static_cast(&x); return &x == &object_; } - virtual void DescribeTo(::std::ostream* os) const { + virtual void DescribeTo(::std::ostream * os) const + { *os << "references the variable "; - UniversalPrinter::Print(object_, os); + UniversalPrinter::Print(object_, os); } - virtual void DescribeNegationTo(::std::ostream* os) const { + virtual void DescribeNegationTo(::std::ostream * os) const + { *os << "does not reference the variable "; - UniversalPrinter::Print(object_, os); + UniversalPrinter::Print(object_, os); } - private: - const Super& object_; + private: + const Super & object_; GTEST_DISALLOW_ASSIGN_(Impl); }; - T& object_; + T & object_; GTEST_DISALLOW_ASSIGN_(RefMatcher); }; // Polymorphic helper functions for narrow and wide string matchers. -inline bool CaseInsensitiveCStringEquals(const char* lhs, const char* rhs) { +inline bool CaseInsensitiveCStringEquals(const char * lhs, const char * rhs) +{ return String::CaseInsensitiveCStringEquals(lhs, rhs); } -inline bool CaseInsensitiveCStringEquals(const wchar_t* lhs, - const wchar_t* rhs) { +inline bool CaseInsensitiveCStringEquals(const wchar_t * lhs, + const wchar_t * rhs) +{ return String::CaseInsensitiveWideCStringEquals(lhs, rhs); } // String comparison for narrow or wide strings that can have embedded NUL // characters. template -bool CaseInsensitiveStringEquals(const StringType& s1, - const StringType& s2) { +bool CaseInsensitiveStringEquals(const StringType & s1, + const StringType & s2) +{ // Are the heads equal? - if (!CaseInsensitiveCStringEquals(s1.c_str(), s2.c_str())) { - return false; - } + if (!CaseInsensitiveCStringEquals(s1.c_str(), s2.c_str())) + { + return false; + } // Skip the equal heads. const typename StringType::value_type nul = 0; const size_t i1 = s1.find(nul), i2 = s2.find(nul); // Are we at the end of either s1 or s2? - if (i1 == StringType::npos || i2 == StringType::npos) { - return i1 == i2; - } + if (i1 == StringType::npos || i2 == StringType::npos) + { + return i1 == i2; + } // Are the tails equal? return CaseInsensitiveStringEquals(s1.substr(i1 + 1), s2.substr(i2 + 1)); @@ -5713,11 +6074,12 @@ bool CaseInsensitiveStringEquals(const StringType& s1, // Implements equality-based string matchers like StrEq, StrCaseNe, and etc. template -class StrEqualityMatcher { - public: - StrEqualityMatcher(const StringType& str, bool expect_eq, +class StrEqualityMatcher +{ +public: + StrEqualityMatcher(const StringType & str, bool expect_eq, bool case_sensitive) - : string_(str), expect_eq_(expect_eq), case_sensitive_(case_sensitive) {} + : string_(str), expect_eq_(expect_eq), case_sensitive_(case_sensitive) {} // Accepts pointer types, particularly: // const char* @@ -5725,10 +6087,13 @@ class StrEqualityMatcher { // const wchar_t* // wchar_t* template - bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { - if (s == NULL) { - return !expect_eq_; - } + bool MatchAndExplain(CharType * s, MatchResultListener * listener) const + { + if (s == NULL) + { + return !expect_eq_; + } + return MatchAndExplain(StringType(s), listener); } @@ -5737,29 +6102,36 @@ class StrEqualityMatcher { // This is a template, not just a plain function with const StringType&, // because StringPiece has some interfering non-explicit constructors. template - bool MatchAndExplain(const MatcheeStringType& s, - MatchResultListener* /* listener */) const { - const StringType& s2(s); + bool MatchAndExplain(const MatcheeStringType & s, + MatchResultListener * /* listener */) const + { + const StringType & s2(s); const bool eq = case_sensitive_ ? s2 == string_ : - CaseInsensitiveStringEquals(s2, string_); + CaseInsensitiveStringEquals(s2, string_); return expect_eq_ == eq; } - void DescribeTo(::std::ostream* os) const { + void DescribeTo(::std::ostream * os) const + { DescribeToHelper(expect_eq_, os); } - void DescribeNegationTo(::std::ostream* os) const { + void DescribeNegationTo(::std::ostream * os) const + { DescribeToHelper(!expect_eq_, os); } - private: - void DescribeToHelper(bool expect_eq, ::std::ostream* os) const { +private: + void DescribeToHelper(bool expect_eq, ::std::ostream * os) const + { *os << (expect_eq ? "is " : "isn't "); *os << "equal to "; - if (!case_sensitive_) { - *os << "(ignoring case) "; - } + + if (!case_sensitive_) + { + *os << "(ignoring case) "; + } + UniversalPrint(string_, os); } @@ -5774,10 +6146,11 @@ class StrEqualityMatcher { // can be used as a Matcher as long as T can be converted to a // string. template -class HasSubstrMatcher { - public: - explicit HasSubstrMatcher(const StringType& substring) - : substring_(substring) {} +class HasSubstrMatcher +{ +public: + explicit HasSubstrMatcher(const StringType & substring) + : substring_(substring) {} // Accepts pointer types, particularly: // const char* @@ -5785,7 +6158,8 @@ class HasSubstrMatcher { // const wchar_t* // wchar_t* template - bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { + bool MatchAndExplain(CharType * s, MatchResultListener * listener) const + { return s != NULL && MatchAndExplain(StringType(s), listener); } @@ -5794,24 +6168,27 @@ class HasSubstrMatcher { // This is a template, not just a plain function with const StringType&, // because StringPiece has some interfering non-explicit constructors. template - bool MatchAndExplain(const MatcheeStringType& s, - MatchResultListener* /* listener */) const { - const StringType& s2(s); + bool MatchAndExplain(const MatcheeStringType & s, + MatchResultListener * /* listener */) const + { + const StringType & s2(s); return s2.find(substring_) != StringType::npos; } // Describes what this matcher matches. - void DescribeTo(::std::ostream* os) const { + void DescribeTo(::std::ostream * os) const + { *os << "has substring "; UniversalPrint(substring_, os); } - void DescribeNegationTo(::std::ostream* os) const { + void DescribeNegationTo(::std::ostream * os) const + { *os << "has no substring "; UniversalPrint(substring_, os); } - private: +private: const StringType substring_; GTEST_DISALLOW_ASSIGN_(HasSubstrMatcher); @@ -5821,9 +6198,11 @@ class HasSubstrMatcher { // can be used as a Matcher as long as T can be converted to a // string. template -class StartsWithMatcher { - public: - explicit StartsWithMatcher(const StringType& prefix) : prefix_(prefix) { +class StartsWithMatcher +{ +public: + explicit StartsWithMatcher(const StringType & prefix) : prefix_(prefix) + { } // Accepts pointer types, particularly: @@ -5832,7 +6211,8 @@ class StartsWithMatcher { // const wchar_t* // wchar_t* template - bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { + bool MatchAndExplain(CharType * s, MatchResultListener * listener) const + { return s != NULL && MatchAndExplain(StringType(s), listener); } @@ -5841,24 +6221,27 @@ class StartsWithMatcher { // This is a template, not just a plain function with const StringType&, // because StringPiece has some interfering non-explicit constructors. template - bool MatchAndExplain(const MatcheeStringType& s, - MatchResultListener* /* listener */) const { - const StringType& s2(s); + bool MatchAndExplain(const MatcheeStringType & s, + MatchResultListener * /* listener */) const + { + const StringType & s2(s); return s2.length() >= prefix_.length() && - s2.substr(0, prefix_.length()) == prefix_; + s2.substr(0, prefix_.length()) == prefix_; } - void DescribeTo(::std::ostream* os) const { + void DescribeTo(::std::ostream * os) const + { *os << "starts with "; UniversalPrint(prefix_, os); } - void DescribeNegationTo(::std::ostream* os) const { + void DescribeNegationTo(::std::ostream * os) const + { *os << "doesn't start with "; UniversalPrint(prefix_, os); } - private: +private: const StringType prefix_; GTEST_DISALLOW_ASSIGN_(StartsWithMatcher); @@ -5868,9 +6251,10 @@ class StartsWithMatcher { // can be used as a Matcher as long as T can be converted to a // string. template -class EndsWithMatcher { - public: - explicit EndsWithMatcher(const StringType& suffix) : suffix_(suffix) {} +class EndsWithMatcher +{ +public: + explicit EndsWithMatcher(const StringType & suffix) : suffix_(suffix) {} // Accepts pointer types, particularly: // const char* @@ -5878,7 +6262,8 @@ class EndsWithMatcher { // const wchar_t* // wchar_t* template - bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { + bool MatchAndExplain(CharType * s, MatchResultListener * listener) const + { return s != NULL && MatchAndExplain(StringType(s), listener); } @@ -5887,24 +6272,27 @@ class EndsWithMatcher { // This is a template, not just a plain function with const StringType&, // because StringPiece has some interfering non-explicit constructors. template - bool MatchAndExplain(const MatcheeStringType& s, - MatchResultListener* /* listener */) const { - const StringType& s2(s); + bool MatchAndExplain(const MatcheeStringType & s, + MatchResultListener * /* listener */) const + { + const StringType & s2(s); return s2.length() >= suffix_.length() && - s2.substr(s2.length() - suffix_.length()) == suffix_; + s2.substr(s2.length() - suffix_.length()) == suffix_; } - void DescribeTo(::std::ostream* os) const { + void DescribeTo(::std::ostream * os) const + { *os << "ends with "; UniversalPrint(suffix_, os); } - void DescribeNegationTo(::std::ostream* os) const { + void DescribeNegationTo(::std::ostream * os) const + { *os << "doesn't end with "; UniversalPrint(suffix_, os); } - private: +private: const StringType suffix_; GTEST_DISALLOW_ASSIGN_(EndsWithMatcher); @@ -5913,10 +6301,11 @@ class EndsWithMatcher { // Implements polymorphic matchers MatchesRegex(regex) and // ContainsRegex(regex), which can be used as a Matcher as long as // T can be converted to a string. -class MatchesRegexMatcher { - public: - MatchesRegexMatcher(const RE* regex, bool full_match) - : regex_(regex), full_match_(full_match) {} +class MatchesRegexMatcher +{ +public: + MatchesRegexMatcher(const RE * regex, bool full_match) + : regex_(regex), full_match_(full_match) {} // Accepts pointer types, particularly: // const char* @@ -5924,7 +6313,8 @@ class MatchesRegexMatcher { // const wchar_t* // wchar_t* template - bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { + bool MatchAndExplain(CharType * s, MatchResultListener * listener) const + { return s != NULL && MatchAndExplain(internal::string(s), listener); } @@ -5933,26 +6323,29 @@ class MatchesRegexMatcher { // This is a template, not just a plain function with const internal::string&, // because StringPiece has some interfering non-explicit constructors. template - bool MatchAndExplain(const MatcheeStringType& s, - MatchResultListener* /* listener */) const { - const internal::string& s2(s); + bool MatchAndExplain(const MatcheeStringType & s, + MatchResultListener * /* listener */) const + { + const internal::string & s2(s); return full_match_ ? RE::FullMatch(s2, *regex_) : - RE::PartialMatch(s2, *regex_); + RE::PartialMatch(s2, *regex_); } - void DescribeTo(::std::ostream* os) const { + void DescribeTo(::std::ostream * os) const + { *os << (full_match_ ? "matches" : "contains") << " regular expression "; UniversalPrinter::Print(regex_->pattern(), os); } - void DescribeNegationTo(::std::ostream* os) const { + void DescribeNegationTo(::std::ostream * os) const + { *os << "doesn't " << (full_match_ ? "match" : "contain") << " regular expression "; UniversalPrinter::Print(regex_->pattern(), os); } - private: +private: const internal::linked_ptr regex_; const bool full_match_; @@ -6002,13 +6395,13 @@ class MatchesRegexMatcher { // Implements Eq(), Ge(), Gt(), Le(), Lt(), and Ne() respectively. GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(Eq, ==, "an equal pair"); GMOCK_IMPLEMENT_COMPARISON2_MATCHER_( - Ge, >=, "a pair where the first >= the second"); + Ge, >=, "a pair where the first >= the second"); GMOCK_IMPLEMENT_COMPARISON2_MATCHER_( - Gt, >, "a pair where the first > the second"); + Gt, >, "a pair where the first > the second"); GMOCK_IMPLEMENT_COMPARISON2_MATCHER_( - Le, <=, "a pair where the first <= the second"); + Le, <=, "a pair where the first <= the second"); GMOCK_IMPLEMENT_COMPARISON2_MATCHER_( - Lt, <, "a pair where the first < the second"); + Lt, <, "a pair where the first < the second"); GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(Ne, !=, "an unequal pair"); #undef GMOCK_IMPLEMENT_COMPARISON2_MATCHER_ @@ -6018,24 +6411,28 @@ GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(Ne, !=, "an unequal pair"); // will prevent different instantiations of NotMatcher from sharing // the same NotMatcherImpl class. template -class NotMatcherImpl : public MatcherInterface { - public: - explicit NotMatcherImpl(const Matcher& matcher) - : matcher_(matcher) {} - - virtual bool MatchAndExplain(T x, MatchResultListener* listener) const { +class NotMatcherImpl : public MatcherInterface +{ +public: + explicit NotMatcherImpl(const Matcher & matcher) + : matcher_(matcher) {} + + virtual bool MatchAndExplain(T x, MatchResultListener * listener) const + { return !matcher_.MatchAndExplain(x, listener); } - virtual void DescribeTo(::std::ostream* os) const { + virtual void DescribeTo(::std::ostream * os) const + { matcher_.DescribeNegationTo(os); } - virtual void DescribeNegationTo(::std::ostream* os) const { + virtual void DescribeNegationTo(::std::ostream * os) const + { matcher_.DescribeTo(os); } - private: +private: const Matcher matcher_; GTEST_DISALLOW_ASSIGN_(NotMatcherImpl); @@ -6044,18 +6441,20 @@ class NotMatcherImpl : public MatcherInterface { // Implements the Not(m) matcher, which matches a value that doesn't // match matcher m. template -class NotMatcher { - public: +class NotMatcher +{ +public: explicit NotMatcher(InnerMatcher matcher) : matcher_(matcher) {} // This template type conversion operator allows Not(m) to be used // to match any type m can match. template - operator Matcher() const { + operator Matcher() const + { return Matcher(new NotMatcherImpl(SafeMatcherCast(matcher_))); } - private: +private: InnerMatcher matcher_; GTEST_DISALLOW_ASSIGN_(NotMatcher); @@ -6066,12 +6465,14 @@ class NotMatcher { // that will prevent different instantiations of BothOfMatcher from // sharing the same BothOfMatcherImpl class. template -class BothOfMatcherImpl : public MatcherInterface { - public: - BothOfMatcherImpl(const Matcher& matcher1, const Matcher& matcher2) - : matcher1_(matcher1), matcher2_(matcher2) {} - - virtual void DescribeTo(::std::ostream* os) const { +class BothOfMatcherImpl : public MatcherInterface +{ +public: + BothOfMatcherImpl(const Matcher & matcher1, const Matcher & matcher2) + : matcher1_(matcher1), matcher2_(matcher2) {} + + virtual void DescribeTo(::std::ostream * os) const + { *os << "("; matcher1_.DescribeTo(os); *os << ") and ("; @@ -6079,7 +6480,8 @@ class BothOfMatcherImpl : public MatcherInterface { *os << ")"; } - virtual void DescribeNegationTo(::std::ostream* os) const { + virtual void DescribeNegationTo(::std::ostream * os) const + { *os << "("; matcher1_.DescribeNegationTo(os); *os << ") or ("; @@ -6087,37 +6489,49 @@ class BothOfMatcherImpl : public MatcherInterface { *os << ")"; } - virtual bool MatchAndExplain(T x, MatchResultListener* listener) const { + virtual bool MatchAndExplain(T x, MatchResultListener * listener) const + { // If either matcher1_ or matcher2_ doesn't match x, we only need // to explain why one of them fails. StringMatchResultListener listener1; - if (!matcher1_.MatchAndExplain(x, &listener1)) { - *listener << listener1.str(); - return false; - } + + if (!matcher1_.MatchAndExplain(x, &listener1)) + { + *listener << listener1.str(); + return false; + } StringMatchResultListener listener2; - if (!matcher2_.MatchAndExplain(x, &listener2)) { - *listener << listener2.str(); - return false; - } + + if (!matcher2_.MatchAndExplain(x, &listener2)) + { + *listener << listener2.str(); + return false; + } // Otherwise we need to explain why *both* of them match. const internal::string s1 = listener1.str(); const internal::string s2 = listener2.str(); - if (s1 == "") { - *listener << s2; - } else { - *listener << s1; - if (s2 != "") { - *listener << ", and " << s2; + if (s1 == "") + { + *listener << s2; } - } + + else + { + *listener << s1; + + if (s2 != "") + { + *listener << ", and " << s2; + } + } + return true; } - private: +private: const Matcher matcher1_; const Matcher matcher2_; @@ -6133,15 +6547,17 @@ class BothOfMatcherImpl : public MatcherInterface { // * Head is the type of the first matcher of the list. // * Tail denotes the types of the remaining matchers of the list. template -struct MatcherList { - typedef MatcherList MatcherListTail; +struct MatcherList +{ + typedef MatcherList < kSize - 1, Tail... > MatcherListTail; typedef ::std::pair ListType; // BuildList stores variadic type values in a nested pair structure. // Example: // MatcherList<3, int, string, float>::BuildList(5, "foo", 2.0) will return // the corresponding result of type pair>. - static ListType BuildList(const Head& matcher, const Tail&... tail) { + static ListType BuildList(const Head & matcher, const Tail & ... tail) + { return ListType(matcher, MatcherListTail::BuildList(tail...)); } @@ -6150,30 +6566,34 @@ struct MatcherList { // list. CombiningMatcher must implement MatcherInterface and have a // constructor taking two Matchers as input. template class CombiningMatcher> - static Matcher CreateMatcher(const ListType& matchers) { + static Matcher CreateMatcher(const ListType & matchers) + { return Matcher(new CombiningMatcher( - SafeMatcherCast(matchers.first), - MatcherListTail::template CreateMatcher( - matchers.second))); + SafeMatcherCast(matchers.first), + MatcherListTail::template CreateMatcher( + matchers.second))); } }; // The following defines the base case for the recursive definition of // MatcherList. template -struct MatcherList<2, Matcher1, Matcher2> { +struct MatcherList<2, Matcher1, Matcher2> +{ typedef ::std::pair ListType; - static ListType BuildList(const Matcher1& matcher1, - const Matcher2& matcher2) { + static ListType BuildList(const Matcher1 & matcher1, + const Matcher2 & matcher2) + { return ::std::pair(matcher1, matcher2); } template class CombiningMatcher> - static Matcher CreateMatcher(const ListType& matchers) { + static Matcher CreateMatcher(const ListType & matchers) + { return Matcher(new CombiningMatcher( - SafeMatcherCast(matchers.first), - SafeMatcherCast(matchers.second))); + SafeMatcherCast(matchers.first), + SafeMatcherCast(matchers.second))); } }; @@ -6182,21 +6602,23 @@ struct MatcherList<2, Matcher1, Matcher2> { // CombiningMatcher is used to recursively combine the provided matchers // (of type Args...). template