Index: mttroot/mtt/bin/mtt ================================================================== --- mttroot/mtt/bin/mtt +++ mttroot/mtt/bin/mtt @@ -15,10 +15,13 @@ ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ +## Revision 1.412 2005/09/29 13:46:25 gawthrop +## Converts labg.fig -> ps/eps correctly (using fig2ps) +## ## Revision 1.411 2005/03/15 15:03:28 gawthrop ## Now works for Hierarchical systems ## ## Revision 1.410 2005/03/15 13:35:50 gawthrop ## Pretty abg figure in reports. @@ -1779,11 +1782,11 @@ mtt vc mtt mtt Options: - -A solve algebraic equations symbolically + -A solve algebraic equations symbolically -abg start at abg.m representation -ae algebraic equation solver: reduce|hybrd|dassl|hooke -cc C++ code generation -cr use cr before resolving equations -D debug -- leave log files etc @@ -3328,10 +3331,11 @@ endif #SUMMARY ode2odes Simulation function (m) #SUMMARY ode2odes Simulation function (cc) #SUMMARY ode2odes Simulation function (oct) +#SUMMARY ode2odes_rtxi Simulation function (o) #SUMMARY ode2odes Simulation function (exe) $1_ode2odes.exe: $1_def.h $1_sympar.h\ $1_ode2odes.o $1_ode2odes_common.o $1_ode2odes_${integration_method}.o $1_ode2odes_${algebraic_solver}.o mtt_kpathsea.o echo Creating $1_ode2odes.exe ${MTT_CXX} ${MTT_CXXFLAGS} -o $1_ode2odes.exe\ @@ -3353,16 +3357,35 @@ ${MTT_CXX} -DCODEGENTARGET=MATLABMEX -o $1_ode2odes.mexglx $1_ode2odes.cc \ $1_ode2odes_common.o $1_ode2odes_${integration_method}.o $1_ode2odes_${algebraic_solver}.o \ ${MTT_MATLAB_FLAGS} ${MTT_CXXINCS} ${MTT_CXXLIBS} ${MTT_CXXFLAGS} \ ${MTT_LIB}/cc/mtt_kpathsea.cc ${MTT_LIB}/cc/mtt_matlab_octave.cc +$1_ode2odes_rtxi.o: $1_ode2odes.cc $1_ode2odes_common.o $1_ode2odes_${integration_method}.o $1_ode2odes_${algebraic_solver}.o \ + $1_rtxi.cc $1_rtxi.h + echo Creating $1_ode2odes_rtxi.o + ${MTT_CXX} ${MTT_CXXFLAGS} ${MTT_CXXINCS} ${MTT_RTXI_FLAGS} -c $1_ode2odes.cc -DCODEGENTARGET=RTXI -o \$@ + $1_ode2odes.cc: $1_def.r $1_sympars.txt\ $1_ode2odes_common_m.stamp $1_ode2odes_common_cc.stamp\ $1_ode2odes_${integration_method}_m.stamp $1_ode2odes_${integration_method}_cc.stamp\ mtt_Solver.cc mtt_AlgebraicSolver.cc mtt_${algebraic_solver}.cc mtt_${algebraic_solver}.hh touch $1_ode2odes.m make_ode2odes $1 cc $integration_method $algebraic_solver $sort_method + +#SUMMARY rtxi real time module (cc) +#$1_rtxi.o: $1_rtxi.cc $1_rtxi.h +# ${MTT_CXX} ${MTT_CXXFLAGS} ${MTT_CXXINCS} -c \$^ + +$1_rtxi.cc: $1_struc.txt $1_sympar.txt + echo Creating \$@ + sympar2rtxi_txt2cc $1 + +$1_rtxi.h: $1_sympar.txt + echo Creating \$@ + sympar2rtxi_txt2h $1 + + #Conversion of m to p to c #SUMMARY ode ordinary differential equations (c) #SUMMARY ode ordinary differential equations (p) #SUMMARY state state declaration (c) Index: mttroot/mtt/bin/mttrc ================================================================== --- mttroot/mtt/bin/mttrc +++ mttroot/mtt/bin/mttrc @@ -13,10 +13,14 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.41 2004/02/17 17:53:34 geraint +## Fixed [ 898739 ] libhdf5 dependency breaks -cc reps. +## Now uses mkoctfile to determine include and library flags. +## ## Revision 1.40 2003/09/23 15:57:18 gawthrop ## And back to gv ## ## Revision 1.39 2003/09/22 17:38:56 gawthrop ## gv --> ghostview @@ -299,9 +303,23 @@ # exported variables export MTT_MATLAB_FLAGS="${MATLAB_FLAGS} ${MATLAB_INCS} ${MATLAB_LIBS}" ## End of Matlab environment configuration + ## + ############################################################# + + ####################################################### + ## + ## Configure environment for compilation of RTXI module + + RTXI_INCS="-I/usr/local/src/mtt/rtxi/rtxi_cvs_30Sep05/include -I/usr/include/qt3" +# MORE_RTXI_INCS="-I/usr/realtime/include -I/usr/src/linux/include" + RTXI_FLAGS="-DHAVE_CONFIG_H -D_REENTRANT -DQT_THREAD_SUPPORT" + + export MTT_RTXI_FLAGS="${RTXI_INCS}" + + ## End of RTXI environment configuration ## ############################################################# fi Index: mttroot/mtt/bin/trans/make_ode2odes ================================================================== --- mttroot/mtt/bin/trans/make_ode2odes +++ mttroot/mtt/bin/trans/make_ode2odes @@ -7,10 +7,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.90 2005/04/26 23:43:34 geraint +## Reset open switches after update to eliminate overshoots. +## ## Revision 1.89 2004/08/29 16:04:44 geraint ## Fixed ae for non-sorted code. ## ## Revision 1.88 2004/08/29 13:15:28 geraint ## Uses sys_sae instead of sys_ae if sorted equations are being used. @@ -554,10 +557,11 @@ // Code generation directives #define STANDALONE 0 #define OCTAVEDLD 1 #define MATLABMEX 2 +#define RTXI 3 #if (! defined (CODEGENTARGET)) #define CODEGENTARGET STANDALONE #endif // (! defined (CODEGENTARGET)) #include @@ -572,11 +576,11 @@ #include "${sys}_sympar.h" #include "mtt_${algebraic_solver}.hh" #include -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) extern ColumnVector ${sys}_${ae} ( const ColumnVector &x, const ColumnVector &u, const double &t, @@ -669,29 +673,29 @@ EOF ;; esac cat <> $filename -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) ColumnVector mtt_ae (const ColumnVector &x, const ColumnVector &u, const double &t, const ColumnVector &par) { -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) return ${sys}_${ae}(x,u,t,par); #elif (CODEGENTARGET == OCTAVEDLD) static octave_value_list args, f; args (0) = octave_value (x); args (1) = octave_value (u); args (2) = octave_value (t); args (3) = octave_value (par); f = feval ("${sys}_${ae}", args, 1); return f(0).${vector_value} (); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) } inline ColumnVector mtt_input (const ColumnVector &x, const ColumnVector &y, @@ -726,96 +730,96 @@ mtt_logic (const ColumnVector &x, const ColumnVector &u, const double &t, const ColumnVector &par) { -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) return ${sys}_logic (x, u, t, par); #elif (CODEGENTARGET == OCTAVEDLD) static octave_value_list args, f; args (0) = octave_value (x); args (1) = octave_value (u); args (2) = octave_value (t); args (3) = octave_value (par); f = feval ("${sys}_logic", args, 1); return f(0).${vector_value} (); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) } inline ColumnVector mtt_numpar (void) { -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) return ${sys}_numpar (); #elif (CODEGENTARGET == OCTAVEDLD) static octave_value_list args, f; f = feval ("${sys}_numpar", args, 1); return f(0).${vector_value} (); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) } inline ColumnVector mtt_simpar (void) { -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) return ${sys}_simpar (); #elif (CODEGENTARGET == OCTAVEDLD) static octave_value_list args, f; f = feval ("${sys}_simpar", args, 1); return f(0).${vector_value} (); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) } inline ColumnVector mtt_state (const ColumnVector &par) { -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) return ${sys}_state (par); #elif (CODEGENTARGET == OCTAVEDLD) static octave_value_list args, f; args (0) = octave_value (par); f = feval ("${sys}_state", args, 1); return f(0).${vector_value} (); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) } inline ColumnVector mtt_rate (const ColumnVector &x, const ColumnVector &u, const double &t, const ColumnVector &par) { -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) return ${sys}_${ode} (x, u, t, par); #elif (CODEGENTARGET == OCTAVEDLD) static octave_value_list args, f; args (0) = octave_value (x); args (1) = octave_value (u); args (2) = octave_value (t); args (3) = octave_value (par); f = feval ("${sys}_${ode}", args, 1); return f(0).${vector_value} (); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) } inline ColumnVector mtt_output (const ColumnVector &x, const ColumnVector &u, const double &t, const ColumnVector &par) { -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) return ${sys}_${odeo} (x, u, t, par); #elif (CODEGENTARGET == OCTAVEDLD) static octave_value_list args, f; args (0) = octave_value (x); args (1) = octave_value (u); args (2) = octave_value (t); args (3) = octave_value (par); f = feval ("${sys}_${odeo}", args, 1); return f(0).${vector_value} (); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) } inline ColumnVector mtt_zeroswitches (ColumnVector &x, const int Nx, @@ -841,11 +845,11 @@ ColumnVector &AAx, const double &ddt, const int &nx, const ColumnVector &open_switches) { -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) return Fmtt_implicit (x, dx, AA, AAx, ddt, nx, open_switches); #elif (CODEGENTARGET == OCTAVEDLD) static octave_value_list args, f; args (0) = octave_value (x); args (1) = octave_value (dx); @@ -854,49 +858,49 @@ args (4) = octave_value (ddt); args (5) = octave_value ((double)nx); args (6) = octave_value (open_switches); f = feval ("mtt_implicit", args, 1); return f(0).${vector_value} (); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) } inline Matrix mtt_smxa (const ColumnVector &x, const ColumnVector &u, const double &t, const ColumnVector &par) { -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) return ${sys}_smxa (x, u, t, par); #elif (CODEGENTARGET == OCTAVEDLD) static octave_value_list args, f; args (0) = octave_value (x); args (1) = octave_value (u); args (2) = octave_value (t); args (3) = octave_value (par); f = feval ("${sys}_smxa", args, 1); return f(0).matrix_value (); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) } inline ColumnVector mtt_smxax (const ColumnVector &x, const ColumnVector &u, const double &t, const ColumnVector &par) { -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) return ${sys}_smxax (x, u, t, par); #elif (CODEGENTARGET == OCTAVEDLD) static octave_value_list args, f; args (0) = octave_value (x); args (1) = octave_value (u); args (2) = octave_value (t); args (3) = octave_value (par); f = feval ("${sys}_smxax", args, 1); return f(0).${vector_value} (); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) } EOF ;; "dassl") @@ -910,11 +914,11 @@ const double &ddt, const int &nx, const int &nyz, const ColumnVector &open_switches) { -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) return Fmtt_dassl (x, u, t, par, dx, ddt, nx, nyz, open_switches); #elif (CODEGENTARGET == OCTAVEDLD) static octave_value_list args, f; args (0) = octave_value (x); args (1) = octave_value (u); @@ -925,14 +929,14 @@ args (6) = octave_value (static_cast (nx)); args (7) = octave_value (static_cast (nyz)); args (8) = octave_value (open_switches); f = feval ("mtt_dassl", args, 1); return f(0).${vector_value} (); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) } -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) ColumnVector Fmtt_residual (const ColumnVector &X, const ColumnVector &DX, double t, int &ires) @@ -947,11 +951,11 @@ X = args(0).${vector_value} (); DX = args(1).${vector_value} (); t = args(2).double_value (); ires = static_cast(args(3).double_value ()); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) static ColumnVector residual (MTTNX+MTTNYZ); static ColumnVector U (MTTNU+MTTNYZ); static ColumnVector u (MTTNU); static ColumnVector y (MTTNY,0.0); @@ -966,34 +970,34 @@ x = X.extract (0,MTTNX-1); if (MTTNYZ > 0) ui = X.extract (MTTNX,MTTNX+MTTNYZ-1); -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) par = ${sys}_numpar(); u = ${sys}_input(x,y,t,par); #elif (CODEGENTARGET == OCTAVEDLD) par = feval ("${sys}_numpar", new_args, 1)(0).${vector_value} (); new_args(0) = octave_value (x); new_args(1) = octave_value (u); new_args(2) = octave_value (t); new_args(3) = octave_value (par); u = feval ("${sys}_input", new_args, 1)(0).${vector_value} (); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) U.insert (u,0); if (MTTNYZ > 0) U.insert (ui,MTTNU); -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) dx = ${sys}_${ode} (x,U,t,par); yz = ${sys}_${ae} (x,U,t,par); #elif (CODEGENTARGET == OCTAVEDLD) new_args(1) = octave_value (U); dx = feval ("${sys}_${ode}", new_args, 1)(0).${vector_value} (); yz = feval ("${sys}_${ae}", new_args, 1)(0).${vector_value} (); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) for (register int i = 0; i < MTTNX; i++) residual (i) = dx(i) - DX(i); if (MTTNYZ > 0) @@ -1015,15 +1019,15 @@ step = t; for (register int i = MTTNX; i < MTTNX+MTTNYZ; i++) residual(i) += X(i) - DX(i)*step; } -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) return residual; #elif (CODEGENTARGET == OCTAVEDLD) return octave_value (residual); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) } EOF ;; "euler" | "rk4" | *) @@ -1033,11 +1037,11 @@ const ColumnVector &dx, const double &ddt, const int &nx, const ColumnVector &open_switches) { -#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#if (CODEGENTARGET != OCTAVEDLD) return Fmtt_euler (x, dx, ddt, nx, open_switches); #elif (CODEGENTARGET == OCTAVEDLD) static octave_value_list args, f; args (0) = octave_value (x); args (1) = octave_value (dx); @@ -1044,11 +1048,11 @@ args (2) = octave_value (ddt); args (3) = octave_value ((double)nx); args (4) = octave_value (open_switches); f = feval ("mtt_euler", args, 1); return f(0).${vector_value} (); -#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == MATLABMEX)) +#endif // (CODEGENTARGET != OCTAVEDLD) } EOF ;; esac @@ -1107,30 +1111,44 @@ $insertor static_cast (cputime - cputime1) / CLOCKS_PER_SEC $insertor std::endl; cputime1 = cputime; if (nrows == row) { -#if (CODEGENTARGET == STANDALONE) +#if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == RTXI)) file $insertor "# name: mtt_dump" $insertor std::endl $insertor "# type: matrix" $insertor std::endl $insertor "# rows: " $insertor data.rows () $insertor std::endl $insertor "# columns: " $insertor data.columns () $insertor std::endl $insertor data; file.flush (); #elif ((CODEGENTARGET == OCTAVEDLD) || (CODEGENTARGET == MATLABMEX)) set_global_value ("MTT_data", data); -#endif // (CODEGENTARGET == STANDALONE) +#endif // ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == RTXI)) row = 0; fcputime.close(); } } + +#if (CODEGENTARGET == RTXI) +#include "${sys}_rtxi.h" +void +${sys}::execute(void) +{ + static ColumnVector simpar (8), par (MTTNPAR), state0 (MTTNX); + + simpar = mtt_simpar (); + par = mtt_numpar (); + state0 = mtt_state (par); + +#else void ${sys}_ode2odes (const ColumnVector &state0, const ColumnVector &par, const ColumnVector &simpar) { +#endif // (CODEGENTARGET == RTXI) static double first, dt, last, stepfactor; first = simpar (0); last = simpar (1); dt = simpar (2); stepfactor = simpar (3); @@ -1152,24 +1170,39 @@ const int nrows = static_cast (round ((last - first) / dt)) + 1; for (register int i = 0; i < MTTNY; i++) { y (i) = 0.0; +#if (CODEGENTARGET == RTXI) + output(i) = y(i); +#endif // (CODEGENTARGET == RTXI) } for (register int i = 0; i < MTTNX; i++) { x (i) = state0 (i); } for (register int j = 0, i = 1; i <= ilast; i++) { +#if (CODEGENTARGET != RTXI) u = mtt_input (x, y, t, par); +#else + for (register int i = 0; i < MTTNU; i++) { + u(i) = input(i); + } +#endif // (CODEGENTARGET != RTXI) y = mtt_output (x, u, t, par); if (0 == j) { - mtt_write (t, x, y, first, nrows); +#if (CODEGENTARGET != RTXI) + mtt_write (t, x, y, first, nrows); +#else + for (register int i = 0; i < MTTNU; i++) { + output(i) = y(i); + } +#endif // (CODEGENTARGET != RTXI) } EOF case "$method" in "rk4") cat << EOF >> $filename @@ -1376,10 +1409,11 @@ ${sys}_ode2odes (state0, numpar, simpar); plhs[0] = mtt_mxArray (get_global_value ("MTT_data").matrix_value ()); } } + #endif // (CODEGENTARGET == STANDALONE) EOF } Index: mttroot/mtt/bin/trans/mtt_header ================================================================== --- mttroot/mtt/bin/trans/mtt_header +++ mttroot/mtt/bin/trans/mtt_header @@ -10,10 +10,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.66 2005/02/17 18:54:23 geraint +## Fixed a bash-sim: replaced let with $(( )) +## ## Revision 1.65 2004/08/29 13:14:29 geraint ## Added rule to make header for sae (sorted algebraic equations). ## ## Revision 1.64 2004/08/29 01:48:46 geraint ## Added rules to create headers for sorted systems: sesx and sesy. @@ -924,10 +927,11 @@ // Code generation directives #define STANDALONE 0 #define OCTAVEDLD 1 #define MATLABMEX 2 +#define RTXI 3 #ifndef CODEGENTARGET #define CODEGENTARGET STANDALONE #endif // CODEGENTARGET ${arg_type} ${system}_${rep} ( Index: mttroot/mtt/bin/trans/sympar2rtxi_txt2cc ================================================================== --- mttroot/mtt/bin/trans/sympar2rtxi_txt2cc +++ mttroot/mtt/bin/trans/sympar2rtxi_txt2cc @@ -1,13 +1,12 @@ #! /bin/sh sys=$1 -Sys=$(capitalise_initial $sys) struc=${sys}_struc.txt sympar=${sys}_sympar.txt -RTXI_H="${Sys}_rtxi.h" -RTXI_CC="${Sys}_rtxi.cc" +RTXI_H="${sys}_rtxi.h" +RTXI_CC="${sys}_rtxi.cc" program=$(basename $0) date=$(date) cat < ${RTXI_CC} // -*-c++-*- Put Emacs into c++-mode @@ -17,11 +16,11 @@ // at $date #include <${RTXI_H}> extern "C" Plugin::Object *createRTXIPlugin(void) { - return new ${Sys}(); + return new ${sys}(); } static DefaultGUIModel::variable_t vars[] = { EOF @@ -67,17 +66,15 @@ ' $sympar >> ${RTXI_CC} cat <> ${RTXI_CC} static long i_count = 0; -${Sys}::~${Sys}(void) {} +${sys}::~${sys}(void) {} + +// ${sys}::execute(void) is defined in ${sys}_ode2odes.cc -void ${Sys}::execute(void) { - // TODO: call ode2odes functions -} - -void ${Sys}::update(DefaultGUIModel::update_flags_t flag) { +void ${sys}::update(DefaultGUIModel::update_flags_t flag) { setCaption("${sys}"); switch(flag) { case INIT: EOF Index: mttroot/mtt/bin/trans/sympar2rtxi_txt2h ================================================================== --- mttroot/mtt/bin/trans/sympar2rtxi_txt2h +++ mttroot/mtt/bin/trans/sympar2rtxi_txt2h @@ -1,11 +1,10 @@ #! /bin/sh sys=$1 -Sys=$(capitalise_initial $sys) sympar=${sys}_sympar.txt -RTXI_H="${Sys}_rtxi.h" +RTXI_H="${sys}_rtxi.h" program=$(basename $0) date=$(date) cat < ${RTXI_H} // -*-c++-*- Put Emacs into c++-mode @@ -15,17 +14,17 @@ // at $date #include #include -class $Sys : public DefaultGUIModel +class $sys : public DefaultGUIModel { public: - $Sys(void); - virtual ~$Sys(void); + $sys(void); + virtual ~$sys(void); virtual void execute(void); protected: