2010-12-26 20:59:17 -04:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
< title > ArduPilot Libraries: Menu Class Reference< / title >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< / head >
< body >
<!-- Generated by Doxygen 1.7.1 -->
< div class = "navigation" id = "top" >
< div class = "tabs" >
< ul class = "tablist" >
< li > < a href = "main.html" > < span > Main Page< / span > < / a > < / li >
< li > < a href = "namespaces.html" > < span > Namespaces< / span > < / a > < / li >
< li class = "current" > < a href = "annotated.html" > < span > Classes< / span > < / a > < / li >
< li > < a href = "files.html" > < span > Files< / span > < / a > < / li >
< / ul >
< / div >
< div class = "tabs2" >
< ul class = "tablist" >
< li > < a href = "annotated.html" > < span > Class List< / span > < / a > < / li >
< li > < a href = "classes.html" > < span > Class Index< / span > < / a > < / li >
< li > < a href = "hierarchy.html" > < span > Class Hierarchy< / span > < / a > < / li >
< li > < a href = "functions.html" > < span > Class Members< / span > < / a > < / li >
< / ul >
< / div >
< / div >
< div class = "header" >
< div class = "summary" >
< a href = "#nested-classes" > Classes< / a > |
< a href = "#pub-types" > Public Types< / a > |
< a href = "#pub-methods" > Public Member Functions< / a > < / div >
< div class = "headertitle" >
< h1 > Menu Class Reference< / h1 > < / div >
< / div >
< div class = "contents" >
<!-- doxytag: class="Menu" -->
< p > Class defining and handling one menu tree.
< a href = "#_details" > More...< / a > < / p >
< p > < code > #include < < a class = "el" href = "menu_8h_source.html" > menu.h< / a > > < / code > < / p >
< div class = "dynheader" >
Collaboration diagram for Menu:< / div >
< div class = "dyncontent" >
< div class = "center" > < img src = "class_menu__coll__graph.png" border = "0" usemap = "#_menu_coll__map" alt = "Collaboration graph" / > < / div >
< map name = "_menu_coll__map" id = "_menu_coll__map" >
< area shape = "rect" id = "node2" href = "struct_menu_1_1arg.html" title = "Menu::arg" alt = "" coords = "5,5,91,35" / > < area shape = "rect" id = "node4" href = "struct_menu_1_1command.html" title = "Menu::command" alt = "" coords = "115,5,245,35" / > < / map >
< center > < span class = "legend" > [< a target = "top" href = "graph_legend.html" > legend< / a > ]< / span > < / center > < / div >
< p > < a href = "class_menu-members.html" > List of all members.< / a > < / p >
< table class = "memberdecls" >
< tr > < td colspan = "2" > < h2 > < a name = "nested-classes" > < / a >
Classes< / h2 > < / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > struct < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "struct_menu_1_1arg.html" > arg< / a > < / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > struct < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "struct_menu_1_1command.html" > command< / a > < / td > < / tr >
< tr > < td colspan = "2" > < h2 > < a name = "pub-types" > < / a >
Public Types< / h2 > < / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > typedef int8_t(* < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_menu.html#aaa251c33ec1cf26ad33095565f0a1125" > func< / a > )(uint8_t argc, const struct < a class = "el" href = "struct_menu_1_1arg.html" > arg< / a > *argv)< / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > typedef bool(* < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_menu.html#aea382e744aa7299bad3866062084c9df" > preprompt< / a > )(void)< / td > < / tr >
< tr > < td colspan = "2" > < h2 > < a name = "pub-methods" > < / a >
Public Member Functions< / h2 > < / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_menu.html#ac6862dec531cc9b42410390985a1c731" > Menu< / a > (const char *prompt, const struct < a class = "el" href = "struct_menu_1_1command.html" > command< / a > *commands, uint8_t entries, < a class = "el" href = "class_menu.html#aea382e744aa7299bad3866062084c9df" > preprompt< / a > ppfunc=0)< / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_menu.html#a8424e0886499d6901c1d2406c568709c" > run< / a > (void)< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > menu runner < a href = "#a8424e0886499d6901c1d2406c568709c" > < / a > < br / > < / td > < / tr >
< / table >
< hr / > < a name = "_details" > < / a > < h2 > Detailed Description< / h2 >
< p > Class defining and handling one menu tree. < / p >
< p > Definition at line < a class = "el" href = "menu_8h_source.html#l00024" > 24< / a > of file < a class = "el" href = "menu_8h_source.html" > menu.h< / a > .< / p >
< hr / > < h2 > Member Typedef Documentation< / h2 >
< a class = "anchor" id = "aaa251c33ec1cf26ad33095565f0a1125" > < / a > <!-- doxytag: member="Menu::func" ref="aaa251c33ec1cf26ad33095565f0a1125" args=")(uint8_t argc, const struct arg *argv)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > typedef int8_t(* < a class = "el" href = "class_menu.html#aaa251c33ec1cf26ad33095565f0a1125" > Menu::func< / a > )(uint8_t argc, const struct < a class = "el" href = "struct_menu_1_1arg.html" > arg< / a > *argv)< / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > menu command function< / p >
< p > Functions called by menu array entries are expected to be of this type.< / p >
< dl > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > argc< / em > < / td > < td > The number of valid arguments, including the name of the command in argv[0]. Will never be more than MENU_ARGS_MAX. < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > argv< / em > < / td > < td > Pointer to an array of < a class = "el" href = "struct_menu_1_1arg.html" > Menu::arg< / a > structures detailing any optional arguments given to the command. argv[0] is always the name of the command, so that the same function can be used to handle more than one command. < / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Definition at line < a class = "el" href = "menu_8h_source.html#l00055" > 55< / a > of file < a class = "el" href = "menu_8h_source.html" > menu.h< / a > .< / p >
< / div >
< / div >
< a class = "anchor" id = "aea382e744aa7299bad3866062084c9df" > < / a > <!-- doxytag: member="Menu::preprompt" ref="aea382e744aa7299bad3866062084c9df" args=")(void)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > typedef bool(* < a class = "el" href = "class_menu.html#aea382e744aa7299bad3866062084c9df" > Menu::preprompt< / a > )(void)< / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > menu pre-prompt function< / p >
< p > Called immediately before waiting for the user to type a command; can be used to display help text or status, for example.< / p >
< p > If this function returns false, the menu exits. < / p >
< p > Definition at line < a class = "el" href = "menu_8h_source.html#l00064" > 64< / a > of file < a class = "el" href = "menu_8h_source.html" > menu.h< / a > .< / p >
< / div >
< / div >
< hr / > < h2 > Constructor & Destructor Documentation< / h2 >
< a class = "anchor" id = "ac6862dec531cc9b42410390985a1c731" > < / a > <!-- doxytag: member="Menu::Menu" ref="ac6862dec531cc9b42410390985a1c731" args="(const char *prompt, const struct command *commands, uint8_t entries, preprompt ppfunc=0)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > Menu::Menu < / td >
< td > (< / td >
< td class = "paramtype" > const char * < / td >
< td class = "paramname" > < em > prompt< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const struct < a class = "el" href = "struct_menu_1_1command.html" > command< / a > * < / td >
< td class = "paramname" > < em > commands< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > entries< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > < a class = "el" href = "class_menu.html#aea382e744aa7299bad3866062084c9df" > preprompt< / a > < / td >
< td class = "paramname" > < em > ppfunc< / em > = < code > 0< / code > < / td > < td > < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td > < td > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > constructor< / p >
< p > Note that you should normally not call the constructor directly. Use the MENU and MENU2 macros defined below.< / p >
< dl > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > prompt< / em > < / td > < td > The prompt to be displayed with this menu. < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > commands< / em > < / td > < td > An array of command structures in program memory (PROGMEM). < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > entries< / em > < / td > < td > The number of entries in the menu. < / td > < / tr >
< / table >
< / dd >
< / dl >
< / div >
< / div >
< hr / > < h2 > Member Function Documentation< / h2 >
< a class = "anchor" id = "a8424e0886499d6901c1d2406c568709c" > < / a > <!-- doxytag: member="Menu::run" ref="a8424e0886499d6901c1d2406c568709c" args="(void)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void Menu::run < / td >
< td > (< / td >
< td class = "paramtype" > void < / td >
< td class = "paramname" > < / td >
< td > ) < / td >
< td > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > menu runner < / p >
< p > Definition at line < a class = "el" href = "menu_8cpp_source.html#l00031" > 31< / a > of file < a class = "el" href = "menu_8cpp_source.html" > menu.cpp< / a > .< / p >
< / div >
< / div >
< hr / > The documentation for this class was generated from the following files:< ul >
< li > /home/jgoppert/Projects/ap/libraries/AP_Common/include/< a class = "el" href = "menu_8h_source.html" > menu.h< / a > < / li >
< li > /home/jgoppert/Projects/ap/libraries/AP_Common/< a class = "el" href = "menu_8cpp_source.html" > menu.cpp< / a > < / li >
< / ul >
< / div >
2010-12-26 22:59:34 -04:00
< hr class = "footer" / > < address class = "footer" > < small > Generated on Sun Dec 26 2010 21:58:35 for ArduPilot Libraries by
2010-12-26 20:59:17 -04:00
< a href = "http://www.doxygen.org/index.html" >
< img class = "footer" src = "doxygen.png" alt = "doxygen" / > < / a > 1.7.1 < / small > < / address >
< / body >
< / html >