Removed references to JSON Syntax. No longer used

This commit is contained in:
Alden Hart
2016-09-01 14:06:47 -04:00
parent b70e2be40e
commit b00faa0103
18 changed files with 88 additions and 151 deletions
-2
View File
@@ -621,11 +621,9 @@ const cfgItem_t cfgArray[] = {
#endif
{ "sys","ej", _fipn, 0, js_print_ej, get_ui8, set_01, (float *)&cs.comm_mode, COMM_MODE },
{ "sys","jv", _fipn, 0, js_print_jv, get_ui8, json_set_jv,(float *)&js.json_verbosity, JSON_VERBOSITY },
{ "sys","js", _fipn, 0, js_print_js, get_ui8, set_01, (float *)&js.json_syntax, JSON_SYNTAX_MODE },
{ "sys","qv", _fipn, 0, qr_print_qv, get_ui8, set_0123, (float *)&qr.queue_report_verbosity, QUEUE_REPORT_VERBOSITY },
{ "sys","sv", _fipn, 0, sr_print_sv, get_ui8, set_012, (float *)&sr.status_report_verbosity,STATUS_REPORT_VERBOSITY },
{ "sys","si", _fipn, 0, sr_print_si, get_int, sr_set_si, (float *)&sr.status_report_interval, STATUS_REPORT_INTERVAL_MS },
// { "sys","spi", _fipn, 0, xio_print_spi,get_ui8,xio_set_spi,(float *)&xio.spi_state, 0 },
// Gcode defaults
// NOTE: The ordering within the gcode defaults is important for token resolution. gc must follow gco
+32 -32
View File
@@ -105,7 +105,7 @@ void json_parser(char *str)
// This is almost the same as json_parser, except it doesn't *always* execute the parsed out list, and it never returns a reponse
void json_parse_for_exec(char *str, bool execute)
{
nvObj_t *nv = nv_reset_exec_nv_list(); // get a fresh nvObj list
nvObj_t *nv = nv_reset_exec_nv_list(); // get a fresh nvObj list
stat_t status = _json_parser_kernal(nv, str);
if ((status == STAT_OK) && (execute)) {
// execute the command
@@ -129,11 +129,11 @@ static stat_t _json_parser_execute(nvObj_t *nv) {
nv_persist(nv);
}
if ((nv = nv->nx) == NULL) {
return (STAT_JSON_TOO_MANY_PAIRS); // Not supposed to encounter a NULL
return (STAT_JSON_TOO_MANY_PAIRS); // Not supposed to encounter a NULL
}
} while (nv->valuetype != TYPE_EMPTY);
return (STAT_OK); // only successful commands exit through this point
return (STAT_OK); // only successful commands exit through this point
}
static stat_t _json_parser_kernal(nvObj_t *nv, char *str)
@@ -162,7 +162,7 @@ static stat_t _json_parser_kernal(nvObj_t *nv, char *str)
}
// propagate the group from previous NV pair (if relevant)
if (group[0] != NUL) {
strncpy(nv->group, group, GROUP_LEN); // copy the parent's group to this child
strncpy(nv->group, group, GROUP_LEN); // copy the parent's group to this child
}
// validate the token and get the index
if ((nv->index = nv_get_index(nv->group, nv->token)) == NO_MATCH) {
@@ -170,14 +170,14 @@ static stat_t _json_parser_kernal(nvObj_t *nv, char *str)
return (STAT_UNRECOGNIZED_NAME);
}
if ((nv_index_is_group(nv->index)) && (nv_group_is_prefixed(nv->token))) {
strncpy(group, nv->token, GROUP_LEN); // record the group ID
strncpy(group, nv->token, GROUP_LEN); // record the group ID
}
if ((nv = nv->nx) == NULL) {
return (STAT_JSON_TOO_MANY_PAIRS); // Not supposed to encounter a NULL
}
} while (status != STAT_OK); // breaks when parsing is complete
return (STAT_OK); // only successful commands exit through this point
return (STAT_OK); // only successful commands exit through this point
}
/*
@@ -189,18 +189,18 @@ static stat_t _json_parser_kernal(nvObj_t *nv, char *str)
static stat_t _normalize_json_string(char *str, uint16_t size)
{
char *wr; // write pointer
char *wr; // write pointer
uint8_t in_comment = false;
if (strlen(str) > size) {
return (STAT_INPUT_EXCEEDS_MAX_LENGTH);
}
for (wr = str; *str != NUL; str++) {
if (!in_comment) { // normal processing
if (!in_comment) { // normal processing
if (*str == '(') in_comment = true;
if ((*str <= ' ') || (*str == DEL)) continue; // toss ctrls, WS & DEL
*wr++ = tolower(*str);
} else { // Gcode comment processing
} else { // Gcode comment processing
if (*str == ')') in_comment = false;
*wr++ = *str;
}
@@ -252,7 +252,7 @@ static stat_t _get_nv_pair(nvObj_t *nv, char **pstr, int8_t *depth)
// Find, terminate and set pointers for the name. Allow for leading and trailing name quotes.
char * name = *pstr;
for (i=0; true; i++, (*pstr)++) {
if (strchr(leaders, (int)**pstr) == NULL) { // find leading character of name
if (strchr(leaders, (int)**pstr) == NULL) { // find leading character of name
name = (*pstr)++;
break;
}
@@ -265,7 +265,7 @@ static stat_t _get_nv_pair(nvObj_t *nv, char **pstr, int8_t *depth)
for (i=0; true; i++, (*pstr)++) {
if (strchr(separators, (int)**pstr) != NULL) {
*(*pstr)++ = NUL;
strncpy(nv->token, name, TOKEN_LEN+1); // copy the string to the token
strncpy(nv->token, name, TOKEN_LEN+1); // copy the string to the token
break;
}
if (i == TOKEN_LEN) {
@@ -290,12 +290,12 @@ static stat_t _get_nv_pair(nvObj_t *nv, char **pstr, int8_t *depth)
nv->value = TYPE_NULL;
// numbers
} else if (isdigit(**pstr) || (**pstr == '-')) {// value is a number
nv->value = (float)strtod(*pstr, &tmp); // tmp is the end pointer
} else if (isdigit(**pstr) || (**pstr == '-')) { // value is a number
nv->value = (float)strtod(*pstr, &tmp); // tmp is the end pointer
if ((tmp == *pstr) || // if start pointer equals end the conversion failed
(strchr(terminators, *tmp) == NULL)) { // terminators are the only legal chars at the end of a number
nv->valuetype = TYPE_NULL; // report back an error
if ((tmp == *pstr) || // if start pointer equals end the conversion failed
(strchr(terminators, *tmp) == NULL)) { // terminators are the only legal chars at the end of a number
nv->valuetype = TYPE_NULL; // report back an error
return (STAT_BAD_NUMBER_FORMAT);
}
nv->valuetype = TYPE_FLOAT;
@@ -303,16 +303,16 @@ static stat_t _get_nv_pair(nvObj_t *nv, char **pstr, int8_t *depth)
// object parent
} else if (**pstr == '{') {
nv->valuetype = TYPE_PARENT;
// *depth += 1; // nv_reset_nv() sets the next object's level so this is redundant
// *depth += 1; // nv_reset_nv() sets the next object's level so this is redundant
(*pstr)++;
return(STAT_EAGAIN); // signal that there is more to parse
return(STAT_EAGAIN); // signal that there is more to parse
// strings
} else if (**pstr == '\"') { // value is a string
} else if (**pstr == '\"') { // value is a string
(*pstr)++;
nv->valuetype = TYPE_STRING;
if ((tmp = strchr(*pstr, '\"')) == NULL) {
return (STAT_JSON_SYNTAX_ERROR); // find the end of the string
return (STAT_JSON_SYNTAX_ERROR); // find the end of the string
}
*tmp = NUL;
@@ -352,13 +352,13 @@ static stat_t _get_nv_pair(nvObj_t *nv, char **pstr, int8_t *depth)
}
if (**pstr == '}') {
*depth -= 1; // pop up a nesting level
(*pstr)++; // advance to comma or whatever follows
(*pstr)++; // advance to comma or whatever follows
}
if (**pstr == ',') {
return (STAT_EAGAIN); // signal that there is more to parse
}
(*pstr)++;
return (STAT_OK); // signal that parsing is complete
return (STAT_OK); // signal that parsing is complete
}
/****************************************************************************
@@ -456,10 +456,10 @@ uint16_t json_serialize(nvObj_t *nv, char *out_buf, uint16_t size)
}
}
}
if (str >= str_max) { return (-1);} // signal buffer overrun
if (str >= str_max) { return (-1);} // signal buffer overrun
if ((nv = nv->nx) == NULL) { break;} // end of the list
while (nv->depth < prev_depth--) { // iterate the closing curlies
while (nv->depth < prev_depth--) { // iterate the closing curlies
need_a_comma = true;
*str++ = '}';
}
@@ -470,7 +470,7 @@ uint16_t json_serialize(nvObj_t *nv, char *out_buf, uint16_t size)
while (prev_depth-- > initial_depth) {
*str++ = '}';
}
str += sprintf((char *)str, "}\n"); // using sprintf for this last one ensures a NUL termination
str += sprintf((char *)str, "}\n"); // using sprintf for this last one ensures a NUL termination
if (str > out_buf + size) {
return (-1);
}
@@ -524,12 +524,12 @@ void json_print_list(stat_t status, uint8_t flags)
void json_print_response(uint8_t status)
{
if (js.json_verbosity == JV_SILENT) { // silent means no responses
if (js.json_verbosity == JV_SILENT) { // silent means no responses
return;
}
if (js.json_verbosity == JV_EXCEPTIONS) { // cutout for JV_EXCEPTIONS mode
if (js.json_verbosity == JV_EXCEPTIONS) { // cutout for JV_EXCEPTIONS mode
if (status == STAT_OK) {
if (cm.machine_state != MACHINE_INITIALIZING) { // always do full echo during startup
if (cm.machine_state != MACHINE_INITIALIZING) { // always do full echo during startup
return;
}
}
@@ -541,7 +541,7 @@ void json_print_response(uint8_t status)
nv_reset_nv_list();
nv_add_string((const char *)"err", escape_string(cs.bufp, cs.saved_buf));
} else if ((cm.machine_state != MACHINE_INITIALIZING) || (status == STAT_INITIALIZING)) { // always do full echo during startup
} else if ((cm.machine_state != MACHINE_INITIALIZING) || (status == STAT_INITIALIZING)) { // always do full echo during startup
uint8_t nv_type;
do {
if ((nv_type = nv_get_type(nv)) == NV_TYPE_NULL) break;
@@ -551,7 +551,7 @@ void json_print_response(uint8_t status)
nv->valuetype = TYPE_EMPTY;
}
//++++ } else if (nv_type == NV_TYPE_CONFIG) { // kill config echo if not enabled
//++++ } else if (nv_type == NV_TYPE_CONFIG) { // kill config echo if not enabled
//fix me if (js.echo_json_configs == false) {
// nv->valuetype = TYPE_EMPTY;
// }
@@ -628,8 +628,8 @@ stat_t json_set_jv(nvObj_t *nv)
js.echo_json_messages = true;
js.echo_json_configs = true;
} else {
if (nv->value >= JV_FOOTER) js.echo_json_footer = true;
if (nv->value >= JV_MESSAGES) js.echo_json_messages = true;
if (nv->value >= JV_FOOTER) js.echo_json_footer = true;
if (nv->value >= JV_MESSAGES) js.echo_json_messages = true;
if (nv->value >= JV_CONFIGS) js.echo_json_configs = true;
if (nv->value >= JV_LINENUM) js.echo_json_linenum = true;
if (nv->value >= JV_VERBOSE) js.echo_json_gcode_block = true;
+1 -8
View File
@@ -60,18 +60,11 @@ typedef enum { // json output print modes
JSON_RESPONSE_FORMAT // print the header/body/footer as a response object
} jsonFormats;
typedef enum {
JSON_SYNTAX_RELAXED = 0, // Does not require quotes on names
JSON_SYNTAX_STRICT // requires quotes on names
} jsonSyntaxMode;
typedef struct jsSingleton {
/*** config values (PUBLIC) ***/
uint8_t json_verbosity; // see enum in this file for settings
uint8_t json_syntax; // 0=relaxed syntax, 1=strict syntax
uint8_t echo_json_footer; // flags for JSON responses serialization
uint8_t echo_json_footer; // flags for JSON responses serialization
uint8_t echo_json_messages;
uint8_t echo_json_configs;
uint8_t echo_json_linenum;
+9 -26
View File
@@ -59,8 +59,6 @@ stat_t rpt_exception(stat_t status, const char *msg)
// you cannot send an exception report if the USB has not been set up. Causes a processor exception.
if (cs.controller_state >= CONTROLLER_READY) {
// always sends a strict string regardless of JS setting
sprintf(global_string_buf, "{\"er\":{\"fb\":%0.2f,\"st\":%d,\"msg\":\"%s - %s\"}}\n",
G2CORE_FIRMWARE_BUILD, status, get_status_message(status), msg);
xio_writeline(global_string_buf);
@@ -261,10 +259,10 @@ stat_t sr_request_status_report(cmStatusReportRequest request_type)
sr.status_report_systick = SysTickTimer_getValue();
if (request_type == SR_REQUEST_IMMEDIATE) {
sr.status_report_request = SR_FILTERED; // will trigger a filtered or verbose report depending on verbosity setting
sr.status_report_request = SR_FILTERED; // will trigger a filtered or verbose report depending on verbosity setting
} else if (request_type == SR_REQUEST_IMMEDIATE_FULL) {
sr.status_report_request = SR_VERBOSE; // will always trigger verbose report, regardless of verbosity setting
sr.status_report_request = SR_VERBOSE; // will always trigger verbose report, regardless of verbosity setting
} else if (request_type == SR_REQUEST_TIMED) {
sr.status_report_request = sr.status_report_verbosity;
@@ -301,7 +299,7 @@ stat_t sr_status_report_callback() // called by controller dispatcher
if (sr.status_report_request == SR_VERBOSE) {
_populate_unfiltered_status_report();
} else {
if (_populate_filtered_status_report() == false) { // no new data
if (_populate_filtered_status_report() == false) { // no new data
return (STAT_OK);
}
}
@@ -328,9 +326,9 @@ static stat_t _populate_unfiltered_status_report()
{
const char sr_str[] = "sr";
char tmp[TOKEN_LEN+1];
nvObj_t *nv = nv_reset_nv_list(); // sets *nv to the start of the body
nvObj_t *nv = nv_reset_nv_list(); // sets *nv to the start of the body
nv->valuetype = TYPE_PARENT; // setup the parent object (no length checking required)
nv->valuetype = TYPE_PARENT; // setup the parent object (no length checking required)
strcpy(nv->token, sr_str);
nv->index = nv_get_index((const char *)"", sr_str);// set the index - may be needed by calling function
nv = nv->nx; // no need to check for NULL as list has just been reset
@@ -339,9 +337,9 @@ static stat_t _populate_unfiltered_status_report()
if ((nv->index = sr.status_report_list[i]) == 0) { break;}
nv_get_nvObj(nv);
strcpy(tmp, nv->group); // flatten out groups - WARNING - you cannot use strncpy here...
strcpy(tmp, nv->group); // flatten out groups - WARNING - you cannot use strncpy here...
strcat(tmp, nv->token);
strcpy(nv->token, tmp); //...or here.
strcpy(nv->token, tmp); //...or here.
if ((nv = nv->nx) == NULL) {
return (cm_panic(STAT_BUFFER_FULL_FATAL, "_populate_unfiltered_status_report() sr link NULL")); // should never be NULL unless SR length exceeds available buffer array
@@ -538,14 +536,6 @@ stat_t qr_queue_report_callback() // called by controller dispatcher
} else {
sprintf(report, "qr:%d, qi:%d, qo:%d\n", qr.buffers_available,qr.buffers_added,qr.buffers_removed);
}
} else if (js.json_syntax == JSON_SYNTAX_RELAXED) {
if (qr.queue_report_verbosity == QR_SINGLE) {
sprintf(report, "{qr:%d}\n", qr.buffers_available);
} else {
sprintf(report, "{qr:%d,qi:%d,qo:%d}\n", qr.buffers_available, qr.buffers_added,qr.buffers_removed);
}
} else {
if (qr.queue_report_verbosity == QR_SINGLE) {
sprintf(report, "{\"qr\":%d}\n", qr.buffers_available);
@@ -666,15 +656,8 @@ uint8_t job_report_callback()
// no-op, job_ids are client app state
return (STAT_OK);
}
if (js.json_syntax == JSON_SYNTAX_RELAXED) {
sprintf(cs.out_buf, "{job:[%lu,%lu,%lu,%lu]}\n", cfg.job_id[0], cfg.job_id[1], cfg.job_id[2], cfg.job_id[3] );
xio_writeline(cs.out_buf);
} else {
sprintf(cs.out_buf, "{\"job\":[%lu,%lu,%lu,%lu]}\n", cfg.job_id[0], cfg.job_id[1], cfg.job_id[2], cfg.job_id[3] );
xio_writeline(cs.out_buf);
//job_clear_report();
}
sprintf(cs.out_buf, "{\"job\":[%lu,%lu,%lu,%lu]}\n", cfg.job_id[0], cfg.job_id[1], cfg.job_id[2], cfg.job_id[3] );
xio_writeline(cs.out_buf);
return (STAT_OK);
}
+3 -5
View File
@@ -57,13 +57,11 @@
// Communications and reporting settings
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
#define JSON_VERBOSITY JV_LINENUM // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define JSON_SYNTAX_MODE JSON_SYNTAX_STRICT // one of JSON_SYNTAX_RELAXED, JSON_SYNTAX_STRICT
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define JSON_VERBOSITY JV_LINENUM // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define QUEUE_REPORT_VERBOSITY QR_OFF // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
+8 -10
View File
@@ -57,18 +57,16 @@
// Communications and reporting settings
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define JSON_SYNTAX_MODE JSON_SYNTAX_STRICT // one of JSON_SYNTAX_RELAXED, JSON_SYNTAX_STRICT
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define QUEUE_REPORT_VERBOSITY QR_OFF // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define QUEUE_REPORT_VERBOSITY QR_OFF // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
#define STATUS_REPORT_MIN_MS 100 // milliseconds - enforces a viable minimum
#define STATUS_REPORT_INTERVAL_MS 250 // milliseconds - set $SV=0 to disable
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
#define STATUS_REPORT_MIN_MS 100 // milliseconds - enforces a viable minimum
#define STATUS_REPORT_INTERVAL_MS 250 // milliseconds - set $SV=0 to disable
// Defaults for 3DP
//#define STATUS_REPORT_DEFAULTS
@@ -57,13 +57,11 @@
// Communications and reporting settings
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define JSON_SYNTAX_MODE JSON_SYNTAX_STRICT // one of JSON_SYNTAX_RELAXED, JSON_SYNTAX_STRICT
#define QUEUE_REPORT_VERBOSITY QR_OFF // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
@@ -57,13 +57,11 @@
// Communications and reporting settings
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define JSON_VERBOSITY JV_LINENUM // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define JSON_SYNTAX_MODE JSON_SYNTAX_STRICT // one of JSON_SYNTAX_RELAXED, JSON_SYNTAX_STRICT
#define QUEUE_REPORT_VERBOSITY QR_OFF // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
+2 -3
View File
@@ -57,18 +57,17 @@
// Communications and reporting settings
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define JSON_SYNTAX_MODE JSON_SYNTAX_STRICT // one of JSON_SYNTAX_RELAXED, JSON_SYNTAX_STRICT
#define QUEUE_REPORT_VERBOSITY QR_OFF // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
#define STATUS_REPORT_MIN_MS 100 // milliseconds - enforces a viable minimum
#define STATUS_REPORT_INTERVAL_MS 250 // milliseconds - set $SV=0 to disable
#define STATUS_REPORT_DEFAULTS "line","posx","posy","posz","posa","feed","vel","unit","coor","dist","frmo","momo","stat"
// Alternate SRs that report in drawable units
//#define STATUS_REPORT_DEFAULTS "line","vel","mpox","mpoy","mpoz","mpoa","coor","ofsa","ofsx","ofsy","ofsz","dist","unit","stat","homz","homy","homx","momo"
-4
View File
@@ -140,10 +140,6 @@
#define JSON_VERBOSITY JV_MESSAGES // {jv: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#endif
#ifndef JSON_SYNTAX_MODE
#define JSON_SYNTAX_MODE JSON_SYNTAX_STRICT // {js: JSON_SYNTAX_RELAXED, JSON_SYNTAX_STRICT
#endif
#ifndef QUEUE_REPORT_VERBOSITY
#define QUEUE_REPORT_VERBOSITY QR_OFF // {qv: QR_OFF, QR_SINGLE, QR_TRIPLE
#endif
+7 -9
View File
@@ -52,17 +52,15 @@
// Communications and reporting settings
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define JSON_SYNTAX_MODE JSON_SYNTAX_STRICT // one of JSON_SYNTAX_RELAXED, JSON_SYNTAX_STRICT
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define QUEUE_REPORT_VERBOSITY QR_OFF // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define QUEUE_REPORT_VERBOSITY QR_OFF // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
#define STATUS_REPORT_MIN_MS 100 // milliseconds - enforces a viable minimum
#define STATUS_REPORT_INTERVAL_MS 250 // milliseconds - set $SV=0 to disable
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
#define STATUS_REPORT_MIN_MS 100 // milliseconds - enforces a viable minimum
#define STATUS_REPORT_INTERVAL_MS 250 // milliseconds - set $SV=0 to disable
//#define STATUS_REPORT_DEFAULTS
//"line","posx","posy","posz","posa","bcr","feed","vel","unit","coor","dist","admo","frmo","momo","stat"
+8 -10
View File
@@ -66,18 +66,16 @@
// Communications and reporting settings
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define JSON_SYNTAX_MODE JSON_SYNTAX_STRICT // one of JSON_SYNTAX_RELAXED, JSON_SYNTAX_STRICT
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define QUEUE_REPORT_VERBOSITY QR_SINGLE // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define QUEUE_REPORT_VERBOSITY QR_SINGLE // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
#define STATUS_REPORT_MIN_MS 100 // milliseconds - enforces a viable minimum
#define STATUS_REPORT_INTERVAL_MS 250 // milliseconds - set $SV=0 to disable
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
#define STATUS_REPORT_MIN_MS 100 // milliseconds - enforces a viable minimum
#define STATUS_REPORT_INTERVAL_MS 250 // milliseconds - set $SV=0 to disable
#define STATUS_REPORT_DEFAULTS \
"mpox", "mpoy", "mpoz", "ofsx", "ofsy", "ofsz", "g55x", "g55y", "g55z", "unit", "stat", "coor", "momo", "dist", \
"home", "mots", "plan", "line", "path", "frmo", "hold", "macs", "cycs"
+4 -6
View File
@@ -79,13 +79,11 @@ constexpr float H3_DEFAULT_D = 100.0;
// Communications and reporting settings
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
#define JSON_VERBOSITY JV_CONFIGS // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define JSON_SYNTAX_MODE JSON_SYNTAX_STRICT // one of JSON_SYNTAX_RELAXED, JSON_SYNTAX_STRICT
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define JSON_VERBOSITY JV_CONFIGS // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define QUEUE_REPORT_VERBOSITY QR_SINGLE
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
+1 -6
View File
@@ -56,16 +56,11 @@
// Communications and reporting settings
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define COM_EXPAND_CR false
#define COM_ENABLE_ECHO false
#define COM_ENABLE_FLOW_CONTROL FLOW_CONTROL_XON // FLOW_CONTROL_OFF, FLOW_CONTROL_XON, FLOW_CONTROL_RTS
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define JSON_SYNTAX_MODE JSON_SYNTAX_STRICT // one of JSON_SYNTAX_RELAXED, JSON_SYNTAX_STRICT
#define QUEUE_REPORT_VERBOSITY QR_OFF // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
+1 -5
View File
@@ -54,18 +54,14 @@
// Communications and reporting settings
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
//#define JSON_VERBOSITY JV_SILENT // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define JSON_SYNTAX_MODE JSON_SYNTAX_STRICT // one of JSON_SYNTAX_RELAXED, JSON_SYNTAX_STRICT
#define QUEUE_REPORT_VERBOSITY QR_OFF // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
//#define STATUS_REPORT_VERBOSITY SR_VERBOSE // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
#define STATUS_REPORT_MIN_MS 100 // milliseconds - enforces a viable minimum
#define STATUS_REPORT_INTERVAL_MS 250 // milliseconds - set $SV=0 to disable
+5 -7
View File
@@ -56,14 +56,12 @@
// Communications and reporting settings
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define JSON_SYNTAX_MODE JSON_SYNTAX_STRICT // one of JSON_SYNTAX_RELAXED, JSON_SYNTAX_STRICT
#define QUEUE_REPORT_VERBOSITY QR_TRIPLE // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define QUEUE_REPORT_VERBOSITY QR_TRIPLE // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
#define STATUS_REPORT_MIN_MS 200 // milliseconds - enforces a viable minimum
+4 -6
View File
@@ -57,14 +57,12 @@
// Communications and reporting settings
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define JSON_SYNTAX_MODE JSON_SYNTAX_STRICT // one of JSON_SYNTAX_RELAXED, JSON_SYNTAX_STRICT
#define QUEUE_REPORT_VERBOSITY QR_OFF // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define QUEUE_REPORT_VERBOSITY QR_OFF // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
#define STATUS_REPORT_MIN_MS 200 // milliseconds - enforces a viable minimum
+1 -6
View File
@@ -50,19 +50,14 @@
// Communications and reporting settings
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
//#define JSON_VERBOSITY JV_SILENT // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
#define JSON_SYNTAX_MODE JSON_SYNTAX_STRICT // one of JSON_SYNTAX_RELAXED, JSON_SYNTAX_STRICT
#define QUEUE_REPORT_VERBOSITY QR_OFF // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
//#define STATUS_REPORT_VERBOSITY SR_VERBOSE // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
#define STATUS_REPORT_MIN_MS 100 // milliseconds - enforces a viable minimum
#define STATUS_REPORT_INTERVAL_MS 250 // milliseconds - set $SV=0 to disable