INTRODUCTION Overview Download and Install Documentation Publications REPOSITORY Libraries DEVELOPER Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
gbxserialacfr::Serial Class ReferenceEncapsulates a serial port. More...
Inherits gbxserialacfr::Uncopyable.
Detailed DescriptionEncapsulates a serial port.This class hard-codes some options, such as:
Constructor & Destructor Documentation
Opens a device References getStatusString(), setBaudRate(), and gbxserialacfr::lockfile::LockFileException::what().
Member Function Documentation
Returns the number of bytes available for reading. Waits according to the timeout. Returns:
References bytesAvailable().
Flushs both input and output buffers. This discards all data in buffers. Referenced by gbxsmartbatteryacfr::OceanServerReader::reset().
Reads up to Referenced by readFull(), and readStringUntil().
Tries to read exactly If timeouts are not enabled we might block forever, waiting for the number of bytes we want or an error. If timeouts are enabled we won't block more than the timeout specified. Returns -1 if it timed out. NOTE: The timeout applies for each individual read() call. We might have to make lots of them, so the total time for which this function blocks might be longer than the specified timeout. References read().
Short-hand for "readStringUntil(str,'\n');" Reads everything up to and including the ' References readStringUntil().
Reads a string into , up to and including the first instance of Returns the number of bytes read (or '-1' on timeout). If timeouts are not enabled we might block forever, waiting for the number of bytes we want or an error. If timeouts are enabled we won't block more than the timeout specified. Returns -1 if it timed out. NOTE: The timeout applies for each individual read() call. We might have to make lots of them, so the total time for which this function blocks might be longer than the specified timeout. References read(). Referenced by readLine().
Sets timeout. Can be used to change the value of timeouts if they're set, but can't set the {en|dis}abled state of timeouts.
Gets the current timeout. A timeout value of (sec=0,usec=0) indicates 'timeouts disabled'.
Writes a ("\0"-terminated) string. Returns the number of bytes written. References write().
The documentation for this class was generated from the following files:
|