1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 2K.1beta (1.48)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Adding Tokens</TITLE>
<META NAME="description" CONTENT="Adding Tokens">
<META NAME="keywords" CONTENT="rtic">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v2K.1beta">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="rtic.css">
<LINK REL="previous" HREF="node47.html">
<LINK REL="up" HREF="node46.html">
<LINK REL="next" HREF="node51.html">
</HEAD>
<BODY bgcolor="white">
<!--Navigation Panel-->
<A NAME="tex2html672"
HREF="node51.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/share/latex2html/icons/next.png"></A>
<A NAME="tex2html670"
HREF="node46.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/share/latex2html/icons/up.png"></A>
<A NAME="tex2html666"
HREF="node49.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/share/latex2html/icons/prev.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html673"
HREF="node51.html">Creating I/O Drivers</A>
<B> Up:</B> <A NAME="tex2html671"
HREF="node46.html">Enhancing XRTiC</A>
<B> Previous:</B> <A NAME="tex2html667"
HREF="node49.html">Example Calls</A>
<BR>
<BR>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00512000000000000000">
Adding Tokens</A>
</H2>
<P>
Users can add tokens which can be parsed from the user's <TT>user_GUI.par</TT> file by doing all of the following. Tokens are used to
manipulate the defaults of both the reactive and embedded tasks. In
what follows, assume that the user wants to add a new token by the
name of ``mywidget'':
<P>
<OL>
<LI>write a C source code ``mywidget.c'' which has an entry point
such as ``mywidget()'' that accepts the appropriate number of
parameters, and links a certain action on the given GTK widgets to an
event handling routine. The event handling routine must load all the
appropriate values into the parameter transfer structure denoted by
its unique identifier and call the ``parameter_send()'' function. It
is recommended that you take a look at the <TT>non_rt_tasks/toolbox/slider.c</TT> widget source code for a better
description of how to develop your own widgets which update scalar
parameters.
<P>
</LI>
<LI>write a header source file ``mywidget.h'' which declares the
user's new world accessible functions. Again, refer to the file <TT>slider.h</TT> for a better description of this header file.
<P>
</LI>
<LI>altering the parsing rules file <TT>utilities/GUIparse.y</TT>: this
file describes the rules that will be used when parsing. This new rule
must parse in a token ``mywidget'' from the user's <TT>user_GUI.par</TT>
file, including a unique identifier, and write out appropriate source
code to stdout, which when compiled will allow the user to call the
entry function in the user's new ``mywidget.c'' file.
<P>
</LI>
<LI>altering the file <TT>non_rt_tasks/toolbox/Makefile.am</TT>: this
file tells RTiC-Lab to include the user's C files while compiling the
code, and
<P>
</LI>
<LI><TT>non_rt_tasks/toolbox/toolbox.h</TT>: this file must include
the user's header file
<P>
</LI>
</OL>
<P>
Token developers are highly encouraged to take a look at the files and
entries for the tokens <TT>trigger</TT>, <TT>toggle</TT>, and <TT>slider</TT>,
for a complete example of how to develop the user's own token set.
<P>
Token developers are fully encouraged to share their tokens with the
controls community. To do so, please submit your new tokens to the
author:
<A NAME="tex2html42"
HREF="mailto:efhilton@fsmlabs.com"><TT>efhilton@fsmlabs.com</TT></A>
. Tokens will be added to future releases of
RTiC-Lab and/or will be posted on the web for others to download.
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html672"
HREF="node51.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/share/latex2html/icons/next.png"></A>
<A NAME="tex2html670"
HREF="node46.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/share/latex2html/icons/up.png"></A>
<A NAME="tex2html666"
HREF="node49.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/share/latex2html/icons/prev.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html673"
HREF="node51.html">Creating I/O Drivers</A>
<B> Up:</B> <A NAME="tex2html671"
HREF="node46.html">Enhancing XRTiC</A>
<B> Previous:</B> <A NAME="tex2html667"
HREF="node49.html">Example Calls</A>
<!--End of Navigation Panel-->
<ADDRESS>
Michael Barabanov
2001-06-19
</ADDRESS>
</BODY>
</HTML>
|