#include <ArDeviceConnection.h>
Inheritance diagram for ArDeviceConnection::
Public Types | |
enum | Status { STATUS_NEVER_OPENED = 1, STATUS_OPEN, STATUS_OPEN_FAILED, STATUS_CLOSED_NORMALLY, STATUS_CLOSED_ERROR } |
Public Methods | |
ArDeviceConnection (void) | |
constructor. | |
virtual | ~ArDeviceConnection (void) |
destructor also forces a close on the connection. | |
virtual int | read (const char *data, unsigned int size, unsigned int msWait=0)=0 |
Reads data from connection. More... | |
virtual int | writePacket (ArBasePacket *packet) |
Writes data to connection. More... | |
virtual int | write (const char *data, unsigned int size)=0 |
Writes data to connection. More... | |
virtual int | getStatus (void)=0 |
Gets the status of the connection, which is one of the enum status. More... | |
std::string | getStatusMessage (int messageNumber) |
Gets the description string associated with the status. More... | |
virtual bool | openSimple (void)=0 |
Opens the connection again, using the values from setLocation or. | |
virtual bool | close (void) |
Closes the connection. More... | |
virtual std::string | getOpenMessage (int messageNumber)=0 |
Gets the string of the message associated with opening the device. More... | |
virtual ArTime | getTimeRead (int index)=0 |
Gets the time data was read in. More... | |
virtual bool | isTimeStamping (void)=0 |
sees if timestamping is really going on or not. More... |
Base class for device connections, this is mostly for connections to the robot or simulator but could also be used for a connection to a laser or other device
Note that this is mostly a base class, so if you'll want to use one of the classes which inherit from this one... also note that in those classes is where you'll find setPort which sets the place the device connection will try to connect to... the inherited classes also have an open which returns more detailed information about the open attempt, and which takes the parameters for where to connect
|
|
|
Closes the connection.
Reimplemented in ArLogFileConnection, ArSerialConnection, and ArTcpConnection. |
|
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 in ArLogFileConnection, ArSerialConnection, and ArTcpConnection. |
|
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 in ArLogFileConnection, ArSerialConnection, and ArTcpConnection. |
|
Gets the description string associated with the status.
|
|
Gets the time data was read in.
Reimplemented in ArLogFileConnection, ArSerialConnection, and ArTcpConnection. |
|
sees if timestamping is really going on or not.
Reimplemented in ArLogFileConnection, ArSerialConnection, and ArTcpConnection. |
|
Reads data from connection. Reads data from connection
Reimplemented in ArLogFileConnection, ArSerialConnection, and ArTcpConnection. |
|
Writes data to connection. Writes data to connection
Reimplemented in ArLogFileConnection, ArSerialConnection, and ArTcpConnection. |
|
Writes data to connection. Writes data to connection from a packet
|