9 #ifndef BLOCKFACTORY_CODER_GENERATEDCODEWRAPPER_H 10 #define BLOCKFACTORY_CODER_GENERATEDCODEWRAPPER_H 13 #error "MODEL option not specified" 55 if (m_model->getRTM()) {
56 if (!m_model->getRTM()->errorStatus)
65 const unsigned& numSampleTimes)
66 : m_modelName(modelName)
67 , m_numSampleTimes(numSampleTimes)
77 m_model = std::make_unique<T>();
78 m_model->initialize();
103 template <
typename T>
110 m_model->terminate();
119 template <
typename T>
127 return {m_model->getRTM()->errorStatus};
133 #endif // BLOCKFACTORY_CODER_GENERATEDCODEWRAPPER_H bool modelFailed() const
Definition: GeneratedCodeWrapper.h:52
bool terminate()
Definition: GeneratedCodeWrapper.h:104
std::unique_ptr< T > m_model
Definition: GeneratedCodeWrapper.h:31
~GeneratedCodeWrapper()=default
Definition: GeneratedCodeWrapper.h:23
bool step()
Definition: GeneratedCodeWrapper.h:88
GeneratedCodeWrapper(const std::string &modelName={}, const unsigned &numSampleTimes=0)
Definition: GeneratedCodeWrapper.h:64
std::string getErrors() const
Definition: GeneratedCodeWrapper.h:120
std::string m_modelName
Definition: GeneratedCodeWrapper.h:32
unsigned m_numSampleTimes
Definition: GeneratedCodeWrapper.h:33
bool initialize()
Definition: GeneratedCodeWrapper.h:71