#ifndef TASK_H #define TASK_H #include #include #include #include extern "C" { #include "SIL.h" typedef void (*SIL_initialize_ptr)(void); typedef void (*SIL_step_ptr)(void); typedef const rtwCAPI_ModelMappingStaticInfo *(*SIL_GetCAPIStaticMap_ptr)(void); } class Task : public QObject { Q_OBJECT public: explicit Task(QObject *parent, QString filename, int index=1); protected: void setup_param(const QVector &head, const QVector &onecase); QString filename; int idx; SIL_initialize_ptr init_func; SIL_step_ptr step_func; SIL_GetCAPIStaticMap_ptr getmap_func; ExtU_SIL_T *u; ExtY_SIL_T *y; RT_MODEL_SIL_T *m; QFile *rec_file; public slots: void run(); signals: void finished(); }; #endif // TASK_H