Open Garden  0.10.1-21
Data Structures | Macros | Functions
cmdli.h File Reference

Command line interface. More...

#include "debug.h"
#include "date.h"
#include "temperature.h"
#include "program.h"
#include "queue.h"
Include dependency graph for cmdli.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cmdli_t
 

Macros

#define MAX_CMD_LENGHT   20
 

Functions

struct cmdli_tcmdli_init (struct cmdli_t *cmdli)
 
void cmdli_free (struct cmdli_t *cmdli)
 
void cmdli_help (struct debug_t *debug)
 
void cmdli_exec (char c, struct cmdli_t *cmdli, struct programs_t *progs, struct debug_t *debug, uint8_t *serno)
 

Detailed Description

Command line interface.

Macro Definition Documentation

◆ MAX_CMD_LENGHT

#define MAX_CMD_LENGHT   20

maximum chars a command is made of

Function Documentation

◆ cmdli_exec()

void cmdli_exec ( char  c,
struct cmdli_t cmdli,
struct programs_t progs,
struct debug_t debug,
uint8_t *  serno 
)

Get a char from the users and echo it, compose the command line and, if an \r is entered, execute the command.

Parameters
cinput char,
cmdlistruct with the command line string,
progsthe programs structure,
debugneeded for printing things.

◆ cmdli_free()

void cmdli_free ( struct cmdli_t cmdli)

Free the struct from memory.

◆ cmdli_help()

void cmdli_help ( struct debug_t debug)

Print the help.

◆ cmdli_init()

struct cmdli_t* cmdli_init ( struct cmdli_t cmdli)

initialize the struct cli and allocate memory.