Next: Enhancing RTiC-Lab
Up: Generating a user_controller.c File
Previous: Necessary Functions
The following tokens have been implemented in order to simplify the
controller implementation and to communicate with the reactive tasks.
- float GET_SENSOR(x): This macro is used to sample the
xth A/D channel. Here,
is an integer denoting the A/D
channel, where
.
- void SET_VOLTAGE(x,y): This macro is used to load a voltage
into the D/A boards. More explicitly, it will load a voltage y
(a float) into D/A channel x (an integer),
.
- float GET_SCALAR_PARAMETER(id): This macro will retrieve
the latest value of scalar parameter identified with the unique
(integer) identifier id,
.
- void RETURN_VAL(x,y): This macro will assign the value of
y (a float) to the xth data point (an integer) that will
be returned to the reactive tasks (xrtic). The user can then
either store this data to disk, plot it to screen, print it to stdout, or use any other user supplied modules from within Linux. In
this case,
.
- int NEW_PARAMS: This macro returns TRUE (1) if a parameter has
been updated via xrtic, otherwise it returns FALSE (0). This
macro is guaranteed to return TRUE over the execution of the very
first controller cycle.
- float GET_RUN_PERIOD: This macro returns the run-time
period of the controller in seconds. Thus, each time the user changes
the run-time frequency via either user_GUI.par or xrtic, the output of this macro will change accordingly.
- float GET_RUN_TIME: This macro returns time (in
nano-seconds) since the controller began its execution.
- volatile float *MATRIX_VALS(id): This macro returns a
pointer to the starting location of the elements associated with the
matrix of identifier id.
- float MATRIX_ELEMENT(id,m,n) : This macro returns the value
of the element identified by row m (an integer) and column n (an integer) of the matrix or vector identified by the unique
identifier id (an integer), Here, note that
; that
; that
, and that
.
- int MAT_DIM_M(id): This macro returns the row dimension of
the matrix identified by the unique identifier id (an integer),
.
- int MAT_DIM_N(id): This macro returns the column dimension of
the matrix identified by the unique identifier
(an integer),
.
Next: Enhancing RTiC-Lab
Up: Generating a user_controller.c File
Previous: Necessary Functions
Michael Barabanov
2001-06-19