-
Notifications
You must be signed in to change notification settings - Fork 40
/
iot_cmd.h
39 lines (26 loc) · 1.41 KB
/
iot_cmd.h
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
#ifndef IOT_CMD_H
#define IOT_CMD_H
#include "Arduino.h"
#include <Ezo_i2c.h>
bool receive_command(String &string_buffer);
//used to receive commands from the serial port, print them,
//strip them of whitespace, and uppercase them to get them ready for processing
//returns true if a command was received and false if it wasn't
void process_command(const String &string_buffer, Ezo_board device_list[],
uint8_t device_list_len, Ezo_board* &default_board);
void process_command(const String &string_buffer, Ezo_board* device_list[],
uint8_t device_list_len, Ezo_board* &default_board);
//handles the common functions of the IOT kit command processing
//such as listing boards, sending commands to one or all boards, and
//switching which board commands are sent to by default
void list_devices(Ezo_board device_list[], uint8_t device_list_len, Ezo_board* default_board);
void list_devices(Ezo_board* device_list[], uint8_t device_list_len, Ezo_board* default_board);
//prints a list of all the boards in the device list array, with an arrow showing which board is
//the default board
void iot_cmd_print_listcmd_help();
//prints the help section for the list command
void iot_cmd_print_allcmd_help();
//prints the help section for the all query
void iot_cmd_print_namedquery_help();
//prints the help section for the named reference query
#endif