void MsgHandler::field_not_found(uint8_t *msg, const char *label) { char all_labels[256]; uint8_t type = msg[2]; string_for_labels(all_labels, 256); ::printf("Field (%s) not found for id=%d; options are (%s)\n", label, type, all_labels); abort(); }
void MsgHandler::require_field(uint8_t *msg, const char *label, char *buffer, uint8_t bufferlen) { if (! field_value(msg, label, buffer, bufferlen)) { char all_labels[256]; string_for_labels(all_labels, 256); ::printf("Field (%s) not found; options are (%s)\n", label, all_labels); exit(1); } }