Overview
Comment:rtxi.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: d39944c4adeeb7226f6cc68f900e3550746be3895822f41eb9bceb5182244881
User & Date: geraint@users.sourceforge.net on 2005-11-18 17:23:19
Other Links: branch diff | manifest | tags
Context
2005-12-05
00:54:10
Loop-gain component: breaks flow check-in: 1188770de6 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2005-11-18
17:23:19
rtxi. check-in: d39944c4ad user: geraint@users.sourceforge.net tags: origin/master, trunk
2005-11-16
00:43:15
rtxi check-in: c91de9df65 user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/mtt from [98626a6b53] to [8cdc94c72b].

13
14
15
16
17
18
19



20
21
22
23
24
25
26
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29







+
+
+







# Copyright (C) 2001 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Header$
## $Log$
## Revision 1.413  2005/11/16 00:43:15  geraint
## rtxi
##
## 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
3357
3358
3359
3360
3361
3362
3363
3364

3365
3366
3367
3368
3369
3370
3371
3372
3373
3374






3375
3376



3377
3378
3379
3380
3381
3382
3383
3360
3361
3362
3363
3364
3365
3366

3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383


3384
3385
3386
3387
3388
3389
3390
3391
3392
3393







-
+










+
+
+
+
+
+
-
-
+
+
+







	${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
	@echo "Creating \$@"
	${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)
#SUMMARY rtxi real time module (o)
#SUMMARY rtxi real time module (so)
$1_rtxi.so: $1_rtxi.o $1_ode2odes_rtxi.o
	@echo "Creating \$@"
	ar -cr \$@ \$^

#$1_rtxi.o: $1_rtxi.cc $1_rtxi.h
#	${MTT_CXX} ${MTT_CXXFLAGS} ${MTT_CXXINCS} -c \$^
$1_rtxi.o: $1_rtxi.cc $1_rtxi.h
	@echo Creating \$@
	${MTT_CXX} ${MTT_CXXFLAGS} ${MTT_CXXINCS} ${MTT_RTXI_FLAGS} -c \$< -o \$@

$1_rtxi.cc: $1_struc.txt $1_sympar.txt
	echo Creating \$@
	sympar2rtxi_txt2cc $1

$1_rtxi.h: $1_sympar.txt
	echo Creating \$@

Modified mttroot/mtt/bin/trans/sympar2rtxi_txt2cc from [690d3775c3] to [163d3be99c].

53
54
55
56
57
58
59

60
61
62
63
64
65
66





67
68
69


















70
71
72
73
74
75
76
53
54
55
56
57
58
59
60
61
62
63




64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96







+



-
-
-
-
+
+
+
+
+



+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







' $sympar >> ${RTXI_CC}

cat <<EOF >> ${RTXI_CC}
};

static size_t num_vars = sizeof(vars)/sizeof(DefaultGUIModel::variable_t);
// TODO: initialise from numpar
static double
EOF

gawk '
  BEGIN { printf("static double\n"); }
  { printf("  %s=0.0,\n", $1); }
  END {printf("  ;\n"); }
' $sympar >> ${RTXI_CC}
  { printf("  %s=0.0,", $1); }
  END { printf ";" }
' $sympar |\
    sed -e 's/,;/;\n/' |\
    sed -e 's/,/,\n/' >> ${RTXI_CC}

cat <<EOF >> ${RTXI_CC}
static long i_count = 0;

${sys}::${sys}(void)
  : DefaultGUIModel("${sys}",::vars,::num_vars),
EOF

gawk '
  { printf("  %s(0.0),", $1); }
  END { printf ";" }
' $sympar |\
    sed -e 's/,;/\n/' |\
    sed -e 's/,/,\n/' >> ${RTXI_CC}


cat <<EOF >> ${RTXI_CC}
{
  doUpdate(INIT);
  refresh();
}

${sys}::~${sys}(void) {}

// ${sys}::execute(void) is defined in ${sys}_ode2odes.cc

void ${sys}::update(DefaultGUIModel::update_flags_t flag) {
  setCaption("${sys}");


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]