Wombat Environmental Node 1.0
An environmental node for SDI-12 and digital sensors.
Loading...
Searching...
No Matches
CLI.h
Go to the documentation of this file.
1
8#ifndef WOMBAT_CLI_H
9#define WOMBAT_CLI_H
10
11#include <Arduino.h>
13
14#define CLI_TAG "cli"
15
16const char OK_RESPONSE[] = "\r\nOK\r\n";
17const char ERROR_RESPONSE[] = "\r\nERROR\r\n";
18const char INVALID_CMD_RESPONSE[] = "\r\nERROR: Invalid command\r\n";
19
26class CLI {
27public:
28 static Stream *cliInput;
29 static Stream *cliOutput;
31 static const size_t MAX_CLI_CMD_LEN = 256;
33 static const size_t MAX_CLI_MSG_LEN = 256;
34
35 static void init();
36 static void repl(Stream& input, Stream& output);
37};
38
39#endif //WOMBAT_CLI_H
const char OK_RESPONSE[]
Definition: CLI.h:16
const char ERROR_RESPONSE[]
Definition: CLI.h:17
const char INVALID_CMD_RESPONSE[]
Definition: CLI.h:18
CAT-M1 CLI command request and response handler.
FreeRTOS command line interface.
Definition: CLI.h:26
static Stream * cliOutput
Definition: CLI.h:29
static void repl(Stream &input, Stream &output)
Read-eval-print loop (REPL) for the command line interface (CLI).
Definition: CLI.cpp:126
static const size_t MAX_CLI_MSG_LEN
Maximum command (output) length.
Definition: CLI.h:33
static Stream * cliInput
Command line stream.
Definition: CLI.h:28
static void init()
Initialise the FreeRTOS command line interface.
Definition: CLI.cpp:103
static const size_t MAX_CLI_CMD_LEN
Maximum command (input) length.
Definition: CLI.h:31