ArDeviceConnection Class 参考
Base class for device connections. 更多...
#include <ArDeviceConnection.h>
继承树—— ArDeviceConnection::
成员列表.
公有类型 | |
enum | Status { STATUS_NEVER_OPENED = 1, STATUS_OPEN, STATUS_OPEN_FAILED, STATUS_CLOSED_NORMALLY, STATUS_CLOSED_ERROR } |
公有方法 | |
ArDeviceConnection (void) | |
构造函数. | |
virtual | ~ArDeviceConnection (void) |
析构函数/强制关闭连接 . | |
virtual int | read (const char *data, unsigned int size, unsigned int msWait=0)=0 |
从连接读数据 . 更多... | |
virtual int | write (const char *data, unsigned int size)=0 |
从连接读数据 . 更多... | |
virtual int | getStatus (void)=0 |
获取连接的状态 . 更多... | |
std::string | getStatusMessage (int messageNumber) |
获取状态相关的描述 . 更多... | |
virtual bool | openSimple (void)=0 |
用setLocation给与的参数重新打开连接. | |
virtual bool | close (void) |
关闭连接. 更多... | |
virtual std::string | getOpenMessage (int messageNumber)=0 |
获取设备相关消息字符串 . 更多... | |
virtual ArTime | getTimeRead (int index)=0 |
获取读进来的时间数据. 更多... | |
virtual bool | isTimeStamping (void)=0 |
判断时间戳是否有效 . 更多... |
详细介绍
此类是device connections的基础类
最主要使用在连接机器人或者模拟器上的,但是也可以用来连接到激光传感器或其他设备。
注意:这是一个基类,所以在实际中,我们会用到一些继承自该类的类;同样,得注意到在这些类里面我们有用来设置连接位置的setPort;继承的类同样含有返回更详细信息的open函数,该函数需要关于连接位置的参数。
成员枚举变量——文档
|
|
成员函数文档
|
关闭连接
在类 ArSerialConnection, 和 ArTcpConnection 中重新实现。 |
|
获取打开设备相关的消息字符串 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
在类 ArSerialConnection, 和 ArTcpConnection 中重新实现。 |
|
获取当前连接的状态 获取当前连接的状态,状态值在列表变量之中定义。如果需要得到状态之相关的字符串描述,请使用getStatusMessage函数
在类 ArSerialConnection, 和 ArTcpConnection 中重新实现。 |
|
获取状态相关的描述字符串
|
|
获取得到数据的时刻
在类 ArSerialConnection, 和 ArTcpConnection 中重新实现。 |
|
测试是否存在有效时间戳。
在类 ArSerialConnection, 和 ArTcpConnection 中重新实现。 |
|
自连接中读取数据 自连接中读取数据
在类 ArSerialConnection, 和 ArTcpConnection 中重新实现。 |
|
向连接写数据 向连接写数据
在类 ArSerialConnection, 和 ArTcpConnection 中重新实现。 |
该文档产生自下列文件:
- ArDeviceConnection.h
- ArDeviceConnection.cpp
产生于 Mon Mar 11 15:48:03 2002 for Aria 1.2.12 written by Dimitri van Heesch, © 1997-2001(林茂翻译2006.4.27) 原文:
ArDeviceConnection Class Reference
Base class for device connections. More...#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 | 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... |
Detailed Description
Base class for device connections.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
Member Enumeration Documentation
|
|
Member Function Documentation
|
Closes the connection.
Reimplemented in 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 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 ArSerialConnection, and ArTcpConnection. |
|
Gets the description string associated with the status.
|
|
Gets the time data was read in.
Reimplemented in ArSerialConnection, and ArTcpConnection. |
|
sees if timestamping is really going on or not.
Reimplemented in ArSerialConnection, and ArTcpConnection. |
|
Reads data from connection. Reads data from connection
Reimplemented in ArSerialConnection, and ArTcpConnection. |
|
Writes data to connection. Writes data to connection
Reimplemented in ArSerialConnection, and ArTcpConnection. |
The documentation for this class was generated from the following files:
- ArDeviceConnection.h
- ArDeviceConnection.cpp
Generated on Mon Mar 11 15:48:03 2002 for Aria 1.2.12 written by Dimitri van Heesch, © 1997-2001