Fields.h
591 Bytes
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
40
/*
* Fields.h
*
*/
#ifndef UTIL_FIELDS_H_
#define UTIL_FIELDS_H_
///// Includes
#include <Arduino.h>
#include <stdbool.h>
////// Definitions
///// Class
class Fields
{
public:
// Constructors
Fields(String str, const char delimiter = ':', boolean ignoreEmpty = false);
~Fields(void);
// Methods
uint8_t size();
String getString(uint8_t fieldNum);
char getChar(uint8_t fieldNum);
bool isNum(uint8_t fieldNum);
int32_t getInt(uint8_t fieldNum);
float getFloat(uint8_t fieldNum);
void clear();
};
#endif /* UTIL_FIELDS_H_ */
//////// End