d4495ecaff
update gencode
45 lines
830 B
C++
45 lines
830 B
C++
#ifndef TASK_H
|
|
#define TASK_H
|
|
|
|
#include <QObject>
|
|
#include <QVector>
|
|
#include <QString>
|
|
#include <QFile>
|
|
|
|
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<QString> &head, const QVector<double> &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
|