|
|
TTY streams are used to represent serial connections that are fully "streamable" objects using C++ stream classes and friends.
TTYStream () |
This constructor is used to derive "ttystream", a more C++ style version of the TTYStream class.
void Allocate (void) |
Used to allocate the buffer space needed for iostream operations. This is based on MAX_INPUT.
void endStream (void) |
Used to terminate the buffer space and clean up the tty connection. This function is called by the destructor.
int underflow (void) |
This streambuf method is used to load the input buffer through the established tty serial port.
Returns: char from get buffer, EOF also possible.
int overflow (int ch) |
This streambuf method is used to write the output buffer through the established tty port.
Parameters:
char | to push through. |
Returns: char pushed through.
int sync (void) |
Flushes the stream input and out buffers, writes pending output.
Returns: 0 on success.
TTYStream (const char *filename) |
Create and ipen a tty serial port.
Parameters:
char | name of device to open. |
~TTYStream () |
End the tty stream and cleanup.
void Interactive (bool flag) |
Set tty mode to buffered or "interactive". When interactive, all streamed I/O is directly sent to the serial port immediately.
Parameters:
bool | set to true to make interactive. |