#include <ArSerialConnection.h>
Inheritance diagram for ArSerialConnection::
Public Types | |
enum | Open { OPEN_COULD_NOT_OPEN_PORT = 1, OPEN_COULD_NOT_SET_UP_PORT, OPEN_INVALID_BAUD_RATE, OPEN_COULD_NOT_SET_BAUD, OPEN_ALREADY_OPEN } |
Public Methods | |
ArSerialConnection (void) | |
Constructor. | |
virtual | ~ArSerialConnection (void) |
Destructor also closes the connection. | |
int | open (const char *port=NULL) |
Opens the serial port. More... | |
void | setPort (const char *port=NULL) |
Sets the port this will use. More... | |
const char * | getPort (void) |
Gets the port this is using. More... | |
virtual bool | openSimple (void) |
Opens the connection again, using the values from setLocation or. | |
virtual int | getStatus (void) |
Gets the status of the connection, which is one of the enum status. More... | |
virtual bool | close (void) |
Closes the connection. More... | |
virtual int | read (const char *data, unsigned int size, unsigned int msWait=0) |
Reads data from connection. More... | |
virtual int | write (const char *data, unsigned int size) |
Writes data to connection. More... | |
virtual std::string | getOpenMessage (int messageNumber) |
Gets the string of the message associated with opening the device. More... | |
bool | setBaud (int baud) |
Sets the baud rate on the connection. More... | |
int | getBaud (void) |
Gets what the current baud rate is set to. More... | |
bool | setHardwareControl (bool hardwareControl) |
Sets whether to enable or disable the hardware control lines. More... | |
bool | getHardwareControl (void) |
Gets whether the hardware control lines are enabled or disabled. More... | |
virtual ArTime | getTimeRead (int index) |
Gets the time data was read in. More... | |
virtual bool | isTimeStamping (void) |
sees if timestamping is really going on or not. More... |
|
|
|
Closes the connection.
Reimplemented from ArDeviceConnection. |
|
Gets what the current baud rate is set to.
|
|
Gets whether the hardware control lines are enabled or disabled.
|
|
Gets the string of the message associated with opening the device. Each class inherited from this one has an open method which returns 0 for success or an integer which can be passed into this function to obtain a string describing the reason for failure
Reimplemented from ArDeviceConnection. |
|
Gets the port this is using.
|
|
Gets the status of the connection, which is one of the enum status. Gets the status of the connection, which is one of the enum status. If you want to get a string to go along with the number, use getStatusMessage
Reimplemented from ArDeviceConnection. |
|
Gets the time data was read in.
Reimplemented from ArDeviceConnection. |
|
sees if timestamping is really going on or not.
Reimplemented from ArDeviceConnection. |
|
Opens the serial port.
|
|
Reads data from connection. Reads data from connection
Reimplemented from ArDeviceConnection. |
|
Sets the baud rate on the connection.
|
|
Sets whether to enable or disable the hardware control lines.
|
|
Sets the port this will use.
|
|
Writes data to connection. Writes data to connection
Reimplemented from ArDeviceConnection. |