Moving Data Scope Embedded C++
13 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello everyone,
I'm trying to export C++ using Embedded Coder from a Simulink model and I'm having trouble getting the interface to look how I want. Right now, I have this:
typedef struct {
real32_T UnitDelay_DSTATE;
} CppTestModel_DW_t;
typedef struct {
real32_T In1;
real32_T In2;
} CppTestModel_ExtU_t;
typedef struct {
real32_T Out1;
} CppTestModel_ExtY_t;
class CppTestModelModelClass {
public:
void initialize();
void step();
CppTestModelModelClass();
void setIn1(real32_T localArgInput);
void setIn2(real32_T localArgInput);
real32_T getOut1() const;
protected:
CppTestModel_ExtU_t CppTestModel_U;
CppTestModel_ExtY_t CppTestModel_Y;
private:
CppTestModel_DW_t CppTestModel_DW;
};
But I want to move the _DW, ExtU, and ExtY struct definitions insde the class definition. There's no reason in my view that they should be at the scope they are...
- Is there an easy way to do that?
- Is there any reason why I shouldn't do that?
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Simulink Coder in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!