diff --git a/CMakeLists.txt b/CMakeLists.txt index 81867ebd7..189ae9bfc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ option(CSECORE_BUILD_APIDOC "Build API documentation" ON) option(CSECORE_BUILD_PRIVATE_APIDOC "Build private API documentation" OFF) option(CSECORE_STANDALONE_INSTALLATION "Whether to build for a standalone installation (Linux only; sets a relative RPATH)" OFF) option(CSECORE_USING_CONAN "Whether Conan is used for package management" OFF) +option(CSECORE_WITH_FMUPROXY "Whether or not to build with fmuproxy integration" OFF) # ============================================================================== # Global internal configuration @@ -67,6 +68,12 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") # should not be a problem, so we disable the warning. add_compile_options("/wd4251") endif() + if (CSECORE_WITH_FMUPROXY) + #warning C4245: 'return': conversion from 'int' to 'SOCKET', signed/unsigned mismatch + add_compile_options("/wd4245") + #warning C4706: assignment within conditional expression + add_compile_options("/wd4706") + endif() add_definitions("-D_SCL_SECURE_NO_WARNINGS" "-D_CRT_SECURE_NO_WARNINGS") endif() @@ -115,6 +122,9 @@ find_package(Boost REQUIRED COMPONENTS ${Boost_components}) find_package(FMILibrary REQUIRED) find_package(LIBZIP REQUIRED) find_package(nlohmann_json REQUIRED) +if(CSECORE_WITH_FMUPROXY) + find_package(Thrift REQUIRED) +endif() # ============================================================================== # Targets diff --git a/Jenkinsfile b/Jenkinsfile index cb3837af6..652ed5754 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,6 +21,7 @@ pipeline { stage('Configure Conan') { steps { sh 'conan remote add osp https://osp-conan.azurewebsites.net/artifactory/api/conan/conan-local --force' + sh 'conan remote add helmesjo https://api.bintray.com/conan/helmesjo/public-conan --force' sh 'conan user -p $OSP_CONAN_CREDS_PSW -r osp $OSP_CONAN_CREDS_USR' } } @@ -104,6 +105,34 @@ pipeline { } } } + stage('Build on Windows with FMU-proxy support') { + agent { label 'windows' } + + environment { + CONAN_USER_HOME = "${env.BASE}\\conan-repositories\\${env.EXECUTOR_NUMBER}" + CONAN_USER_HOME_SHORT = "${env.CONAN_USER_HOME}" + OSP_CONAN_CREDS = credentials('jenkins-osp-conan-creds') + CSE_CONAN_CHANNEL = "${env.BRANCH_NAME}".replaceAll("/", "_") + } + + stages { + stage('Configure Conan') { + steps { + sh 'conan remote add osp https://osp-conan.azurewebsites.net/artifactory/api/conan/conan-local --force' + sh 'conan remote add helmesjo https://api.bintray.com/conan/helmesjo/public-conan --force' + sh 'conan user -p $OSP_CONAN_CREDS_PSW -r osp $OSP_CONAN_CREDS_USR' + } + } + stage('Build Release') { + steps { + dir('release-build-fmuproxy') { + bat 'conan install ../cse-core -s build_type=Release -o fmuproxy=True -b missing' + bat 'conan package ../cse-core -pf package/windows/release' + } + } + } + } + } stage ( 'Build on Linux with Conan' ) { agent { dockerfile { @@ -125,6 +154,7 @@ pipeline { stage('Configure Conan') { steps { sh 'conan remote add osp https://osp-conan.azurewebsites.net/artifactory/api/conan/conan-local --force' + sh 'conan remote add helmesjo https://api.bintray.com/conan/helmesjo/public-conan --force' sh 'conan user -p $OSP_CONAN_CREDS_PSW -r osp $OSP_CONAN_CREDS_USR' } } @@ -175,7 +205,6 @@ pipeline { } } } - stage ('Test Release') { steps { dir('release-build-conan') { @@ -209,6 +238,41 @@ pipeline { } } } + stage ( 'Build on Linux with Conan & FMU-proxy support' ) { + agent { + dockerfile { + filename 'Dockerfile.conan-build' + dir 'cse-core/.dockerfiles' + label 'linux && docker' + args '-v ${HOME}/jenkins_slave/conan-repositories/${EXECUTOR_NUMBER}:/conan_repo' + } + } + + environment { + CONAN_USER_HOME = '/conan_repo' + CONAN_USER_HOME_SHORT = 'None' + OSP_CONAN_CREDS = credentials('jenkins-osp-conan-creds') + CSE_CONAN_CHANNEL = "${env.BRANCH_NAME}".replaceAll("/", "_") + } + + stages { + stage('Configure Conan') { + steps { + sh 'conan remote add osp https://osp-conan.azurewebsites.net/artifactory/api/conan/conan-local --force' + sh 'conan remote add helmesjo https://api.bintray.com/conan/helmesjo/public-conan --force' + sh 'conan user -p $OSP_CONAN_CREDS_PSW -r osp $OSP_CONAN_CREDS_USR' + } + } + stage('Build Release') { + steps { + dir('release-build-conan-fmuproxy') { + sh 'conan install ../cse-core -s compiler.libcxx=libstdc++11 -s build_type=Release -o fmuproxy=True -b missing' + sh 'conan package ../cse-core -pf package/linux/release' + } + } + } + } + } stage ( 'Build on Linux with Docker' ) { agent { dockerfile { diff --git a/cmake/FindThrift.cmake b/cmake/FindThrift.cmake new file mode 100644 index 000000000..0d5da8977 --- /dev/null +++ b/cmake/FindThrift.cmake @@ -0,0 +1,36 @@ +# Find Thrift +# +# Find the native Thrift headers and libraries. +# +# THRIFT_INCLUDE_DIRS - where to find thrift/thrift.h +# THRIFT_LIBRARIES - List of libraries when using Thrift. +# THRIFT_FOUND - True if Thrift found. +# + +find_path(THRIFT_INCLUDE_DIR NAMES thrift/Thrift.h) +mark_as_advanced(THRIFT_INCLUDE_DIR) + +find_library(THRIFT_LIBRARY NAMES thrift thriftmd thriftmdd) +mark_as_advanced(THRIFT_LIBRARY) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(THRIFT + REQUIRED_VARS THRIFT_LIBRARY THRIFT_INCLUDE_DIR) + +if (THRIFT_FOUND) + + set(THRIFT_INCLUDE_DIRS ${THRIFT_INCLUDE_DIR}) + + if (NOT THRIFT_LIBRARIES) + set(THRIFT_LIBRARIES ${THRIFT_LIBRARY}) + endif() + + if (NOT TARGET thrift::thrift) + add_library(thrift::thrift UNKNOWN IMPORTED) + set_target_properties(thrift::thrift PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${THRIFT_INCLUDE_DIR}") + set_property(TARGET thrift::thrift APPEND PROPERTY + IMPORTED_LOCATION "${THRIFT_LIBRARY}") + endif() + +endif() \ No newline at end of file diff --git a/conanfile.py b/conanfile.py index 58160072d..525c5b838 100644 --- a/conanfile.py +++ b/conanfile.py @@ -22,7 +22,9 @@ class CSECoreConan(ConanFile): "jsonformoderncpp/3.5.0@vthiery/stable" ) + options = {"fmuproxy": [True, False]} default_options = ( + "fmuproxy=False", "boost:shared=True", "libzip:shared=True" ) @@ -32,12 +34,19 @@ def imports(self): self.copy("*.dll", dst=binDir, keep_path=False) self.copy("*.pdb", dst=binDir, keep_path=False) + def requirements(self): + if self.options.fmuproxy: + self.requires("OpenSSL/1.0.2o@conan/stable") + self.requires("thrift/0.12.0@helmesjo/stable") + def configure_cmake(self): cmake = CMake(self) cmake.parallel = False # Needed to keep stable build on Jenkins Windows Node cmake.definitions["CSECORE_USING_CONAN"] = "ON" if self.settings.build_type == "Debug": cmake.definitions["CSECORE_BUILD_PRIVATE_APIDOC"] = "ON" + if self.options.fmuproxy: + cmake.definitions["CSECORE_WITH_FMUPROXY"] = "ON" cmake.configure() return cmake @@ -51,4 +60,4 @@ def package(self): cmake = self.configure_cmake() self.run('cmake --build %s --target install-doc' % (self.build_folder)) cmake.install() - + diff --git a/include/cse/fmuproxy/fmu_service.hpp b/include/cse/fmuproxy/fmu_service.hpp new file mode 100644 index 000000000..6fe502773 --- /dev/null +++ b/include/cse/fmuproxy/fmu_service.hpp @@ -0,0 +1,3475 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef CSE_FMUPROXY_FMU_SERVICE_HPP +#define CSE_FMUPROXY_FMU_SERVICE_HPP + +#include +#include +#include "service_types.hpp" + +namespace fmuproxy { namespace thrift { + +#ifdef _MSC_VER + #pragma warning( push ) + #pragma warning (disable : 4250 ) //inheriting methods via dominance +#endif + +class FmuServiceIf { + public: + virtual ~FmuServiceIf() {} + virtual void load_from_url(FmuId& _return, const std::string& url) = 0; + virtual void load_from_file(FmuId& _return, const std::string& name, const std::string& data) = 0; + virtual void get_model_description(ModelDescription& _return, const FmuId& fmuId) = 0; + virtual void get_co_simulation_attributes(CoSimulationAttributes& _return, const InstanceId& instanceId) = 0; + virtual bool can_create_instance_from_cs(const FmuId& fmuId) = 0; + virtual bool can_create_instance_from_me(const FmuId& fmuId) = 0; + virtual void create_instance_from_cs(InstanceId& _return, const FmuId& fmuId) = 0; + virtual void create_instance_from_me(InstanceId& _return, const FmuId& fmuId, const Solver& solver) = 0; + virtual Status::type setup_experiment(const InstanceId& instanceId, const double start, const double stop, const double tolerance) = 0; + virtual Status::type enter_initialization_mode(const InstanceId& instanceId) = 0; + virtual Status::type exit_initialization_mode(const InstanceId& instanceId) = 0; + virtual void step(StepResult& _return, const InstanceId& instanceId, const double stepSize) = 0; + virtual Status::type reset(const InstanceId& instanceId) = 0; + virtual Status::type terminate(const InstanceId& instanceId) = 0; + virtual void read_integer(IntegerRead& _return, const InstanceId& instanceId, const ValueReferences& vr) = 0; + virtual void read_real(RealRead& _return, const InstanceId& instanceId, const ValueReferences& vr) = 0; + virtual void read_string(StringRead& _return, const InstanceId& instanceId, const ValueReferences& vr) = 0; + virtual void read_boolean(BooleanRead& _return, const InstanceId& instanceId, const ValueReferences& vr) = 0; + virtual Status::type write_integer(const InstanceId& instanceId, const ValueReferences& vr, const IntArray& value) = 0; + virtual Status::type write_real(const InstanceId& instanceId, const ValueReferences& vr, const RealArray& value) = 0; + virtual Status::type write_string(const InstanceId& instanceId, const ValueReferences& vr, const StringArray& value) = 0; + virtual Status::type write_boolean(const InstanceId& instanceId, const ValueReferences& vr, const BooleanArray& value) = 0; + virtual void get_directional_derivative(DirectionalDerivativeResult& _return, const InstanceId& instanceId, const ValueReferences& vUnknownRef, const ValueReferences& vKnownRef, const std::vector & dvKnownRef) = 0; +}; + +class FmuServiceIfFactory { + public: + typedef FmuServiceIf Handler; + + virtual ~FmuServiceIfFactory() {} + + virtual FmuServiceIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; + virtual void releaseHandler(FmuServiceIf* /* handler */) = 0; +}; + +class FmuServiceIfSingletonFactory : virtual public FmuServiceIfFactory { + public: + FmuServiceIfSingletonFactory(const ::apache::thrift::stdcxx::shared_ptr& iface) : iface_(iface) {} + virtual ~FmuServiceIfSingletonFactory() {} + + virtual FmuServiceIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + return iface_.get(); + } + virtual void releaseHandler(FmuServiceIf* /* handler */) {} + + protected: + ::apache::thrift::stdcxx::shared_ptr iface_; +}; + +class FmuServiceNull : virtual public FmuServiceIf { + public: + virtual ~FmuServiceNull() {} + void load_from_url(FmuId& /* _return */, const std::string& /* url */) { + return; + } + void load_from_file(FmuId& /* _return */, const std::string& /* name */, const std::string& /* data */) { + return; + } + void get_model_description(ModelDescription& /* _return */, const FmuId& /* fmuId */) { + return; + } + void get_co_simulation_attributes(CoSimulationAttributes& /* _return */, const InstanceId& /* instanceId */) { + return; + } + bool can_create_instance_from_cs(const FmuId& /* fmuId */) { + bool _return = false; + return _return; + } + bool can_create_instance_from_me(const FmuId& /* fmuId */) { + bool _return = false; + return _return; + } + void create_instance_from_cs(InstanceId& /* _return */, const FmuId& /* fmuId */) { + return; + } + void create_instance_from_me(InstanceId& /* _return */, const FmuId& /* fmuId */, const Solver& /* solver */) { + return; + } + Status::type setup_experiment(const InstanceId& /* instanceId */, const double /* start */, const double /* stop */, const double /* tolerance */) { + Status::type _return = (Status::type)0; + return _return; + } + Status::type enter_initialization_mode(const InstanceId& /* instanceId */) { + Status::type _return = (Status::type)0; + return _return; + } + Status::type exit_initialization_mode(const InstanceId& /* instanceId */) { + Status::type _return = (Status::type)0; + return _return; + } + void step(StepResult& /* _return */, const InstanceId& /* instanceId */, const double /* stepSize */) { + return; + } + Status::type reset(const InstanceId& /* instanceId */) { + Status::type _return = (Status::type)0; + return _return; + } + Status::type terminate(const InstanceId& /* instanceId */) { + Status::type _return = (Status::type)0; + return _return; + } + void read_integer(IntegerRead& /* _return */, const InstanceId& /* instanceId */, const ValueReferences& /* vr */) { + return; + } + void read_real(RealRead& /* _return */, const InstanceId& /* instanceId */, const ValueReferences& /* vr */) { + return; + } + void read_string(StringRead& /* _return */, const InstanceId& /* instanceId */, const ValueReferences& /* vr */) { + return; + } + void read_boolean(BooleanRead& /* _return */, const InstanceId& /* instanceId */, const ValueReferences& /* vr */) { + return; + } + Status::type write_integer(const InstanceId& /* instanceId */, const ValueReferences& /* vr */, const IntArray& /* value */) { + Status::type _return = (Status::type)0; + return _return; + } + Status::type write_real(const InstanceId& /* instanceId */, const ValueReferences& /* vr */, const RealArray& /* value */) { + Status::type _return = (Status::type)0; + return _return; + } + Status::type write_string(const InstanceId& /* instanceId */, const ValueReferences& /* vr */, const StringArray& /* value */) { + Status::type _return = (Status::type)0; + return _return; + } + Status::type write_boolean(const InstanceId& /* instanceId */, const ValueReferences& /* vr */, const BooleanArray& /* value */) { + Status::type _return = (Status::type)0; + return _return; + } + void get_directional_derivative(DirectionalDerivativeResult& /* _return */, const InstanceId& /* instanceId */, const ValueReferences& /* vUnknownRef */, const ValueReferences& /* vKnownRef */, const std::vector & /* dvKnownRef */) { + return; + } +}; + +typedef struct _FmuService_load_from_url_args__isset { + _FmuService_load_from_url_args__isset() : url(false) {} + bool url :1; +} _FmuService_load_from_url_args__isset; + +class FmuService_load_from_url_args { + public: + + FmuService_load_from_url_args(const FmuService_load_from_url_args&); + FmuService_load_from_url_args& operator=(const FmuService_load_from_url_args&); + FmuService_load_from_url_args() : url() { + } + + virtual ~FmuService_load_from_url_args() throw(); + std::string url; + + _FmuService_load_from_url_args__isset __isset; + + void __set_url(const std::string& val); + + bool operator == (const FmuService_load_from_url_args & rhs) const + { + if (!(url == rhs.url)) + return false; + return true; + } + bool operator != (const FmuService_load_from_url_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_load_from_url_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_load_from_url_pargs { + public: + + + virtual ~FmuService_load_from_url_pargs() throw(); + const std::string* url; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_load_from_url_result__isset { + _FmuService_load_from_url_result__isset() : success(false) {} + bool success :1; +} _FmuService_load_from_url_result__isset; + +class FmuService_load_from_url_result { + public: + + FmuService_load_from_url_result(const FmuService_load_from_url_result&); + FmuService_load_from_url_result& operator=(const FmuService_load_from_url_result&); + FmuService_load_from_url_result() : success() { + } + + virtual ~FmuService_load_from_url_result() throw(); + FmuId success; + + _FmuService_load_from_url_result__isset __isset; + + void __set_success(const FmuId& val); + + bool operator == (const FmuService_load_from_url_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const FmuService_load_from_url_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_load_from_url_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_load_from_url_presult__isset { + _FmuService_load_from_url_presult__isset() : success(false) {} + bool success :1; +} _FmuService_load_from_url_presult__isset; + +class FmuService_load_from_url_presult { + public: + + + virtual ~FmuService_load_from_url_presult() throw(); + FmuId* success; + + _FmuService_load_from_url_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_load_from_file_args__isset { + _FmuService_load_from_file_args__isset() : name(false), data(false) {} + bool name :1; + bool data :1; +} _FmuService_load_from_file_args__isset; + +class FmuService_load_from_file_args { + public: + + FmuService_load_from_file_args(const FmuService_load_from_file_args&); + FmuService_load_from_file_args& operator=(const FmuService_load_from_file_args&); + FmuService_load_from_file_args() : name(), data() { + } + + virtual ~FmuService_load_from_file_args() throw(); + std::string name; + std::string data; + + _FmuService_load_from_file_args__isset __isset; + + void __set_name(const std::string& val); + + void __set_data(const std::string& val); + + bool operator == (const FmuService_load_from_file_args & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(data == rhs.data)) + return false; + return true; + } + bool operator != (const FmuService_load_from_file_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_load_from_file_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_load_from_file_pargs { + public: + + + virtual ~FmuService_load_from_file_pargs() throw(); + const std::string* name; + const std::string* data; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_load_from_file_result__isset { + _FmuService_load_from_file_result__isset() : success(false) {} + bool success :1; +} _FmuService_load_from_file_result__isset; + +class FmuService_load_from_file_result { + public: + + FmuService_load_from_file_result(const FmuService_load_from_file_result&); + FmuService_load_from_file_result& operator=(const FmuService_load_from_file_result&); + FmuService_load_from_file_result() : success() { + } + + virtual ~FmuService_load_from_file_result() throw(); + FmuId success; + + _FmuService_load_from_file_result__isset __isset; + + void __set_success(const FmuId& val); + + bool operator == (const FmuService_load_from_file_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const FmuService_load_from_file_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_load_from_file_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_load_from_file_presult__isset { + _FmuService_load_from_file_presult__isset() : success(false) {} + bool success :1; +} _FmuService_load_from_file_presult__isset; + +class FmuService_load_from_file_presult { + public: + + + virtual ~FmuService_load_from_file_presult() throw(); + FmuId* success; + + _FmuService_load_from_file_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_get_model_description_args__isset { + _FmuService_get_model_description_args__isset() : fmuId(false) {} + bool fmuId :1; +} _FmuService_get_model_description_args__isset; + +class FmuService_get_model_description_args { + public: + + FmuService_get_model_description_args(const FmuService_get_model_description_args&); + FmuService_get_model_description_args& operator=(const FmuService_get_model_description_args&); + FmuService_get_model_description_args() : fmuId() { + } + + virtual ~FmuService_get_model_description_args() throw(); + FmuId fmuId; + + _FmuService_get_model_description_args__isset __isset; + + void __set_fmuId(const FmuId& val); + + bool operator == (const FmuService_get_model_description_args & rhs) const + { + if (!(fmuId == rhs.fmuId)) + return false; + return true; + } + bool operator != (const FmuService_get_model_description_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_get_model_description_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_get_model_description_pargs { + public: + + + virtual ~FmuService_get_model_description_pargs() throw(); + const FmuId* fmuId; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_get_model_description_result__isset { + _FmuService_get_model_description_result__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_get_model_description_result__isset; + +class FmuService_get_model_description_result { + public: + + FmuService_get_model_description_result(const FmuService_get_model_description_result&); + FmuService_get_model_description_result& operator=(const FmuService_get_model_description_result&); + FmuService_get_model_description_result() { + } + + virtual ~FmuService_get_model_description_result() throw(); + ModelDescription success; + NoSuchFmuException ex; + + _FmuService_get_model_description_result__isset __isset; + + void __set_success(const ModelDescription& val); + + void __set_ex(const NoSuchFmuException& val); + + bool operator == (const FmuService_get_model_description_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex == rhs.ex)) + return false; + return true; + } + bool operator != (const FmuService_get_model_description_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_get_model_description_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_get_model_description_presult__isset { + _FmuService_get_model_description_presult__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_get_model_description_presult__isset; + +class FmuService_get_model_description_presult { + public: + + + virtual ~FmuService_get_model_description_presult() throw(); + ModelDescription* success; + NoSuchFmuException ex; + + _FmuService_get_model_description_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_get_co_simulation_attributes_args__isset { + _FmuService_get_co_simulation_attributes_args__isset() : instanceId(false) {} + bool instanceId :1; +} _FmuService_get_co_simulation_attributes_args__isset; + +class FmuService_get_co_simulation_attributes_args { + public: + + FmuService_get_co_simulation_attributes_args(const FmuService_get_co_simulation_attributes_args&); + FmuService_get_co_simulation_attributes_args& operator=(const FmuService_get_co_simulation_attributes_args&); + FmuService_get_co_simulation_attributes_args() : instanceId() { + } + + virtual ~FmuService_get_co_simulation_attributes_args() throw(); + InstanceId instanceId; + + _FmuService_get_co_simulation_attributes_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + bool operator == (const FmuService_get_co_simulation_attributes_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + return true; + } + bool operator != (const FmuService_get_co_simulation_attributes_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_get_co_simulation_attributes_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_get_co_simulation_attributes_pargs { + public: + + + virtual ~FmuService_get_co_simulation_attributes_pargs() throw(); + const InstanceId* instanceId; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_get_co_simulation_attributes_result__isset { + _FmuService_get_co_simulation_attributes_result__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_get_co_simulation_attributes_result__isset; + +class FmuService_get_co_simulation_attributes_result { + public: + + FmuService_get_co_simulation_attributes_result(const FmuService_get_co_simulation_attributes_result&); + FmuService_get_co_simulation_attributes_result& operator=(const FmuService_get_co_simulation_attributes_result&); + FmuService_get_co_simulation_attributes_result() { + } + + virtual ~FmuService_get_co_simulation_attributes_result() throw(); + CoSimulationAttributes success; + NoSuchInstanceException ex; + + _FmuService_get_co_simulation_attributes_result__isset __isset; + + void __set_success(const CoSimulationAttributes& val); + + void __set_ex(const NoSuchInstanceException& val); + + bool operator == (const FmuService_get_co_simulation_attributes_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex == rhs.ex)) + return false; + return true; + } + bool operator != (const FmuService_get_co_simulation_attributes_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_get_co_simulation_attributes_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_get_co_simulation_attributes_presult__isset { + _FmuService_get_co_simulation_attributes_presult__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_get_co_simulation_attributes_presult__isset; + +class FmuService_get_co_simulation_attributes_presult { + public: + + + virtual ~FmuService_get_co_simulation_attributes_presult() throw(); + CoSimulationAttributes* success; + NoSuchInstanceException ex; + + _FmuService_get_co_simulation_attributes_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_can_create_instance_from_cs_args__isset { + _FmuService_can_create_instance_from_cs_args__isset() : fmuId(false) {} + bool fmuId :1; +} _FmuService_can_create_instance_from_cs_args__isset; + +class FmuService_can_create_instance_from_cs_args { + public: + + FmuService_can_create_instance_from_cs_args(const FmuService_can_create_instance_from_cs_args&); + FmuService_can_create_instance_from_cs_args& operator=(const FmuService_can_create_instance_from_cs_args&); + FmuService_can_create_instance_from_cs_args() : fmuId() { + } + + virtual ~FmuService_can_create_instance_from_cs_args() throw(); + FmuId fmuId; + + _FmuService_can_create_instance_from_cs_args__isset __isset; + + void __set_fmuId(const FmuId& val); + + bool operator == (const FmuService_can_create_instance_from_cs_args & rhs) const + { + if (!(fmuId == rhs.fmuId)) + return false; + return true; + } + bool operator != (const FmuService_can_create_instance_from_cs_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_can_create_instance_from_cs_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_can_create_instance_from_cs_pargs { + public: + + + virtual ~FmuService_can_create_instance_from_cs_pargs() throw(); + const FmuId* fmuId; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_can_create_instance_from_cs_result__isset { + _FmuService_can_create_instance_from_cs_result__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_can_create_instance_from_cs_result__isset; + +class FmuService_can_create_instance_from_cs_result { + public: + + FmuService_can_create_instance_from_cs_result(const FmuService_can_create_instance_from_cs_result&); + FmuService_can_create_instance_from_cs_result& operator=(const FmuService_can_create_instance_from_cs_result&); + FmuService_can_create_instance_from_cs_result() : success(0) { + } + + virtual ~FmuService_can_create_instance_from_cs_result() throw(); + bool success; + NoSuchFmuException ex; + + _FmuService_can_create_instance_from_cs_result__isset __isset; + + void __set_success(const bool val); + + void __set_ex(const NoSuchFmuException& val); + + bool operator == (const FmuService_can_create_instance_from_cs_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex == rhs.ex)) + return false; + return true; + } + bool operator != (const FmuService_can_create_instance_from_cs_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_can_create_instance_from_cs_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_can_create_instance_from_cs_presult__isset { + _FmuService_can_create_instance_from_cs_presult__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_can_create_instance_from_cs_presult__isset; + +class FmuService_can_create_instance_from_cs_presult { + public: + + + virtual ~FmuService_can_create_instance_from_cs_presult() throw(); + bool* success; + NoSuchFmuException ex; + + _FmuService_can_create_instance_from_cs_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_can_create_instance_from_me_args__isset { + _FmuService_can_create_instance_from_me_args__isset() : fmuId(false) {} + bool fmuId :1; +} _FmuService_can_create_instance_from_me_args__isset; + +class FmuService_can_create_instance_from_me_args { + public: + + FmuService_can_create_instance_from_me_args(const FmuService_can_create_instance_from_me_args&); + FmuService_can_create_instance_from_me_args& operator=(const FmuService_can_create_instance_from_me_args&); + FmuService_can_create_instance_from_me_args() : fmuId() { + } + + virtual ~FmuService_can_create_instance_from_me_args() throw(); + FmuId fmuId; + + _FmuService_can_create_instance_from_me_args__isset __isset; + + void __set_fmuId(const FmuId& val); + + bool operator == (const FmuService_can_create_instance_from_me_args & rhs) const + { + if (!(fmuId == rhs.fmuId)) + return false; + return true; + } + bool operator != (const FmuService_can_create_instance_from_me_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_can_create_instance_from_me_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_can_create_instance_from_me_pargs { + public: + + + virtual ~FmuService_can_create_instance_from_me_pargs() throw(); + const FmuId* fmuId; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_can_create_instance_from_me_result__isset { + _FmuService_can_create_instance_from_me_result__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_can_create_instance_from_me_result__isset; + +class FmuService_can_create_instance_from_me_result { + public: + + FmuService_can_create_instance_from_me_result(const FmuService_can_create_instance_from_me_result&); + FmuService_can_create_instance_from_me_result& operator=(const FmuService_can_create_instance_from_me_result&); + FmuService_can_create_instance_from_me_result() : success(0) { + } + + virtual ~FmuService_can_create_instance_from_me_result() throw(); + bool success; + NoSuchFmuException ex; + + _FmuService_can_create_instance_from_me_result__isset __isset; + + void __set_success(const bool val); + + void __set_ex(const NoSuchFmuException& val); + + bool operator == (const FmuService_can_create_instance_from_me_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex == rhs.ex)) + return false; + return true; + } + bool operator != (const FmuService_can_create_instance_from_me_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_can_create_instance_from_me_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_can_create_instance_from_me_presult__isset { + _FmuService_can_create_instance_from_me_presult__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_can_create_instance_from_me_presult__isset; + +class FmuService_can_create_instance_from_me_presult { + public: + + + virtual ~FmuService_can_create_instance_from_me_presult() throw(); + bool* success; + NoSuchFmuException ex; + + _FmuService_can_create_instance_from_me_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_create_instance_from_cs_args__isset { + _FmuService_create_instance_from_cs_args__isset() : fmuId(false) {} + bool fmuId :1; +} _FmuService_create_instance_from_cs_args__isset; + +class FmuService_create_instance_from_cs_args { + public: + + FmuService_create_instance_from_cs_args(const FmuService_create_instance_from_cs_args&); + FmuService_create_instance_from_cs_args& operator=(const FmuService_create_instance_from_cs_args&); + FmuService_create_instance_from_cs_args() : fmuId() { + } + + virtual ~FmuService_create_instance_from_cs_args() throw(); + FmuId fmuId; + + _FmuService_create_instance_from_cs_args__isset __isset; + + void __set_fmuId(const FmuId& val); + + bool operator == (const FmuService_create_instance_from_cs_args & rhs) const + { + if (!(fmuId == rhs.fmuId)) + return false; + return true; + } + bool operator != (const FmuService_create_instance_from_cs_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_create_instance_from_cs_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_create_instance_from_cs_pargs { + public: + + + virtual ~FmuService_create_instance_from_cs_pargs() throw(); + const FmuId* fmuId; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_create_instance_from_cs_result__isset { + _FmuService_create_instance_from_cs_result__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_create_instance_from_cs_result__isset; + +class FmuService_create_instance_from_cs_result { + public: + + FmuService_create_instance_from_cs_result(const FmuService_create_instance_from_cs_result&); + FmuService_create_instance_from_cs_result& operator=(const FmuService_create_instance_from_cs_result&); + FmuService_create_instance_from_cs_result() : success() { + } + + virtual ~FmuService_create_instance_from_cs_result() throw(); + InstanceId success; + UnsupportedOperationException ex1; + NoSuchFmuException ex2; + + _FmuService_create_instance_from_cs_result__isset __isset; + + void __set_success(const InstanceId& val); + + void __set_ex1(const UnsupportedOperationException& val); + + void __set_ex2(const NoSuchFmuException& val); + + bool operator == (const FmuService_create_instance_from_cs_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex1 == rhs.ex1)) + return false; + if (!(ex2 == rhs.ex2)) + return false; + return true; + } + bool operator != (const FmuService_create_instance_from_cs_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_create_instance_from_cs_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_create_instance_from_cs_presult__isset { + _FmuService_create_instance_from_cs_presult__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_create_instance_from_cs_presult__isset; + +class FmuService_create_instance_from_cs_presult { + public: + + + virtual ~FmuService_create_instance_from_cs_presult() throw(); + InstanceId* success; + UnsupportedOperationException ex1; + NoSuchFmuException ex2; + + _FmuService_create_instance_from_cs_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_create_instance_from_me_args__isset { + _FmuService_create_instance_from_me_args__isset() : fmuId(false), solver(false) {} + bool fmuId :1; + bool solver :1; +} _FmuService_create_instance_from_me_args__isset; + +class FmuService_create_instance_from_me_args { + public: + + FmuService_create_instance_from_me_args(const FmuService_create_instance_from_me_args&); + FmuService_create_instance_from_me_args& operator=(const FmuService_create_instance_from_me_args&); + FmuService_create_instance_from_me_args() : fmuId() { + } + + virtual ~FmuService_create_instance_from_me_args() throw(); + FmuId fmuId; + Solver solver; + + _FmuService_create_instance_from_me_args__isset __isset; + + void __set_fmuId(const FmuId& val); + + void __set_solver(const Solver& val); + + bool operator == (const FmuService_create_instance_from_me_args & rhs) const + { + if (!(fmuId == rhs.fmuId)) + return false; + if (!(solver == rhs.solver)) + return false; + return true; + } + bool operator != (const FmuService_create_instance_from_me_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_create_instance_from_me_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_create_instance_from_me_pargs { + public: + + + virtual ~FmuService_create_instance_from_me_pargs() throw(); + const FmuId* fmuId; + const Solver* solver; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_create_instance_from_me_result__isset { + _FmuService_create_instance_from_me_result__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_create_instance_from_me_result__isset; + +class FmuService_create_instance_from_me_result { + public: + + FmuService_create_instance_from_me_result(const FmuService_create_instance_from_me_result&); + FmuService_create_instance_from_me_result& operator=(const FmuService_create_instance_from_me_result&); + FmuService_create_instance_from_me_result() : success() { + } + + virtual ~FmuService_create_instance_from_me_result() throw(); + InstanceId success; + UnsupportedOperationException ex1; + NoSuchFmuException ex2; + + _FmuService_create_instance_from_me_result__isset __isset; + + void __set_success(const InstanceId& val); + + void __set_ex1(const UnsupportedOperationException& val); + + void __set_ex2(const NoSuchFmuException& val); + + bool operator == (const FmuService_create_instance_from_me_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex1 == rhs.ex1)) + return false; + if (!(ex2 == rhs.ex2)) + return false; + return true; + } + bool operator != (const FmuService_create_instance_from_me_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_create_instance_from_me_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_create_instance_from_me_presult__isset { + _FmuService_create_instance_from_me_presult__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_create_instance_from_me_presult__isset; + +class FmuService_create_instance_from_me_presult { + public: + + + virtual ~FmuService_create_instance_from_me_presult() throw(); + InstanceId* success; + UnsupportedOperationException ex1; + NoSuchFmuException ex2; + + _FmuService_create_instance_from_me_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_setup_experiment_args__isset { + _FmuService_setup_experiment_args__isset() : instanceId(false), start(false), stop(false), tolerance(false) {} + bool instanceId :1; + bool start :1; + bool stop :1; + bool tolerance :1; +} _FmuService_setup_experiment_args__isset; + +class FmuService_setup_experiment_args { + public: + + FmuService_setup_experiment_args(const FmuService_setup_experiment_args&); + FmuService_setup_experiment_args& operator=(const FmuService_setup_experiment_args&); + FmuService_setup_experiment_args() : instanceId(), start(0), stop(0), tolerance(0) { + } + + virtual ~FmuService_setup_experiment_args() throw(); + InstanceId instanceId; + double start; + double stop; + double tolerance; + + _FmuService_setup_experiment_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + void __set_start(const double val); + + void __set_stop(const double val); + + void __set_tolerance(const double val); + + bool operator == (const FmuService_setup_experiment_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + if (!(start == rhs.start)) + return false; + if (!(stop == rhs.stop)) + return false; + if (!(tolerance == rhs.tolerance)) + return false; + return true; + } + bool operator != (const FmuService_setup_experiment_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_setup_experiment_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_setup_experiment_pargs { + public: + + + virtual ~FmuService_setup_experiment_pargs() throw(); + const InstanceId* instanceId; + const double* start; + const double* stop; + const double* tolerance; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_setup_experiment_result__isset { + _FmuService_setup_experiment_result__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_setup_experiment_result__isset; + +class FmuService_setup_experiment_result { + public: + + FmuService_setup_experiment_result(const FmuService_setup_experiment_result&); + FmuService_setup_experiment_result& operator=(const FmuService_setup_experiment_result&); + FmuService_setup_experiment_result() : success((Status::type)0) { + } + + virtual ~FmuService_setup_experiment_result() throw(); + Status::type success; + NoSuchInstanceException ex; + + _FmuService_setup_experiment_result__isset __isset; + + void __set_success(const Status::type val); + + void __set_ex(const NoSuchInstanceException& val); + + bool operator == (const FmuService_setup_experiment_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex == rhs.ex)) + return false; + return true; + } + bool operator != (const FmuService_setup_experiment_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_setup_experiment_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_setup_experiment_presult__isset { + _FmuService_setup_experiment_presult__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_setup_experiment_presult__isset; + +class FmuService_setup_experiment_presult { + public: + + + virtual ~FmuService_setup_experiment_presult() throw(); + Status::type* success; + NoSuchInstanceException ex; + + _FmuService_setup_experiment_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_enter_initialization_mode_args__isset { + _FmuService_enter_initialization_mode_args__isset() : instanceId(false) {} + bool instanceId :1; +} _FmuService_enter_initialization_mode_args__isset; + +class FmuService_enter_initialization_mode_args { + public: + + FmuService_enter_initialization_mode_args(const FmuService_enter_initialization_mode_args&); + FmuService_enter_initialization_mode_args& operator=(const FmuService_enter_initialization_mode_args&); + FmuService_enter_initialization_mode_args() : instanceId() { + } + + virtual ~FmuService_enter_initialization_mode_args() throw(); + InstanceId instanceId; + + _FmuService_enter_initialization_mode_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + bool operator == (const FmuService_enter_initialization_mode_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + return true; + } + bool operator != (const FmuService_enter_initialization_mode_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_enter_initialization_mode_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_enter_initialization_mode_pargs { + public: + + + virtual ~FmuService_enter_initialization_mode_pargs() throw(); + const InstanceId* instanceId; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_enter_initialization_mode_result__isset { + _FmuService_enter_initialization_mode_result__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_enter_initialization_mode_result__isset; + +class FmuService_enter_initialization_mode_result { + public: + + FmuService_enter_initialization_mode_result(const FmuService_enter_initialization_mode_result&); + FmuService_enter_initialization_mode_result& operator=(const FmuService_enter_initialization_mode_result&); + FmuService_enter_initialization_mode_result() : success((Status::type)0) { + } + + virtual ~FmuService_enter_initialization_mode_result() throw(); + Status::type success; + NoSuchInstanceException ex; + + _FmuService_enter_initialization_mode_result__isset __isset; + + void __set_success(const Status::type val); + + void __set_ex(const NoSuchInstanceException& val); + + bool operator == (const FmuService_enter_initialization_mode_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex == rhs.ex)) + return false; + return true; + } + bool operator != (const FmuService_enter_initialization_mode_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_enter_initialization_mode_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_enter_initialization_mode_presult__isset { + _FmuService_enter_initialization_mode_presult__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_enter_initialization_mode_presult__isset; + +class FmuService_enter_initialization_mode_presult { + public: + + + virtual ~FmuService_enter_initialization_mode_presult() throw(); + Status::type* success; + NoSuchInstanceException ex; + + _FmuService_enter_initialization_mode_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_exit_initialization_mode_args__isset { + _FmuService_exit_initialization_mode_args__isset() : instanceId(false) {} + bool instanceId :1; +} _FmuService_exit_initialization_mode_args__isset; + +class FmuService_exit_initialization_mode_args { + public: + + FmuService_exit_initialization_mode_args(const FmuService_exit_initialization_mode_args&); + FmuService_exit_initialization_mode_args& operator=(const FmuService_exit_initialization_mode_args&); + FmuService_exit_initialization_mode_args() : instanceId() { + } + + virtual ~FmuService_exit_initialization_mode_args() throw(); + InstanceId instanceId; + + _FmuService_exit_initialization_mode_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + bool operator == (const FmuService_exit_initialization_mode_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + return true; + } + bool operator != (const FmuService_exit_initialization_mode_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_exit_initialization_mode_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_exit_initialization_mode_pargs { + public: + + + virtual ~FmuService_exit_initialization_mode_pargs() throw(); + const InstanceId* instanceId; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_exit_initialization_mode_result__isset { + _FmuService_exit_initialization_mode_result__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_exit_initialization_mode_result__isset; + +class FmuService_exit_initialization_mode_result { + public: + + FmuService_exit_initialization_mode_result(const FmuService_exit_initialization_mode_result&); + FmuService_exit_initialization_mode_result& operator=(const FmuService_exit_initialization_mode_result&); + FmuService_exit_initialization_mode_result() : success((Status::type)0) { + } + + virtual ~FmuService_exit_initialization_mode_result() throw(); + Status::type success; + NoSuchInstanceException ex; + + _FmuService_exit_initialization_mode_result__isset __isset; + + void __set_success(const Status::type val); + + void __set_ex(const NoSuchInstanceException& val); + + bool operator == (const FmuService_exit_initialization_mode_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex == rhs.ex)) + return false; + return true; + } + bool operator != (const FmuService_exit_initialization_mode_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_exit_initialization_mode_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_exit_initialization_mode_presult__isset { + _FmuService_exit_initialization_mode_presult__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_exit_initialization_mode_presult__isset; + +class FmuService_exit_initialization_mode_presult { + public: + + + virtual ~FmuService_exit_initialization_mode_presult() throw(); + Status::type* success; + NoSuchInstanceException ex; + + _FmuService_exit_initialization_mode_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_step_args__isset { + _FmuService_step_args__isset() : instanceId(false), stepSize(false) {} + bool instanceId :1; + bool stepSize :1; +} _FmuService_step_args__isset; + +class FmuService_step_args { + public: + + FmuService_step_args(const FmuService_step_args&); + FmuService_step_args& operator=(const FmuService_step_args&); + FmuService_step_args() : instanceId(), stepSize(0) { + } + + virtual ~FmuService_step_args() throw(); + InstanceId instanceId; + double stepSize; + + _FmuService_step_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + void __set_stepSize(const double val); + + bool operator == (const FmuService_step_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + if (!(stepSize == rhs.stepSize)) + return false; + return true; + } + bool operator != (const FmuService_step_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_step_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_step_pargs { + public: + + + virtual ~FmuService_step_pargs() throw(); + const InstanceId* instanceId; + const double* stepSize; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_step_result__isset { + _FmuService_step_result__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_step_result__isset; + +class FmuService_step_result { + public: + + FmuService_step_result(const FmuService_step_result&); + FmuService_step_result& operator=(const FmuService_step_result&); + FmuService_step_result() { + } + + virtual ~FmuService_step_result() throw(); + StepResult success; + NoSuchInstanceException ex; + + _FmuService_step_result__isset __isset; + + void __set_success(const StepResult& val); + + void __set_ex(const NoSuchInstanceException& val); + + bool operator == (const FmuService_step_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex == rhs.ex)) + return false; + return true; + } + bool operator != (const FmuService_step_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_step_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_step_presult__isset { + _FmuService_step_presult__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_step_presult__isset; + +class FmuService_step_presult { + public: + + + virtual ~FmuService_step_presult() throw(); + StepResult* success; + NoSuchInstanceException ex; + + _FmuService_step_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_reset_args__isset { + _FmuService_reset_args__isset() : instanceId(false) {} + bool instanceId :1; +} _FmuService_reset_args__isset; + +class FmuService_reset_args { + public: + + FmuService_reset_args(const FmuService_reset_args&); + FmuService_reset_args& operator=(const FmuService_reset_args&); + FmuService_reset_args() : instanceId() { + } + + virtual ~FmuService_reset_args() throw(); + InstanceId instanceId; + + _FmuService_reset_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + bool operator == (const FmuService_reset_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + return true; + } + bool operator != (const FmuService_reset_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_reset_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_reset_pargs { + public: + + + virtual ~FmuService_reset_pargs() throw(); + const InstanceId* instanceId; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_reset_result__isset { + _FmuService_reset_result__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_reset_result__isset; + +class FmuService_reset_result { + public: + + FmuService_reset_result(const FmuService_reset_result&); + FmuService_reset_result& operator=(const FmuService_reset_result&); + FmuService_reset_result() : success((Status::type)0) { + } + + virtual ~FmuService_reset_result() throw(); + Status::type success; + NoSuchInstanceException ex; + + _FmuService_reset_result__isset __isset; + + void __set_success(const Status::type val); + + void __set_ex(const NoSuchInstanceException& val); + + bool operator == (const FmuService_reset_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex == rhs.ex)) + return false; + return true; + } + bool operator != (const FmuService_reset_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_reset_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_reset_presult__isset { + _FmuService_reset_presult__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_reset_presult__isset; + +class FmuService_reset_presult { + public: + + + virtual ~FmuService_reset_presult() throw(); + Status::type* success; + NoSuchInstanceException ex; + + _FmuService_reset_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_terminate_args__isset { + _FmuService_terminate_args__isset() : instanceId(false) {} + bool instanceId :1; +} _FmuService_terminate_args__isset; + +class FmuService_terminate_args { + public: + + FmuService_terminate_args(const FmuService_terminate_args&); + FmuService_terminate_args& operator=(const FmuService_terminate_args&); + FmuService_terminate_args() : instanceId() { + } + + virtual ~FmuService_terminate_args() throw(); + InstanceId instanceId; + + _FmuService_terminate_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + bool operator == (const FmuService_terminate_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + return true; + } + bool operator != (const FmuService_terminate_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_terminate_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_terminate_pargs { + public: + + + virtual ~FmuService_terminate_pargs() throw(); + const InstanceId* instanceId; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_terminate_result__isset { + _FmuService_terminate_result__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_terminate_result__isset; + +class FmuService_terminate_result { + public: + + FmuService_terminate_result(const FmuService_terminate_result&); + FmuService_terminate_result& operator=(const FmuService_terminate_result&); + FmuService_terminate_result() : success((Status::type)0) { + } + + virtual ~FmuService_terminate_result() throw(); + Status::type success; + NoSuchInstanceException ex; + + _FmuService_terminate_result__isset __isset; + + void __set_success(const Status::type val); + + void __set_ex(const NoSuchInstanceException& val); + + bool operator == (const FmuService_terminate_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex == rhs.ex)) + return false; + return true; + } + bool operator != (const FmuService_terminate_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_terminate_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_terminate_presult__isset { + _FmuService_terminate_presult__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _FmuService_terminate_presult__isset; + +class FmuService_terminate_presult { + public: + + + virtual ~FmuService_terminate_presult() throw(); + Status::type* success; + NoSuchInstanceException ex; + + _FmuService_terminate_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_read_integer_args__isset { + _FmuService_read_integer_args__isset() : instanceId(false), vr(false) {} + bool instanceId :1; + bool vr :1; +} _FmuService_read_integer_args__isset; + +class FmuService_read_integer_args { + public: + + FmuService_read_integer_args(const FmuService_read_integer_args&); + FmuService_read_integer_args& operator=(const FmuService_read_integer_args&); + FmuService_read_integer_args() : instanceId() { + } + + virtual ~FmuService_read_integer_args() throw(); + InstanceId instanceId; + ValueReferences vr; + + _FmuService_read_integer_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + void __set_vr(const ValueReferences& val); + + bool operator == (const FmuService_read_integer_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + if (!(vr == rhs.vr)) + return false; + return true; + } + bool operator != (const FmuService_read_integer_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_read_integer_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_read_integer_pargs { + public: + + + virtual ~FmuService_read_integer_pargs() throw(); + const InstanceId* instanceId; + const ValueReferences* vr; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_read_integer_result__isset { + _FmuService_read_integer_result__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_read_integer_result__isset; + +class FmuService_read_integer_result { + public: + + FmuService_read_integer_result(const FmuService_read_integer_result&); + FmuService_read_integer_result& operator=(const FmuService_read_integer_result&); + FmuService_read_integer_result() { + } + + virtual ~FmuService_read_integer_result() throw(); + IntegerRead success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_read_integer_result__isset __isset; + + void __set_success(const IntegerRead& val); + + void __set_ex1(const NoSuchInstanceException& val); + + void __set_ex2(const NoSuchVariableException& val); + + bool operator == (const FmuService_read_integer_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex1 == rhs.ex1)) + return false; + if (!(ex2 == rhs.ex2)) + return false; + return true; + } + bool operator != (const FmuService_read_integer_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_read_integer_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_read_integer_presult__isset { + _FmuService_read_integer_presult__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_read_integer_presult__isset; + +class FmuService_read_integer_presult { + public: + + + virtual ~FmuService_read_integer_presult() throw(); + IntegerRead* success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_read_integer_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_read_real_args__isset { + _FmuService_read_real_args__isset() : instanceId(false), vr(false) {} + bool instanceId :1; + bool vr :1; +} _FmuService_read_real_args__isset; + +class FmuService_read_real_args { + public: + + FmuService_read_real_args(const FmuService_read_real_args&); + FmuService_read_real_args& operator=(const FmuService_read_real_args&); + FmuService_read_real_args() : instanceId() { + } + + virtual ~FmuService_read_real_args() throw(); + InstanceId instanceId; + ValueReferences vr; + + _FmuService_read_real_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + void __set_vr(const ValueReferences& val); + + bool operator == (const FmuService_read_real_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + if (!(vr == rhs.vr)) + return false; + return true; + } + bool operator != (const FmuService_read_real_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_read_real_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_read_real_pargs { + public: + + + virtual ~FmuService_read_real_pargs() throw(); + const InstanceId* instanceId; + const ValueReferences* vr; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_read_real_result__isset { + _FmuService_read_real_result__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_read_real_result__isset; + +class FmuService_read_real_result { + public: + + FmuService_read_real_result(const FmuService_read_real_result&); + FmuService_read_real_result& operator=(const FmuService_read_real_result&); + FmuService_read_real_result() { + } + + virtual ~FmuService_read_real_result() throw(); + RealRead success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_read_real_result__isset __isset; + + void __set_success(const RealRead& val); + + void __set_ex1(const NoSuchInstanceException& val); + + void __set_ex2(const NoSuchVariableException& val); + + bool operator == (const FmuService_read_real_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex1 == rhs.ex1)) + return false; + if (!(ex2 == rhs.ex2)) + return false; + return true; + } + bool operator != (const FmuService_read_real_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_read_real_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_read_real_presult__isset { + _FmuService_read_real_presult__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_read_real_presult__isset; + +class FmuService_read_real_presult { + public: + + + virtual ~FmuService_read_real_presult() throw(); + RealRead* success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_read_real_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_read_string_args__isset { + _FmuService_read_string_args__isset() : instanceId(false), vr(false) {} + bool instanceId :1; + bool vr :1; +} _FmuService_read_string_args__isset; + +class FmuService_read_string_args { + public: + + FmuService_read_string_args(const FmuService_read_string_args&); + FmuService_read_string_args& operator=(const FmuService_read_string_args&); + FmuService_read_string_args() : instanceId() { + } + + virtual ~FmuService_read_string_args() throw(); + InstanceId instanceId; + ValueReferences vr; + + _FmuService_read_string_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + void __set_vr(const ValueReferences& val); + + bool operator == (const FmuService_read_string_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + if (!(vr == rhs.vr)) + return false; + return true; + } + bool operator != (const FmuService_read_string_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_read_string_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_read_string_pargs { + public: + + + virtual ~FmuService_read_string_pargs() throw(); + const InstanceId* instanceId; + const ValueReferences* vr; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_read_string_result__isset { + _FmuService_read_string_result__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_read_string_result__isset; + +class FmuService_read_string_result { + public: + + FmuService_read_string_result(const FmuService_read_string_result&); + FmuService_read_string_result& operator=(const FmuService_read_string_result&); + FmuService_read_string_result() { + } + + virtual ~FmuService_read_string_result() throw(); + StringRead success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_read_string_result__isset __isset; + + void __set_success(const StringRead& val); + + void __set_ex1(const NoSuchInstanceException& val); + + void __set_ex2(const NoSuchVariableException& val); + + bool operator == (const FmuService_read_string_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex1 == rhs.ex1)) + return false; + if (!(ex2 == rhs.ex2)) + return false; + return true; + } + bool operator != (const FmuService_read_string_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_read_string_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_read_string_presult__isset { + _FmuService_read_string_presult__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_read_string_presult__isset; + +class FmuService_read_string_presult { + public: + + + virtual ~FmuService_read_string_presult() throw(); + StringRead* success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_read_string_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_read_boolean_args__isset { + _FmuService_read_boolean_args__isset() : instanceId(false), vr(false) {} + bool instanceId :1; + bool vr :1; +} _FmuService_read_boolean_args__isset; + +class FmuService_read_boolean_args { + public: + + FmuService_read_boolean_args(const FmuService_read_boolean_args&); + FmuService_read_boolean_args& operator=(const FmuService_read_boolean_args&); + FmuService_read_boolean_args() : instanceId() { + } + + virtual ~FmuService_read_boolean_args() throw(); + InstanceId instanceId; + ValueReferences vr; + + _FmuService_read_boolean_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + void __set_vr(const ValueReferences& val); + + bool operator == (const FmuService_read_boolean_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + if (!(vr == rhs.vr)) + return false; + return true; + } + bool operator != (const FmuService_read_boolean_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_read_boolean_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_read_boolean_pargs { + public: + + + virtual ~FmuService_read_boolean_pargs() throw(); + const InstanceId* instanceId; + const ValueReferences* vr; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_read_boolean_result__isset { + _FmuService_read_boolean_result__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_read_boolean_result__isset; + +class FmuService_read_boolean_result { + public: + + FmuService_read_boolean_result(const FmuService_read_boolean_result&); + FmuService_read_boolean_result& operator=(const FmuService_read_boolean_result&); + FmuService_read_boolean_result() { + } + + virtual ~FmuService_read_boolean_result() throw(); + BooleanRead success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_read_boolean_result__isset __isset; + + void __set_success(const BooleanRead& val); + + void __set_ex1(const NoSuchInstanceException& val); + + void __set_ex2(const NoSuchVariableException& val); + + bool operator == (const FmuService_read_boolean_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex1 == rhs.ex1)) + return false; + if (!(ex2 == rhs.ex2)) + return false; + return true; + } + bool operator != (const FmuService_read_boolean_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_read_boolean_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_read_boolean_presult__isset { + _FmuService_read_boolean_presult__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_read_boolean_presult__isset; + +class FmuService_read_boolean_presult { + public: + + + virtual ~FmuService_read_boolean_presult() throw(); + BooleanRead* success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_read_boolean_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_write_integer_args__isset { + _FmuService_write_integer_args__isset() : instanceId(false), vr(false), value(false) {} + bool instanceId :1; + bool vr :1; + bool value :1; +} _FmuService_write_integer_args__isset; + +class FmuService_write_integer_args { + public: + + FmuService_write_integer_args(const FmuService_write_integer_args&); + FmuService_write_integer_args& operator=(const FmuService_write_integer_args&); + FmuService_write_integer_args() : instanceId() { + } + + virtual ~FmuService_write_integer_args() throw(); + InstanceId instanceId; + ValueReferences vr; + IntArray value; + + _FmuService_write_integer_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + void __set_vr(const ValueReferences& val); + + void __set_value(const IntArray& val); + + bool operator == (const FmuService_write_integer_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + if (!(vr == rhs.vr)) + return false; + if (!(value == rhs.value)) + return false; + return true; + } + bool operator != (const FmuService_write_integer_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_write_integer_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_write_integer_pargs { + public: + + + virtual ~FmuService_write_integer_pargs() throw(); + const InstanceId* instanceId; + const ValueReferences* vr; + const IntArray* value; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_write_integer_result__isset { + _FmuService_write_integer_result__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_write_integer_result__isset; + +class FmuService_write_integer_result { + public: + + FmuService_write_integer_result(const FmuService_write_integer_result&); + FmuService_write_integer_result& operator=(const FmuService_write_integer_result&); + FmuService_write_integer_result() : success((Status::type)0) { + } + + virtual ~FmuService_write_integer_result() throw(); + Status::type success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_write_integer_result__isset __isset; + + void __set_success(const Status::type val); + + void __set_ex1(const NoSuchInstanceException& val); + + void __set_ex2(const NoSuchVariableException& val); + + bool operator == (const FmuService_write_integer_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex1 == rhs.ex1)) + return false; + if (!(ex2 == rhs.ex2)) + return false; + return true; + } + bool operator != (const FmuService_write_integer_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_write_integer_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_write_integer_presult__isset { + _FmuService_write_integer_presult__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_write_integer_presult__isset; + +class FmuService_write_integer_presult { + public: + + + virtual ~FmuService_write_integer_presult() throw(); + Status::type* success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_write_integer_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_write_real_args__isset { + _FmuService_write_real_args__isset() : instanceId(false), vr(false), value(false) {} + bool instanceId :1; + bool vr :1; + bool value :1; +} _FmuService_write_real_args__isset; + +class FmuService_write_real_args { + public: + + FmuService_write_real_args(const FmuService_write_real_args&); + FmuService_write_real_args& operator=(const FmuService_write_real_args&); + FmuService_write_real_args() : instanceId() { + } + + virtual ~FmuService_write_real_args() throw(); + InstanceId instanceId; + ValueReferences vr; + RealArray value; + + _FmuService_write_real_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + void __set_vr(const ValueReferences& val); + + void __set_value(const RealArray& val); + + bool operator == (const FmuService_write_real_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + if (!(vr == rhs.vr)) + return false; + if (!(value == rhs.value)) + return false; + return true; + } + bool operator != (const FmuService_write_real_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_write_real_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_write_real_pargs { + public: + + + virtual ~FmuService_write_real_pargs() throw(); + const InstanceId* instanceId; + const ValueReferences* vr; + const RealArray* value; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_write_real_result__isset { + _FmuService_write_real_result__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_write_real_result__isset; + +class FmuService_write_real_result { + public: + + FmuService_write_real_result(const FmuService_write_real_result&); + FmuService_write_real_result& operator=(const FmuService_write_real_result&); + FmuService_write_real_result() : success((Status::type)0) { + } + + virtual ~FmuService_write_real_result() throw(); + Status::type success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_write_real_result__isset __isset; + + void __set_success(const Status::type val); + + void __set_ex1(const NoSuchInstanceException& val); + + void __set_ex2(const NoSuchVariableException& val); + + bool operator == (const FmuService_write_real_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex1 == rhs.ex1)) + return false; + if (!(ex2 == rhs.ex2)) + return false; + return true; + } + bool operator != (const FmuService_write_real_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_write_real_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_write_real_presult__isset { + _FmuService_write_real_presult__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_write_real_presult__isset; + +class FmuService_write_real_presult { + public: + + + virtual ~FmuService_write_real_presult() throw(); + Status::type* success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_write_real_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_write_string_args__isset { + _FmuService_write_string_args__isset() : instanceId(false), vr(false), value(false) {} + bool instanceId :1; + bool vr :1; + bool value :1; +} _FmuService_write_string_args__isset; + +class FmuService_write_string_args { + public: + + FmuService_write_string_args(const FmuService_write_string_args&); + FmuService_write_string_args& operator=(const FmuService_write_string_args&); + FmuService_write_string_args() : instanceId() { + } + + virtual ~FmuService_write_string_args() throw(); + InstanceId instanceId; + ValueReferences vr; + StringArray value; + + _FmuService_write_string_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + void __set_vr(const ValueReferences& val); + + void __set_value(const StringArray& val); + + bool operator == (const FmuService_write_string_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + if (!(vr == rhs.vr)) + return false; + if (!(value == rhs.value)) + return false; + return true; + } + bool operator != (const FmuService_write_string_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_write_string_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_write_string_pargs { + public: + + + virtual ~FmuService_write_string_pargs() throw(); + const InstanceId* instanceId; + const ValueReferences* vr; + const StringArray* value; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_write_string_result__isset { + _FmuService_write_string_result__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_write_string_result__isset; + +class FmuService_write_string_result { + public: + + FmuService_write_string_result(const FmuService_write_string_result&); + FmuService_write_string_result& operator=(const FmuService_write_string_result&); + FmuService_write_string_result() : success((Status::type)0) { + } + + virtual ~FmuService_write_string_result() throw(); + Status::type success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_write_string_result__isset __isset; + + void __set_success(const Status::type val); + + void __set_ex1(const NoSuchInstanceException& val); + + void __set_ex2(const NoSuchVariableException& val); + + bool operator == (const FmuService_write_string_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex1 == rhs.ex1)) + return false; + if (!(ex2 == rhs.ex2)) + return false; + return true; + } + bool operator != (const FmuService_write_string_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_write_string_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_write_string_presult__isset { + _FmuService_write_string_presult__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_write_string_presult__isset; + +class FmuService_write_string_presult { + public: + + + virtual ~FmuService_write_string_presult() throw(); + Status::type* success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_write_string_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_write_boolean_args__isset { + _FmuService_write_boolean_args__isset() : instanceId(false), vr(false), value(false) {} + bool instanceId :1; + bool vr :1; + bool value :1; +} _FmuService_write_boolean_args__isset; + +class FmuService_write_boolean_args { + public: + + FmuService_write_boolean_args(const FmuService_write_boolean_args&); + FmuService_write_boolean_args& operator=(const FmuService_write_boolean_args&); + FmuService_write_boolean_args() : instanceId() { + } + + virtual ~FmuService_write_boolean_args() throw(); + InstanceId instanceId; + ValueReferences vr; + BooleanArray value; + + _FmuService_write_boolean_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + void __set_vr(const ValueReferences& val); + + void __set_value(const BooleanArray& val); + + bool operator == (const FmuService_write_boolean_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + if (!(vr == rhs.vr)) + return false; + if (!(value == rhs.value)) + return false; + return true; + } + bool operator != (const FmuService_write_boolean_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_write_boolean_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_write_boolean_pargs { + public: + + + virtual ~FmuService_write_boolean_pargs() throw(); + const InstanceId* instanceId; + const ValueReferences* vr; + const BooleanArray* value; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_write_boolean_result__isset { + _FmuService_write_boolean_result__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_write_boolean_result__isset; + +class FmuService_write_boolean_result { + public: + + FmuService_write_boolean_result(const FmuService_write_boolean_result&); + FmuService_write_boolean_result& operator=(const FmuService_write_boolean_result&); + FmuService_write_boolean_result() : success((Status::type)0) { + } + + virtual ~FmuService_write_boolean_result() throw(); + Status::type success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_write_boolean_result__isset __isset; + + void __set_success(const Status::type val); + + void __set_ex1(const NoSuchInstanceException& val); + + void __set_ex2(const NoSuchVariableException& val); + + bool operator == (const FmuService_write_boolean_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex1 == rhs.ex1)) + return false; + if (!(ex2 == rhs.ex2)) + return false; + return true; + } + bool operator != (const FmuService_write_boolean_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_write_boolean_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_write_boolean_presult__isset { + _FmuService_write_boolean_presult__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_write_boolean_presult__isset; + +class FmuService_write_boolean_presult { + public: + + + virtual ~FmuService_write_boolean_presult() throw(); + Status::type* success; + NoSuchInstanceException ex1; + NoSuchVariableException ex2; + + _FmuService_write_boolean_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FmuService_get_directional_derivative_args__isset { + _FmuService_get_directional_derivative_args__isset() : instanceId(false), vUnknownRef(false), vKnownRef(false), dvKnownRef(false) {} + bool instanceId :1; + bool vUnknownRef :1; + bool vKnownRef :1; + bool dvKnownRef :1; +} _FmuService_get_directional_derivative_args__isset; + +class FmuService_get_directional_derivative_args { + public: + + FmuService_get_directional_derivative_args(const FmuService_get_directional_derivative_args&); + FmuService_get_directional_derivative_args& operator=(const FmuService_get_directional_derivative_args&); + FmuService_get_directional_derivative_args() : instanceId() { + } + + virtual ~FmuService_get_directional_derivative_args() throw(); + InstanceId instanceId; + ValueReferences vUnknownRef; + ValueReferences vKnownRef; + std::vector dvKnownRef; + + _FmuService_get_directional_derivative_args__isset __isset; + + void __set_instanceId(const InstanceId& val); + + void __set_vUnknownRef(const ValueReferences& val); + + void __set_vKnownRef(const ValueReferences& val); + + void __set_dvKnownRef(const std::vector & val); + + bool operator == (const FmuService_get_directional_derivative_args & rhs) const + { + if (!(instanceId == rhs.instanceId)) + return false; + if (!(vUnknownRef == rhs.vUnknownRef)) + return false; + if (!(vKnownRef == rhs.vKnownRef)) + return false; + if (!(dvKnownRef == rhs.dvKnownRef)) + return false; + return true; + } + bool operator != (const FmuService_get_directional_derivative_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_get_directional_derivative_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FmuService_get_directional_derivative_pargs { + public: + + + virtual ~FmuService_get_directional_derivative_pargs() throw(); + const InstanceId* instanceId; + const ValueReferences* vUnknownRef; + const ValueReferences* vKnownRef; + const std::vector * dvKnownRef; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_get_directional_derivative_result__isset { + _FmuService_get_directional_derivative_result__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_get_directional_derivative_result__isset; + +class FmuService_get_directional_derivative_result { + public: + + FmuService_get_directional_derivative_result(const FmuService_get_directional_derivative_result&); + FmuService_get_directional_derivative_result& operator=(const FmuService_get_directional_derivative_result&); + FmuService_get_directional_derivative_result() { + } + + virtual ~FmuService_get_directional_derivative_result() throw(); + DirectionalDerivativeResult success; + NoSuchInstanceException ex1; + UnsupportedOperationException ex2; + + _FmuService_get_directional_derivative_result__isset __isset; + + void __set_success(const DirectionalDerivativeResult& val); + + void __set_ex1(const NoSuchInstanceException& val); + + void __set_ex2(const UnsupportedOperationException& val); + + bool operator == (const FmuService_get_directional_derivative_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex1 == rhs.ex1)) + return false; + if (!(ex2 == rhs.ex2)) + return false; + return true; + } + bool operator != (const FmuService_get_directional_derivative_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FmuService_get_directional_derivative_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FmuService_get_directional_derivative_presult__isset { + _FmuService_get_directional_derivative_presult__isset() : success(false), ex1(false), ex2(false) {} + bool success :1; + bool ex1 :1; + bool ex2 :1; +} _FmuService_get_directional_derivative_presult__isset; + +class FmuService_get_directional_derivative_presult { + public: + + + virtual ~FmuService_get_directional_derivative_presult() throw(); + DirectionalDerivativeResult* success; + NoSuchInstanceException ex1; + UnsupportedOperationException ex2; + + _FmuService_get_directional_derivative_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +class FmuServiceClient : virtual public FmuServiceIf { + public: + FmuServiceClient(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + FmuServiceClient(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + void load_from_url(FmuId& _return, const std::string& url); + void send_load_from_url(const std::string& url); + void recv_load_from_url(FmuId& _return); + void load_from_file(FmuId& _return, const std::string& name, const std::string& data); + void send_load_from_file(const std::string& name, const std::string& data); + void recv_load_from_file(FmuId& _return); + void get_model_description(ModelDescription& _return, const FmuId& fmuId); + void send_get_model_description(const FmuId& fmuId); + void recv_get_model_description(ModelDescription& _return); + void get_co_simulation_attributes(CoSimulationAttributes& _return, const InstanceId& instanceId); + void send_get_co_simulation_attributes(const InstanceId& instanceId); + void recv_get_co_simulation_attributes(CoSimulationAttributes& _return); + bool can_create_instance_from_cs(const FmuId& fmuId); + void send_can_create_instance_from_cs(const FmuId& fmuId); + bool recv_can_create_instance_from_cs(); + bool can_create_instance_from_me(const FmuId& fmuId); + void send_can_create_instance_from_me(const FmuId& fmuId); + bool recv_can_create_instance_from_me(); + void create_instance_from_cs(InstanceId& _return, const FmuId& fmuId); + void send_create_instance_from_cs(const FmuId& fmuId); + void recv_create_instance_from_cs(InstanceId& _return); + void create_instance_from_me(InstanceId& _return, const FmuId& fmuId, const Solver& solver); + void send_create_instance_from_me(const FmuId& fmuId, const Solver& solver); + void recv_create_instance_from_me(InstanceId& _return); + Status::type setup_experiment(const InstanceId& instanceId, const double start, const double stop, const double tolerance); + void send_setup_experiment(const InstanceId& instanceId, const double start, const double stop, const double tolerance); + Status::type recv_setup_experiment(); + Status::type enter_initialization_mode(const InstanceId& instanceId); + void send_enter_initialization_mode(const InstanceId& instanceId); + Status::type recv_enter_initialization_mode(); + Status::type exit_initialization_mode(const InstanceId& instanceId); + void send_exit_initialization_mode(const InstanceId& instanceId); + Status::type recv_exit_initialization_mode(); + void step(StepResult& _return, const InstanceId& instanceId, const double stepSize); + void send_step(const InstanceId& instanceId, const double stepSize); + void recv_step(StepResult& _return); + Status::type reset(const InstanceId& instanceId); + void send_reset(const InstanceId& instanceId); + Status::type recv_reset(); + Status::type terminate(const InstanceId& instanceId); + void send_terminate(const InstanceId& instanceId); + Status::type recv_terminate(); + void read_integer(IntegerRead& _return, const InstanceId& instanceId, const ValueReferences& vr); + void send_read_integer(const InstanceId& instanceId, const ValueReferences& vr); + void recv_read_integer(IntegerRead& _return); + void read_real(RealRead& _return, const InstanceId& instanceId, const ValueReferences& vr); + void send_read_real(const InstanceId& instanceId, const ValueReferences& vr); + void recv_read_real(RealRead& _return); + void read_string(StringRead& _return, const InstanceId& instanceId, const ValueReferences& vr); + void send_read_string(const InstanceId& instanceId, const ValueReferences& vr); + void recv_read_string(StringRead& _return); + void read_boolean(BooleanRead& _return, const InstanceId& instanceId, const ValueReferences& vr); + void send_read_boolean(const InstanceId& instanceId, const ValueReferences& vr); + void recv_read_boolean(BooleanRead& _return); + Status::type write_integer(const InstanceId& instanceId, const ValueReferences& vr, const IntArray& value); + void send_write_integer(const InstanceId& instanceId, const ValueReferences& vr, const IntArray& value); + Status::type recv_write_integer(); + Status::type write_real(const InstanceId& instanceId, const ValueReferences& vr, const RealArray& value); + void send_write_real(const InstanceId& instanceId, const ValueReferences& vr, const RealArray& value); + Status::type recv_write_real(); + Status::type write_string(const InstanceId& instanceId, const ValueReferences& vr, const StringArray& value); + void send_write_string(const InstanceId& instanceId, const ValueReferences& vr, const StringArray& value); + Status::type recv_write_string(); + Status::type write_boolean(const InstanceId& instanceId, const ValueReferences& vr, const BooleanArray& value); + void send_write_boolean(const InstanceId& instanceId, const ValueReferences& vr, const BooleanArray& value); + Status::type recv_write_boolean(); + void get_directional_derivative(DirectionalDerivativeResult& _return, const InstanceId& instanceId, const ValueReferences& vUnknownRef, const ValueReferences& vKnownRef, const std::vector & dvKnownRef); + void send_get_directional_derivative(const InstanceId& instanceId, const ValueReferences& vUnknownRef, const ValueReferences& vKnownRef, const std::vector & dvKnownRef); + void recv_get_directional_derivative(DirectionalDerivativeResult& _return); + protected: + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; +}; + +class FmuServiceProcessor : public ::apache::thrift::TDispatchProcessor { + protected: + ::apache::thrift::stdcxx::shared_ptr iface_; + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); + private: + typedef void (FmuServiceProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); + typedef std::map ProcessMap; + ProcessMap processMap_; + void process_load_from_url(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_load_from_file(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_model_description(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_co_simulation_attributes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_can_create_instance_from_cs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_can_create_instance_from_me(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_create_instance_from_cs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_create_instance_from_me(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_setup_experiment(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_enter_initialization_mode(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_exit_initialization_mode(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_step(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_reset(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_terminate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_read_integer(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_read_real(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_read_string(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_read_boolean(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_write_integer(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_write_real(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_write_string(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_write_boolean(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_directional_derivative(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + public: + FmuServiceProcessor(::apache::thrift::stdcxx::shared_ptr iface) : + iface_(iface) { + processMap_["load_from_url"] = &FmuServiceProcessor::process_load_from_url; + processMap_["load_from_file"] = &FmuServiceProcessor::process_load_from_file; + processMap_["get_model_description"] = &FmuServiceProcessor::process_get_model_description; + processMap_["get_co_simulation_attributes"] = &FmuServiceProcessor::process_get_co_simulation_attributes; + processMap_["can_create_instance_from_cs"] = &FmuServiceProcessor::process_can_create_instance_from_cs; + processMap_["can_create_instance_from_me"] = &FmuServiceProcessor::process_can_create_instance_from_me; + processMap_["create_instance_from_cs"] = &FmuServiceProcessor::process_create_instance_from_cs; + processMap_["create_instance_from_me"] = &FmuServiceProcessor::process_create_instance_from_me; + processMap_["setup_experiment"] = &FmuServiceProcessor::process_setup_experiment; + processMap_["enter_initialization_mode"] = &FmuServiceProcessor::process_enter_initialization_mode; + processMap_["exit_initialization_mode"] = &FmuServiceProcessor::process_exit_initialization_mode; + processMap_["step"] = &FmuServiceProcessor::process_step; + processMap_["reset"] = &FmuServiceProcessor::process_reset; + processMap_["terminate"] = &FmuServiceProcessor::process_terminate; + processMap_["read_integer"] = &FmuServiceProcessor::process_read_integer; + processMap_["read_real"] = &FmuServiceProcessor::process_read_real; + processMap_["read_string"] = &FmuServiceProcessor::process_read_string; + processMap_["read_boolean"] = &FmuServiceProcessor::process_read_boolean; + processMap_["write_integer"] = &FmuServiceProcessor::process_write_integer; + processMap_["write_real"] = &FmuServiceProcessor::process_write_real; + processMap_["write_string"] = &FmuServiceProcessor::process_write_string; + processMap_["write_boolean"] = &FmuServiceProcessor::process_write_boolean; + processMap_["get_directional_derivative"] = &FmuServiceProcessor::process_get_directional_derivative; + } + + virtual ~FmuServiceProcessor() {} +}; + +class FmuServiceProcessorFactory : public ::apache::thrift::TProcessorFactory { + public: + FmuServiceProcessorFactory(const ::apache::thrift::stdcxx::shared_ptr< FmuServiceIfFactory >& handlerFactory) : + handlerFactory_(handlerFactory) {} + + ::apache::thrift::stdcxx::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + + protected: + ::apache::thrift::stdcxx::shared_ptr< FmuServiceIfFactory > handlerFactory_; +}; + +class FmuServiceMultiface : virtual public FmuServiceIf { + public: + FmuServiceMultiface(std::vector >& ifaces) : ifaces_(ifaces) { + } + virtual ~FmuServiceMultiface() {} + protected: + std::vector > ifaces_; + FmuServiceMultiface() {} + void add(::apache::thrift::stdcxx::shared_ptr iface) { + ifaces_.push_back(iface); + } + public: + void load_from_url(FmuId& _return, const std::string& url) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->load_from_url(_return, url); + } + ifaces_[i]->load_from_url(_return, url); + return; + } + + void load_from_file(FmuId& _return, const std::string& name, const std::string& data) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->load_from_file(_return, name, data); + } + ifaces_[i]->load_from_file(_return, name, data); + return; + } + + void get_model_description(ModelDescription& _return, const FmuId& fmuId) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_model_description(_return, fmuId); + } + ifaces_[i]->get_model_description(_return, fmuId); + return; + } + + void get_co_simulation_attributes(CoSimulationAttributes& _return, const InstanceId& instanceId) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_co_simulation_attributes(_return, instanceId); + } + ifaces_[i]->get_co_simulation_attributes(_return, instanceId); + return; + } + + bool can_create_instance_from_cs(const FmuId& fmuId) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->can_create_instance_from_cs(fmuId); + } + return ifaces_[i]->can_create_instance_from_cs(fmuId); + } + + bool can_create_instance_from_me(const FmuId& fmuId) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->can_create_instance_from_me(fmuId); + } + return ifaces_[i]->can_create_instance_from_me(fmuId); + } + + void create_instance_from_cs(InstanceId& _return, const FmuId& fmuId) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->create_instance_from_cs(_return, fmuId); + } + ifaces_[i]->create_instance_from_cs(_return, fmuId); + return; + } + + void create_instance_from_me(InstanceId& _return, const FmuId& fmuId, const Solver& solver) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->create_instance_from_me(_return, fmuId, solver); + } + ifaces_[i]->create_instance_from_me(_return, fmuId, solver); + return; + } + + Status::type setup_experiment(const InstanceId& instanceId, const double start, const double stop, const double tolerance) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->setup_experiment(instanceId, start, stop, tolerance); + } + return ifaces_[i]->setup_experiment(instanceId, start, stop, tolerance); + } + + Status::type enter_initialization_mode(const InstanceId& instanceId) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->enter_initialization_mode(instanceId); + } + return ifaces_[i]->enter_initialization_mode(instanceId); + } + + Status::type exit_initialization_mode(const InstanceId& instanceId) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->exit_initialization_mode(instanceId); + } + return ifaces_[i]->exit_initialization_mode(instanceId); + } + + void step(StepResult& _return, const InstanceId& instanceId, const double stepSize) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->step(_return, instanceId, stepSize); + } + ifaces_[i]->step(_return, instanceId, stepSize); + return; + } + + Status::type reset(const InstanceId& instanceId) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->reset(instanceId); + } + return ifaces_[i]->reset(instanceId); + } + + Status::type terminate(const InstanceId& instanceId) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->terminate(instanceId); + } + return ifaces_[i]->terminate(instanceId); + } + + void read_integer(IntegerRead& _return, const InstanceId& instanceId, const ValueReferences& vr) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->read_integer(_return, instanceId, vr); + } + ifaces_[i]->read_integer(_return, instanceId, vr); + return; + } + + void read_real(RealRead& _return, const InstanceId& instanceId, const ValueReferences& vr) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->read_real(_return, instanceId, vr); + } + ifaces_[i]->read_real(_return, instanceId, vr); + return; + } + + void read_string(StringRead& _return, const InstanceId& instanceId, const ValueReferences& vr) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->read_string(_return, instanceId, vr); + } + ifaces_[i]->read_string(_return, instanceId, vr); + return; + } + + void read_boolean(BooleanRead& _return, const InstanceId& instanceId, const ValueReferences& vr) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->read_boolean(_return, instanceId, vr); + } + ifaces_[i]->read_boolean(_return, instanceId, vr); + return; + } + + Status::type write_integer(const InstanceId& instanceId, const ValueReferences& vr, const IntArray& value) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->write_integer(instanceId, vr, value); + } + return ifaces_[i]->write_integer(instanceId, vr, value); + } + + Status::type write_real(const InstanceId& instanceId, const ValueReferences& vr, const RealArray& value) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->write_real(instanceId, vr, value); + } + return ifaces_[i]->write_real(instanceId, vr, value); + } + + Status::type write_string(const InstanceId& instanceId, const ValueReferences& vr, const StringArray& value) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->write_string(instanceId, vr, value); + } + return ifaces_[i]->write_string(instanceId, vr, value); + } + + Status::type write_boolean(const InstanceId& instanceId, const ValueReferences& vr, const BooleanArray& value) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->write_boolean(instanceId, vr, value); + } + return ifaces_[i]->write_boolean(instanceId, vr, value); + } + + void get_directional_derivative(DirectionalDerivativeResult& _return, const InstanceId& instanceId, const ValueReferences& vUnknownRef, const ValueReferences& vKnownRef, const std::vector & dvKnownRef) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_directional_derivative(_return, instanceId, vUnknownRef, vKnownRef, dvKnownRef); + } + ifaces_[i]->get_directional_derivative(_return, instanceId, vUnknownRef, vKnownRef, dvKnownRef); + return; + } + +}; + +// The 'concurrent' client is a thread safe client that correctly handles +// out of order responses. It is slower than the regular client, so should +// only be used when you need to share a connection among multiple threads +class FmuServiceConcurrentClient : virtual public FmuServiceIf { + public: + FmuServiceConcurrentClient(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + FmuServiceConcurrentClient(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + void load_from_url(FmuId& _return, const std::string& url); + int32_t send_load_from_url(const std::string& url); + void recv_load_from_url(FmuId& _return, const int32_t seqid); + void load_from_file(FmuId& _return, const std::string& name, const std::string& data); + int32_t send_load_from_file(const std::string& name, const std::string& data); + void recv_load_from_file(FmuId& _return, const int32_t seqid); + void get_model_description(ModelDescription& _return, const FmuId& fmuId); + int32_t send_get_model_description(const FmuId& fmuId); + void recv_get_model_description(ModelDescription& _return, const int32_t seqid); + void get_co_simulation_attributes(CoSimulationAttributes& _return, const InstanceId& instanceId); + int32_t send_get_co_simulation_attributes(const InstanceId& instanceId); + void recv_get_co_simulation_attributes(CoSimulationAttributes& _return, const int32_t seqid); + bool can_create_instance_from_cs(const FmuId& fmuId); + int32_t send_can_create_instance_from_cs(const FmuId& fmuId); + bool recv_can_create_instance_from_cs(const int32_t seqid); + bool can_create_instance_from_me(const FmuId& fmuId); + int32_t send_can_create_instance_from_me(const FmuId& fmuId); + bool recv_can_create_instance_from_me(const int32_t seqid); + void create_instance_from_cs(InstanceId& _return, const FmuId& fmuId); + int32_t send_create_instance_from_cs(const FmuId& fmuId); + void recv_create_instance_from_cs(InstanceId& _return, const int32_t seqid); + void create_instance_from_me(InstanceId& _return, const FmuId& fmuId, const Solver& solver); + int32_t send_create_instance_from_me(const FmuId& fmuId, const Solver& solver); + void recv_create_instance_from_me(InstanceId& _return, const int32_t seqid); + Status::type setup_experiment(const InstanceId& instanceId, const double start, const double stop, const double tolerance); + int32_t send_setup_experiment(const InstanceId& instanceId, const double start, const double stop, const double tolerance); + Status::type recv_setup_experiment(const int32_t seqid); + Status::type enter_initialization_mode(const InstanceId& instanceId); + int32_t send_enter_initialization_mode(const InstanceId& instanceId); + Status::type recv_enter_initialization_mode(const int32_t seqid); + Status::type exit_initialization_mode(const InstanceId& instanceId); + int32_t send_exit_initialization_mode(const InstanceId& instanceId); + Status::type recv_exit_initialization_mode(const int32_t seqid); + void step(StepResult& _return, const InstanceId& instanceId, const double stepSize); + int32_t send_step(const InstanceId& instanceId, const double stepSize); + void recv_step(StepResult& _return, const int32_t seqid); + Status::type reset(const InstanceId& instanceId); + int32_t send_reset(const InstanceId& instanceId); + Status::type recv_reset(const int32_t seqid); + Status::type terminate(const InstanceId& instanceId); + int32_t send_terminate(const InstanceId& instanceId); + Status::type recv_terminate(const int32_t seqid); + void read_integer(IntegerRead& _return, const InstanceId& instanceId, const ValueReferences& vr); + int32_t send_read_integer(const InstanceId& instanceId, const ValueReferences& vr); + void recv_read_integer(IntegerRead& _return, const int32_t seqid); + void read_real(RealRead& _return, const InstanceId& instanceId, const ValueReferences& vr); + int32_t send_read_real(const InstanceId& instanceId, const ValueReferences& vr); + void recv_read_real(RealRead& _return, const int32_t seqid); + void read_string(StringRead& _return, const InstanceId& instanceId, const ValueReferences& vr); + int32_t send_read_string(const InstanceId& instanceId, const ValueReferences& vr); + void recv_read_string(StringRead& _return, const int32_t seqid); + void read_boolean(BooleanRead& _return, const InstanceId& instanceId, const ValueReferences& vr); + int32_t send_read_boolean(const InstanceId& instanceId, const ValueReferences& vr); + void recv_read_boolean(BooleanRead& _return, const int32_t seqid); + Status::type write_integer(const InstanceId& instanceId, const ValueReferences& vr, const IntArray& value); + int32_t send_write_integer(const InstanceId& instanceId, const ValueReferences& vr, const IntArray& value); + Status::type recv_write_integer(const int32_t seqid); + Status::type write_real(const InstanceId& instanceId, const ValueReferences& vr, const RealArray& value); + int32_t send_write_real(const InstanceId& instanceId, const ValueReferences& vr, const RealArray& value); + Status::type recv_write_real(const int32_t seqid); + Status::type write_string(const InstanceId& instanceId, const ValueReferences& vr, const StringArray& value); + int32_t send_write_string(const InstanceId& instanceId, const ValueReferences& vr, const StringArray& value); + Status::type recv_write_string(const int32_t seqid); + Status::type write_boolean(const InstanceId& instanceId, const ValueReferences& vr, const BooleanArray& value); + int32_t send_write_boolean(const InstanceId& instanceId, const ValueReferences& vr, const BooleanArray& value); + Status::type recv_write_boolean(const int32_t seqid); + void get_directional_derivative(DirectionalDerivativeResult& _return, const InstanceId& instanceId, const ValueReferences& vUnknownRef, const ValueReferences& vKnownRef, const std::vector & dvKnownRef); + int32_t send_get_directional_derivative(const InstanceId& instanceId, const ValueReferences& vUnknownRef, const ValueReferences& vKnownRef, const std::vector & dvKnownRef); + void recv_get_directional_derivative(DirectionalDerivativeResult& _return, const int32_t seqid); + protected: + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; + ::apache::thrift::async::TConcurrentClientSyncInfo sync_; +}; + +#ifdef _MSC_VER + #pragma warning( pop ) +#endif + +typedef FmuServiceIf fmu_service_if; +typedef FmuServiceClient fmu_service_client; +typedef FmuServiceProcessor fmu_service_processor; +typedef FmuServiceConcurrentClient fmu_service_concurrent_client; +}} // namespace + +#endif diff --git a/include/cse/fmuproxy/fmuproxy_client.hpp b/include/cse/fmuproxy/fmuproxy_client.hpp new file mode 100644 index 000000000..f183eba8f --- /dev/null +++ b/include/cse/fmuproxy/fmuproxy_client.hpp @@ -0,0 +1,37 @@ + +#ifndef CSE_FMUPROXY_FMUPROXYCLIENT_HPP +#define CSE_FMUPROXY_FMUPROXYCLIENT_HPP + +#include +#include + +namespace cse +{ + +namespace fmuproxy +{ + +class fmuproxy_client +{ + +public: + fmuproxy_client(const std::string& host, + unsigned int port, + bool concurrent = false); + + remote_fmu from_url(const std::string& url); + + remote_fmu from_file(const std::string& file); + + remote_fmu from_guid(const std::string& guid); + +private: + std::shared_ptr state_; +}; + +} // namespace fmuproxy + +} // namespace cse + + +#endif diff --git a/include/cse/fmuproxy/remote_fmu.hpp b/include/cse/fmuproxy/remote_fmu.hpp new file mode 100644 index 000000000..8d56c5556 --- /dev/null +++ b/include/cse/fmuproxy/remote_fmu.hpp @@ -0,0 +1,50 @@ + +#ifndef CSE_FMUPROXY_REMOTE_FMU_HPP +#define CSE_FMUPROXY_REMOTE_FMU_HPP + +#ifdef _WIN32 +//must be included before +# include +#endif + +#include +#include +#include +#include + +#include +#include + +namespace cse +{ + +namespace fmuproxy +{ + +class fmuproxy_client; + +class remote_fmu +{ + + friend class fmuproxy_client; + +public: + std::shared_ptr model_description() const; + + std::shared_ptr instantiate_slave(); + + +private: + const std::string fmuId_; + std::shared_ptr state_; + std::shared_ptr modelDescription_; + + remote_fmu(const ::fmuproxy::thrift::FmuId& fmuId, + std::shared_ptr state); +}; + +} // namespace fmuproxy + +} // namespace cse + +#endif diff --git a/include/cse/fmuproxy/service_types.hpp b/include/cse/fmuproxy/service_types.hpp new file mode 100644 index 000000000..c514ad559 --- /dev/null +++ b/include/cse/fmuproxy/service_types.hpp @@ -0,0 +1,1430 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef CSE_FMUPROXY_SERVICE_TYPES_HPP +#define CSE_FMUPROXY_SERVICE_TYPES_HPP + +#include + +#include +#include +#include +#include +#include + +#include + + +namespace fmuproxy { namespace thrift { + +struct Status { + enum type { + OK_STATUS = 0, + WARNING_STATUS = 1, + DISCARD_STATUS = 2, + ERROR_STATUS = 3, + FATAL_STATUS = 4, + PENDING_STATUS = 5 + }; +}; + +extern const std::map _Status_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const Status::type& val); + +typedef std::string FmuId; + +typedef std::string InstanceId; + +typedef int64_t ValueReference; + +typedef int64_t FmuState; + +typedef std::vector DirectionalDerivative; + +typedef std::vector ValueReferences; + +typedef std::vector IntArray; + +typedef std::vector RealArray; + +typedef std::vector StringArray; + +typedef std::vector BooleanArray; + +typedef std::vector ModelVariables; + +class IntegerAttribute; + +class RealAttribute; + +class StringAttribute; + +class BooleanAttribute; + +class EnumerationAttribute; + +class ScalarVariableAttribute; + +class ScalarVariable; + +class Unknown; + +class ModelStructure; + +class DefaultExperiment; + +class StepResult; + +class IntegerRead; + +class RealRead; + +class StringRead; + +class BooleanRead; + +class Solver; + +class ModelDescription; + +class CoSimulationAttributes; + +class NoSuchFmuException; + +class NoSuchInstanceException; + +class NoSuchVariableException; + +class UnsupportedOperationException; + +class DirectionalDerivativeResult; + +typedef struct _IntegerAttribute__isset { + _IntegerAttribute__isset() : min(false), max(false), start(false), quantity(false) {} + bool min :1; + bool max :1; + bool start :1; + bool quantity :1; +} _IntegerAttribute__isset; + +class IntegerAttribute : public virtual ::apache::thrift::TBase { + public: + + IntegerAttribute(const IntegerAttribute&); + IntegerAttribute& operator=(const IntegerAttribute&); + IntegerAttribute() : min(0), max(0), start(0), quantity() { + } + + virtual ~IntegerAttribute() throw(); + int32_t min; + int32_t max; + int32_t start; + std::string quantity; + + _IntegerAttribute__isset __isset; + + void __set_min(const int32_t val); + + void __set_max(const int32_t val); + + void __set_start(const int32_t val); + + void __set_quantity(const std::string& val); + + bool operator == (const IntegerAttribute & rhs) const + { + if (!(min == rhs.min)) + return false; + if (!(max == rhs.max)) + return false; + if (!(start == rhs.start)) + return false; + if (!(quantity == rhs.quantity)) + return false; + return true; + } + bool operator != (const IntegerAttribute &rhs) const { + return !(*this == rhs); + } + + bool operator < (const IntegerAttribute & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(IntegerAttribute &a, IntegerAttribute &b); + +std::ostream& operator<<(std::ostream& out, const IntegerAttribute& obj); + +typedef struct _RealAttribute__isset { + _RealAttribute__isset() : min(false), max(false), start(false), quantity(false) {} + bool min :1; + bool max :1; + bool start :1; + bool quantity :1; +} _RealAttribute__isset; + +class RealAttribute : public virtual ::apache::thrift::TBase { + public: + + RealAttribute(const RealAttribute&); + RealAttribute& operator=(const RealAttribute&); + RealAttribute() : min(0), max(0), start(0), quantity() { + } + + virtual ~RealAttribute() throw(); + double min; + double max; + double start; + std::string quantity; + + _RealAttribute__isset __isset; + + void __set_min(const double val); + + void __set_max(const double val); + + void __set_start(const double val); + + void __set_quantity(const std::string& val); + + bool operator == (const RealAttribute & rhs) const + { + if (!(min == rhs.min)) + return false; + if (!(max == rhs.max)) + return false; + if (!(start == rhs.start)) + return false; + if (!(quantity == rhs.quantity)) + return false; + return true; + } + bool operator != (const RealAttribute &rhs) const { + return !(*this == rhs); + } + + bool operator < (const RealAttribute & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(RealAttribute &a, RealAttribute &b); + +std::ostream& operator<<(std::ostream& out, const RealAttribute& obj); + +typedef struct _StringAttribute__isset { + _StringAttribute__isset() : start(false) {} + bool start :1; +} _StringAttribute__isset; + +class StringAttribute : public virtual ::apache::thrift::TBase { + public: + + StringAttribute(const StringAttribute&); + StringAttribute& operator=(const StringAttribute&); + StringAttribute() : start() { + } + + virtual ~StringAttribute() throw(); + std::string start; + + _StringAttribute__isset __isset; + + void __set_start(const std::string& val); + + bool operator == (const StringAttribute & rhs) const + { + if (!(start == rhs.start)) + return false; + return true; + } + bool operator != (const StringAttribute &rhs) const { + return !(*this == rhs); + } + + bool operator < (const StringAttribute & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(StringAttribute &a, StringAttribute &b); + +std::ostream& operator<<(std::ostream& out, const StringAttribute& obj); + +typedef struct _BooleanAttribute__isset { + _BooleanAttribute__isset() : start(false) {} + bool start :1; +} _BooleanAttribute__isset; + +class BooleanAttribute : public virtual ::apache::thrift::TBase { + public: + + BooleanAttribute(const BooleanAttribute&); + BooleanAttribute& operator=(const BooleanAttribute&); + BooleanAttribute() : start(0) { + } + + virtual ~BooleanAttribute() throw(); + bool start; + + _BooleanAttribute__isset __isset; + + void __set_start(const bool val); + + bool operator == (const BooleanAttribute & rhs) const + { + if (!(start == rhs.start)) + return false; + return true; + } + bool operator != (const BooleanAttribute &rhs) const { + return !(*this == rhs); + } + + bool operator < (const BooleanAttribute & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(BooleanAttribute &a, BooleanAttribute &b); + +std::ostream& operator<<(std::ostream& out, const BooleanAttribute& obj); + +typedef struct _EnumerationAttribute__isset { + _EnumerationAttribute__isset() : min(false), max(false), start(false), quantity(false) {} + bool min :1; + bool max :1; + bool start :1; + bool quantity :1; +} _EnumerationAttribute__isset; + +class EnumerationAttribute : public virtual ::apache::thrift::TBase { + public: + + EnumerationAttribute(const EnumerationAttribute&); + EnumerationAttribute& operator=(const EnumerationAttribute&); + EnumerationAttribute() : min(0), max(0), start(0), quantity() { + } + + virtual ~EnumerationAttribute() throw(); + int32_t min; + int32_t max; + int32_t start; + std::string quantity; + + _EnumerationAttribute__isset __isset; + + void __set_min(const int32_t val); + + void __set_max(const int32_t val); + + void __set_start(const int32_t val); + + void __set_quantity(const std::string& val); + + bool operator == (const EnumerationAttribute & rhs) const + { + if (!(min == rhs.min)) + return false; + if (!(max == rhs.max)) + return false; + if (!(start == rhs.start)) + return false; + if (!(quantity == rhs.quantity)) + return false; + return true; + } + bool operator != (const EnumerationAttribute &rhs) const { + return !(*this == rhs); + } + + bool operator < (const EnumerationAttribute & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(EnumerationAttribute &a, EnumerationAttribute &b); + +std::ostream& operator<<(std::ostream& out, const EnumerationAttribute& obj); + +typedef struct _ScalarVariableAttribute__isset { + _ScalarVariableAttribute__isset() : integer_attribute(false), real_attribute(false), string_attribute(false), boolean_attribute(false), enumeration_attribute(false) {} + bool integer_attribute :1; + bool real_attribute :1; + bool string_attribute :1; + bool boolean_attribute :1; + bool enumeration_attribute :1; +} _ScalarVariableAttribute__isset; + +class ScalarVariableAttribute : public virtual ::apache::thrift::TBase { + public: + + ScalarVariableAttribute(const ScalarVariableAttribute&); + ScalarVariableAttribute& operator=(const ScalarVariableAttribute&); + ScalarVariableAttribute() { + } + + virtual ~ScalarVariableAttribute() throw(); + IntegerAttribute integer_attribute; + RealAttribute real_attribute; + StringAttribute string_attribute; + BooleanAttribute boolean_attribute; + EnumerationAttribute enumeration_attribute; + + _ScalarVariableAttribute__isset __isset; + + void __set_integer_attribute(const IntegerAttribute& val); + + void __set_real_attribute(const RealAttribute& val); + + void __set_string_attribute(const StringAttribute& val); + + void __set_boolean_attribute(const BooleanAttribute& val); + + void __set_enumeration_attribute(const EnumerationAttribute& val); + + bool operator == (const ScalarVariableAttribute & rhs) const + { + if (__isset.integer_attribute != rhs.__isset.integer_attribute) + return false; + else if (__isset.integer_attribute && !(integer_attribute == rhs.integer_attribute)) + return false; + if (__isset.real_attribute != rhs.__isset.real_attribute) + return false; + else if (__isset.real_attribute && !(real_attribute == rhs.real_attribute)) + return false; + if (__isset.string_attribute != rhs.__isset.string_attribute) + return false; + else if (__isset.string_attribute && !(string_attribute == rhs.string_attribute)) + return false; + if (__isset.boolean_attribute != rhs.__isset.boolean_attribute) + return false; + else if (__isset.boolean_attribute && !(boolean_attribute == rhs.boolean_attribute)) + return false; + if (__isset.enumeration_attribute != rhs.__isset.enumeration_attribute) + return false; + else if (__isset.enumeration_attribute && !(enumeration_attribute == rhs.enumeration_attribute)) + return false; + return true; + } + bool operator != (const ScalarVariableAttribute &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ScalarVariableAttribute & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ScalarVariableAttribute &a, ScalarVariableAttribute &b); + +std::ostream& operator<<(std::ostream& out, const ScalarVariableAttribute& obj); + +typedef struct _ScalarVariable__isset { + _ScalarVariable__isset() : name(false), value_reference(false), description(false), initial(false), causality(false), variability(false), attribute(false) {} + bool name :1; + bool value_reference :1; + bool description :1; + bool initial :1; + bool causality :1; + bool variability :1; + bool attribute :1; +} _ScalarVariable__isset; + +class ScalarVariable : public virtual ::apache::thrift::TBase { + public: + + ScalarVariable(const ScalarVariable&); + ScalarVariable& operator=(const ScalarVariable&); + ScalarVariable() : name(), value_reference(0), description(), initial(), causality(), variability() { + } + + virtual ~ScalarVariable() throw(); + std::string name; + ValueReference value_reference; + std::string description; + std::string initial; + std::string causality; + std::string variability; + ScalarVariableAttribute attribute; + + _ScalarVariable__isset __isset; + + void __set_name(const std::string& val); + + void __set_value_reference(const ValueReference val); + + void __set_description(const std::string& val); + + void __set_initial(const std::string& val); + + void __set_causality(const std::string& val); + + void __set_variability(const std::string& val); + + void __set_attribute(const ScalarVariableAttribute& val); + + bool operator == (const ScalarVariable & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(value_reference == rhs.value_reference)) + return false; + if (__isset.description != rhs.__isset.description) + return false; + else if (__isset.description && !(description == rhs.description)) + return false; + if (__isset.initial != rhs.__isset.initial) + return false; + else if (__isset.initial && !(initial == rhs.initial)) + return false; + if (__isset.causality != rhs.__isset.causality) + return false; + else if (__isset.causality && !(causality == rhs.causality)) + return false; + if (__isset.variability != rhs.__isset.variability) + return false; + else if (__isset.variability && !(variability == rhs.variability)) + return false; + if (!(attribute == rhs.attribute)) + return false; + return true; + } + bool operator != (const ScalarVariable &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ScalarVariable & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ScalarVariable &a, ScalarVariable &b); + +std::ostream& operator<<(std::ostream& out, const ScalarVariable& obj); + +typedef struct _Unknown__isset { + _Unknown__isset() : index(false), dependencies(false), dependencies_kind(false) {} + bool index :1; + bool dependencies :1; + bool dependencies_kind :1; +} _Unknown__isset; + +class Unknown : public virtual ::apache::thrift::TBase { + public: + + Unknown(const Unknown&); + Unknown& operator=(const Unknown&); + Unknown() : index(0) { + } + + virtual ~Unknown() throw(); + int32_t index; + std::vector dependencies; + std::vector dependencies_kind; + + _Unknown__isset __isset; + + void __set_index(const int32_t val); + + void __set_dependencies(const std::vector & val); + + void __set_dependencies_kind(const std::vector & val); + + bool operator == (const Unknown & rhs) const + { + if (!(index == rhs.index)) + return false; + if (!(dependencies == rhs.dependencies)) + return false; + if (!(dependencies_kind == rhs.dependencies_kind)) + return false; + return true; + } + bool operator != (const Unknown &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Unknown & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(Unknown &a, Unknown &b); + +std::ostream& operator<<(std::ostream& out, const Unknown& obj); + +typedef struct _ModelStructure__isset { + _ModelStructure__isset() : outputs(false), derivatives(false), initial_unknowns(false) {} + bool outputs :1; + bool derivatives :1; + bool initial_unknowns :1; +} _ModelStructure__isset; + +class ModelStructure : public virtual ::apache::thrift::TBase { + public: + + ModelStructure(const ModelStructure&); + ModelStructure& operator=(const ModelStructure&); + ModelStructure() { + } + + virtual ~ModelStructure() throw(); + std::vector outputs; + std::vector derivatives; + std::vector initial_unknowns; + + _ModelStructure__isset __isset; + + void __set_outputs(const std::vector & val); + + void __set_derivatives(const std::vector & val); + + void __set_initial_unknowns(const std::vector & val); + + bool operator == (const ModelStructure & rhs) const + { + if (!(outputs == rhs.outputs)) + return false; + if (!(derivatives == rhs.derivatives)) + return false; + if (!(initial_unknowns == rhs.initial_unknowns)) + return false; + return true; + } + bool operator != (const ModelStructure &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ModelStructure & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ModelStructure &a, ModelStructure &b); + +std::ostream& operator<<(std::ostream& out, const ModelStructure& obj); + +typedef struct _DefaultExperiment__isset { + _DefaultExperiment__isset() : startTime(false), stopTime(false), tolerance(false), stepSize(false) {} + bool startTime :1; + bool stopTime :1; + bool tolerance :1; + bool stepSize :1; +} _DefaultExperiment__isset; + +class DefaultExperiment : public virtual ::apache::thrift::TBase { + public: + + DefaultExperiment(const DefaultExperiment&); + DefaultExperiment& operator=(const DefaultExperiment&); + DefaultExperiment() : startTime(0), stopTime(0), tolerance(0), stepSize(0) { + } + + virtual ~DefaultExperiment() throw(); + double startTime; + double stopTime; + double tolerance; + double stepSize; + + _DefaultExperiment__isset __isset; + + void __set_startTime(const double val); + + void __set_stopTime(const double val); + + void __set_tolerance(const double val); + + void __set_stepSize(const double val); + + bool operator == (const DefaultExperiment & rhs) const + { + if (!(startTime == rhs.startTime)) + return false; + if (!(stopTime == rhs.stopTime)) + return false; + if (!(tolerance == rhs.tolerance)) + return false; + if (!(stepSize == rhs.stepSize)) + return false; + return true; + } + bool operator != (const DefaultExperiment &rhs) const { + return !(*this == rhs); + } + + bool operator < (const DefaultExperiment & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(DefaultExperiment &a, DefaultExperiment &b); + +std::ostream& operator<<(std::ostream& out, const DefaultExperiment& obj); + +typedef struct _StepResult__isset { + _StepResult__isset() : status(false), simulation_time(false) {} + bool status :1; + bool simulation_time :1; +} _StepResult__isset; + +class StepResult : public virtual ::apache::thrift::TBase { + public: + + StepResult(const StepResult&); + StepResult& operator=(const StepResult&); + StepResult() : status((Status::type)0), simulation_time(0) { + } + + virtual ~StepResult() throw(); + Status::type status; + double simulation_time; + + _StepResult__isset __isset; + + void __set_status(const Status::type val); + + void __set_simulation_time(const double val); + + bool operator == (const StepResult & rhs) const + { + if (!(status == rhs.status)) + return false; + if (!(simulation_time == rhs.simulation_time)) + return false; + return true; + } + bool operator != (const StepResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const StepResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(StepResult &a, StepResult &b); + +std::ostream& operator<<(std::ostream& out, const StepResult& obj); + +typedef struct _IntegerRead__isset { + _IntegerRead__isset() : value(false), status(false) {} + bool value :1; + bool status :1; +} _IntegerRead__isset; + +class IntegerRead : public virtual ::apache::thrift::TBase { + public: + + IntegerRead(const IntegerRead&); + IntegerRead& operator=(const IntegerRead&); + IntegerRead() : status((Status::type)0) { + } + + virtual ~IntegerRead() throw(); + std::vector value; + Status::type status; + + _IntegerRead__isset __isset; + + void __set_value(const std::vector & val); + + void __set_status(const Status::type val); + + bool operator == (const IntegerRead & rhs) const + { + if (!(value == rhs.value)) + return false; + if (!(status == rhs.status)) + return false; + return true; + } + bool operator != (const IntegerRead &rhs) const { + return !(*this == rhs); + } + + bool operator < (const IntegerRead & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(IntegerRead &a, IntegerRead &b); + +std::ostream& operator<<(std::ostream& out, const IntegerRead& obj); + +typedef struct _RealRead__isset { + _RealRead__isset() : value(false), status(false) {} + bool value :1; + bool status :1; +} _RealRead__isset; + +class RealRead : public virtual ::apache::thrift::TBase { + public: + + RealRead(const RealRead&); + RealRead& operator=(const RealRead&); + RealRead() : status((Status::type)0) { + } + + virtual ~RealRead() throw(); + std::vector value; + Status::type status; + + _RealRead__isset __isset; + + void __set_value(const std::vector & val); + + void __set_status(const Status::type val); + + bool operator == (const RealRead & rhs) const + { + if (!(value == rhs.value)) + return false; + if (!(status == rhs.status)) + return false; + return true; + } + bool operator != (const RealRead &rhs) const { + return !(*this == rhs); + } + + bool operator < (const RealRead & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(RealRead &a, RealRead &b); + +std::ostream& operator<<(std::ostream& out, const RealRead& obj); + +typedef struct _StringRead__isset { + _StringRead__isset() : value(false), status(false) {} + bool value :1; + bool status :1; +} _StringRead__isset; + +class StringRead : public virtual ::apache::thrift::TBase { + public: + + StringRead(const StringRead&); + StringRead& operator=(const StringRead&); + StringRead() : status((Status::type)0) { + } + + virtual ~StringRead() throw(); + std::vector value; + Status::type status; + + _StringRead__isset __isset; + + void __set_value(const std::vector & val); + + void __set_status(const Status::type val); + + bool operator == (const StringRead & rhs) const + { + if (!(value == rhs.value)) + return false; + if (!(status == rhs.status)) + return false; + return true; + } + bool operator != (const StringRead &rhs) const { + return !(*this == rhs); + } + + bool operator < (const StringRead & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(StringRead &a, StringRead &b); + +std::ostream& operator<<(std::ostream& out, const StringRead& obj); + +typedef struct _BooleanRead__isset { + _BooleanRead__isset() : value(false), status(false) {} + bool value :1; + bool status :1; +} _BooleanRead__isset; + +class BooleanRead : public virtual ::apache::thrift::TBase { + public: + + BooleanRead(const BooleanRead&); + BooleanRead& operator=(const BooleanRead&); + BooleanRead() : status((Status::type)0) { + } + + virtual ~BooleanRead() throw(); + std::vector value; + Status::type status; + + _BooleanRead__isset __isset; + + void __set_value(const std::vector & val); + + void __set_status(const Status::type val); + + bool operator == (const BooleanRead & rhs) const + { + if (!(value == rhs.value)) + return false; + if (!(status == rhs.status)) + return false; + return true; + } + bool operator != (const BooleanRead &rhs) const { + return !(*this == rhs); + } + + bool operator < (const BooleanRead & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(BooleanRead &a, BooleanRead &b); + +std::ostream& operator<<(std::ostream& out, const BooleanRead& obj); + +typedef struct _Solver__isset { + _Solver__isset() : name(false), settings(false) {} + bool name :1; + bool settings :1; +} _Solver__isset; + +class Solver : public virtual ::apache::thrift::TBase { + public: + + Solver(const Solver&); + Solver& operator=(const Solver&); + Solver() : name(), settings() { + } + + virtual ~Solver() throw(); + std::string name; + std::string settings; + + _Solver__isset __isset; + + void __set_name(const std::string& val); + + void __set_settings(const std::string& val); + + bool operator == (const Solver & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(settings == rhs.settings)) + return false; + return true; + } + bool operator != (const Solver &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Solver & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(Solver &a, Solver &b); + +std::ostream& operator<<(std::ostream& out, const Solver& obj); + +typedef struct _ModelDescription__isset { + _ModelDescription__isset() : guid(false), fmi_version(false), modelName(false), license(false), copyright(false), author(false), version(false), description(false), generation_tool(false), generation_date_and_time(false), default_experiment(false), variable_naming_convention(false), model_variables(false), model_structure(false) {} + bool guid :1; + bool fmi_version :1; + bool modelName :1; + bool license :1; + bool copyright :1; + bool author :1; + bool version :1; + bool description :1; + bool generation_tool :1; + bool generation_date_and_time :1; + bool default_experiment :1; + bool variable_naming_convention :1; + bool model_variables :1; + bool model_structure :1; +} _ModelDescription__isset; + +class ModelDescription : public virtual ::apache::thrift::TBase { + public: + + ModelDescription(const ModelDescription&); + ModelDescription& operator=(const ModelDescription&); + ModelDescription() : guid(), fmi_version(), modelName(), license(), copyright(), author(), version(), description(), generation_tool(), generation_date_and_time(), variable_naming_convention() { + } + + virtual ~ModelDescription() throw(); + std::string guid; + std::string fmi_version; + std::string modelName; + std::string license; + std::string copyright; + std::string author; + std::string version; + std::string description; + std::string generation_tool; + std::string generation_date_and_time; + DefaultExperiment default_experiment; + std::string variable_naming_convention; + ModelVariables model_variables; + ModelStructure model_structure; + + _ModelDescription__isset __isset; + + void __set_guid(const std::string& val); + + void __set_fmi_version(const std::string& val); + + void __set_modelName(const std::string& val); + + void __set_license(const std::string& val); + + void __set_copyright(const std::string& val); + + void __set_author(const std::string& val); + + void __set_version(const std::string& val); + + void __set_description(const std::string& val); + + void __set_generation_tool(const std::string& val); + + void __set_generation_date_and_time(const std::string& val); + + void __set_default_experiment(const DefaultExperiment& val); + + void __set_variable_naming_convention(const std::string& val); + + void __set_model_variables(const ModelVariables& val); + + void __set_model_structure(const ModelStructure& val); + + bool operator == (const ModelDescription & rhs) const + { + if (!(guid == rhs.guid)) + return false; + if (!(fmi_version == rhs.fmi_version)) + return false; + if (!(modelName == rhs.modelName)) + return false; + if (__isset.license != rhs.__isset.license) + return false; + else if (__isset.license && !(license == rhs.license)) + return false; + if (__isset.copyright != rhs.__isset.copyright) + return false; + else if (__isset.copyright && !(copyright == rhs.copyright)) + return false; + if (__isset.author != rhs.__isset.author) + return false; + else if (__isset.author && !(author == rhs.author)) + return false; + if (__isset.version != rhs.__isset.version) + return false; + else if (__isset.version && !(version == rhs.version)) + return false; + if (__isset.description != rhs.__isset.description) + return false; + else if (__isset.description && !(description == rhs.description)) + return false; + if (__isset.generation_tool != rhs.__isset.generation_tool) + return false; + else if (__isset.generation_tool && !(generation_tool == rhs.generation_tool)) + return false; + if (__isset.generation_date_and_time != rhs.__isset.generation_date_and_time) + return false; + else if (__isset.generation_date_and_time && !(generation_date_and_time == rhs.generation_date_and_time)) + return false; + if (__isset.default_experiment != rhs.__isset.default_experiment) + return false; + else if (__isset.default_experiment && !(default_experiment == rhs.default_experiment)) + return false; + if (__isset.variable_naming_convention != rhs.__isset.variable_naming_convention) + return false; + else if (__isset.variable_naming_convention && !(variable_naming_convention == rhs.variable_naming_convention)) + return false; + if (!(model_variables == rhs.model_variables)) + return false; + if (!(model_structure == rhs.model_structure)) + return false; + return true; + } + bool operator != (const ModelDescription &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ModelDescription & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ModelDescription &a, ModelDescription &b); + +std::ostream& operator<<(std::ostream& out, const ModelDescription& obj); + +typedef struct _CoSimulationAttributes__isset { + _CoSimulationAttributes__isset() : model_identifier(false), can_get_and_set_fmu_state(false), can_serialize_fmu_state(false), provides_directional_derivative(false), can_handle_variable_communication_step_size(false), can_interpolate_inputs(false), max_output_derivative_order(false) {} + bool model_identifier :1; + bool can_get_and_set_fmu_state :1; + bool can_serialize_fmu_state :1; + bool provides_directional_derivative :1; + bool can_handle_variable_communication_step_size :1; + bool can_interpolate_inputs :1; + bool max_output_derivative_order :1; +} _CoSimulationAttributes__isset; + +class CoSimulationAttributes : public virtual ::apache::thrift::TBase { + public: + + CoSimulationAttributes(const CoSimulationAttributes&); + CoSimulationAttributes& operator=(const CoSimulationAttributes&); + CoSimulationAttributes() : model_identifier(), can_get_and_set_fmu_state(0), can_serialize_fmu_state(0), provides_directional_derivative(0), can_handle_variable_communication_step_size(0), can_interpolate_inputs(0), max_output_derivative_order(0) { + } + + virtual ~CoSimulationAttributes() throw(); + std::string model_identifier; + bool can_get_and_set_fmu_state; + bool can_serialize_fmu_state; + bool provides_directional_derivative; + bool can_handle_variable_communication_step_size; + bool can_interpolate_inputs; + int32_t max_output_derivative_order; + + _CoSimulationAttributes__isset __isset; + + void __set_model_identifier(const std::string& val); + + void __set_can_get_and_set_fmu_state(const bool val); + + void __set_can_serialize_fmu_state(const bool val); + + void __set_provides_directional_derivative(const bool val); + + void __set_can_handle_variable_communication_step_size(const bool val); + + void __set_can_interpolate_inputs(const bool val); + + void __set_max_output_derivative_order(const int32_t val); + + bool operator == (const CoSimulationAttributes & rhs) const + { + if (!(model_identifier == rhs.model_identifier)) + return false; + if (!(can_get_and_set_fmu_state == rhs.can_get_and_set_fmu_state)) + return false; + if (!(can_serialize_fmu_state == rhs.can_serialize_fmu_state)) + return false; + if (!(provides_directional_derivative == rhs.provides_directional_derivative)) + return false; + if (!(can_handle_variable_communication_step_size == rhs.can_handle_variable_communication_step_size)) + return false; + if (!(can_interpolate_inputs == rhs.can_interpolate_inputs)) + return false; + if (!(max_output_derivative_order == rhs.max_output_derivative_order)) + return false; + return true; + } + bool operator != (const CoSimulationAttributes &rhs) const { + return !(*this == rhs); + } + + bool operator < (const CoSimulationAttributes & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(CoSimulationAttributes &a, CoSimulationAttributes &b); + +std::ostream& operator<<(std::ostream& out, const CoSimulationAttributes& obj); + +typedef struct _NoSuchFmuException__isset { + _NoSuchFmuException__isset() : message(false) {} + bool message :1; +} _NoSuchFmuException__isset; + +class NoSuchFmuException : public ::apache::thrift::TException { + public: + + NoSuchFmuException(const NoSuchFmuException&); + NoSuchFmuException& operator=(const NoSuchFmuException&); + NoSuchFmuException() : message() { + } + + virtual ~NoSuchFmuException() throw(); + std::string message; + + _NoSuchFmuException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const NoSuchFmuException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const NoSuchFmuException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const NoSuchFmuException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(NoSuchFmuException &a, NoSuchFmuException &b); + +std::ostream& operator<<(std::ostream& out, const NoSuchFmuException& obj); + +typedef struct _NoSuchInstanceException__isset { + _NoSuchInstanceException__isset() : message(false) {} + bool message :1; +} _NoSuchInstanceException__isset; + +class NoSuchInstanceException : public ::apache::thrift::TException { + public: + + NoSuchInstanceException(const NoSuchInstanceException&); + NoSuchInstanceException& operator=(const NoSuchInstanceException&); + NoSuchInstanceException() : message() { + } + + virtual ~NoSuchInstanceException() throw(); + std::string message; + + _NoSuchInstanceException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const NoSuchInstanceException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const NoSuchInstanceException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const NoSuchInstanceException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(NoSuchInstanceException &a, NoSuchInstanceException &b); + +std::ostream& operator<<(std::ostream& out, const NoSuchInstanceException& obj); + +typedef struct _NoSuchVariableException__isset { + _NoSuchVariableException__isset() : message(false) {} + bool message :1; +} _NoSuchVariableException__isset; + +class NoSuchVariableException : public ::apache::thrift::TException { + public: + + NoSuchVariableException(const NoSuchVariableException&); + NoSuchVariableException& operator=(const NoSuchVariableException&); + NoSuchVariableException() : message() { + } + + virtual ~NoSuchVariableException() throw(); + std::string message; + + _NoSuchVariableException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const NoSuchVariableException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const NoSuchVariableException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const NoSuchVariableException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(NoSuchVariableException &a, NoSuchVariableException &b); + +std::ostream& operator<<(std::ostream& out, const NoSuchVariableException& obj); + +typedef struct _UnsupportedOperationException__isset { + _UnsupportedOperationException__isset() : message(false) {} + bool message :1; +} _UnsupportedOperationException__isset; + +class UnsupportedOperationException : public ::apache::thrift::TException { + public: + + UnsupportedOperationException(const UnsupportedOperationException&); + UnsupportedOperationException& operator=(const UnsupportedOperationException&); + UnsupportedOperationException() : message() { + } + + virtual ~UnsupportedOperationException() throw(); + std::string message; + + _UnsupportedOperationException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const UnsupportedOperationException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const UnsupportedOperationException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const UnsupportedOperationException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(UnsupportedOperationException &a, UnsupportedOperationException &b); + +std::ostream& operator<<(std::ostream& out, const UnsupportedOperationException& obj); + +typedef struct _DirectionalDerivativeResult__isset { + _DirectionalDerivativeResult__isset() : dv_unknown_ref(false), status(false) {} + bool dv_unknown_ref :1; + bool status :1; +} _DirectionalDerivativeResult__isset; + +class DirectionalDerivativeResult : public virtual ::apache::thrift::TBase { + public: + + DirectionalDerivativeResult(const DirectionalDerivativeResult&); + DirectionalDerivativeResult& operator=(const DirectionalDerivativeResult&); + DirectionalDerivativeResult() : status((Status::type)0) { + } + + virtual ~DirectionalDerivativeResult() throw(); + DirectionalDerivative dv_unknown_ref; + Status::type status; + + _DirectionalDerivativeResult__isset __isset; + + void __set_dv_unknown_ref(const DirectionalDerivative& val); + + void __set_status(const Status::type val); + + bool operator == (const DirectionalDerivativeResult & rhs) const + { + if (!(dv_unknown_ref == rhs.dv_unknown_ref)) + return false; + if (!(status == rhs.status)) + return false; + return true; + } + bool operator != (const DirectionalDerivativeResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const DirectionalDerivativeResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(DirectionalDerivativeResult &a, DirectionalDerivativeResult &b); + +std::ostream& operator<<(std::ostream& out, const DirectionalDerivativeResult& obj); + +}} // namespace + +#endif diff --git a/include/cse/fmuproxy/thrift_state.hpp b/include/cse/fmuproxy/thrift_state.hpp new file mode 100644 index 000000000..a19bc8f82 --- /dev/null +++ b/include/cse/fmuproxy/thrift_state.hpp @@ -0,0 +1,40 @@ + + +#ifndef CSE_FMUPROXY_SHARED_THRIFT_STATE_HPP +#define CSE_FMUPROXY_SHARED_THRIFT_STATE_HPP + +#include + +#include + +namespace cse +{ + +namespace fmuproxy +{ + +class remote_fmu; +class fmuproxy_client; + +class thrift_state +{ + + friend class remote_fmu; + friend class fmuproxy_client; + +public: + thrift_state(const std::shared_ptr<::fmuproxy::thrift::fmu_service_if>& client_, + const std::shared_ptr& transport_); + + ~thrift_state(); + +private: + std::shared_ptr<::fmuproxy::thrift::fmu_service_if> client_; + std::shared_ptr transport_; +}; + +} // namespace fmuproxy + +} // namespace cse + +#endif diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt index fe79644da..7e83021ec 100644 --- a/src/cpp/CMakeLists.txt +++ b/src/cpp/CMakeLists.txt @@ -68,6 +68,29 @@ set(sources "utility/zip.cpp" ) +if(CSECORE_WITH_FMUPROXY) + list(APPEND publicHeaders + "fmuproxy/remote_fmu.hpp" + "fmuproxy/fmu_service.hpp" + "fmuproxy/service_types.hpp" + "fmuproxy/fmuproxy_client.hpp" + "fmuproxy/thrift_state.hpp" + ) + + list(APPEND privateHeaders + "fmuproxy/fmuproxy_helper.hpp" + "fmuproxy/remote_slave.hpp" + ) + list(APPEND sources + "fmuproxy/fmu_service.cpp" + "fmuproxy/service_types.cpp" + "fmuproxy/remote_slave.cpp" + "fmuproxy/remote_fmu.cpp" + "fmuproxy/fmuproxy_client.cpp" + "fmuproxy/thrift_state.cpp" + ) +endif() + set(publicHeadersFull) foreach(h IN LISTS publicHeaders) list(APPEND publicHeadersFull "${publicHeaderDir}/${h}") @@ -100,6 +123,14 @@ target_link_libraries(csecorecpp PRIVATE nlohmann_json ) + +if(CSECORE_WITH_FMUPROXY) + target_link_libraries(csecorecpp + PUBLIC + thrift::thrift + ) +endif() + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") target_link_libraries(csecorecpp INTERFACE "atomic") endif() diff --git a/src/cpp/algorithm.cpp b/src/cpp/algorithm.cpp index 8487a8039..ac6ac54a5 100644 --- a/src/cpp/algorithm.cpp +++ b/src/cpp/algorithm.cpp @@ -1,4 +1,4 @@ -#ifdef _WIN32 +#if defined(_WIN32) && !defined(NOMINMAX) # define NOMINMAX #endif #include "cse/algorithm.hpp" diff --git a/src/cpp/cse/fmuproxy/fmuproxy_helper.hpp b/src/cpp/cse/fmuproxy/fmuproxy_helper.hpp new file mode 100644 index 000000000..e5e803558 --- /dev/null +++ b/src/cpp/cse/fmuproxy/fmuproxy_helper.hpp @@ -0,0 +1,95 @@ + +#ifndef CSE_FMUPROXY_FMUPROXY_HELPER_HPP +#define CSE_FMUPROXY_FMUPROXY_HELPER_HPP + +#include + +#include "cse/error.hpp" +#include "cse/model.hpp" +#include "cse/fmuproxy/service_types.hpp" + + +namespace { + + inline cse::variable_causality parse_causality(const std::string &c) { + if (c.compare("input") == 0) { + return cse::variable_causality::input; + } else if (c.compare("output") == 0) { + return cse::variable_causality::output; + } else if (c.compare("parameter") == 0) { + return cse::variable_causality::parameter; + } else if (c.compare("calculated_parameter") == 0) { + return cse::variable_causality::calculated_parameter; + } else if (c.compare("local") == 0 + || c.compare("independent") == 0 || c.compare("unknown") == 0 || c.compare("") == 0) { + return cse::variable_causality::local; + } else { + const auto err = "Failed to parse causality: '" + c + "'"; + CSE_PANIC_M(err.c_str()); + } + } + + inline cse::variable_variability parse_variability(const std::string &v) { + if (v.compare("constant") == 0) { + return cse::variable_variability::constant; + } else if (v.compare("discrete") == 0) { + return cse::variable_variability::discrete; + } else if (v.compare("fixed") == 0) { + return cse::variable_variability::fixed; + } else if (v.compare("tunable") == 0) { + return cse::variable_variability::tunable; + } else if (v.compare("continuous") == 0 || v.compare("unknown") == 0 || v.compare("") == 0) { + return cse::variable_variability::continuous; + } else { + const auto err = "Failed to parse variability: '" + v + "'"; + CSE_PANIC_M(err.c_str()); + } + } + + inline cse::variable_type get_type(const fmuproxy::thrift::ScalarVariable &v) { + if (v.attribute.__isset.integer_attribute) { + return cse::variable_type::integer; + } else if (v.attribute.__isset.real_attribute) { + return cse::variable_type::real; + } else if (v.attribute.__isset.string_attribute) { + return cse::variable_type::string; + } else if (v.attribute.__isset.boolean_attribute) { + return cse::variable_type::boolean; + } else { + const auto err = "Failed to get type of variable: '" + v.name + "'"; + CSE_PANIC_M(err.c_str()); + } + } + + inline cse::variable_description convert(const fmuproxy::thrift::ScalarVariable &v) { + cse::variable_description var; + var.name = v.name; + var.index = (cse::variable_index) v.value_reference; + var.causality = parse_causality(v.causality); + var.variability = parse_variability(v.variability); + var.type = get_type(v); + return var; + } + + inline std::vector convert(fmuproxy::thrift::ModelVariables &vars) { + std::vector modelVariables(vars.size()); + for (const auto &v : vars) { + modelVariables.push_back(convert(v)); + } + return modelVariables; + } + + inline std::shared_ptr convert(fmuproxy::thrift::ModelDescription &md) { + auto modelDescription = std::make_shared(); + modelDescription->name = md.modelName; + modelDescription->author = md.author; + modelDescription->uuid = md.guid; + modelDescription->version = md.version; + modelDescription->description = md.description; + modelDescription->variables = convert(md.model_variables); + return modelDescription; + } + +} + +#endif diff --git a/src/cpp/cse/fmuproxy/remote_slave.hpp b/src/cpp/cse/fmuproxy/remote_slave.hpp new file mode 100644 index 000000000..e7b7c1edf --- /dev/null +++ b/src/cpp/cse/fmuproxy/remote_slave.hpp @@ -0,0 +1,71 @@ + +#ifndef CSE_FMUPROXY_REMOTE_SLAVE_HPP +#define CSE_FMUPROXY_REMOTE_SLAVE_HPP + +#include + +#include +#include +#include + +namespace cse { + + namespace fmuproxy { + + class remote_slave : public slave { + + public: + + remote_slave(const std::string &instanceId, + std::shared_ptr<::fmuproxy::thrift::fmu_service_if> client, + std::shared_ptr modelDescription); + + + cse::model_description model_description() const override; + + void setup(time_point startTime, std::optional stopTime, + std::optional relativeTolerance) override; + + void start_simulation() override; + + void end_simulation() override; + + cse::step_result do_step(time_point currentT, duration deltaT) override; + + void get_real_variables(gsl::span variables, gsl::span values) const override; + + void get_integer_variables(gsl::span variables, gsl::span values) const override; + + void + get_boolean_variables(gsl::span variables, gsl::span values) const override; + + void get_string_variables(gsl::span variables, + gsl::span values) const override; + + void set_real_variables(gsl::span variables, gsl::span values) override; + + void set_integer_variables(gsl::span variables, gsl::span values) override; + + void + set_boolean_variables(gsl::span variables, gsl::span values) override; + + void set_string_variables(gsl::span variables, + gsl::span values) override; + + ~remote_slave() override; + + private: + + bool terminated_; + std::string instanceId_; + cse::time_point startTime_; + std::shared_ptr<::fmuproxy::thrift::fmu_service_if> client_; + std::shared_ptr modelDescription_; + + }; + + } + +} + +#endif diff --git a/src/cpp/fmuproxy/fmu_service.cpp b/src/cpp/fmuproxy/fmu_service.cpp new file mode 100644 index 000000000..d5a80b040 --- /dev/null +++ b/src/cpp/fmuproxy/fmu_service.cpp @@ -0,0 +1,10641 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include + +namespace fmuproxy { namespace thrift { + + +FmuService_load_from_url_args::~FmuService_load_from_url_args() throw() { +} + + +uint32_t FmuService_load_from_url_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->url); + this->__isset.url = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_load_from_url_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_load_from_url_args"); + + xfer += oprot->writeFieldBegin("url", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->url); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_load_from_url_pargs::~FmuService_load_from_url_pargs() throw() { +} + + +uint32_t FmuService_load_from_url_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_load_from_url_pargs"); + + xfer += oprot->writeFieldBegin("url", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->url))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_load_from_url_result::~FmuService_load_from_url_result() throw() { +} + + +uint32_t FmuService_load_from_url_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_load_from_url_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_load_from_url_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_load_from_url_presult::~FmuService_load_from_url_presult() throw() { +} + + +uint32_t FmuService_load_from_url_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_load_from_file_args::~FmuService_load_from_file_args() throw() { +} + + +uint32_t FmuService_load_from_file_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->data); + this->__isset.data = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_load_from_file_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_load_from_file_args"); + + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->data); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_load_from_file_pargs::~FmuService_load_from_file_pargs() throw() { +} + + +uint32_t FmuService_load_from_file_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_load_from_file_pargs"); + + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->name))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->data))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_load_from_file_result::~FmuService_load_from_file_result() throw() { +} + + +uint32_t FmuService_load_from_file_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_load_from_file_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_load_from_file_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_load_from_file_presult::~FmuService_load_from_file_presult() throw() { +} + + +uint32_t FmuService_load_from_file_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_get_model_description_args::~FmuService_get_model_description_args() throw() { +} + + +uint32_t FmuService_get_model_description_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->fmuId); + this->__isset.fmuId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_get_model_description_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_get_model_description_args"); + + xfer += oprot->writeFieldBegin("fmuId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->fmuId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_get_model_description_pargs::~FmuService_get_model_description_pargs() throw() { +} + + +uint32_t FmuService_get_model_description_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_get_model_description_pargs"); + + xfer += oprot->writeFieldBegin("fmuId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->fmuId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_get_model_description_result::~FmuService_get_model_description_result() throw() { +} + + +uint32_t FmuService_get_model_description_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_get_model_description_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_get_model_description_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex) { + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_get_model_description_presult::~FmuService_get_model_description_presult() throw() { +} + + +uint32_t FmuService_get_model_description_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_get_co_simulation_attributes_args::~FmuService_get_co_simulation_attributes_args() throw() { +} + + +uint32_t FmuService_get_co_simulation_attributes_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_get_co_simulation_attributes_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_get_co_simulation_attributes_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_get_co_simulation_attributes_pargs::~FmuService_get_co_simulation_attributes_pargs() throw() { +} + + +uint32_t FmuService_get_co_simulation_attributes_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_get_co_simulation_attributes_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_get_co_simulation_attributes_result::~FmuService_get_co_simulation_attributes_result() throw() { +} + + +uint32_t FmuService_get_co_simulation_attributes_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_get_co_simulation_attributes_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_get_co_simulation_attributes_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex) { + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_get_co_simulation_attributes_presult::~FmuService_get_co_simulation_attributes_presult() throw() { +} + + +uint32_t FmuService_get_co_simulation_attributes_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_can_create_instance_from_cs_args::~FmuService_can_create_instance_from_cs_args() throw() { +} + + +uint32_t FmuService_can_create_instance_from_cs_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->fmuId); + this->__isset.fmuId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_can_create_instance_from_cs_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_can_create_instance_from_cs_args"); + + xfer += oprot->writeFieldBegin("fmuId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->fmuId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_can_create_instance_from_cs_pargs::~FmuService_can_create_instance_from_cs_pargs() throw() { +} + + +uint32_t FmuService_can_create_instance_from_cs_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_can_create_instance_from_cs_pargs"); + + xfer += oprot->writeFieldBegin("fmuId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->fmuId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_can_create_instance_from_cs_result::~FmuService_can_create_instance_from_cs_result() throw() { +} + + +uint32_t FmuService_can_create_instance_from_cs_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_can_create_instance_from_cs_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_can_create_instance_from_cs_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex) { + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_can_create_instance_from_cs_presult::~FmuService_can_create_instance_from_cs_presult() throw() { +} + + +uint32_t FmuService_can_create_instance_from_cs_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_can_create_instance_from_me_args::~FmuService_can_create_instance_from_me_args() throw() { +} + + +uint32_t FmuService_can_create_instance_from_me_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->fmuId); + this->__isset.fmuId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_can_create_instance_from_me_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_can_create_instance_from_me_args"); + + xfer += oprot->writeFieldBegin("fmuId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->fmuId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_can_create_instance_from_me_pargs::~FmuService_can_create_instance_from_me_pargs() throw() { +} + + +uint32_t FmuService_can_create_instance_from_me_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_can_create_instance_from_me_pargs"); + + xfer += oprot->writeFieldBegin("fmuId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->fmuId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_can_create_instance_from_me_result::~FmuService_can_create_instance_from_me_result() throw() { +} + + +uint32_t FmuService_can_create_instance_from_me_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_can_create_instance_from_me_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_can_create_instance_from_me_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex) { + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_can_create_instance_from_me_presult::~FmuService_can_create_instance_from_me_presult() throw() { +} + + +uint32_t FmuService_can_create_instance_from_me_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_create_instance_from_cs_args::~FmuService_create_instance_from_cs_args() throw() { +} + + +uint32_t FmuService_create_instance_from_cs_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->fmuId); + this->__isset.fmuId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_create_instance_from_cs_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_create_instance_from_cs_args"); + + xfer += oprot->writeFieldBegin("fmuId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->fmuId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_create_instance_from_cs_pargs::~FmuService_create_instance_from_cs_pargs() throw() { +} + + +uint32_t FmuService_create_instance_from_cs_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_create_instance_from_cs_pargs"); + + xfer += oprot->writeFieldBegin("fmuId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->fmuId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_create_instance_from_cs_result::~FmuService_create_instance_from_cs_result() throw() { +} + + +uint32_t FmuService_create_instance_from_cs_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_create_instance_from_cs_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_create_instance_from_cs_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex1) { + xfer += oprot->writeFieldBegin("ex1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex2) { + xfer += oprot->writeFieldBegin("ex2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ex2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_create_instance_from_cs_presult::~FmuService_create_instance_from_cs_presult() throw() { +} + + +uint32_t FmuService_create_instance_from_cs_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_create_instance_from_me_args::~FmuService_create_instance_from_me_args() throw() { +} + + +uint32_t FmuService_create_instance_from_me_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->fmuId); + this->__isset.fmuId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->solver.read(iprot); + this->__isset.solver = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_create_instance_from_me_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_create_instance_from_me_args"); + + xfer += oprot->writeFieldBegin("fmuId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->fmuId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("solver", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->solver.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_create_instance_from_me_pargs::~FmuService_create_instance_from_me_pargs() throw() { +} + + +uint32_t FmuService_create_instance_from_me_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_create_instance_from_me_pargs"); + + xfer += oprot->writeFieldBegin("fmuId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->fmuId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("solver", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->solver)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_create_instance_from_me_result::~FmuService_create_instance_from_me_result() throw() { +} + + +uint32_t FmuService_create_instance_from_me_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_create_instance_from_me_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_create_instance_from_me_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex1) { + xfer += oprot->writeFieldBegin("ex1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex2) { + xfer += oprot->writeFieldBegin("ex2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ex2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_create_instance_from_me_presult::~FmuService_create_instance_from_me_presult() throw() { +} + + +uint32_t FmuService_create_instance_from_me_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_setup_experiment_args::~FmuService_setup_experiment_args() throw() { +} + + +uint32_t FmuService_setup_experiment_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->start); + this->__isset.start = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->stop); + this->__isset.stop = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->tolerance); + this->__isset.tolerance = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_setup_experiment_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_setup_experiment_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_DOUBLE, 2); + xfer += oprot->writeDouble(this->start); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("stop", ::apache::thrift::protocol::T_DOUBLE, 3); + xfer += oprot->writeDouble(this->stop); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tolerance", ::apache::thrift::protocol::T_DOUBLE, 4); + xfer += oprot->writeDouble(this->tolerance); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_setup_experiment_pargs::~FmuService_setup_experiment_pargs() throw() { +} + + +uint32_t FmuService_setup_experiment_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_setup_experiment_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_DOUBLE, 2); + xfer += oprot->writeDouble((*(this->start))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("stop", ::apache::thrift::protocol::T_DOUBLE, 3); + xfer += oprot->writeDouble((*(this->stop))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tolerance", ::apache::thrift::protocol::T_DOUBLE, 4); + xfer += oprot->writeDouble((*(this->tolerance))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_setup_experiment_result::~FmuService_setup_experiment_result() throw() { +} + + +uint32_t FmuService_setup_experiment_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast118; + xfer += iprot->readI32(ecast118); + this->success = (Status::type)ecast118; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_setup_experiment_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_setup_experiment_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32((int32_t)this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex) { + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_setup_experiment_presult::~FmuService_setup_experiment_presult() throw() { +} + + +uint32_t FmuService_setup_experiment_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast119; + xfer += iprot->readI32(ecast119); + (*(this->success)) = (Status::type)ecast119; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_enter_initialization_mode_args::~FmuService_enter_initialization_mode_args() throw() { +} + + +uint32_t FmuService_enter_initialization_mode_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_enter_initialization_mode_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_enter_initialization_mode_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_enter_initialization_mode_pargs::~FmuService_enter_initialization_mode_pargs() throw() { +} + + +uint32_t FmuService_enter_initialization_mode_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_enter_initialization_mode_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_enter_initialization_mode_result::~FmuService_enter_initialization_mode_result() throw() { +} + + +uint32_t FmuService_enter_initialization_mode_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast120; + xfer += iprot->readI32(ecast120); + this->success = (Status::type)ecast120; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_enter_initialization_mode_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_enter_initialization_mode_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32((int32_t)this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex) { + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_enter_initialization_mode_presult::~FmuService_enter_initialization_mode_presult() throw() { +} + + +uint32_t FmuService_enter_initialization_mode_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast121; + xfer += iprot->readI32(ecast121); + (*(this->success)) = (Status::type)ecast121; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_exit_initialization_mode_args::~FmuService_exit_initialization_mode_args() throw() { +} + + +uint32_t FmuService_exit_initialization_mode_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_exit_initialization_mode_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_exit_initialization_mode_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_exit_initialization_mode_pargs::~FmuService_exit_initialization_mode_pargs() throw() { +} + + +uint32_t FmuService_exit_initialization_mode_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_exit_initialization_mode_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_exit_initialization_mode_result::~FmuService_exit_initialization_mode_result() throw() { +} + + +uint32_t FmuService_exit_initialization_mode_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast122; + xfer += iprot->readI32(ecast122); + this->success = (Status::type)ecast122; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_exit_initialization_mode_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_exit_initialization_mode_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32((int32_t)this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex) { + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_exit_initialization_mode_presult::~FmuService_exit_initialization_mode_presult() throw() { +} + + +uint32_t FmuService_exit_initialization_mode_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast123; + xfer += iprot->readI32(ecast123); + (*(this->success)) = (Status::type)ecast123; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_step_args::~FmuService_step_args() throw() { +} + + +uint32_t FmuService_step_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->stepSize); + this->__isset.stepSize = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_step_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_step_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("stepSize", ::apache::thrift::protocol::T_DOUBLE, 2); + xfer += oprot->writeDouble(this->stepSize); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_step_pargs::~FmuService_step_pargs() throw() { +} + + +uint32_t FmuService_step_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_step_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("stepSize", ::apache::thrift::protocol::T_DOUBLE, 2); + xfer += oprot->writeDouble((*(this->stepSize))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_step_result::~FmuService_step_result() throw() { +} + + +uint32_t FmuService_step_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_step_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_step_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex) { + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_step_presult::~FmuService_step_presult() throw() { +} + + +uint32_t FmuService_step_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_reset_args::~FmuService_reset_args() throw() { +} + + +uint32_t FmuService_reset_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_reset_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_reset_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_reset_pargs::~FmuService_reset_pargs() throw() { +} + + +uint32_t FmuService_reset_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_reset_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_reset_result::~FmuService_reset_result() throw() { +} + + +uint32_t FmuService_reset_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast124; + xfer += iprot->readI32(ecast124); + this->success = (Status::type)ecast124; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_reset_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_reset_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32((int32_t)this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex) { + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_reset_presult::~FmuService_reset_presult() throw() { +} + + +uint32_t FmuService_reset_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast125; + xfer += iprot->readI32(ecast125); + (*(this->success)) = (Status::type)ecast125; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_terminate_args::~FmuService_terminate_args() throw() { +} + + +uint32_t FmuService_terminate_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_terminate_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_terminate_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_terminate_pargs::~FmuService_terminate_pargs() throw() { +} + + +uint32_t FmuService_terminate_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_terminate_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_terminate_result::~FmuService_terminate_result() throw() { +} + + +uint32_t FmuService_terminate_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast126; + xfer += iprot->readI32(ecast126); + this->success = (Status::type)ecast126; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_terminate_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_terminate_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32((int32_t)this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex) { + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_terminate_presult::~FmuService_terminate_presult() throw() { +} + + +uint32_t FmuService_terminate_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast127; + xfer += iprot->readI32(ecast127); + (*(this->success)) = (Status::type)ecast127; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_read_integer_args::~FmuService_read_integer_args() throw() { +} + + +uint32_t FmuService_read_integer_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->vr.clear(); + uint32_t _size128; + ::apache::thrift::protocol::TType _etype131; + xfer += iprot->readListBegin(_etype131, _size128); + this->vr.resize(_size128); + uint32_t _i132; + for (_i132 = 0; _i132 < _size128; ++_i132) + { + xfer += iprot->readI64(this->vr[_i132]); + } + xfer += iprot->readListEnd(); + } + this->__isset.vr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_read_integer_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_read_integer_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->vr.size())); + std::vector ::const_iterator _iter133; + for (_iter133 = this->vr.begin(); _iter133 != this->vr.end(); ++_iter133) + { + xfer += oprot->writeI64((*_iter133)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_read_integer_pargs::~FmuService_read_integer_pargs() throw() { +} + + +uint32_t FmuService_read_integer_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_read_integer_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast((*(this->vr)).size())); + std::vector ::const_iterator _iter134; + for (_iter134 = (*(this->vr)).begin(); _iter134 != (*(this->vr)).end(); ++_iter134) + { + xfer += oprot->writeI64((*_iter134)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_read_integer_result::~FmuService_read_integer_result() throw() { +} + + +uint32_t FmuService_read_integer_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_read_integer_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_read_integer_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex1) { + xfer += oprot->writeFieldBegin("ex1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex2) { + xfer += oprot->writeFieldBegin("ex2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ex2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_read_integer_presult::~FmuService_read_integer_presult() throw() { +} + + +uint32_t FmuService_read_integer_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_read_real_args::~FmuService_read_real_args() throw() { +} + + +uint32_t FmuService_read_real_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->vr.clear(); + uint32_t _size135; + ::apache::thrift::protocol::TType _etype138; + xfer += iprot->readListBegin(_etype138, _size135); + this->vr.resize(_size135); + uint32_t _i139; + for (_i139 = 0; _i139 < _size135; ++_i139) + { + xfer += iprot->readI64(this->vr[_i139]); + } + xfer += iprot->readListEnd(); + } + this->__isset.vr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_read_real_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_read_real_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->vr.size())); + std::vector ::const_iterator _iter140; + for (_iter140 = this->vr.begin(); _iter140 != this->vr.end(); ++_iter140) + { + xfer += oprot->writeI64((*_iter140)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_read_real_pargs::~FmuService_read_real_pargs() throw() { +} + + +uint32_t FmuService_read_real_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_read_real_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast((*(this->vr)).size())); + std::vector ::const_iterator _iter141; + for (_iter141 = (*(this->vr)).begin(); _iter141 != (*(this->vr)).end(); ++_iter141) + { + xfer += oprot->writeI64((*_iter141)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_read_real_result::~FmuService_read_real_result() throw() { +} + + +uint32_t FmuService_read_real_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_read_real_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_read_real_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex1) { + xfer += oprot->writeFieldBegin("ex1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex2) { + xfer += oprot->writeFieldBegin("ex2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ex2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_read_real_presult::~FmuService_read_real_presult() throw() { +} + + +uint32_t FmuService_read_real_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_read_string_args::~FmuService_read_string_args() throw() { +} + + +uint32_t FmuService_read_string_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->vr.clear(); + uint32_t _size142; + ::apache::thrift::protocol::TType _etype145; + xfer += iprot->readListBegin(_etype145, _size142); + this->vr.resize(_size142); + uint32_t _i146; + for (_i146 = 0; _i146 < _size142; ++_i146) + { + xfer += iprot->readI64(this->vr[_i146]); + } + xfer += iprot->readListEnd(); + } + this->__isset.vr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_read_string_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_read_string_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->vr.size())); + std::vector ::const_iterator _iter147; + for (_iter147 = this->vr.begin(); _iter147 != this->vr.end(); ++_iter147) + { + xfer += oprot->writeI64((*_iter147)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_read_string_pargs::~FmuService_read_string_pargs() throw() { +} + + +uint32_t FmuService_read_string_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_read_string_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast((*(this->vr)).size())); + std::vector ::const_iterator _iter148; + for (_iter148 = (*(this->vr)).begin(); _iter148 != (*(this->vr)).end(); ++_iter148) + { + xfer += oprot->writeI64((*_iter148)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_read_string_result::~FmuService_read_string_result() throw() { +} + + +uint32_t FmuService_read_string_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_read_string_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_read_string_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex1) { + xfer += oprot->writeFieldBegin("ex1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex2) { + xfer += oprot->writeFieldBegin("ex2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ex2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_read_string_presult::~FmuService_read_string_presult() throw() { +} + + +uint32_t FmuService_read_string_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_read_boolean_args::~FmuService_read_boolean_args() throw() { +} + + +uint32_t FmuService_read_boolean_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->vr.clear(); + uint32_t _size149; + ::apache::thrift::protocol::TType _etype152; + xfer += iprot->readListBegin(_etype152, _size149); + this->vr.resize(_size149); + uint32_t _i153; + for (_i153 = 0; _i153 < _size149; ++_i153) + { + xfer += iprot->readI64(this->vr[_i153]); + } + xfer += iprot->readListEnd(); + } + this->__isset.vr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_read_boolean_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_read_boolean_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->vr.size())); + std::vector ::const_iterator _iter154; + for (_iter154 = this->vr.begin(); _iter154 != this->vr.end(); ++_iter154) + { + xfer += oprot->writeI64((*_iter154)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_read_boolean_pargs::~FmuService_read_boolean_pargs() throw() { +} + + +uint32_t FmuService_read_boolean_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_read_boolean_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast((*(this->vr)).size())); + std::vector ::const_iterator _iter155; + for (_iter155 = (*(this->vr)).begin(); _iter155 != (*(this->vr)).end(); ++_iter155) + { + xfer += oprot->writeI64((*_iter155)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_read_boolean_result::~FmuService_read_boolean_result() throw() { +} + + +uint32_t FmuService_read_boolean_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_read_boolean_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_read_boolean_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex1) { + xfer += oprot->writeFieldBegin("ex1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex2) { + xfer += oprot->writeFieldBegin("ex2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ex2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_read_boolean_presult::~FmuService_read_boolean_presult() throw() { +} + + +uint32_t FmuService_read_boolean_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_write_integer_args::~FmuService_write_integer_args() throw() { +} + + +uint32_t FmuService_write_integer_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->vr.clear(); + uint32_t _size156; + ::apache::thrift::protocol::TType _etype159; + xfer += iprot->readListBegin(_etype159, _size156); + this->vr.resize(_size156); + uint32_t _i160; + for (_i160 = 0; _i160 < _size156; ++_i160) + { + xfer += iprot->readI64(this->vr[_i160]); + } + xfer += iprot->readListEnd(); + } + this->__isset.vr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->value.clear(); + uint32_t _size161; + ::apache::thrift::protocol::TType _etype164; + xfer += iprot->readListBegin(_etype164, _size161); + this->value.resize(_size161); + uint32_t _i165; + for (_i165 = 0; _i165 < _size161; ++_i165) + { + xfer += iprot->readI32(this->value[_i165]); + } + xfer += iprot->readListEnd(); + } + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_write_integer_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_write_integer_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->vr.size())); + std::vector ::const_iterator _iter166; + for (_iter166 = this->vr.begin(); _iter166 != this->vr.end(); ++_iter166) + { + xfer += oprot->writeI64((*_iter166)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->value.size())); + std::vector ::const_iterator _iter167; + for (_iter167 = this->value.begin(); _iter167 != this->value.end(); ++_iter167) + { + xfer += oprot->writeI32((*_iter167)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_write_integer_pargs::~FmuService_write_integer_pargs() throw() { +} + + +uint32_t FmuService_write_integer_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_write_integer_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast((*(this->vr)).size())); + std::vector ::const_iterator _iter168; + for (_iter168 = (*(this->vr)).begin(); _iter168 != (*(this->vr)).end(); ++_iter168) + { + xfer += oprot->writeI64((*_iter168)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast((*(this->value)).size())); + std::vector ::const_iterator _iter169; + for (_iter169 = (*(this->value)).begin(); _iter169 != (*(this->value)).end(); ++_iter169) + { + xfer += oprot->writeI32((*_iter169)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_write_integer_result::~FmuService_write_integer_result() throw() { +} + + +uint32_t FmuService_write_integer_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast170; + xfer += iprot->readI32(ecast170); + this->success = (Status::type)ecast170; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_write_integer_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_write_integer_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32((int32_t)this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex1) { + xfer += oprot->writeFieldBegin("ex1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex2) { + xfer += oprot->writeFieldBegin("ex2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ex2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_write_integer_presult::~FmuService_write_integer_presult() throw() { +} + + +uint32_t FmuService_write_integer_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast171; + xfer += iprot->readI32(ecast171); + (*(this->success)) = (Status::type)ecast171; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_write_real_args::~FmuService_write_real_args() throw() { +} + + +uint32_t FmuService_write_real_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->vr.clear(); + uint32_t _size172; + ::apache::thrift::protocol::TType _etype175; + xfer += iprot->readListBegin(_etype175, _size172); + this->vr.resize(_size172); + uint32_t _i176; + for (_i176 = 0; _i176 < _size172; ++_i176) + { + xfer += iprot->readI64(this->vr[_i176]); + } + xfer += iprot->readListEnd(); + } + this->__isset.vr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->value.clear(); + uint32_t _size177; + ::apache::thrift::protocol::TType _etype180; + xfer += iprot->readListBegin(_etype180, _size177); + this->value.resize(_size177); + uint32_t _i181; + for (_i181 = 0; _i181 < _size177; ++_i181) + { + xfer += iprot->readDouble(this->value[_i181]); + } + xfer += iprot->readListEnd(); + } + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_write_real_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_write_real_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->vr.size())); + std::vector ::const_iterator _iter182; + for (_iter182 = this->vr.begin(); _iter182 != this->vr.end(); ++_iter182) + { + xfer += oprot->writeI64((*_iter182)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_DOUBLE, static_cast(this->value.size())); + std::vector ::const_iterator _iter183; + for (_iter183 = this->value.begin(); _iter183 != this->value.end(); ++_iter183) + { + xfer += oprot->writeDouble((*_iter183)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_write_real_pargs::~FmuService_write_real_pargs() throw() { +} + + +uint32_t FmuService_write_real_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_write_real_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast((*(this->vr)).size())); + std::vector ::const_iterator _iter184; + for (_iter184 = (*(this->vr)).begin(); _iter184 != (*(this->vr)).end(); ++_iter184) + { + xfer += oprot->writeI64((*_iter184)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_DOUBLE, static_cast((*(this->value)).size())); + std::vector ::const_iterator _iter185; + for (_iter185 = (*(this->value)).begin(); _iter185 != (*(this->value)).end(); ++_iter185) + { + xfer += oprot->writeDouble((*_iter185)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_write_real_result::~FmuService_write_real_result() throw() { +} + + +uint32_t FmuService_write_real_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast186; + xfer += iprot->readI32(ecast186); + this->success = (Status::type)ecast186; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_write_real_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_write_real_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32((int32_t)this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex1) { + xfer += oprot->writeFieldBegin("ex1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex2) { + xfer += oprot->writeFieldBegin("ex2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ex2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_write_real_presult::~FmuService_write_real_presult() throw() { +} + + +uint32_t FmuService_write_real_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast187; + xfer += iprot->readI32(ecast187); + (*(this->success)) = (Status::type)ecast187; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_write_string_args::~FmuService_write_string_args() throw() { +} + + +uint32_t FmuService_write_string_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->vr.clear(); + uint32_t _size188; + ::apache::thrift::protocol::TType _etype191; + xfer += iprot->readListBegin(_etype191, _size188); + this->vr.resize(_size188); + uint32_t _i192; + for (_i192 = 0; _i192 < _size188; ++_i192) + { + xfer += iprot->readI64(this->vr[_i192]); + } + xfer += iprot->readListEnd(); + } + this->__isset.vr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->value.clear(); + uint32_t _size193; + ::apache::thrift::protocol::TType _etype196; + xfer += iprot->readListBegin(_etype196, _size193); + this->value.resize(_size193); + uint32_t _i197; + for (_i197 = 0; _i197 < _size193; ++_i197) + { + xfer += iprot->readString(this->value[_i197]); + } + xfer += iprot->readListEnd(); + } + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_write_string_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_write_string_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->vr.size())); + std::vector ::const_iterator _iter198; + for (_iter198 = this->vr.begin(); _iter198 != this->vr.end(); ++_iter198) + { + xfer += oprot->writeI64((*_iter198)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->value.size())); + std::vector ::const_iterator _iter199; + for (_iter199 = this->value.begin(); _iter199 != this->value.end(); ++_iter199) + { + xfer += oprot->writeString((*_iter199)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_write_string_pargs::~FmuService_write_string_pargs() throw() { +} + + +uint32_t FmuService_write_string_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_write_string_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast((*(this->vr)).size())); + std::vector ::const_iterator _iter200; + for (_iter200 = (*(this->vr)).begin(); _iter200 != (*(this->vr)).end(); ++_iter200) + { + xfer += oprot->writeI64((*_iter200)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->value)).size())); + std::vector ::const_iterator _iter201; + for (_iter201 = (*(this->value)).begin(); _iter201 != (*(this->value)).end(); ++_iter201) + { + xfer += oprot->writeString((*_iter201)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_write_string_result::~FmuService_write_string_result() throw() { +} + + +uint32_t FmuService_write_string_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast202; + xfer += iprot->readI32(ecast202); + this->success = (Status::type)ecast202; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_write_string_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_write_string_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32((int32_t)this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex1) { + xfer += oprot->writeFieldBegin("ex1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex2) { + xfer += oprot->writeFieldBegin("ex2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ex2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_write_string_presult::~FmuService_write_string_presult() throw() { +} + + +uint32_t FmuService_write_string_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast203; + xfer += iprot->readI32(ecast203); + (*(this->success)) = (Status::type)ecast203; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_write_boolean_args::~FmuService_write_boolean_args() throw() { +} + + +uint32_t FmuService_write_boolean_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->vr.clear(); + uint32_t _size204; + ::apache::thrift::protocol::TType _etype207; + xfer += iprot->readListBegin(_etype207, _size204); + this->vr.resize(_size204); + uint32_t _i208; + for (_i208 = 0; _i208 < _size204; ++_i208) + { + xfer += iprot->readI64(this->vr[_i208]); + } + xfer += iprot->readListEnd(); + } + this->__isset.vr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->value.clear(); + uint32_t _size209; + ::apache::thrift::protocol::TType _etype212; + xfer += iprot->readListBegin(_etype212, _size209); + this->value.resize(_size209); + uint32_t _i213; + for (_i213 = 0; _i213 < _size209; ++_i213) + { + xfer += iprot->readBool(this->value[_i213]); + } + xfer += iprot->readListEnd(); + } + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_write_boolean_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_write_boolean_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->vr.size())); + std::vector ::const_iterator _iter214; + for (_iter214 = this->vr.begin(); _iter214 != this->vr.end(); ++_iter214) + { + xfer += oprot->writeI64((*_iter214)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_BOOL, static_cast(this->value.size())); + std::vector ::const_iterator _iter215; + for (_iter215 = this->value.begin(); _iter215 != this->value.end(); ++_iter215) + { + xfer += oprot->writeBool((*_iter215)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_write_boolean_pargs::~FmuService_write_boolean_pargs() throw() { +} + + +uint32_t FmuService_write_boolean_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_write_boolean_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vr", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast((*(this->vr)).size())); + std::vector ::const_iterator _iter216; + for (_iter216 = (*(this->vr)).begin(); _iter216 != (*(this->vr)).end(); ++_iter216) + { + xfer += oprot->writeI64((*_iter216)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_BOOL, static_cast((*(this->value)).size())); + std::vector ::const_iterator _iter217; + for (_iter217 = (*(this->value)).begin(); _iter217 != (*(this->value)).end(); ++_iter217) + { + xfer += oprot->writeBool((*_iter217)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_write_boolean_result::~FmuService_write_boolean_result() throw() { +} + + +uint32_t FmuService_write_boolean_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast218; + xfer += iprot->readI32(ecast218); + this->success = (Status::type)ecast218; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_write_boolean_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_write_boolean_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32((int32_t)this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex1) { + xfer += oprot->writeFieldBegin("ex1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex2) { + xfer += oprot->writeFieldBegin("ex2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ex2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_write_boolean_presult::~FmuService_write_boolean_presult() throw() { +} + + +uint32_t FmuService_write_boolean_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast219; + xfer += iprot->readI32(ecast219); + (*(this->success)) = (Status::type)ecast219; + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FmuService_get_directional_derivative_args::~FmuService_get_directional_derivative_args() throw() { +} + + +uint32_t FmuService_get_directional_derivative_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->vUnknownRef.clear(); + uint32_t _size220; + ::apache::thrift::protocol::TType _etype223; + xfer += iprot->readListBegin(_etype223, _size220); + this->vUnknownRef.resize(_size220); + uint32_t _i224; + for (_i224 = 0; _i224 < _size220; ++_i224) + { + xfer += iprot->readI64(this->vUnknownRef[_i224]); + } + xfer += iprot->readListEnd(); + } + this->__isset.vUnknownRef = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->vKnownRef.clear(); + uint32_t _size225; + ::apache::thrift::protocol::TType _etype228; + xfer += iprot->readListBegin(_etype228, _size225); + this->vKnownRef.resize(_size225); + uint32_t _i229; + for (_i229 = 0; _i229 < _size225; ++_i229) + { + xfer += iprot->readI64(this->vKnownRef[_i229]); + } + xfer += iprot->readListEnd(); + } + this->__isset.vKnownRef = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->dvKnownRef.clear(); + uint32_t _size230; + ::apache::thrift::protocol::TType _etype233; + xfer += iprot->readListBegin(_etype233, _size230); + this->dvKnownRef.resize(_size230); + uint32_t _i234; + for (_i234 = 0; _i234 < _size230; ++_i234) + { + xfer += iprot->readDouble(this->dvKnownRef[_i234]); + } + xfer += iprot->readListEnd(); + } + this->__isset.dvKnownRef = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_get_directional_derivative_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_get_directional_derivative_args"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vUnknownRef", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->vUnknownRef.size())); + std::vector ::const_iterator _iter235; + for (_iter235 = this->vUnknownRef.begin(); _iter235 != this->vUnknownRef.end(); ++_iter235) + { + xfer += oprot->writeI64((*_iter235)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vKnownRef", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->vKnownRef.size())); + std::vector ::const_iterator _iter236; + for (_iter236 = this->vKnownRef.begin(); _iter236 != this->vKnownRef.end(); ++_iter236) + { + xfer += oprot->writeI64((*_iter236)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dvKnownRef", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_DOUBLE, static_cast(this->dvKnownRef.size())); + std::vector ::const_iterator _iter237; + for (_iter237 = this->dvKnownRef.begin(); _iter237 != this->dvKnownRef.end(); ++_iter237) + { + xfer += oprot->writeDouble((*_iter237)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_get_directional_derivative_pargs::~FmuService_get_directional_derivative_pargs() throw() { +} + + +uint32_t FmuService_get_directional_derivative_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FmuService_get_directional_derivative_pargs"); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->instanceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vUnknownRef", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast((*(this->vUnknownRef)).size())); + std::vector ::const_iterator _iter238; + for (_iter238 = (*(this->vUnknownRef)).begin(); _iter238 != (*(this->vUnknownRef)).end(); ++_iter238) + { + xfer += oprot->writeI64((*_iter238)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("vKnownRef", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast((*(this->vKnownRef)).size())); + std::vector ::const_iterator _iter239; + for (_iter239 = (*(this->vKnownRef)).begin(); _iter239 != (*(this->vKnownRef)).end(); ++_iter239) + { + xfer += oprot->writeI64((*_iter239)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dvKnownRef", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_DOUBLE, static_cast((*(this->dvKnownRef)).size())); + std::vector ::const_iterator _iter240; + for (_iter240 = (*(this->dvKnownRef)).begin(); _iter240 != (*(this->dvKnownRef)).end(); ++_iter240) + { + xfer += oprot->writeDouble((*_iter240)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_get_directional_derivative_result::~FmuService_get_directional_derivative_result() throw() { +} + + +uint32_t FmuService_get_directional_derivative_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FmuService_get_directional_derivative_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FmuService_get_directional_derivative_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex1) { + xfer += oprot->writeFieldBegin("ex1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex2) { + xfer += oprot->writeFieldBegin("ex2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ex2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FmuService_get_directional_derivative_presult::~FmuService_get_directional_derivative_presult() throw() { +} + + +uint32_t FmuService_get_directional_derivative_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex1.read(iprot); + this->__isset.ex1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex2.read(iprot); + this->__isset.ex2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +void FmuServiceClient::load_from_url(FmuId& _return, const std::string& url) +{ + send_load_from_url(url); + recv_load_from_url(_return); +} + +void FmuServiceClient::send_load_from_url(const std::string& url) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("load_from_url", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_load_from_url_pargs args; + args.url = &url; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void FmuServiceClient::recv_load_from_url(FmuId& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("load_from_url") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + FmuService_load_from_url_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "load_from_url failed: unknown result"); +} + +void FmuServiceClient::load_from_file(FmuId& _return, const std::string& name, const std::string& data) +{ + send_load_from_file(name, data); + recv_load_from_file(_return); +} + +void FmuServiceClient::send_load_from_file(const std::string& name, const std::string& data) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("load_from_file", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_load_from_file_pargs args; + args.name = &name; + args.data = &data; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void FmuServiceClient::recv_load_from_file(FmuId& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("load_from_file") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + FmuService_load_from_file_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "load_from_file failed: unknown result"); +} + +void FmuServiceClient::get_model_description(ModelDescription& _return, const FmuId& fmuId) +{ + send_get_model_description(fmuId); + recv_get_model_description(_return); +} + +void FmuServiceClient::send_get_model_description(const FmuId& fmuId) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_model_description", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_get_model_description_pargs args; + args.fmuId = &fmuId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void FmuServiceClient::recv_get_model_description(ModelDescription& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_model_description") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + FmuService_get_model_description_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.ex) { + throw result.ex; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_model_description failed: unknown result"); +} + +void FmuServiceClient::get_co_simulation_attributes(CoSimulationAttributes& _return, const InstanceId& instanceId) +{ + send_get_co_simulation_attributes(instanceId); + recv_get_co_simulation_attributes(_return); +} + +void FmuServiceClient::send_get_co_simulation_attributes(const InstanceId& instanceId) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_co_simulation_attributes", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_get_co_simulation_attributes_pargs args; + args.instanceId = &instanceId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void FmuServiceClient::recv_get_co_simulation_attributes(CoSimulationAttributes& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_co_simulation_attributes") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + FmuService_get_co_simulation_attributes_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.ex) { + throw result.ex; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_co_simulation_attributes failed: unknown result"); +} + +bool FmuServiceClient::can_create_instance_from_cs(const FmuId& fmuId) +{ + send_can_create_instance_from_cs(fmuId); + return recv_can_create_instance_from_cs(); +} + +void FmuServiceClient::send_can_create_instance_from_cs(const FmuId& fmuId) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("can_create_instance_from_cs", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_can_create_instance_from_cs_pargs args; + args.fmuId = &fmuId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool FmuServiceClient::recv_can_create_instance_from_cs() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("can_create_instance_from_cs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + FmuService_can_create_instance_from_cs_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.ex) { + throw result.ex; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "can_create_instance_from_cs failed: unknown result"); +} + +bool FmuServiceClient::can_create_instance_from_me(const FmuId& fmuId) +{ + send_can_create_instance_from_me(fmuId); + return recv_can_create_instance_from_me(); +} + +void FmuServiceClient::send_can_create_instance_from_me(const FmuId& fmuId) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("can_create_instance_from_me", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_can_create_instance_from_me_pargs args; + args.fmuId = &fmuId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool FmuServiceClient::recv_can_create_instance_from_me() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("can_create_instance_from_me") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + FmuService_can_create_instance_from_me_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.ex) { + throw result.ex; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "can_create_instance_from_me failed: unknown result"); +} + +void FmuServiceClient::create_instance_from_cs(InstanceId& _return, const FmuId& fmuId) +{ + send_create_instance_from_cs(fmuId); + recv_create_instance_from_cs(_return); +} + +void FmuServiceClient::send_create_instance_from_cs(const FmuId& fmuId) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_instance_from_cs", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_create_instance_from_cs_pargs args; + args.fmuId = &fmuId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void FmuServiceClient::recv_create_instance_from_cs(InstanceId& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_instance_from_cs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + FmuService_create_instance_from_cs_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.ex1) { + throw result.ex1; + } + if (result.__isset.ex2) { + throw result.ex2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_instance_from_cs failed: unknown result"); +} + +void FmuServiceClient::create_instance_from_me(InstanceId& _return, const FmuId& fmuId, const Solver& solver) +{ + send_create_instance_from_me(fmuId, solver); + recv_create_instance_from_me(_return); +} + +void FmuServiceClient::send_create_instance_from_me(const FmuId& fmuId, const Solver& solver) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_instance_from_me", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_create_instance_from_me_pargs args; + args.fmuId = &fmuId; + args.solver = &solver; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void FmuServiceClient::recv_create_instance_from_me(InstanceId& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_instance_from_me") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + FmuService_create_instance_from_me_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.ex1) { + throw result.ex1; + } + if (result.__isset.ex2) { + throw result.ex2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_instance_from_me failed: unknown result"); +} + +Status::type FmuServiceClient::setup_experiment(const InstanceId& instanceId, const double start, const double stop, const double tolerance) +{ + send_setup_experiment(instanceId, start, stop, tolerance); + return recv_setup_experiment(); +} + +void FmuServiceClient::send_setup_experiment(const InstanceId& instanceId, const double start, const double stop, const double tolerance) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("setup_experiment", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_setup_experiment_pargs args; + args.instanceId = &instanceId; + args.start = &start; + args.stop = &stop; + args.tolerance = &tolerance; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +Status::type FmuServiceClient::recv_setup_experiment() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("setup_experiment") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Status::type _return; + FmuService_setup_experiment_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.ex) { + throw result.ex; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "setup_experiment failed: unknown result"); +} + +Status::type FmuServiceClient::enter_initialization_mode(const InstanceId& instanceId) +{ + send_enter_initialization_mode(instanceId); + return recv_enter_initialization_mode(); +} + +void FmuServiceClient::send_enter_initialization_mode(const InstanceId& instanceId) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("enter_initialization_mode", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_enter_initialization_mode_pargs args; + args.instanceId = &instanceId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +Status::type FmuServiceClient::recv_enter_initialization_mode() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("enter_initialization_mode") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Status::type _return; + FmuService_enter_initialization_mode_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.ex) { + throw result.ex; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "enter_initialization_mode failed: unknown result"); +} + +Status::type FmuServiceClient::exit_initialization_mode(const InstanceId& instanceId) +{ + send_exit_initialization_mode(instanceId); + return recv_exit_initialization_mode(); +} + +void FmuServiceClient::send_exit_initialization_mode(const InstanceId& instanceId) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("exit_initialization_mode", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_exit_initialization_mode_pargs args; + args.instanceId = &instanceId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +Status::type FmuServiceClient::recv_exit_initialization_mode() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("exit_initialization_mode") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Status::type _return; + FmuService_exit_initialization_mode_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.ex) { + throw result.ex; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "exit_initialization_mode failed: unknown result"); +} + +void FmuServiceClient::step(StepResult& _return, const InstanceId& instanceId, const double stepSize) +{ + send_step(instanceId, stepSize); + recv_step(_return); +} + +void FmuServiceClient::send_step(const InstanceId& instanceId, const double stepSize) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("step", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_step_pargs args; + args.instanceId = &instanceId; + args.stepSize = &stepSize; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void FmuServiceClient::recv_step(StepResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("step") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + FmuService_step_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.ex) { + throw result.ex; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "step failed: unknown result"); +} + +Status::type FmuServiceClient::reset(const InstanceId& instanceId) +{ + send_reset(instanceId); + return recv_reset(); +} + +void FmuServiceClient::send_reset(const InstanceId& instanceId) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("reset", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_reset_pargs args; + args.instanceId = &instanceId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +Status::type FmuServiceClient::recv_reset() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("reset") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Status::type _return; + FmuService_reset_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.ex) { + throw result.ex; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "reset failed: unknown result"); +} + +Status::type FmuServiceClient::terminate(const InstanceId& instanceId) +{ + send_terminate(instanceId); + return recv_terminate(); +} + +void FmuServiceClient::send_terminate(const InstanceId& instanceId) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("terminate", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_terminate_pargs args; + args.instanceId = &instanceId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +Status::type FmuServiceClient::recv_terminate() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("terminate") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Status::type _return; + FmuService_terminate_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.ex) { + throw result.ex; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "terminate failed: unknown result"); +} + +void FmuServiceClient::read_integer(IntegerRead& _return, const InstanceId& instanceId, const ValueReferences& vr) +{ + send_read_integer(instanceId, vr); + recv_read_integer(_return); +} + +void FmuServiceClient::send_read_integer(const InstanceId& instanceId, const ValueReferences& vr) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("read_integer", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_read_integer_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void FmuServiceClient::recv_read_integer(IntegerRead& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("read_integer") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + FmuService_read_integer_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.ex1) { + throw result.ex1; + } + if (result.__isset.ex2) { + throw result.ex2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "read_integer failed: unknown result"); +} + +void FmuServiceClient::read_real(RealRead& _return, const InstanceId& instanceId, const ValueReferences& vr) +{ + send_read_real(instanceId, vr); + recv_read_real(_return); +} + +void FmuServiceClient::send_read_real(const InstanceId& instanceId, const ValueReferences& vr) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("read_real", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_read_real_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void FmuServiceClient::recv_read_real(RealRead& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("read_real") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + FmuService_read_real_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.ex1) { + throw result.ex1; + } + if (result.__isset.ex2) { + throw result.ex2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "read_real failed: unknown result"); +} + +void FmuServiceClient::read_string(StringRead& _return, const InstanceId& instanceId, const ValueReferences& vr) +{ + send_read_string(instanceId, vr); + recv_read_string(_return); +} + +void FmuServiceClient::send_read_string(const InstanceId& instanceId, const ValueReferences& vr) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("read_string", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_read_string_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void FmuServiceClient::recv_read_string(StringRead& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("read_string") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + FmuService_read_string_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.ex1) { + throw result.ex1; + } + if (result.__isset.ex2) { + throw result.ex2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "read_string failed: unknown result"); +} + +void FmuServiceClient::read_boolean(BooleanRead& _return, const InstanceId& instanceId, const ValueReferences& vr) +{ + send_read_boolean(instanceId, vr); + recv_read_boolean(_return); +} + +void FmuServiceClient::send_read_boolean(const InstanceId& instanceId, const ValueReferences& vr) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("read_boolean", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_read_boolean_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void FmuServiceClient::recv_read_boolean(BooleanRead& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("read_boolean") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + FmuService_read_boolean_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.ex1) { + throw result.ex1; + } + if (result.__isset.ex2) { + throw result.ex2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "read_boolean failed: unknown result"); +} + +Status::type FmuServiceClient::write_integer(const InstanceId& instanceId, const ValueReferences& vr, const IntArray& value) +{ + send_write_integer(instanceId, vr, value); + return recv_write_integer(); +} + +void FmuServiceClient::send_write_integer(const InstanceId& instanceId, const ValueReferences& vr, const IntArray& value) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("write_integer", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_write_integer_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +Status::type FmuServiceClient::recv_write_integer() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("write_integer") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Status::type _return; + FmuService_write_integer_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.ex1) { + throw result.ex1; + } + if (result.__isset.ex2) { + throw result.ex2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "write_integer failed: unknown result"); +} + +Status::type FmuServiceClient::write_real(const InstanceId& instanceId, const ValueReferences& vr, const RealArray& value) +{ + send_write_real(instanceId, vr, value); + return recv_write_real(); +} + +void FmuServiceClient::send_write_real(const InstanceId& instanceId, const ValueReferences& vr, const RealArray& value) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("write_real", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_write_real_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +Status::type FmuServiceClient::recv_write_real() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("write_real") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Status::type _return; + FmuService_write_real_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.ex1) { + throw result.ex1; + } + if (result.__isset.ex2) { + throw result.ex2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "write_real failed: unknown result"); +} + +Status::type FmuServiceClient::write_string(const InstanceId& instanceId, const ValueReferences& vr, const StringArray& value) +{ + send_write_string(instanceId, vr, value); + return recv_write_string(); +} + +void FmuServiceClient::send_write_string(const InstanceId& instanceId, const ValueReferences& vr, const StringArray& value) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("write_string", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_write_string_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +Status::type FmuServiceClient::recv_write_string() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("write_string") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Status::type _return; + FmuService_write_string_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.ex1) { + throw result.ex1; + } + if (result.__isset.ex2) { + throw result.ex2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "write_string failed: unknown result"); +} + +Status::type FmuServiceClient::write_boolean(const InstanceId& instanceId, const ValueReferences& vr, const BooleanArray& value) +{ + send_write_boolean(instanceId, vr, value); + return recv_write_boolean(); +} + +void FmuServiceClient::send_write_boolean(const InstanceId& instanceId, const ValueReferences& vr, const BooleanArray& value) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("write_boolean", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_write_boolean_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +Status::type FmuServiceClient::recv_write_boolean() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("write_boolean") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Status::type _return; + FmuService_write_boolean_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.ex1) { + throw result.ex1; + } + if (result.__isset.ex2) { + throw result.ex2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "write_boolean failed: unknown result"); +} + +void FmuServiceClient::get_directional_derivative(DirectionalDerivativeResult& _return, const InstanceId& instanceId, const ValueReferences& vUnknownRef, const ValueReferences& vKnownRef, const std::vector & dvKnownRef) +{ + send_get_directional_derivative(instanceId, vUnknownRef, vKnownRef, dvKnownRef); + recv_get_directional_derivative(_return); +} + +void FmuServiceClient::send_get_directional_derivative(const InstanceId& instanceId, const ValueReferences& vUnknownRef, const ValueReferences& vKnownRef, const std::vector & dvKnownRef) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_directional_derivative", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_get_directional_derivative_pargs args; + args.instanceId = &instanceId; + args.vUnknownRef = &vUnknownRef; + args.vKnownRef = &vKnownRef; + args.dvKnownRef = &dvKnownRef; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void FmuServiceClient::recv_get_directional_derivative(DirectionalDerivativeResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_directional_derivative") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + FmuService_get_directional_derivative_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.ex1) { + throw result.ex1; + } + if (result.__isset.ex2) { + throw result.ex2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_directional_derivative failed: unknown result"); +} + +bool FmuServiceProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) { + ProcessMap::iterator pfn; + pfn = processMap_.find(fname); + if (pfn == processMap_.end()) { + iprot->skip(::apache::thrift::protocol::T_STRUCT); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::UNKNOWN_METHOD, "Invalid method name: '"+fname+"'"); + oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return true; + } + (this->*(pfn->second))(seqid, iprot, oprot, callContext); + return true; +} + +void FmuServiceProcessor::process_load_from_url(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.load_from_url", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.load_from_url"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.load_from_url"); + } + + FmuService_load_from_url_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.load_from_url", bytes); + } + + FmuService_load_from_url_result result; + try { + iface_->load_from_url(result.success, args.url); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.load_from_url"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("load_from_url", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.load_from_url"); + } + + oprot->writeMessageBegin("load_from_url", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.load_from_url", bytes); + } +} + +void FmuServiceProcessor::process_load_from_file(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.load_from_file", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.load_from_file"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.load_from_file"); + } + + FmuService_load_from_file_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.load_from_file", bytes); + } + + FmuService_load_from_file_result result; + try { + iface_->load_from_file(result.success, args.name, args.data); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.load_from_file"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("load_from_file", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.load_from_file"); + } + + oprot->writeMessageBegin("load_from_file", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.load_from_file", bytes); + } +} + +void FmuServiceProcessor::process_get_model_description(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.get_model_description", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.get_model_description"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.get_model_description"); + } + + FmuService_get_model_description_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.get_model_description", bytes); + } + + FmuService_get_model_description_result result; + try { + iface_->get_model_description(result.success, args.fmuId); + result.__isset.success = true; + } catch (NoSuchFmuException &ex) { + result.ex = ex; + result.__isset.ex = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.get_model_description"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_model_description", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.get_model_description"); + } + + oprot->writeMessageBegin("get_model_description", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.get_model_description", bytes); + } +} + +void FmuServiceProcessor::process_get_co_simulation_attributes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.get_co_simulation_attributes", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.get_co_simulation_attributes"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.get_co_simulation_attributes"); + } + + FmuService_get_co_simulation_attributes_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.get_co_simulation_attributes", bytes); + } + + FmuService_get_co_simulation_attributes_result result; + try { + iface_->get_co_simulation_attributes(result.success, args.instanceId); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex) { + result.ex = ex; + result.__isset.ex = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.get_co_simulation_attributes"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_co_simulation_attributes", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.get_co_simulation_attributes"); + } + + oprot->writeMessageBegin("get_co_simulation_attributes", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.get_co_simulation_attributes", bytes); + } +} + +void FmuServiceProcessor::process_can_create_instance_from_cs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.can_create_instance_from_cs", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.can_create_instance_from_cs"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.can_create_instance_from_cs"); + } + + FmuService_can_create_instance_from_cs_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.can_create_instance_from_cs", bytes); + } + + FmuService_can_create_instance_from_cs_result result; + try { + result.success = iface_->can_create_instance_from_cs(args.fmuId); + result.__isset.success = true; + } catch (NoSuchFmuException &ex) { + result.ex = ex; + result.__isset.ex = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.can_create_instance_from_cs"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("can_create_instance_from_cs", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.can_create_instance_from_cs"); + } + + oprot->writeMessageBegin("can_create_instance_from_cs", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.can_create_instance_from_cs", bytes); + } +} + +void FmuServiceProcessor::process_can_create_instance_from_me(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.can_create_instance_from_me", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.can_create_instance_from_me"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.can_create_instance_from_me"); + } + + FmuService_can_create_instance_from_me_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.can_create_instance_from_me", bytes); + } + + FmuService_can_create_instance_from_me_result result; + try { + result.success = iface_->can_create_instance_from_me(args.fmuId); + result.__isset.success = true; + } catch (NoSuchFmuException &ex) { + result.ex = ex; + result.__isset.ex = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.can_create_instance_from_me"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("can_create_instance_from_me", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.can_create_instance_from_me"); + } + + oprot->writeMessageBegin("can_create_instance_from_me", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.can_create_instance_from_me", bytes); + } +} + +void FmuServiceProcessor::process_create_instance_from_cs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.create_instance_from_cs", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.create_instance_from_cs"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.create_instance_from_cs"); + } + + FmuService_create_instance_from_cs_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.create_instance_from_cs", bytes); + } + + FmuService_create_instance_from_cs_result result; + try { + iface_->create_instance_from_cs(result.success, args.fmuId); + result.__isset.success = true; + } catch (UnsupportedOperationException &ex1) { + result.ex1 = ex1; + result.__isset.ex1 = true; + } catch (NoSuchFmuException &ex2) { + result.ex2 = ex2; + result.__isset.ex2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.create_instance_from_cs"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_instance_from_cs", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.create_instance_from_cs"); + } + + oprot->writeMessageBegin("create_instance_from_cs", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.create_instance_from_cs", bytes); + } +} + +void FmuServiceProcessor::process_create_instance_from_me(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.create_instance_from_me", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.create_instance_from_me"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.create_instance_from_me"); + } + + FmuService_create_instance_from_me_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.create_instance_from_me", bytes); + } + + FmuService_create_instance_from_me_result result; + try { + iface_->create_instance_from_me(result.success, args.fmuId, args.solver); + result.__isset.success = true; + } catch (UnsupportedOperationException &ex1) { + result.ex1 = ex1; + result.__isset.ex1 = true; + } catch (NoSuchFmuException &ex2) { + result.ex2 = ex2; + result.__isset.ex2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.create_instance_from_me"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_instance_from_me", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.create_instance_from_me"); + } + + oprot->writeMessageBegin("create_instance_from_me", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.create_instance_from_me", bytes); + } +} + +void FmuServiceProcessor::process_setup_experiment(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.setup_experiment", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.setup_experiment"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.setup_experiment"); + } + + FmuService_setup_experiment_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.setup_experiment", bytes); + } + + FmuService_setup_experiment_result result; + try { + result.success = iface_->setup_experiment(args.instanceId, args.start, args.stop, args.tolerance); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex) { + result.ex = ex; + result.__isset.ex = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.setup_experiment"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("setup_experiment", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.setup_experiment"); + } + + oprot->writeMessageBegin("setup_experiment", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.setup_experiment", bytes); + } +} + +void FmuServiceProcessor::process_enter_initialization_mode(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.enter_initialization_mode", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.enter_initialization_mode"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.enter_initialization_mode"); + } + + FmuService_enter_initialization_mode_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.enter_initialization_mode", bytes); + } + + FmuService_enter_initialization_mode_result result; + try { + result.success = iface_->enter_initialization_mode(args.instanceId); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex) { + result.ex = ex; + result.__isset.ex = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.enter_initialization_mode"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("enter_initialization_mode", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.enter_initialization_mode"); + } + + oprot->writeMessageBegin("enter_initialization_mode", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.enter_initialization_mode", bytes); + } +} + +void FmuServiceProcessor::process_exit_initialization_mode(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.exit_initialization_mode", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.exit_initialization_mode"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.exit_initialization_mode"); + } + + FmuService_exit_initialization_mode_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.exit_initialization_mode", bytes); + } + + FmuService_exit_initialization_mode_result result; + try { + result.success = iface_->exit_initialization_mode(args.instanceId); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex) { + result.ex = ex; + result.__isset.ex = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.exit_initialization_mode"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("exit_initialization_mode", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.exit_initialization_mode"); + } + + oprot->writeMessageBegin("exit_initialization_mode", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.exit_initialization_mode", bytes); + } +} + +void FmuServiceProcessor::process_step(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.step", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.step"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.step"); + } + + FmuService_step_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.step", bytes); + } + + FmuService_step_result result; + try { + iface_->step(result.success, args.instanceId, args.stepSize); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex) { + result.ex = ex; + result.__isset.ex = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.step"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("step", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.step"); + } + + oprot->writeMessageBegin("step", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.step", bytes); + } +} + +void FmuServiceProcessor::process_reset(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.reset", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.reset"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.reset"); + } + + FmuService_reset_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.reset", bytes); + } + + FmuService_reset_result result; + try { + result.success = iface_->reset(args.instanceId); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex) { + result.ex = ex; + result.__isset.ex = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.reset"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("reset", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.reset"); + } + + oprot->writeMessageBegin("reset", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.reset", bytes); + } +} + +void FmuServiceProcessor::process_terminate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.terminate", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.terminate"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.terminate"); + } + + FmuService_terminate_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.terminate", bytes); + } + + FmuService_terminate_result result; + try { + result.success = iface_->terminate(args.instanceId); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex) { + result.ex = ex; + result.__isset.ex = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.terminate"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("terminate", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.terminate"); + } + + oprot->writeMessageBegin("terminate", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.terminate", bytes); + } +} + +void FmuServiceProcessor::process_read_integer(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.read_integer", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.read_integer"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.read_integer"); + } + + FmuService_read_integer_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.read_integer", bytes); + } + + FmuService_read_integer_result result; + try { + iface_->read_integer(result.success, args.instanceId, args.vr); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex1) { + result.ex1 = ex1; + result.__isset.ex1 = true; + } catch (NoSuchVariableException &ex2) { + result.ex2 = ex2; + result.__isset.ex2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.read_integer"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("read_integer", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.read_integer"); + } + + oprot->writeMessageBegin("read_integer", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.read_integer", bytes); + } +} + +void FmuServiceProcessor::process_read_real(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.read_real", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.read_real"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.read_real"); + } + + FmuService_read_real_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.read_real", bytes); + } + + FmuService_read_real_result result; + try { + iface_->read_real(result.success, args.instanceId, args.vr); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex1) { + result.ex1 = ex1; + result.__isset.ex1 = true; + } catch (NoSuchVariableException &ex2) { + result.ex2 = ex2; + result.__isset.ex2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.read_real"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("read_real", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.read_real"); + } + + oprot->writeMessageBegin("read_real", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.read_real", bytes); + } +} + +void FmuServiceProcessor::process_read_string(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.read_string", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.read_string"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.read_string"); + } + + FmuService_read_string_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.read_string", bytes); + } + + FmuService_read_string_result result; + try { + iface_->read_string(result.success, args.instanceId, args.vr); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex1) { + result.ex1 = ex1; + result.__isset.ex1 = true; + } catch (NoSuchVariableException &ex2) { + result.ex2 = ex2; + result.__isset.ex2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.read_string"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("read_string", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.read_string"); + } + + oprot->writeMessageBegin("read_string", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.read_string", bytes); + } +} + +void FmuServiceProcessor::process_read_boolean(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.read_boolean", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.read_boolean"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.read_boolean"); + } + + FmuService_read_boolean_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.read_boolean", bytes); + } + + FmuService_read_boolean_result result; + try { + iface_->read_boolean(result.success, args.instanceId, args.vr); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex1) { + result.ex1 = ex1; + result.__isset.ex1 = true; + } catch (NoSuchVariableException &ex2) { + result.ex2 = ex2; + result.__isset.ex2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.read_boolean"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("read_boolean", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.read_boolean"); + } + + oprot->writeMessageBegin("read_boolean", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.read_boolean", bytes); + } +} + +void FmuServiceProcessor::process_write_integer(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.write_integer", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.write_integer"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.write_integer"); + } + + FmuService_write_integer_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.write_integer", bytes); + } + + FmuService_write_integer_result result; + try { + result.success = iface_->write_integer(args.instanceId, args.vr, args.value); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex1) { + result.ex1 = ex1; + result.__isset.ex1 = true; + } catch (NoSuchVariableException &ex2) { + result.ex2 = ex2; + result.__isset.ex2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.write_integer"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("write_integer", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.write_integer"); + } + + oprot->writeMessageBegin("write_integer", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.write_integer", bytes); + } +} + +void FmuServiceProcessor::process_write_real(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.write_real", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.write_real"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.write_real"); + } + + FmuService_write_real_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.write_real", bytes); + } + + FmuService_write_real_result result; + try { + result.success = iface_->write_real(args.instanceId, args.vr, args.value); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex1) { + result.ex1 = ex1; + result.__isset.ex1 = true; + } catch (NoSuchVariableException &ex2) { + result.ex2 = ex2; + result.__isset.ex2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.write_real"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("write_real", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.write_real"); + } + + oprot->writeMessageBegin("write_real", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.write_real", bytes); + } +} + +void FmuServiceProcessor::process_write_string(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.write_string", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.write_string"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.write_string"); + } + + FmuService_write_string_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.write_string", bytes); + } + + FmuService_write_string_result result; + try { + result.success = iface_->write_string(args.instanceId, args.vr, args.value); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex1) { + result.ex1 = ex1; + result.__isset.ex1 = true; + } catch (NoSuchVariableException &ex2) { + result.ex2 = ex2; + result.__isset.ex2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.write_string"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("write_string", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.write_string"); + } + + oprot->writeMessageBegin("write_string", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.write_string", bytes); + } +} + +void FmuServiceProcessor::process_write_boolean(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.write_boolean", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.write_boolean"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.write_boolean"); + } + + FmuService_write_boolean_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.write_boolean", bytes); + } + + FmuService_write_boolean_result result; + try { + result.success = iface_->write_boolean(args.instanceId, args.vr, args.value); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex1) { + result.ex1 = ex1; + result.__isset.ex1 = true; + } catch (NoSuchVariableException &ex2) { + result.ex2 = ex2; + result.__isset.ex2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.write_boolean"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("write_boolean", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.write_boolean"); + } + + oprot->writeMessageBegin("write_boolean", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.write_boolean", bytes); + } +} + +void FmuServiceProcessor::process_get_directional_derivative(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FmuService.get_directional_derivative", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FmuService.get_directional_derivative"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FmuService.get_directional_derivative"); + } + + FmuService_get_directional_derivative_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FmuService.get_directional_derivative", bytes); + } + + FmuService_get_directional_derivative_result result; + try { + iface_->get_directional_derivative(result.success, args.instanceId, args.vUnknownRef, args.vKnownRef, args.dvKnownRef); + result.__isset.success = true; + } catch (NoSuchInstanceException &ex1) { + result.ex1 = ex1; + result.__isset.ex1 = true; + } catch (UnsupportedOperationException &ex2) { + result.ex2 = ex2; + result.__isset.ex2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FmuService.get_directional_derivative"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_directional_derivative", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FmuService.get_directional_derivative"); + } + + oprot->writeMessageBegin("get_directional_derivative", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FmuService.get_directional_derivative", bytes); + } +} + +::apache::thrift::stdcxx::shared_ptr< ::apache::thrift::TProcessor > FmuServiceProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { + ::apache::thrift::ReleaseHandler< FmuServiceIfFactory > cleanup(handlerFactory_); + ::apache::thrift::stdcxx::shared_ptr< FmuServiceIf > handler(handlerFactory_->getHandler(connInfo), cleanup); + ::apache::thrift::stdcxx::shared_ptr< ::apache::thrift::TProcessor > processor(new FmuServiceProcessor(handler)); + return processor; +} + +void FmuServiceConcurrentClient::load_from_url(FmuId& _return, const std::string& url) +{ + int32_t seqid = send_load_from_url(url); + recv_load_from_url(_return, seqid); +} + +int32_t FmuServiceConcurrentClient::send_load_from_url(const std::string& url) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("load_from_url", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_load_from_url_pargs args; + args.url = &url; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void FmuServiceConcurrentClient::recv_load_from_url(FmuId& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("load_from_url") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + FmuService_load_from_url_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "load_from_url failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void FmuServiceConcurrentClient::load_from_file(FmuId& _return, const std::string& name, const std::string& data) +{ + int32_t seqid = send_load_from_file(name, data); + recv_load_from_file(_return, seqid); +} + +int32_t FmuServiceConcurrentClient::send_load_from_file(const std::string& name, const std::string& data) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("load_from_file", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_load_from_file_pargs args; + args.name = &name; + args.data = &data; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void FmuServiceConcurrentClient::recv_load_from_file(FmuId& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("load_from_file") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + FmuService_load_from_file_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "load_from_file failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void FmuServiceConcurrentClient::get_model_description(ModelDescription& _return, const FmuId& fmuId) +{ + int32_t seqid = send_get_model_description(fmuId); + recv_get_model_description(_return, seqid); +} + +int32_t FmuServiceConcurrentClient::send_get_model_description(const FmuId& fmuId) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_model_description", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_get_model_description_pargs args; + args.fmuId = &fmuId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void FmuServiceConcurrentClient::recv_get_model_description(ModelDescription& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_model_description") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + FmuService_get_model_description_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.ex) { + sentry.commit(); + throw result.ex; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_model_description failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void FmuServiceConcurrentClient::get_co_simulation_attributes(CoSimulationAttributes& _return, const InstanceId& instanceId) +{ + int32_t seqid = send_get_co_simulation_attributes(instanceId); + recv_get_co_simulation_attributes(_return, seqid); +} + +int32_t FmuServiceConcurrentClient::send_get_co_simulation_attributes(const InstanceId& instanceId) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_co_simulation_attributes", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_get_co_simulation_attributes_pargs args; + args.instanceId = &instanceId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void FmuServiceConcurrentClient::recv_get_co_simulation_attributes(CoSimulationAttributes& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_co_simulation_attributes") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + FmuService_get_co_simulation_attributes_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.ex) { + sentry.commit(); + throw result.ex; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_co_simulation_attributes failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool FmuServiceConcurrentClient::can_create_instance_from_cs(const FmuId& fmuId) +{ + int32_t seqid = send_can_create_instance_from_cs(fmuId); + return recv_can_create_instance_from_cs(seqid); +} + +int32_t FmuServiceConcurrentClient::send_can_create_instance_from_cs(const FmuId& fmuId) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("can_create_instance_from_cs", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_can_create_instance_from_cs_pargs args; + args.fmuId = &fmuId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool FmuServiceConcurrentClient::recv_can_create_instance_from_cs(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("can_create_instance_from_cs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + FmuService_can_create_instance_from_cs_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.ex) { + sentry.commit(); + throw result.ex; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "can_create_instance_from_cs failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool FmuServiceConcurrentClient::can_create_instance_from_me(const FmuId& fmuId) +{ + int32_t seqid = send_can_create_instance_from_me(fmuId); + return recv_can_create_instance_from_me(seqid); +} + +int32_t FmuServiceConcurrentClient::send_can_create_instance_from_me(const FmuId& fmuId) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("can_create_instance_from_me", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_can_create_instance_from_me_pargs args; + args.fmuId = &fmuId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool FmuServiceConcurrentClient::recv_can_create_instance_from_me(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("can_create_instance_from_me") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + FmuService_can_create_instance_from_me_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.ex) { + sentry.commit(); + throw result.ex; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "can_create_instance_from_me failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void FmuServiceConcurrentClient::create_instance_from_cs(InstanceId& _return, const FmuId& fmuId) +{ + int32_t seqid = send_create_instance_from_cs(fmuId); + recv_create_instance_from_cs(_return, seqid); +} + +int32_t FmuServiceConcurrentClient::send_create_instance_from_cs(const FmuId& fmuId) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("create_instance_from_cs", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_create_instance_from_cs_pargs args; + args.fmuId = &fmuId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void FmuServiceConcurrentClient::recv_create_instance_from_cs(InstanceId& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_instance_from_cs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + FmuService_create_instance_from_cs_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.ex1) { + sentry.commit(); + throw result.ex1; + } + if (result.__isset.ex2) { + sentry.commit(); + throw result.ex2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_instance_from_cs failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void FmuServiceConcurrentClient::create_instance_from_me(InstanceId& _return, const FmuId& fmuId, const Solver& solver) +{ + int32_t seqid = send_create_instance_from_me(fmuId, solver); + recv_create_instance_from_me(_return, seqid); +} + +int32_t FmuServiceConcurrentClient::send_create_instance_from_me(const FmuId& fmuId, const Solver& solver) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("create_instance_from_me", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_create_instance_from_me_pargs args; + args.fmuId = &fmuId; + args.solver = &solver; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void FmuServiceConcurrentClient::recv_create_instance_from_me(InstanceId& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_instance_from_me") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + FmuService_create_instance_from_me_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.ex1) { + sentry.commit(); + throw result.ex1; + } + if (result.__isset.ex2) { + sentry.commit(); + throw result.ex2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_instance_from_me failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +Status::type FmuServiceConcurrentClient::setup_experiment(const InstanceId& instanceId, const double start, const double stop, const double tolerance) +{ + int32_t seqid = send_setup_experiment(instanceId, start, stop, tolerance); + return recv_setup_experiment(seqid); +} + +int32_t FmuServiceConcurrentClient::send_setup_experiment(const InstanceId& instanceId, const double start, const double stop, const double tolerance) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("setup_experiment", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_setup_experiment_pargs args; + args.instanceId = &instanceId; + args.start = &start; + args.stop = &stop; + args.tolerance = &tolerance; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +Status::type FmuServiceConcurrentClient::recv_setup_experiment(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("setup_experiment") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + Status::type _return; + FmuService_setup_experiment_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.ex) { + sentry.commit(); + throw result.ex; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "setup_experiment failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +Status::type FmuServiceConcurrentClient::enter_initialization_mode(const InstanceId& instanceId) +{ + int32_t seqid = send_enter_initialization_mode(instanceId); + return recv_enter_initialization_mode(seqid); +} + +int32_t FmuServiceConcurrentClient::send_enter_initialization_mode(const InstanceId& instanceId) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("enter_initialization_mode", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_enter_initialization_mode_pargs args; + args.instanceId = &instanceId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +Status::type FmuServiceConcurrentClient::recv_enter_initialization_mode(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("enter_initialization_mode") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + Status::type _return; + FmuService_enter_initialization_mode_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.ex) { + sentry.commit(); + throw result.ex; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "enter_initialization_mode failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +Status::type FmuServiceConcurrentClient::exit_initialization_mode(const InstanceId& instanceId) +{ + int32_t seqid = send_exit_initialization_mode(instanceId); + return recv_exit_initialization_mode(seqid); +} + +int32_t FmuServiceConcurrentClient::send_exit_initialization_mode(const InstanceId& instanceId) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("exit_initialization_mode", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_exit_initialization_mode_pargs args; + args.instanceId = &instanceId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +Status::type FmuServiceConcurrentClient::recv_exit_initialization_mode(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("exit_initialization_mode") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + Status::type _return; + FmuService_exit_initialization_mode_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.ex) { + sentry.commit(); + throw result.ex; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "exit_initialization_mode failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void FmuServiceConcurrentClient::step(StepResult& _return, const InstanceId& instanceId, const double stepSize) +{ + int32_t seqid = send_step(instanceId, stepSize); + recv_step(_return, seqid); +} + +int32_t FmuServiceConcurrentClient::send_step(const InstanceId& instanceId, const double stepSize) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("step", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_step_pargs args; + args.instanceId = &instanceId; + args.stepSize = &stepSize; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void FmuServiceConcurrentClient::recv_step(StepResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("step") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + FmuService_step_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.ex) { + sentry.commit(); + throw result.ex; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "step failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +Status::type FmuServiceConcurrentClient::reset(const InstanceId& instanceId) +{ + int32_t seqid = send_reset(instanceId); + return recv_reset(seqid); +} + +int32_t FmuServiceConcurrentClient::send_reset(const InstanceId& instanceId) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("reset", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_reset_pargs args; + args.instanceId = &instanceId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +Status::type FmuServiceConcurrentClient::recv_reset(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("reset") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + Status::type _return; + FmuService_reset_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.ex) { + sentry.commit(); + throw result.ex; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "reset failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +Status::type FmuServiceConcurrentClient::terminate(const InstanceId& instanceId) +{ + int32_t seqid = send_terminate(instanceId); + return recv_terminate(seqid); +} + +int32_t FmuServiceConcurrentClient::send_terminate(const InstanceId& instanceId) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("terminate", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_terminate_pargs args; + args.instanceId = &instanceId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +Status::type FmuServiceConcurrentClient::recv_terminate(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("terminate") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + Status::type _return; + FmuService_terminate_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.ex) { + sentry.commit(); + throw result.ex; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "terminate failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void FmuServiceConcurrentClient::read_integer(IntegerRead& _return, const InstanceId& instanceId, const ValueReferences& vr) +{ + int32_t seqid = send_read_integer(instanceId, vr); + recv_read_integer(_return, seqid); +} + +int32_t FmuServiceConcurrentClient::send_read_integer(const InstanceId& instanceId, const ValueReferences& vr) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("read_integer", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_read_integer_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void FmuServiceConcurrentClient::recv_read_integer(IntegerRead& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("read_integer") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + FmuService_read_integer_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.ex1) { + sentry.commit(); + throw result.ex1; + } + if (result.__isset.ex2) { + sentry.commit(); + throw result.ex2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "read_integer failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void FmuServiceConcurrentClient::read_real(RealRead& _return, const InstanceId& instanceId, const ValueReferences& vr) +{ + int32_t seqid = send_read_real(instanceId, vr); + recv_read_real(_return, seqid); +} + +int32_t FmuServiceConcurrentClient::send_read_real(const InstanceId& instanceId, const ValueReferences& vr) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("read_real", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_read_real_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void FmuServiceConcurrentClient::recv_read_real(RealRead& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("read_real") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + FmuService_read_real_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.ex1) { + sentry.commit(); + throw result.ex1; + } + if (result.__isset.ex2) { + sentry.commit(); + throw result.ex2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "read_real failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void FmuServiceConcurrentClient::read_string(StringRead& _return, const InstanceId& instanceId, const ValueReferences& vr) +{ + int32_t seqid = send_read_string(instanceId, vr); + recv_read_string(_return, seqid); +} + +int32_t FmuServiceConcurrentClient::send_read_string(const InstanceId& instanceId, const ValueReferences& vr) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("read_string", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_read_string_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void FmuServiceConcurrentClient::recv_read_string(StringRead& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("read_string") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + FmuService_read_string_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.ex1) { + sentry.commit(); + throw result.ex1; + } + if (result.__isset.ex2) { + sentry.commit(); + throw result.ex2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "read_string failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void FmuServiceConcurrentClient::read_boolean(BooleanRead& _return, const InstanceId& instanceId, const ValueReferences& vr) +{ + int32_t seqid = send_read_boolean(instanceId, vr); + recv_read_boolean(_return, seqid); +} + +int32_t FmuServiceConcurrentClient::send_read_boolean(const InstanceId& instanceId, const ValueReferences& vr) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("read_boolean", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_read_boolean_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void FmuServiceConcurrentClient::recv_read_boolean(BooleanRead& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("read_boolean") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + FmuService_read_boolean_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.ex1) { + sentry.commit(); + throw result.ex1; + } + if (result.__isset.ex2) { + sentry.commit(); + throw result.ex2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "read_boolean failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +Status::type FmuServiceConcurrentClient::write_integer(const InstanceId& instanceId, const ValueReferences& vr, const IntArray& value) +{ + int32_t seqid = send_write_integer(instanceId, vr, value); + return recv_write_integer(seqid); +} + +int32_t FmuServiceConcurrentClient::send_write_integer(const InstanceId& instanceId, const ValueReferences& vr, const IntArray& value) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("write_integer", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_write_integer_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +Status::type FmuServiceConcurrentClient::recv_write_integer(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("write_integer") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + Status::type _return; + FmuService_write_integer_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.ex1) { + sentry.commit(); + throw result.ex1; + } + if (result.__isset.ex2) { + sentry.commit(); + throw result.ex2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "write_integer failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +Status::type FmuServiceConcurrentClient::write_real(const InstanceId& instanceId, const ValueReferences& vr, const RealArray& value) +{ + int32_t seqid = send_write_real(instanceId, vr, value); + return recv_write_real(seqid); +} + +int32_t FmuServiceConcurrentClient::send_write_real(const InstanceId& instanceId, const ValueReferences& vr, const RealArray& value) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("write_real", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_write_real_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +Status::type FmuServiceConcurrentClient::recv_write_real(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("write_real") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + Status::type _return; + FmuService_write_real_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.ex1) { + sentry.commit(); + throw result.ex1; + } + if (result.__isset.ex2) { + sentry.commit(); + throw result.ex2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "write_real failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +Status::type FmuServiceConcurrentClient::write_string(const InstanceId& instanceId, const ValueReferences& vr, const StringArray& value) +{ + int32_t seqid = send_write_string(instanceId, vr, value); + return recv_write_string(seqid); +} + +int32_t FmuServiceConcurrentClient::send_write_string(const InstanceId& instanceId, const ValueReferences& vr, const StringArray& value) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("write_string", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_write_string_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +Status::type FmuServiceConcurrentClient::recv_write_string(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("write_string") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + Status::type _return; + FmuService_write_string_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.ex1) { + sentry.commit(); + throw result.ex1; + } + if (result.__isset.ex2) { + sentry.commit(); + throw result.ex2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "write_string failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +Status::type FmuServiceConcurrentClient::write_boolean(const InstanceId& instanceId, const ValueReferences& vr, const BooleanArray& value) +{ + int32_t seqid = send_write_boolean(instanceId, vr, value); + return recv_write_boolean(seqid); +} + +int32_t FmuServiceConcurrentClient::send_write_boolean(const InstanceId& instanceId, const ValueReferences& vr, const BooleanArray& value) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("write_boolean", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_write_boolean_pargs args; + args.instanceId = &instanceId; + args.vr = &vr; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +Status::type FmuServiceConcurrentClient::recv_write_boolean(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("write_boolean") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + Status::type _return; + FmuService_write_boolean_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.ex1) { + sentry.commit(); + throw result.ex1; + } + if (result.__isset.ex2) { + sentry.commit(); + throw result.ex2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "write_boolean failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void FmuServiceConcurrentClient::get_directional_derivative(DirectionalDerivativeResult& _return, const InstanceId& instanceId, const ValueReferences& vUnknownRef, const ValueReferences& vKnownRef, const std::vector & dvKnownRef) +{ + int32_t seqid = send_get_directional_derivative(instanceId, vUnknownRef, vKnownRef, dvKnownRef); + recv_get_directional_derivative(_return, seqid); +} + +int32_t FmuServiceConcurrentClient::send_get_directional_derivative(const InstanceId& instanceId, const ValueReferences& vUnknownRef, const ValueReferences& vKnownRef, const std::vector & dvKnownRef) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_directional_derivative", ::apache::thrift::protocol::T_CALL, cseqid); + + FmuService_get_directional_derivative_pargs args; + args.instanceId = &instanceId; + args.vUnknownRef = &vUnknownRef; + args.vKnownRef = &vKnownRef; + args.dvKnownRef = &dvKnownRef; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void FmuServiceConcurrentClient::recv_get_directional_derivative(DirectionalDerivativeResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_directional_derivative") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + FmuService_get_directional_derivative_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.ex1) { + sentry.commit(); + throw result.ex1; + } + if (result.__isset.ex2) { + sentry.commit(); + throw result.ex2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_directional_derivative failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +}} // namespace + diff --git a/src/cpp/fmuproxy/fmuproxy_client.cpp b/src/cpp/fmuproxy/fmuproxy_client.cpp new file mode 100644 index 000000000..ac2af018c --- /dev/null +++ b/src/cpp/fmuproxy/fmuproxy_client.cpp @@ -0,0 +1,89 @@ +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +using namespace fmuproxy::thrift; +using namespace apache::thrift::transport; +using namespace apache::thrift::protocol; + +namespace fs = boost::filesystem; + +namespace +{ + +void read_data(std::string const &fileName, std::string &data) +{ + + FILE* file = fopen(fileName.c_str(), "rb"); + if (file == NULL) return; + fseek(file, 0, SEEK_END); + long int size = ftell(file); + fclose(file); + file = fopen(fileName.c_str(), "rb"); +#if defined(__GNUC__) + size_t read __attribute__((unused)) = fread(data.data(), sizeof(unsigned char), size, file); +#else + fread(data.data(), sizeof(unsigned char), size, file); +#endif + data.resize(size); + + fclose(file); +} + +} // namespace + +cse::fmuproxy::fmuproxy_client::fmuproxy_client(const std::string& host, const unsigned int port, const bool concurrent) +{ + std::shared_ptr socket(new TSocket(host, port)); + std::shared_ptr transport(new TFramedTransport(socket)); + std::shared_ptr protocol(new TBinaryProtocol(transport)); + std::shared_ptr<::fmuproxy::thrift::fmu_service_if> client; + if (!concurrent) { + client = std::make_shared(protocol); + } else { + client = std::make_shared(protocol); + } + try { + transport->open(); + } catch (TTransportException&) { + std::string msg = "Failed to connect to remote FMU @ " + host + ":" + std::to_string(port); + CSE_PANIC_M(msg.c_str()); + } + state_ = std::make_shared(client, transport); +} + +cse::fmuproxy::remote_fmu +cse::fmuproxy::fmuproxy_client::from_url(const std::string& url) +{ + FmuId fmuId; + state_->client_->load_from_url(fmuId, url); + return from_guid(fmuId); +} + +cse::fmuproxy::remote_fmu +cse::fmuproxy::fmuproxy_client::from_file(const std::string& file) +{ + + const auto name = fs::path(file).stem().string(); + + std::string data; + read_data(file, data); + + FmuId fmuId; + state_->client_->load_from_file(fmuId, name, data); + return from_guid(fmuId); +} + +cse::fmuproxy::remote_fmu +cse::fmuproxy::fmuproxy_client::from_guid(const std::string& guid) +{ + return cse::fmuproxy::remote_fmu(guid, state_); +} diff --git a/src/cpp/fmuproxy/remote_fmu.cpp b/src/cpp/fmuproxy/remote_fmu.cpp new file mode 100644 index 000000000..ba84288a3 --- /dev/null +++ b/src/cpp/fmuproxy/remote_fmu.cpp @@ -0,0 +1,38 @@ + +#include "cse/fmuproxy/fmuproxy_helper.hpp" +#include +#include +#include + +#include +#include +#include + +using namespace fmuproxy::thrift; +using namespace apache::thrift::transport; +using namespace apache::thrift::protocol; + + +cse::fmuproxy::remote_fmu::remote_fmu( + const FmuId& fmuId, + std::shared_ptr state) + : fmuId_(fmuId) + , state_(std::move(state)) +{ + ::fmuproxy::thrift::ModelDescription md = ModelDescription(); + state_->client_->get_model_description(md, fmuId); + modelDescription_ = convert(md); +} + +std::shared_ptr cse::fmuproxy::remote_fmu::model_description() const +{ + return modelDescription_; +} + +std::shared_ptr cse::fmuproxy::remote_fmu::instantiate_slave() +{ + InstanceId instanceId; + state_->client_->create_instance_from_cs(instanceId, fmuId_); + std::shared_ptr slave(new cse::fmuproxy::remote_slave(instanceId, state_->client_, modelDescription_)); + return slave; +} diff --git a/src/cpp/fmuproxy/remote_slave.cpp b/src/cpp/fmuproxy/remote_slave.cpp new file mode 100644 index 000000000..bb6256f84 --- /dev/null +++ b/src/cpp/fmuproxy/remote_slave.cpp @@ -0,0 +1,185 @@ + +#include +#include +#include + +cse::fmuproxy::remote_slave::remote_slave(const std::string& instanceId, + std::shared_ptr<::fmuproxy::thrift::fmu_service_if> client, + std::shared_ptr modelDescription) + : terminated_(false) + , instanceId_(instanceId) + , client_(client) + , modelDescription_(modelDescription) +{} + +cse::model_description cse::fmuproxy::remote_slave::model_description() const +{ + return *modelDescription_; +} + +void cse::fmuproxy::remote_slave::setup(cse::time_point startTime, std::optional stopTime, + std::optional relativeTolerance) +{ + + startTime_ = startTime; + + double start = to_double_time_point(startTime); + double stop = to_double_time_point(stopTime.value_or(cse::to_time_point(0))); + double tolerance = relativeTolerance.value_or(0); + + ::fmuproxy::thrift::Status::type status; + status = client_->setup_experiment(instanceId_, start, stop, tolerance); + if (status != ::fmuproxy::thrift::Status::OK_STATUS) { + CSE_PANIC(); + } + status = client_->enter_initialization_mode(instanceId_); + if (status != ::fmuproxy::thrift::Status::OK_STATUS) { + CSE_PANIC(); + } +} + +void cse::fmuproxy::remote_slave::start_simulation() +{ + auto status = client_->exit_initialization_mode(instanceId_); + if (status != ::fmuproxy::thrift::Status::OK_STATUS) { + CSE_PANIC(); + } +} + +void cse::fmuproxy::remote_slave::end_simulation() +{ + if (!terminated_) { + auto status = client_->terminate(instanceId_); + if (status != ::fmuproxy::thrift::Status::OK_STATUS) { + CSE_PANIC(); + } + terminated_ = true; + } +} + +cse::step_result cse::fmuproxy::remote_slave::do_step(cse::time_point, cse::duration deltaT) +{ + + double dt = to_double_duration(deltaT, startTime_); + + ::fmuproxy::thrift::StepResult result; + client_->step(result, instanceId_, dt); + if (result.status != ::fmuproxy::thrift::Status::OK_STATUS) { + CSE_PANIC(); + } + return cse::step_result::complete; +} + +void cse::fmuproxy::remote_slave::get_real_variables(gsl::span variables, + gsl::span values) const +{ + CSE_INPUT_CHECK(variables.size() == values.size()); + if (variables.empty()) return; + ::fmuproxy::thrift::RealRead read; + ::fmuproxy::thrift::ValueReferences vr(variables.begin(), variables.end()); + client_->read_real(read, instanceId_, vr); + if (read.status != ::fmuproxy::thrift::Status::OK_STATUS) { + CSE_PANIC(); + } + for (unsigned int i = 0; i < read.value.size(); i++) { + values[i] = read.value[i]; + } +} + +void cse::fmuproxy::remote_slave::get_integer_variables(gsl::span variables, + gsl::span values) const +{ + CSE_INPUT_CHECK(variables.size() == values.size()); + if (variables.empty()) return; + ::fmuproxy::thrift::IntegerRead read; + ::fmuproxy::thrift::ValueReferences vr(variables.begin(), variables.end()); + client_->read_integer(read, instanceId_, vr); + if (read.status != ::fmuproxy::thrift::Status::OK_STATUS) { + CSE_PANIC(); + } + for (unsigned int i = 0; i < read.value.size(); i++) { + values[i] = read.value[i]; + } +} + +void cse::fmuproxy::remote_slave::get_boolean_variables(gsl::span variables, + gsl::span values) const +{ + CSE_INPUT_CHECK(variables.size() == values.size()); + if (variables.empty()) return; + ::fmuproxy::thrift::BooleanRead read; + ::fmuproxy::thrift::ValueReferences vr(variables.begin(), variables.end()); + client_->read_boolean(read, instanceId_, vr); + if (read.status != ::fmuproxy::thrift::Status::OK_STATUS) { + CSE_PANIC(); + } + for (unsigned int i = 0; i < read.value.size(); i++) { + values[i] = read.value[i]; + } +} + +void cse::fmuproxy::remote_slave::get_string_variables(gsl::span variables, + gsl::span values) const +{ + CSE_INPUT_CHECK(variables.size() == values.size()); + if (variables.empty()) return; + ::fmuproxy::thrift::StringRead read; + ::fmuproxy::thrift::ValueReferences vr(variables.begin(), variables.end()); + client_->read_string(read, instanceId_, vr); + for (unsigned int i = 0; i < read.value.size(); i++) { + values[i] = read.value[i]; + } +} + +void cse::fmuproxy::remote_slave::set_real_variables(gsl::span variables, + gsl::span values) +{ + CSE_INPUT_CHECK(variables.size() == values.size()); + if (variables.empty()) return; + ::fmuproxy::thrift::ValueReferences vr(variables.begin(), variables.end()); + auto status = client_->write_real(instanceId_, vr, std::vector(values.begin(), values.end())); + if (status != ::fmuproxy::thrift::Status::OK_STATUS) { + CSE_PANIC(); + } +} + +void cse::fmuproxy::remote_slave::set_integer_variables(gsl::span variables, + gsl::span values) +{ + CSE_INPUT_CHECK(variables.size() == values.size()); + if (variables.empty()) return; + ::fmuproxy::thrift::ValueReferences vr(variables.begin(), variables.end()); + auto status = client_->write_integer(instanceId_, vr, std::vector(values.begin(), values.end())); + if (status != ::fmuproxy::thrift::Status::OK_STATUS) { + CSE_PANIC(); + } +} + +void cse::fmuproxy::remote_slave::set_boolean_variables(gsl::span variables, + gsl::span values) +{ + CSE_INPUT_CHECK(variables.size() == values.size()); + if (variables.empty()) return; + ::fmuproxy::thrift::ValueReferences vr(variables.begin(), variables.end()); + auto status = client_->write_boolean(instanceId_, vr, std::vector(values.begin(), values.end())); + if (status != ::fmuproxy::thrift::Status::OK_STATUS) { + CSE_PANIC(); + } +} + +void cse::fmuproxy::remote_slave::set_string_variables(gsl::span variables, + gsl::span values) +{ + CSE_INPUT_CHECK(variables.size() == values.size()); + if (variables.empty()) return; + ::fmuproxy::thrift::ValueReferences vr(variables.begin(), variables.end()); + auto status = client_->write_string(instanceId_, vr, std::vector(values.begin(), values.end())); + if (status != ::fmuproxy::thrift::Status::OK_STATUS) { + CSE_PANIC(); + } +} + +cse::fmuproxy::remote_slave::~remote_slave() +{ + end_simulation(); +} diff --git a/src/cpp/fmuproxy/service_types.cpp b/src/cpp/fmuproxy/service_types.cpp new file mode 100644 index 000000000..80d62f801 --- /dev/null +++ b/src/cpp/fmuproxy/service_types.cpp @@ -0,0 +1,3512 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include + +#include +#include + +#include + +namespace fmuproxy { namespace thrift { + +int _kStatusValues[] = { + Status::OK_STATUS, + Status::WARNING_STATUS, + Status::DISCARD_STATUS, + Status::ERROR_STATUS, + Status::FATAL_STATUS, + Status::PENDING_STATUS +}; +const char* _kStatusNames[] = { + "OK_STATUS", + "WARNING_STATUS", + "DISCARD_STATUS", + "ERROR_STATUS", + "FATAL_STATUS", + "PENDING_STATUS" +}; +const std::map _Status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kStatusValues, _kStatusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const Status::type& val) { + std::map::const_iterator it = _Status_VALUES_TO_NAMES.find(val); + if (it != _Status_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + + +IntegerAttribute::~IntegerAttribute() throw() { +} + + +void IntegerAttribute::__set_min(const int32_t val) { + this->min = val; +} + +void IntegerAttribute::__set_max(const int32_t val) { + this->max = val; +} + +void IntegerAttribute::__set_start(const int32_t val) { + this->start = val; +} + +void IntegerAttribute::__set_quantity(const std::string& val) { + this->quantity = val; +} +std::ostream& operator<<(std::ostream& out, const IntegerAttribute& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t IntegerAttribute::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->min); + this->__isset.min = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->max); + this->__isset.max = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->start); + this->__isset.start = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->quantity); + this->__isset.quantity = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t IntegerAttribute::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("IntegerAttribute"); + + xfer += oprot->writeFieldBegin("min", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->min); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("max", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->max); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->start); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("quantity", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->quantity); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(IntegerAttribute &a, IntegerAttribute &b) { + using ::std::swap; + swap(a.min, b.min); + swap(a.max, b.max); + swap(a.start, b.start); + swap(a.quantity, b.quantity); + swap(a.__isset, b.__isset); +} + +IntegerAttribute::IntegerAttribute(const IntegerAttribute& other0) { + min = other0.min; + max = other0.max; + start = other0.start; + quantity = other0.quantity; + __isset = other0.__isset; +} +IntegerAttribute& IntegerAttribute::operator=(const IntegerAttribute& other1) { + min = other1.min; + max = other1.max; + start = other1.start; + quantity = other1.quantity; + __isset = other1.__isset; + return *this; +} +void IntegerAttribute::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "IntegerAttribute("; + out << "min=" << to_string(min); + out << ", " << "max=" << to_string(max); + out << ", " << "start=" << to_string(start); + out << ", " << "quantity=" << to_string(quantity); + out << ")"; +} + + +RealAttribute::~RealAttribute() throw() { +} + + +void RealAttribute::__set_min(const double val) { + this->min = val; +} + +void RealAttribute::__set_max(const double val) { + this->max = val; +} + +void RealAttribute::__set_start(const double val) { + this->start = val; +} + +void RealAttribute::__set_quantity(const std::string& val) { + this->quantity = val; +} +std::ostream& operator<<(std::ostream& out, const RealAttribute& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t RealAttribute::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->min); + this->__isset.min = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->max); + this->__isset.max = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->start); + this->__isset.start = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->quantity); + this->__isset.quantity = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t RealAttribute::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("RealAttribute"); + + xfer += oprot->writeFieldBegin("min", ::apache::thrift::protocol::T_DOUBLE, 1); + xfer += oprot->writeDouble(this->min); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("max", ::apache::thrift::protocol::T_DOUBLE, 2); + xfer += oprot->writeDouble(this->max); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_DOUBLE, 3); + xfer += oprot->writeDouble(this->start); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("quantity", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->quantity); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(RealAttribute &a, RealAttribute &b) { + using ::std::swap; + swap(a.min, b.min); + swap(a.max, b.max); + swap(a.start, b.start); + swap(a.quantity, b.quantity); + swap(a.__isset, b.__isset); +} + +RealAttribute::RealAttribute(const RealAttribute& other2) { + min = other2.min; + max = other2.max; + start = other2.start; + quantity = other2.quantity; + __isset = other2.__isset; +} +RealAttribute& RealAttribute::operator=(const RealAttribute& other3) { + min = other3.min; + max = other3.max; + start = other3.start; + quantity = other3.quantity; + __isset = other3.__isset; + return *this; +} +void RealAttribute::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "RealAttribute("; + out << "min=" << to_string(min); + out << ", " << "max=" << to_string(max); + out << ", " << "start=" << to_string(start); + out << ", " << "quantity=" << to_string(quantity); + out << ")"; +} + + +StringAttribute::~StringAttribute() throw() { +} + + +void StringAttribute::__set_start(const std::string& val) { + this->start = val; +} +std::ostream& operator<<(std::ostream& out, const StringAttribute& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t StringAttribute::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->start); + this->__isset.start = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t StringAttribute::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("StringAttribute"); + + xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->start); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(StringAttribute &a, StringAttribute &b) { + using ::std::swap; + swap(a.start, b.start); + swap(a.__isset, b.__isset); +} + +StringAttribute::StringAttribute(const StringAttribute& other4) { + start = other4.start; + __isset = other4.__isset; +} +StringAttribute& StringAttribute::operator=(const StringAttribute& other5) { + start = other5.start; + __isset = other5.__isset; + return *this; +} +void StringAttribute::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "StringAttribute("; + out << "start=" << to_string(start); + out << ")"; +} + + +BooleanAttribute::~BooleanAttribute() throw() { +} + + +void BooleanAttribute::__set_start(const bool val) { + this->start = val; +} +std::ostream& operator<<(std::ostream& out, const BooleanAttribute& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t BooleanAttribute::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->start); + this->__isset.start = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t BooleanAttribute::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("BooleanAttribute"); + + xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_BOOL, 1); + xfer += oprot->writeBool(this->start); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(BooleanAttribute &a, BooleanAttribute &b) { + using ::std::swap; + swap(a.start, b.start); + swap(a.__isset, b.__isset); +} + +BooleanAttribute::BooleanAttribute(const BooleanAttribute& other6) { + start = other6.start; + __isset = other6.__isset; +} +BooleanAttribute& BooleanAttribute::operator=(const BooleanAttribute& other7) { + start = other7.start; + __isset = other7.__isset; + return *this; +} +void BooleanAttribute::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "BooleanAttribute("; + out << "start=" << to_string(start); + out << ")"; +} + + +EnumerationAttribute::~EnumerationAttribute() throw() { +} + + +void EnumerationAttribute::__set_min(const int32_t val) { + this->min = val; +} + +void EnumerationAttribute::__set_max(const int32_t val) { + this->max = val; +} + +void EnumerationAttribute::__set_start(const int32_t val) { + this->start = val; +} + +void EnumerationAttribute::__set_quantity(const std::string& val) { + this->quantity = val; +} +std::ostream& operator<<(std::ostream& out, const EnumerationAttribute& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t EnumerationAttribute::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->min); + this->__isset.min = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->max); + this->__isset.max = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->start); + this->__isset.start = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->quantity); + this->__isset.quantity = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t EnumerationAttribute::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("EnumerationAttribute"); + + xfer += oprot->writeFieldBegin("min", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->min); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("max", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->max); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->start); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("quantity", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->quantity); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(EnumerationAttribute &a, EnumerationAttribute &b) { + using ::std::swap; + swap(a.min, b.min); + swap(a.max, b.max); + swap(a.start, b.start); + swap(a.quantity, b.quantity); + swap(a.__isset, b.__isset); +} + +EnumerationAttribute::EnumerationAttribute(const EnumerationAttribute& other8) { + min = other8.min; + max = other8.max; + start = other8.start; + quantity = other8.quantity; + __isset = other8.__isset; +} +EnumerationAttribute& EnumerationAttribute::operator=(const EnumerationAttribute& other9) { + min = other9.min; + max = other9.max; + start = other9.start; + quantity = other9.quantity; + __isset = other9.__isset; + return *this; +} +void EnumerationAttribute::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "EnumerationAttribute("; + out << "min=" << to_string(min); + out << ", " << "max=" << to_string(max); + out << ", " << "start=" << to_string(start); + out << ", " << "quantity=" << to_string(quantity); + out << ")"; +} + + +ScalarVariableAttribute::~ScalarVariableAttribute() throw() { +} + + +void ScalarVariableAttribute::__set_integer_attribute(const IntegerAttribute& val) { + this->integer_attribute = val; +__isset.integer_attribute = true; +} + +void ScalarVariableAttribute::__set_real_attribute(const RealAttribute& val) { + this->real_attribute = val; +__isset.real_attribute = true; +} + +void ScalarVariableAttribute::__set_string_attribute(const StringAttribute& val) { + this->string_attribute = val; +__isset.string_attribute = true; +} + +void ScalarVariableAttribute::__set_boolean_attribute(const BooleanAttribute& val) { + this->boolean_attribute = val; +__isset.boolean_attribute = true; +} + +void ScalarVariableAttribute::__set_enumeration_attribute(const EnumerationAttribute& val) { + this->enumeration_attribute = val; +__isset.enumeration_attribute = true; +} +std::ostream& operator<<(std::ostream& out, const ScalarVariableAttribute& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t ScalarVariableAttribute::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->integer_attribute.read(iprot); + this->__isset.integer_attribute = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->real_attribute.read(iprot); + this->__isset.real_attribute = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->string_attribute.read(iprot); + this->__isset.string_attribute = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->boolean_attribute.read(iprot); + this->__isset.boolean_attribute = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->enumeration_attribute.read(iprot); + this->__isset.enumeration_attribute = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ScalarVariableAttribute::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ScalarVariableAttribute"); + + if (this->__isset.integer_attribute) { + xfer += oprot->writeFieldBegin("integer_attribute", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->integer_attribute.write(oprot); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.real_attribute) { + xfer += oprot->writeFieldBegin("real_attribute", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->real_attribute.write(oprot); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.string_attribute) { + xfer += oprot->writeFieldBegin("string_attribute", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->string_attribute.write(oprot); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.boolean_attribute) { + xfer += oprot->writeFieldBegin("boolean_attribute", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->boolean_attribute.write(oprot); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.enumeration_attribute) { + xfer += oprot->writeFieldBegin("enumeration_attribute", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->enumeration_attribute.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ScalarVariableAttribute &a, ScalarVariableAttribute &b) { + using ::std::swap; + swap(a.integer_attribute, b.integer_attribute); + swap(a.real_attribute, b.real_attribute); + swap(a.string_attribute, b.string_attribute); + swap(a.boolean_attribute, b.boolean_attribute); + swap(a.enumeration_attribute, b.enumeration_attribute); + swap(a.__isset, b.__isset); +} + +ScalarVariableAttribute::ScalarVariableAttribute(const ScalarVariableAttribute& other10) { + integer_attribute = other10.integer_attribute; + real_attribute = other10.real_attribute; + string_attribute = other10.string_attribute; + boolean_attribute = other10.boolean_attribute; + enumeration_attribute = other10.enumeration_attribute; + __isset = other10.__isset; +} +ScalarVariableAttribute& ScalarVariableAttribute::operator=(const ScalarVariableAttribute& other11) { + integer_attribute = other11.integer_attribute; + real_attribute = other11.real_attribute; + string_attribute = other11.string_attribute; + boolean_attribute = other11.boolean_attribute; + enumeration_attribute = other11.enumeration_attribute; + __isset = other11.__isset; + return *this; +} +void ScalarVariableAttribute::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ScalarVariableAttribute("; + out << "integer_attribute="; (__isset.integer_attribute ? (out << to_string(integer_attribute)) : (out << "")); + out << ", " << "real_attribute="; (__isset.real_attribute ? (out << to_string(real_attribute)) : (out << "")); + out << ", " << "string_attribute="; (__isset.string_attribute ? (out << to_string(string_attribute)) : (out << "")); + out << ", " << "boolean_attribute="; (__isset.boolean_attribute ? (out << to_string(boolean_attribute)) : (out << "")); + out << ", " << "enumeration_attribute="; (__isset.enumeration_attribute ? (out << to_string(enumeration_attribute)) : (out << "")); + out << ")"; +} + + +ScalarVariable::~ScalarVariable() throw() { +} + + +void ScalarVariable::__set_name(const std::string& val) { + this->name = val; +} + +void ScalarVariable::__set_value_reference(const ValueReference val) { + this->value_reference = val; +} + +void ScalarVariable::__set_description(const std::string& val) { + this->description = val; +__isset.description = true; +} + +void ScalarVariable::__set_initial(const std::string& val) { + this->initial = val; +__isset.initial = true; +} + +void ScalarVariable::__set_causality(const std::string& val) { + this->causality = val; +__isset.causality = true; +} + +void ScalarVariable::__set_variability(const std::string& val) { + this->variability = val; +__isset.variability = true; +} + +void ScalarVariable::__set_attribute(const ScalarVariableAttribute& val) { + this->attribute = val; +} +std::ostream& operator<<(std::ostream& out, const ScalarVariable& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t ScalarVariable::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->value_reference); + this->__isset.value_reference = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->description); + this->__isset.description = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->initial); + this->__isset.initial = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->causality); + this->__isset.causality = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->variability); + this->__isset.variability = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->attribute.read(iprot); + this->__isset.attribute = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ScalarVariable::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ScalarVariable"); + + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value_reference", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->value_reference); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.description) { + xfer += oprot->writeFieldBegin("description", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->description); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.initial) { + xfer += oprot->writeFieldBegin("initial", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->initial); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.causality) { + xfer += oprot->writeFieldBegin("causality", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->causality); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.variability) { + xfer += oprot->writeFieldBegin("variability", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->variability); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("attribute", ::apache::thrift::protocol::T_STRUCT, 7); + xfer += this->attribute.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ScalarVariable &a, ScalarVariable &b) { + using ::std::swap; + swap(a.name, b.name); + swap(a.value_reference, b.value_reference); + swap(a.description, b.description); + swap(a.initial, b.initial); + swap(a.causality, b.causality); + swap(a.variability, b.variability); + swap(a.attribute, b.attribute); + swap(a.__isset, b.__isset); +} + +ScalarVariable::ScalarVariable(const ScalarVariable& other12) { + name = other12.name; + value_reference = other12.value_reference; + description = other12.description; + initial = other12.initial; + causality = other12.causality; + variability = other12.variability; + attribute = other12.attribute; + __isset = other12.__isset; +} +ScalarVariable& ScalarVariable::operator=(const ScalarVariable& other13) { + name = other13.name; + value_reference = other13.value_reference; + description = other13.description; + initial = other13.initial; + causality = other13.causality; + variability = other13.variability; + attribute = other13.attribute; + __isset = other13.__isset; + return *this; +} +void ScalarVariable::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ScalarVariable("; + out << "name=" << to_string(name); + out << ", " << "value_reference=" << to_string(value_reference); + out << ", " << "description="; (__isset.description ? (out << to_string(description)) : (out << "")); + out << ", " << "initial="; (__isset.initial ? (out << to_string(initial)) : (out << "")); + out << ", " << "causality="; (__isset.causality ? (out << to_string(causality)) : (out << "")); + out << ", " << "variability="; (__isset.variability ? (out << to_string(variability)) : (out << "")); + out << ", " << "attribute=" << to_string(attribute); + out << ")"; +} + + +Unknown::~Unknown() throw() { +} + + +void Unknown::__set_index(const int32_t val) { + this->index = val; +} + +void Unknown::__set_dependencies(const std::vector & val) { + this->dependencies = val; +} + +void Unknown::__set_dependencies_kind(const std::vector & val) { + this->dependencies_kind = val; +} +std::ostream& operator<<(std::ostream& out, const Unknown& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t Unknown::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->index); + this->__isset.index = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->dependencies.clear(); + uint32_t _size14; + ::apache::thrift::protocol::TType _etype17; + xfer += iprot->readListBegin(_etype17, _size14); + this->dependencies.resize(_size14); + uint32_t _i18; + for (_i18 = 0; _i18 < _size14; ++_i18) + { + xfer += iprot->readI32(this->dependencies[_i18]); + } + xfer += iprot->readListEnd(); + } + this->__isset.dependencies = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->dependencies_kind.clear(); + uint32_t _size19; + ::apache::thrift::protocol::TType _etype22; + xfer += iprot->readListBegin(_etype22, _size19); + this->dependencies_kind.resize(_size19); + uint32_t _i23; + for (_i23 = 0; _i23 < _size19; ++_i23) + { + xfer += iprot->readString(this->dependencies_kind[_i23]); + } + xfer += iprot->readListEnd(); + } + this->__isset.dependencies_kind = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Unknown::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("Unknown"); + + xfer += oprot->writeFieldBegin("index", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->index); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dependencies", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->dependencies.size())); + std::vector ::const_iterator _iter24; + for (_iter24 = this->dependencies.begin(); _iter24 != this->dependencies.end(); ++_iter24) + { + xfer += oprot->writeI32((*_iter24)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dependencies_kind", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->dependencies_kind.size())); + std::vector ::const_iterator _iter25; + for (_iter25 = this->dependencies_kind.begin(); _iter25 != this->dependencies_kind.end(); ++_iter25) + { + xfer += oprot->writeString((*_iter25)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(Unknown &a, Unknown &b) { + using ::std::swap; + swap(a.index, b.index); + swap(a.dependencies, b.dependencies); + swap(a.dependencies_kind, b.dependencies_kind); + swap(a.__isset, b.__isset); +} + +Unknown::Unknown(const Unknown& other26) { + index = other26.index; + dependencies = other26.dependencies; + dependencies_kind = other26.dependencies_kind; + __isset = other26.__isset; +} +Unknown& Unknown::operator=(const Unknown& other27) { + index = other27.index; + dependencies = other27.dependencies; + dependencies_kind = other27.dependencies_kind; + __isset = other27.__isset; + return *this; +} +void Unknown::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Unknown("; + out << "index=" << to_string(index); + out << ", " << "dependencies=" << to_string(dependencies); + out << ", " << "dependencies_kind=" << to_string(dependencies_kind); + out << ")"; +} + + +ModelStructure::~ModelStructure() throw() { +} + + +void ModelStructure::__set_outputs(const std::vector & val) { + this->outputs = val; +} + +void ModelStructure::__set_derivatives(const std::vector & val) { + this->derivatives = val; +} + +void ModelStructure::__set_initial_unknowns(const std::vector & val) { + this->initial_unknowns = val; +} +std::ostream& operator<<(std::ostream& out, const ModelStructure& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t ModelStructure::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->outputs.clear(); + uint32_t _size28; + ::apache::thrift::protocol::TType _etype31; + xfer += iprot->readListBegin(_etype31, _size28); + this->outputs.resize(_size28); + uint32_t _i32; + for (_i32 = 0; _i32 < _size28; ++_i32) + { + xfer += this->outputs[_i32].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.outputs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->derivatives.clear(); + uint32_t _size33; + ::apache::thrift::protocol::TType _etype36; + xfer += iprot->readListBegin(_etype36, _size33); + this->derivatives.resize(_size33); + uint32_t _i37; + for (_i37 = 0; _i37 < _size33; ++_i37) + { + xfer += this->derivatives[_i37].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.derivatives = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->initial_unknowns.clear(); + uint32_t _size38; + ::apache::thrift::protocol::TType _etype41; + xfer += iprot->readListBegin(_etype41, _size38); + this->initial_unknowns.resize(_size38); + uint32_t _i42; + for (_i42 = 0; _i42 < _size38; ++_i42) + { + xfer += this->initial_unknowns[_i42].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.initial_unknowns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ModelStructure::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ModelStructure"); + + xfer += oprot->writeFieldBegin("outputs", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->outputs.size())); + std::vector ::const_iterator _iter43; + for (_iter43 = this->outputs.begin(); _iter43 != this->outputs.end(); ++_iter43) + { + xfer += (*_iter43).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("derivatives", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->derivatives.size())); + std::vector ::const_iterator _iter44; + for (_iter44 = this->derivatives.begin(); _iter44 != this->derivatives.end(); ++_iter44) + { + xfer += (*_iter44).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("initial_unknowns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->initial_unknowns.size())); + std::vector ::const_iterator _iter45; + for (_iter45 = this->initial_unknowns.begin(); _iter45 != this->initial_unknowns.end(); ++_iter45) + { + xfer += (*_iter45).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ModelStructure &a, ModelStructure &b) { + using ::std::swap; + swap(a.outputs, b.outputs); + swap(a.derivatives, b.derivatives); + swap(a.initial_unknowns, b.initial_unknowns); + swap(a.__isset, b.__isset); +} + +ModelStructure::ModelStructure(const ModelStructure& other46) { + outputs = other46.outputs; + derivatives = other46.derivatives; + initial_unknowns = other46.initial_unknowns; + __isset = other46.__isset; +} +ModelStructure& ModelStructure::operator=(const ModelStructure& other47) { + outputs = other47.outputs; + derivatives = other47.derivatives; + initial_unknowns = other47.initial_unknowns; + __isset = other47.__isset; + return *this; +} +void ModelStructure::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ModelStructure("; + out << "outputs=" << to_string(outputs); + out << ", " << "derivatives=" << to_string(derivatives); + out << ", " << "initial_unknowns=" << to_string(initial_unknowns); + out << ")"; +} + + +DefaultExperiment::~DefaultExperiment() throw() { +} + + +void DefaultExperiment::__set_startTime(const double val) { + this->startTime = val; +} + +void DefaultExperiment::__set_stopTime(const double val) { + this->stopTime = val; +} + +void DefaultExperiment::__set_tolerance(const double val) { + this->tolerance = val; +} + +void DefaultExperiment::__set_stepSize(const double val) { + this->stepSize = val; +} +std::ostream& operator<<(std::ostream& out, const DefaultExperiment& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t DefaultExperiment::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->startTime); + this->__isset.startTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->stopTime); + this->__isset.stopTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->tolerance); + this->__isset.tolerance = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->stepSize); + this->__isset.stepSize = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t DefaultExperiment::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("DefaultExperiment"); + + xfer += oprot->writeFieldBegin("startTime", ::apache::thrift::protocol::T_DOUBLE, 1); + xfer += oprot->writeDouble(this->startTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("stopTime", ::apache::thrift::protocol::T_DOUBLE, 2); + xfer += oprot->writeDouble(this->stopTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tolerance", ::apache::thrift::protocol::T_DOUBLE, 3); + xfer += oprot->writeDouble(this->tolerance); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("stepSize", ::apache::thrift::protocol::T_DOUBLE, 4); + xfer += oprot->writeDouble(this->stepSize); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(DefaultExperiment &a, DefaultExperiment &b) { + using ::std::swap; + swap(a.startTime, b.startTime); + swap(a.stopTime, b.stopTime); + swap(a.tolerance, b.tolerance); + swap(a.stepSize, b.stepSize); + swap(a.__isset, b.__isset); +} + +DefaultExperiment::DefaultExperiment(const DefaultExperiment& other48) { + startTime = other48.startTime; + stopTime = other48.stopTime; + tolerance = other48.tolerance; + stepSize = other48.stepSize; + __isset = other48.__isset; +} +DefaultExperiment& DefaultExperiment::operator=(const DefaultExperiment& other49) { + startTime = other49.startTime; + stopTime = other49.stopTime; + tolerance = other49.tolerance; + stepSize = other49.stepSize; + __isset = other49.__isset; + return *this; +} +void DefaultExperiment::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "DefaultExperiment("; + out << "startTime=" << to_string(startTime); + out << ", " << "stopTime=" << to_string(stopTime); + out << ", " << "tolerance=" << to_string(tolerance); + out << ", " << "stepSize=" << to_string(stepSize); + out << ")"; +} + + +StepResult::~StepResult() throw() { +} + + +void StepResult::__set_status(const Status::type val) { + this->status = val; +} + +void StepResult::__set_simulation_time(const double val) { + this->simulation_time = val; +} +std::ostream& operator<<(std::ostream& out, const StepResult& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t StepResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast50; + xfer += iprot->readI32(ecast50); + this->status = (Status::type)ecast50; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->simulation_time); + this->__isset.simulation_time = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t StepResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("StepResult"); + + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("simulation_time", ::apache::thrift::protocol::T_DOUBLE, 2); + xfer += oprot->writeDouble(this->simulation_time); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(StepResult &a, StepResult &b) { + using ::std::swap; + swap(a.status, b.status); + swap(a.simulation_time, b.simulation_time); + swap(a.__isset, b.__isset); +} + +StepResult::StepResult(const StepResult& other51) { + status = other51.status; + simulation_time = other51.simulation_time; + __isset = other51.__isset; +} +StepResult& StepResult::operator=(const StepResult& other52) { + status = other52.status; + simulation_time = other52.simulation_time; + __isset = other52.__isset; + return *this; +} +void StepResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "StepResult("; + out << "status=" << to_string(status); + out << ", " << "simulation_time=" << to_string(simulation_time); + out << ")"; +} + + +IntegerRead::~IntegerRead() throw() { +} + + +void IntegerRead::__set_value(const std::vector & val) { + this->value = val; +} + +void IntegerRead::__set_status(const Status::type val) { + this->status = val; +} +std::ostream& operator<<(std::ostream& out, const IntegerRead& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t IntegerRead::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->value.clear(); + uint32_t _size53; + ::apache::thrift::protocol::TType _etype56; + xfer += iprot->readListBegin(_etype56, _size53); + this->value.resize(_size53); + uint32_t _i57; + for (_i57 = 0; _i57 < _size53; ++_i57) + { + xfer += iprot->readI32(this->value[_i57]); + } + xfer += iprot->readListEnd(); + } + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast58; + xfer += iprot->readI32(ecast58); + this->status = (Status::type)ecast58; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t IntegerRead::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("IntegerRead"); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->value.size())); + std::vector ::const_iterator _iter59; + for (_iter59 = this->value.begin(); _iter59 != this->value.end(); ++_iter59) + { + xfer += oprot->writeI32((*_iter59)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(IntegerRead &a, IntegerRead &b) { + using ::std::swap; + swap(a.value, b.value); + swap(a.status, b.status); + swap(a.__isset, b.__isset); +} + +IntegerRead::IntegerRead(const IntegerRead& other60) { + value = other60.value; + status = other60.status; + __isset = other60.__isset; +} +IntegerRead& IntegerRead::operator=(const IntegerRead& other61) { + value = other61.value; + status = other61.status; + __isset = other61.__isset; + return *this; +} +void IntegerRead::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "IntegerRead("; + out << "value=" << to_string(value); + out << ", " << "status=" << to_string(status); + out << ")"; +} + + +RealRead::~RealRead() throw() { +} + + +void RealRead::__set_value(const std::vector & val) { + this->value = val; +} + +void RealRead::__set_status(const Status::type val) { + this->status = val; +} +std::ostream& operator<<(std::ostream& out, const RealRead& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t RealRead::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->value.clear(); + uint32_t _size62; + ::apache::thrift::protocol::TType _etype65; + xfer += iprot->readListBegin(_etype65, _size62); + this->value.resize(_size62); + uint32_t _i66; + for (_i66 = 0; _i66 < _size62; ++_i66) + { + xfer += iprot->readDouble(this->value[_i66]); + } + xfer += iprot->readListEnd(); + } + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast67; + xfer += iprot->readI32(ecast67); + this->status = (Status::type)ecast67; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t RealRead::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("RealRead"); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_DOUBLE, static_cast(this->value.size())); + std::vector ::const_iterator _iter68; + for (_iter68 = this->value.begin(); _iter68 != this->value.end(); ++_iter68) + { + xfer += oprot->writeDouble((*_iter68)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(RealRead &a, RealRead &b) { + using ::std::swap; + swap(a.value, b.value); + swap(a.status, b.status); + swap(a.__isset, b.__isset); +} + +RealRead::RealRead(const RealRead& other69) { + value = other69.value; + status = other69.status; + __isset = other69.__isset; +} +RealRead& RealRead::operator=(const RealRead& other70) { + value = other70.value; + status = other70.status; + __isset = other70.__isset; + return *this; +} +void RealRead::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "RealRead("; + out << "value=" << to_string(value); + out << ", " << "status=" << to_string(status); + out << ")"; +} + + +StringRead::~StringRead() throw() { +} + + +void StringRead::__set_value(const std::vector & val) { + this->value = val; +} + +void StringRead::__set_status(const Status::type val) { + this->status = val; +} +std::ostream& operator<<(std::ostream& out, const StringRead& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t StringRead::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->value.clear(); + uint32_t _size71; + ::apache::thrift::protocol::TType _etype74; + xfer += iprot->readListBegin(_etype74, _size71); + this->value.resize(_size71); + uint32_t _i75; + for (_i75 = 0; _i75 < _size71; ++_i75) + { + xfer += iprot->readString(this->value[_i75]); + } + xfer += iprot->readListEnd(); + } + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast76; + xfer += iprot->readI32(ecast76); + this->status = (Status::type)ecast76; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t StringRead::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("StringRead"); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->value.size())); + std::vector ::const_iterator _iter77; + for (_iter77 = this->value.begin(); _iter77 != this->value.end(); ++_iter77) + { + xfer += oprot->writeString((*_iter77)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(StringRead &a, StringRead &b) { + using ::std::swap; + swap(a.value, b.value); + swap(a.status, b.status); + swap(a.__isset, b.__isset); +} + +StringRead::StringRead(const StringRead& other78) { + value = other78.value; + status = other78.status; + __isset = other78.__isset; +} +StringRead& StringRead::operator=(const StringRead& other79) { + value = other79.value; + status = other79.status; + __isset = other79.__isset; + return *this; +} +void StringRead::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "StringRead("; + out << "value=" << to_string(value); + out << ", " << "status=" << to_string(status); + out << ")"; +} + + +BooleanRead::~BooleanRead() throw() { +} + + +void BooleanRead::__set_value(const std::vector & val) { + this->value = val; +} + +void BooleanRead::__set_status(const Status::type val) { + this->status = val; +} +std::ostream& operator<<(std::ostream& out, const BooleanRead& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t BooleanRead::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->value.clear(); + uint32_t _size80; + ::apache::thrift::protocol::TType _etype83; + xfer += iprot->readListBegin(_etype83, _size80); + this->value.resize(_size80); + uint32_t _i84; + for (_i84 = 0; _i84 < _size80; ++_i84) + { + xfer += iprot->readBool(this->value[_i84]); + } + xfer += iprot->readListEnd(); + } + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast85; + xfer += iprot->readI32(ecast85); + this->status = (Status::type)ecast85; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t BooleanRead::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("BooleanRead"); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_BOOL, static_cast(this->value.size())); + std::vector ::const_iterator _iter86; + for (_iter86 = this->value.begin(); _iter86 != this->value.end(); ++_iter86) + { + xfer += oprot->writeBool((*_iter86)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(BooleanRead &a, BooleanRead &b) { + using ::std::swap; + swap(a.value, b.value); + swap(a.status, b.status); + swap(a.__isset, b.__isset); +} + +BooleanRead::BooleanRead(const BooleanRead& other87) { + value = other87.value; + status = other87.status; + __isset = other87.__isset; +} +BooleanRead& BooleanRead::operator=(const BooleanRead& other88) { + value = other88.value; + status = other88.status; + __isset = other88.__isset; + return *this; +} +void BooleanRead::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "BooleanRead("; + out << "value=" << to_string(value); + out << ", " << "status=" << to_string(status); + out << ")"; +} + + +Solver::~Solver() throw() { +} + + +void Solver::__set_name(const std::string& val) { + this->name = val; +} + +void Solver::__set_settings(const std::string& val) { + this->settings = val; +} +std::ostream& operator<<(std::ostream& out, const Solver& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t Solver::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->settings); + this->__isset.settings = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Solver::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("Solver"); + + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("settings", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->settings); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(Solver &a, Solver &b) { + using ::std::swap; + swap(a.name, b.name); + swap(a.settings, b.settings); + swap(a.__isset, b.__isset); +} + +Solver::Solver(const Solver& other89) { + name = other89.name; + settings = other89.settings; + __isset = other89.__isset; +} +Solver& Solver::operator=(const Solver& other90) { + name = other90.name; + settings = other90.settings; + __isset = other90.__isset; + return *this; +} +void Solver::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Solver("; + out << "name=" << to_string(name); + out << ", " << "settings=" << to_string(settings); + out << ")"; +} + + +ModelDescription::~ModelDescription() throw() { +} + + +void ModelDescription::__set_guid(const std::string& val) { + this->guid = val; +} + +void ModelDescription::__set_fmi_version(const std::string& val) { + this->fmi_version = val; +} + +void ModelDescription::__set_modelName(const std::string& val) { + this->modelName = val; +} + +void ModelDescription::__set_license(const std::string& val) { + this->license = val; +__isset.license = true; +} + +void ModelDescription::__set_copyright(const std::string& val) { + this->copyright = val; +__isset.copyright = true; +} + +void ModelDescription::__set_author(const std::string& val) { + this->author = val; +__isset.author = true; +} + +void ModelDescription::__set_version(const std::string& val) { + this->version = val; +__isset.version = true; +} + +void ModelDescription::__set_description(const std::string& val) { + this->description = val; +__isset.description = true; +} + +void ModelDescription::__set_generation_tool(const std::string& val) { + this->generation_tool = val; +__isset.generation_tool = true; +} + +void ModelDescription::__set_generation_date_and_time(const std::string& val) { + this->generation_date_and_time = val; +__isset.generation_date_and_time = true; +} + +void ModelDescription::__set_default_experiment(const DefaultExperiment& val) { + this->default_experiment = val; +__isset.default_experiment = true; +} + +void ModelDescription::__set_variable_naming_convention(const std::string& val) { + this->variable_naming_convention = val; +__isset.variable_naming_convention = true; +} + +void ModelDescription::__set_model_variables(const ModelVariables& val) { + this->model_variables = val; +} + +void ModelDescription::__set_model_structure(const ModelStructure& val) { + this->model_structure = val; +} +std::ostream& operator<<(std::ostream& out, const ModelDescription& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t ModelDescription::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->guid); + this->__isset.guid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->fmi_version); + this->__isset.fmi_version = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->modelName); + this->__isset.modelName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->license); + this->__isset.license = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->copyright); + this->__isset.copyright = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->author); + this->__isset.author = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->version); + this->__isset.version = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->description); + this->__isset.description = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->generation_tool); + this->__isset.generation_tool = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->generation_date_and_time); + this->__isset.generation_date_and_time = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->default_experiment.read(iprot); + this->__isset.default_experiment = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->variable_naming_convention); + this->__isset.variable_naming_convention = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 13: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->model_variables.clear(); + uint32_t _size91; + ::apache::thrift::protocol::TType _etype94; + xfer += iprot->readListBegin(_etype94, _size91); + this->model_variables.resize(_size91); + uint32_t _i95; + for (_i95 = 0; _i95 < _size91; ++_i95) + { + xfer += this->model_variables[_i95].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.model_variables = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 14: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->model_structure.read(iprot); + this->__isset.model_structure = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ModelDescription::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ModelDescription"); + + xfer += oprot->writeFieldBegin("guid", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->guid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("fmi_version", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->fmi_version); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("modelName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->modelName); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.license) { + xfer += oprot->writeFieldBegin("license", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->license); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.copyright) { + xfer += oprot->writeFieldBegin("copyright", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->copyright); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.author) { + xfer += oprot->writeFieldBegin("author", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->author); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.version) { + xfer += oprot->writeFieldBegin("version", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString(this->version); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.description) { + xfer += oprot->writeFieldBegin("description", ::apache::thrift::protocol::T_STRING, 8); + xfer += oprot->writeString(this->description); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.generation_tool) { + xfer += oprot->writeFieldBegin("generation_tool", ::apache::thrift::protocol::T_STRING, 9); + xfer += oprot->writeString(this->generation_tool); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.generation_date_and_time) { + xfer += oprot->writeFieldBegin("generation_date_and_time", ::apache::thrift::protocol::T_STRING, 10); + xfer += oprot->writeString(this->generation_date_and_time); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.default_experiment) { + xfer += oprot->writeFieldBegin("default_experiment", ::apache::thrift::protocol::T_STRUCT, 11); + xfer += this->default_experiment.write(oprot); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.variable_naming_convention) { + xfer += oprot->writeFieldBegin("variable_naming_convention", ::apache::thrift::protocol::T_STRING, 12); + xfer += oprot->writeString(this->variable_naming_convention); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("model_variables", ::apache::thrift::protocol::T_LIST, 13); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->model_variables.size())); + std::vector ::const_iterator _iter96; + for (_iter96 = this->model_variables.begin(); _iter96 != this->model_variables.end(); ++_iter96) + { + xfer += (*_iter96).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("model_structure", ::apache::thrift::protocol::T_STRUCT, 14); + xfer += this->model_structure.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ModelDescription &a, ModelDescription &b) { + using ::std::swap; + swap(a.guid, b.guid); + swap(a.fmi_version, b.fmi_version); + swap(a.modelName, b.modelName); + swap(a.license, b.license); + swap(a.copyright, b.copyright); + swap(a.author, b.author); + swap(a.version, b.version); + swap(a.description, b.description); + swap(a.generation_tool, b.generation_tool); + swap(a.generation_date_and_time, b.generation_date_and_time); + swap(a.default_experiment, b.default_experiment); + swap(a.variable_naming_convention, b.variable_naming_convention); + swap(a.model_variables, b.model_variables); + swap(a.model_structure, b.model_structure); + swap(a.__isset, b.__isset); +} + +ModelDescription::ModelDescription(const ModelDescription& other97) { + guid = other97.guid; + fmi_version = other97.fmi_version; + modelName = other97.modelName; + license = other97.license; + copyright = other97.copyright; + author = other97.author; + version = other97.version; + description = other97.description; + generation_tool = other97.generation_tool; + generation_date_and_time = other97.generation_date_and_time; + default_experiment = other97.default_experiment; + variable_naming_convention = other97.variable_naming_convention; + model_variables = other97.model_variables; + model_structure = other97.model_structure; + __isset = other97.__isset; +} +ModelDescription& ModelDescription::operator=(const ModelDescription& other98) { + guid = other98.guid; + fmi_version = other98.fmi_version; + modelName = other98.modelName; + license = other98.license; + copyright = other98.copyright; + author = other98.author; + version = other98.version; + description = other98.description; + generation_tool = other98.generation_tool; + generation_date_and_time = other98.generation_date_and_time; + default_experiment = other98.default_experiment; + variable_naming_convention = other98.variable_naming_convention; + model_variables = other98.model_variables; + model_structure = other98.model_structure; + __isset = other98.__isset; + return *this; +} +void ModelDescription::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ModelDescription("; + out << "guid=" << to_string(guid); + out << ", " << "fmi_version=" << to_string(fmi_version); + out << ", " << "modelName=" << to_string(modelName); + out << ", " << "license="; (__isset.license ? (out << to_string(license)) : (out << "")); + out << ", " << "copyright="; (__isset.copyright ? (out << to_string(copyright)) : (out << "")); + out << ", " << "author="; (__isset.author ? (out << to_string(author)) : (out << "")); + out << ", " << "version="; (__isset.version ? (out << to_string(version)) : (out << "")); + out << ", " << "description="; (__isset.description ? (out << to_string(description)) : (out << "")); + out << ", " << "generation_tool="; (__isset.generation_tool ? (out << to_string(generation_tool)) : (out << "")); + out << ", " << "generation_date_and_time="; (__isset.generation_date_and_time ? (out << to_string(generation_date_and_time)) : (out << "")); + out << ", " << "default_experiment="; (__isset.default_experiment ? (out << to_string(default_experiment)) : (out << "")); + out << ", " << "variable_naming_convention="; (__isset.variable_naming_convention ? (out << to_string(variable_naming_convention)) : (out << "")); + out << ", " << "model_variables=" << to_string(model_variables); + out << ", " << "model_structure=" << to_string(model_structure); + out << ")"; +} + + +CoSimulationAttributes::~CoSimulationAttributes() throw() { +} + + +void CoSimulationAttributes::__set_model_identifier(const std::string& val) { + this->model_identifier = val; +} + +void CoSimulationAttributes::__set_can_get_and_set_fmu_state(const bool val) { + this->can_get_and_set_fmu_state = val; +} + +void CoSimulationAttributes::__set_can_serialize_fmu_state(const bool val) { + this->can_serialize_fmu_state = val; +} + +void CoSimulationAttributes::__set_provides_directional_derivative(const bool val) { + this->provides_directional_derivative = val; +} + +void CoSimulationAttributes::__set_can_handle_variable_communication_step_size(const bool val) { + this->can_handle_variable_communication_step_size = val; +} + +void CoSimulationAttributes::__set_can_interpolate_inputs(const bool val) { + this->can_interpolate_inputs = val; +} + +void CoSimulationAttributes::__set_max_output_derivative_order(const int32_t val) { + this->max_output_derivative_order = val; +} +std::ostream& operator<<(std::ostream& out, const CoSimulationAttributes& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t CoSimulationAttributes::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->model_identifier); + this->__isset.model_identifier = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->can_get_and_set_fmu_state); + this->__isset.can_get_and_set_fmu_state = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->can_serialize_fmu_state); + this->__isset.can_serialize_fmu_state = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->provides_directional_derivative); + this->__isset.provides_directional_derivative = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->can_handle_variable_communication_step_size); + this->__isset.can_handle_variable_communication_step_size = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->can_interpolate_inputs); + this->__isset.can_interpolate_inputs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->max_output_derivative_order); + this->__isset.max_output_derivative_order = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t CoSimulationAttributes::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("CoSimulationAttributes"); + + xfer += oprot->writeFieldBegin("model_identifier", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->model_identifier); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("can_get_and_set_fmu_state", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->can_get_and_set_fmu_state); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("can_serialize_fmu_state", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->can_serialize_fmu_state); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("provides_directional_derivative", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->provides_directional_derivative); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("can_handle_variable_communication_step_size", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool(this->can_handle_variable_communication_step_size); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("can_interpolate_inputs", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->can_interpolate_inputs); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("max_output_derivative_order", ::apache::thrift::protocol::T_I32, 7); + xfer += oprot->writeI32(this->max_output_derivative_order); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(CoSimulationAttributes &a, CoSimulationAttributes &b) { + using ::std::swap; + swap(a.model_identifier, b.model_identifier); + swap(a.can_get_and_set_fmu_state, b.can_get_and_set_fmu_state); + swap(a.can_serialize_fmu_state, b.can_serialize_fmu_state); + swap(a.provides_directional_derivative, b.provides_directional_derivative); + swap(a.can_handle_variable_communication_step_size, b.can_handle_variable_communication_step_size); + swap(a.can_interpolate_inputs, b.can_interpolate_inputs); + swap(a.max_output_derivative_order, b.max_output_derivative_order); + swap(a.__isset, b.__isset); +} + +CoSimulationAttributes::CoSimulationAttributes(const CoSimulationAttributes& other99) { + model_identifier = other99.model_identifier; + can_get_and_set_fmu_state = other99.can_get_and_set_fmu_state; + can_serialize_fmu_state = other99.can_serialize_fmu_state; + provides_directional_derivative = other99.provides_directional_derivative; + can_handle_variable_communication_step_size = other99.can_handle_variable_communication_step_size; + can_interpolate_inputs = other99.can_interpolate_inputs; + max_output_derivative_order = other99.max_output_derivative_order; + __isset = other99.__isset; +} +CoSimulationAttributes& CoSimulationAttributes::operator=(const CoSimulationAttributes& other100) { + model_identifier = other100.model_identifier; + can_get_and_set_fmu_state = other100.can_get_and_set_fmu_state; + can_serialize_fmu_state = other100.can_serialize_fmu_state; + provides_directional_derivative = other100.provides_directional_derivative; + can_handle_variable_communication_step_size = other100.can_handle_variable_communication_step_size; + can_interpolate_inputs = other100.can_interpolate_inputs; + max_output_derivative_order = other100.max_output_derivative_order; + __isset = other100.__isset; + return *this; +} +void CoSimulationAttributes::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "CoSimulationAttributes("; + out << "model_identifier=" << to_string(model_identifier); + out << ", " << "can_get_and_set_fmu_state=" << to_string(can_get_and_set_fmu_state); + out << ", " << "can_serialize_fmu_state=" << to_string(can_serialize_fmu_state); + out << ", " << "provides_directional_derivative=" << to_string(provides_directional_derivative); + out << ", " << "can_handle_variable_communication_step_size=" << to_string(can_handle_variable_communication_step_size); + out << ", " << "can_interpolate_inputs=" << to_string(can_interpolate_inputs); + out << ", " << "max_output_derivative_order=" << to_string(max_output_derivative_order); + out << ")"; +} + + +NoSuchFmuException::~NoSuchFmuException() throw() { +} + + +void NoSuchFmuException::__set_message(const std::string& val) { + this->message = val; +} +std::ostream& operator<<(std::ostream& out, const NoSuchFmuException& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t NoSuchFmuException::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t NoSuchFmuException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("NoSuchFmuException"); + + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->message); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(NoSuchFmuException &a, NoSuchFmuException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + +NoSuchFmuException::NoSuchFmuException(const NoSuchFmuException& other101) : TException() { + message = other101.message; + __isset = other101.__isset; +} +NoSuchFmuException& NoSuchFmuException::operator=(const NoSuchFmuException& other102) { + message = other102.message; + __isset = other102.__isset; + return *this; +} +void NoSuchFmuException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "NoSuchFmuException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* NoSuchFmuException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: NoSuchFmuException"; + } +} + + +NoSuchInstanceException::~NoSuchInstanceException() throw() { +} + + +void NoSuchInstanceException::__set_message(const std::string& val) { + this->message = val; +} +std::ostream& operator<<(std::ostream& out, const NoSuchInstanceException& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t NoSuchInstanceException::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t NoSuchInstanceException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("NoSuchInstanceException"); + + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->message); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(NoSuchInstanceException &a, NoSuchInstanceException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + +NoSuchInstanceException::NoSuchInstanceException(const NoSuchInstanceException& other103) : TException() { + message = other103.message; + __isset = other103.__isset; +} +NoSuchInstanceException& NoSuchInstanceException::operator=(const NoSuchInstanceException& other104) { + message = other104.message; + __isset = other104.__isset; + return *this; +} +void NoSuchInstanceException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "NoSuchInstanceException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* NoSuchInstanceException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: NoSuchInstanceException"; + } +} + + +NoSuchVariableException::~NoSuchVariableException() throw() { +} + + +void NoSuchVariableException::__set_message(const std::string& val) { + this->message = val; +} +std::ostream& operator<<(std::ostream& out, const NoSuchVariableException& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t NoSuchVariableException::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t NoSuchVariableException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("NoSuchVariableException"); + + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->message); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(NoSuchVariableException &a, NoSuchVariableException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + +NoSuchVariableException::NoSuchVariableException(const NoSuchVariableException& other105) : TException() { + message = other105.message; + __isset = other105.__isset; +} +NoSuchVariableException& NoSuchVariableException::operator=(const NoSuchVariableException& other106) { + message = other106.message; + __isset = other106.__isset; + return *this; +} +void NoSuchVariableException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "NoSuchVariableException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* NoSuchVariableException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: NoSuchVariableException"; + } +} + + +UnsupportedOperationException::~UnsupportedOperationException() throw() { +} + + +void UnsupportedOperationException::__set_message(const std::string& val) { + this->message = val; +} +std::ostream& operator<<(std::ostream& out, const UnsupportedOperationException& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t UnsupportedOperationException::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t UnsupportedOperationException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("UnsupportedOperationException"); + + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->message); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(UnsupportedOperationException &a, UnsupportedOperationException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + +UnsupportedOperationException::UnsupportedOperationException(const UnsupportedOperationException& other107) : TException() { + message = other107.message; + __isset = other107.__isset; +} +UnsupportedOperationException& UnsupportedOperationException::operator=(const UnsupportedOperationException& other108) { + message = other108.message; + __isset = other108.__isset; + return *this; +} +void UnsupportedOperationException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "UnsupportedOperationException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* UnsupportedOperationException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: UnsupportedOperationException"; + } +} + + +DirectionalDerivativeResult::~DirectionalDerivativeResult() throw() { +} + + +void DirectionalDerivativeResult::__set_dv_unknown_ref(const DirectionalDerivative& val) { + this->dv_unknown_ref = val; +} + +void DirectionalDerivativeResult::__set_status(const Status::type val) { + this->status = val; +} +std::ostream& operator<<(std::ostream& out, const DirectionalDerivativeResult& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t DirectionalDerivativeResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->dv_unknown_ref.clear(); + uint32_t _size109; + ::apache::thrift::protocol::TType _etype112; + xfer += iprot->readListBegin(_etype112, _size109); + this->dv_unknown_ref.resize(_size109); + uint32_t _i113; + for (_i113 = 0; _i113 < _size109; ++_i113) + { + xfer += iprot->readDouble(this->dv_unknown_ref[_i113]); + } + xfer += iprot->readListEnd(); + } + this->__isset.dv_unknown_ref = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast114; + xfer += iprot->readI32(ecast114); + this->status = (Status::type)ecast114; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t DirectionalDerivativeResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("DirectionalDerivativeResult"); + + xfer += oprot->writeFieldBegin("dv_unknown_ref", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_DOUBLE, static_cast(this->dv_unknown_ref.size())); + std::vector ::const_iterator _iter115; + for (_iter115 = this->dv_unknown_ref.begin(); _iter115 != this->dv_unknown_ref.end(); ++_iter115) + { + xfer += oprot->writeDouble((*_iter115)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(DirectionalDerivativeResult &a, DirectionalDerivativeResult &b) { + using ::std::swap; + swap(a.dv_unknown_ref, b.dv_unknown_ref); + swap(a.status, b.status); + swap(a.__isset, b.__isset); +} + +DirectionalDerivativeResult::DirectionalDerivativeResult(const DirectionalDerivativeResult& other116) { + dv_unknown_ref = other116.dv_unknown_ref; + status = other116.status; + __isset = other116.__isset; +} +DirectionalDerivativeResult& DirectionalDerivativeResult::operator=(const DirectionalDerivativeResult& other117) { + dv_unknown_ref = other117.dv_unknown_ref; + status = other117.status; + __isset = other117.__isset; + return *this; +} +void DirectionalDerivativeResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "DirectionalDerivativeResult("; + out << "dv_unknown_ref=" << to_string(dv_unknown_ref); + out << ", " << "status=" << to_string(status); + out << ")"; +} + +}} // namespace diff --git a/src/cpp/fmuproxy/thrift_state.cpp b/src/cpp/fmuproxy/thrift_state.cpp new file mode 100644 index 000000000..30026cf6c --- /dev/null +++ b/src/cpp/fmuproxy/thrift_state.cpp @@ -0,0 +1,16 @@ + +#include + +cse::fmuproxy::thrift_state::thrift_state(const std::shared_ptr<::fmuproxy::thrift::fmu_service_if>& client_, + const std::shared_ptr& transport_) + : client_(client_) + , transport_(transport_) +{} + + +cse::fmuproxy::thrift_state::~thrift_state() +{ + if (transport_->isOpen()) { + transport_->close(); + } +} diff --git a/test/cpp/CMakeLists.txt b/test/cpp/CMakeLists.txt index e42e7ad54..fe8384cc5 100644 --- a/test/cpp/CMakeLists.txt +++ b/test/cpp/CMakeLists.txt @@ -10,6 +10,11 @@ set(tests "scenario_parser_test" "synchronized_xy_series_test" ) + +if(CSECORE_WITH_FMUPROXY) + list(APPEND tests "fmuproxy_test") +endif() + set(unittests "async_slave_unittest" "fmi_v1_fmu_unittest" diff --git a/test/cpp/fmuproxy_test.cpp b/test/cpp/fmuproxy_test.cpp new file mode 100644 index 000000000..836fdb52f --- /dev/null +++ b/test/cpp/fmuproxy_test.cpp @@ -0,0 +1,147 @@ + +#include +#include +#include +#include + +//must appear before other cse headers due to #include +#include +#include + +#include +#include + +using namespace cse; +using namespace cse::fmuproxy; + +const int NUM_FMUS = 25; + +const double stop = 1; +const double stepSize_s = 1.0 / 100; +const int numSteps = (int) (stop / stepSize_s); +const cse::duration stepSize = cse::to_duration(stepSize_s); + +template +inline float measure_time_sec(function &&fun) { + auto t_start = std::chrono::high_resolution_clock::now(); + fun(); + auto t_stop = std::chrono::high_resolution_clock::now(); + return std::chrono::duration(t_stop - t_start).count(); +} + +void run_serial(remote_fmu &fmu) { + + cse::time_point t; + std::shared_ptr slaves[NUM_FMUS]; + for (auto &slave : slaves) { + slave = fmu.instantiate_slave(); + slave->setup(t, {}, {}); + slave->start_simulation(); + } + + auto elapsed = measure_time_sec([&t, &slaves] { + for (int i = 0; i < numSteps; i++) { + for (auto &slave : slaves) { + slave->do_step(t, stepSize); + + } + t += stepSize; + } + }); + + for (auto &slave : slaves) { + slave->end_simulation(); + } + + std::cout << "[serial] elapsed=" << elapsed << "s" << std::endl; + +} + +void run_execution(remote_fmu &fmu) { + + auto execution = cse::execution(cse::time_point(), + std::make_unique(cse::to_duration(stepSize_s))); + + std::shared_ptr slaves[NUM_FMUS]; + for (int i = 0; i < NUM_FMUS; i++) { + slaves[i] = fmu.instantiate_slave(); + execution.add_slave( cse::make_background_thread_slave(slaves[i]), std::string("slave") + std::to_string(i)); + } + + execution.step(); + auto elapsed = measure_time_sec([&execution] { + for (int i = 0; i < numSteps-1; i++) { + execution.step(); + } + }); + + for (auto &slave : slaves) { + slave->end_simulation(); + } + + std::cout << "[execution] elapsed=" << elapsed << "s" << std::endl; + +} + +void run_threads(remote_fmu &fmu) { + + cse::time_point t = cse::time_point(); + std::shared_ptr slaves[NUM_FMUS]; + + for (auto &slave : slaves) { + slave = fmu.instantiate_slave(); + slave->setup(t, {}, {}); + slave->start_simulation(); + } + + auto elapsed = measure_time_sec([&slaves, &t] { + + for (int i = 0; i < numSteps; i++) { + std::thread threads[NUM_FMUS]; + for (int j = 0; j < NUM_FMUS; j++) { + auto slave = slaves[j]; + threads[j] = std::thread([slave, t]{ + slave->do_step(t, stepSize); + }); + } + t += stepSize; + + for (auto &thread : threads) { + thread.join(); + } + + } + + }); + + for (auto &slave : slaves) { + slave->end_simulation(); + } + + std::cout << "[threads] elapsed=" << elapsed << "s" << std::endl; + +} + +int main(int argc, char** argv) { + + if (argc != 4) { + std::cerr << "Missing one or more program arguments: [url:string host:string port:int]" << std::endl; + return 1; + } + + auto url = argv[1]; + auto host = argv[2]; + auto port = std::stoi(argv[3]); + + fmuproxy_client client1(host, port, /*concurrent*/false); + auto fmu1 = client1.from_url(url); + run_serial(fmu1); + + fmuproxy_client client2(host, port, /*concurrent*/true); + auto fmu2 = client2.from_url(url); + run_execution(fmu2); + run_threads(fmu2); + + return 0; + +} \ No newline at end of file