In response to your answer: whywhy don't you think it is convenient? As As you already noticed, you can use the enum values directly in your sketch.
Anyway, it is better to use a switch statement:
Serial.write("ODB State: ");
switch (odb.getState())
{ {
case ODB_DISCONNECTED:
Serial.write("Disconnected");
break;
case OBD_CONNECTING:
Serial.write("Connecting");
break;
case OBD_CONNECTED:
Serial.write("Connected");
break;
case OBD_FAILED:
Serial.write("Failed");
break;
default:
// Error case
break;
}
Serial.write("\n");
This way, whenever the enum is changed (e.g. added items), you automatically fall into the error state, so you know you have to adapter the code.