menu.h File Reference

definitions to build menus (API) More...

Go to the source code of this file.

## Data Structures

struct | menu_command_t
| command menu entry More...

## Enumerations

enum | menu_argument_t { MENU_ARGUMENT_NONE, MENU_ARGUMENT_SIGNED, MENU_ARGUMENT_UNSIGNED, MENU_ARGUMENT_FLOAT, MENU_ARGUMENT_STRING }
| types of argument accepted by the command More...

## Functions

bool | menu_handle_command (const char *line, const struct menu_command_t *command_list, size_t command_list_length)
| parse command from line and call corresponding command More...
void | menu_print_commands (const struct menu_command_t *command_list, size_t command_list_length)
| print the commands from the command list More...

## Detailed Description

definitions to build menus (API)

Author
  King Kévin kingk.nosp@m.evin.nosp@m.@cuvo.nosp@m.odoo.nosp@m..info

Date
  2018

Definition in file menu.h.

## Enumeration Type Documentation

## menu_argument_t

enum menu_argument_t

types of argument accepted by the command

Enumerator
MENU_ARGUMENT_NONE | no argument accepted
MENU_ARGUMENT_SIGNED | int32 argument accepted
MENU_ARGUMENT_UNSIGNED | uint32 argument accepted
MENU_ARGUMENT_FLOAT | double argument accepted
MENU_ARGUMENT_STRING | string argument accepted

Definition at line 22 of file menu.h.

## Function Documentation

## menu_handle_command()

bool menu_handle_command | ( | const char * | line,
|  | const struct menu_command_t * | command_list,
|  | size_t | command_list_length
| ) |  |

parse command from line and call corresponding command

Parameters

  [in] | line | use input to parse
  [in] | command_list | list of available commands
  [in] | command_list_length | number of available commands

Returns
  if an command corresponding to the line has been found and called

Definition at line 30 of file menu.c.

## menu_print_commands()

void menu_print_commands | ( | const struct menu_command_t * | command_list,
|  | size_t | command_list_length
| ) |  |

print the commands from the command list

Parameters

  [in] | command_list | list of available commands
  [in] | command_list_length | number of available commands

Definition at line 103 of file menu.c.