Currently when using OF serial you need to deal with Serial Bytes and convert that into a usable number.
This unfortunately is a bit complicated to quickly get projects going or to transfer from Processing to OF.
I am requesting a function added to OpenFrameworks Serial to read in Serial Print string statements like Processing: https://processing.org/reference/libraries/serial/Serial_read_.html
This is Processing’s Serial source code(java): https://github.com/processing/processing/blob/349f413a3fb63a75e0b096097a5b0ba7f5565198/java/libraries/serial/src/processing/serial/Serial.java
ofxSerial has this capability built in.
If you want the exact processing-like behavior you can use
std::size_t readBytes(std::string& buffer) const;
std::size_t bytesRead = serial.readBytes(buffer);
buffer = serial.readStringUntil('\n'); // or whatever character you like.
For more sophisticated event-buffer-based handling, see this example: