46 #define debug(fmt, args...) do { } while(0) 63 if ((buf[0] == tag) && (buf[1] ==
':')) {
78 if (isupper(buf[0]) && buf[1] ==
':') {
95 if ((p = (
const char *)memchr(buf,
'\r', buflen)) || (p = (
const char *)memchr(buf,
'\n', buflen))) {
97 buflen -= (p - buf) + 1;
108 for (
int i = buflen - 1; i >= 0; i--) {
109 if (buf[i] ==
'\0') {
114 if (buf[i] ==
'\n' || buf[i] ==
'\r') {
121 debug(
"pre-parser rejected: No newline in buf");
static char findnexttag(const char *buf, unsigned buflen)
Find next tag and return it (0 is returned if no tag is found)
static const char * skipline(const char *buf, unsigned &buflen)
Skip a line.
ControlCallback _control_cb
client-supplied callback used when fetching control values
Generic, programmable, procedural control signal mixers.
static bool string_well_formed(const char *buf, unsigned &buflen)
Check wether the string is well formed and suitable for parsing.
float get_control(uint8_t group, uint8_t index)
Invoke the client callback to fetch a control value.
static const char * findtag(const char *buf, unsigned &buflen, char tag)
Find a tag.
#define debug(fmt, args...)