|
MOOS 0.2375
|
Implements linux aspects of CMOOSSerialPort. More...
#include <MOOSLinuxSerialPort.h>


Public Member Functions | |
| virtual bool | Close () |
| CMOOSLinuxSerialPort () | |
| virtual | ~CMOOSLinuxSerialPort () |
| virtual bool | Create (const char *pPortNum=DEFAULT_PORT, int nBaudRate=DEFAULT_BAUDRATE) |
| int | Write (const char *Str, int nLen, double *pTime=NULL) |
| virtual void | Break () |
| virtual int | Flush () |
| int | GetFD () |
Protected Member Functions | |
| virtual int | GrabN (char *pBuffer, int nRequired) |
Protected Attributes | |
| int | m_nPortFD |
| struct termios | m_OldPortOptions |
| struct termios | m_PortOptions |
Implements linux aspects of CMOOSSerialPort.
Definition at line 59 of file MOOSLinuxSerialPort.h.
| CMOOSLinuxSerialPort::CMOOSLinuxSerialPort | ( | ) |
constructor.
Definition at line 43 of file MOOSLinuxSerialPort.cpp.
| CMOOSLinuxSerialPort::~CMOOSLinuxSerialPort | ( | ) | [virtual] |
Destructor.Reset the port option to what every they were before and close port
Definition at line 50 of file MOOSLinuxSerialPort.cpp.
| void CMOOSLinuxSerialPort::Break | ( | ) | [virtual] |
send break signal
The ability to send a Break signal (~.5sec of tying the TX pin low) in Linux
Reimplemented from CMOOSSerialPort.
Definition at line 214 of file MOOSLinuxSerialPort.cpp.
| bool CMOOSLinuxSerialPort::Close | ( | void | ) | [virtual] |
Reimplemented from CMOOSSerialPort.
Definition at line 252 of file MOOSLinuxSerialPort.cpp.
| bool CMOOSLinuxSerialPort::Create | ( | const char * | sPort = DEFAULT_PORT, |
| int | nBaudRate = DEFAULT_BAUDRATE |
||
| ) | [virtual] |
Create and set up the port
Implements CMOOSSerialPort.
Definition at line 56 of file MOOSLinuxSerialPort.cpp.
| int CMOOSLinuxSerialPort::Flush | ( | void | ) | [virtual] |
Call this method in order to free the Output Buffer of any characters that may not have been sent during our last write. We use the queue_selector TCOFLUSH.
Reimplemented from CMOOSSerialPort.
Definition at line 236 of file MOOSLinuxSerialPort.cpp.
| int CMOOSLinuxSerialPort::GetFD | ( | ) |
returns the file descriptor
returns the port file descriptor
Definition at line 128 of file MOOSLinuxSerialPort.cpp.
| int CMOOSLinuxSerialPort::GrabN | ( | char * | pBuffer, |
| int | nRequired | ||
| ) | [protected, virtual] |
Just grab N characters NOW
Implements CMOOSSerialPort.
Definition at line 134 of file MOOSLinuxSerialPort.cpp.
| int CMOOSLinuxSerialPort::Write | ( | const char * | Str, |
| int | nLen, | ||
| double * | pTime = NULL |
||
| ) | [virtual] |
Write a string out of port
Write a string out of the port. The time at which it was written is written to *pTime
Implements CMOOSSerialPort.
Definition at line 159 of file MOOSLinuxSerialPort.cpp.
int CMOOSLinuxSerialPort::m_nPortFD [protected] |
FileDescriptor of Port
Definition at line 84 of file MOOSLinuxSerialPort.h.
struct termios CMOOSLinuxSerialPort::m_OldPortOptions [protected] |
Definition at line 90 of file MOOSLinuxSerialPort.h.
struct termios CMOOSLinuxSerialPort::m_PortOptions [protected] |
Definition at line 91 of file MOOSLinuxSerialPort.h.
1.7.4