#include <urgManualCapture.h>


Public Member Functions | |
| const char * | what (void) |
| エラー状態を示す文字列を返す | |
| int | connect (const char *device, long baudrate) |
| センサへの接続を行う | |
| int | connectSocket (const char *host, short port) |
| ソケットに対して接続 | |
| void | disconnect (void) |
| センサとの接続を切断する | |
| bool | isConnected (void) |
| センサと接続されているかを返す | |
| void | set_recvTimeout (int timeout) |
| 受信時のタイムアウトを指定 | |
| void | setTimestampMode (bool withTimestamp) |
| タイムスタンプ取得モードに設定する | |
| virtual int | capture (long length[], int first_index, int last_index, int group, URGInterface::urgParams_t ¶ms, unsigned long *raw_timestamp=NULL) |
| センサからのデータ取得 | |
| int | getCaptureTimes (void) |
| センサからデータを取得した回数を返す | |
| int | send (const char *data, int size) |
| センサに直接コマンドを転送する | |
| int | recv (char *data, int maxsize, long timeout) |
| センサから直接メッセージを受け取る | |
| int | recv_line (char *data, int maxsize, long timeout) |
| センサから1行分のメッセージを直接受け取る | |
| int | laser (bool on) |
Protected Member Functions | |
| long | decode (const char *data, int data_byte) |
| int | recvCaptureData (long *data, size_t max_size, unsigned long *timestamp, URGInterface::urgParams_t ¶ms) |
| int | readLine (char *buffer, int timeout) |
| int | addRecvData (const char buffer[]) |
Protected Attributes | |
| bool | laser_on |
| int | remain_byte |
| char | remain_data [3] |
| bool | enableTimestamp |
| std::vector< long > | recv_data |
Friends | |
| class | URGCtrlTest |
Definition at line 21 of file urgManualCapture.h.
| const char * URGManualCapture::what | ( | void | ) | [virtual] |
エラー状態を示す文字列を返す
Implements URGCapture.
Definition at line 29 of file urgManualCapture.cpp.
| int URGManualCapture::connect | ( | const char * | device, | |
| long | baudrate | |||
| ) | [virtual] |
センサへの接続を行う
| device | [i] 接続デバイス名 | |
| baudrate | [i] 接続ボーレート |
| 0 | 正常終了 | |
| 戻り値 | < 0 エラー |
Implements URGCapture.
Definition at line 34 of file urgManualCapture.cpp.
References ConnectionDevice::connect(), ConnectionDevice::disconnect(), disconnect(), ConnectionDevice::flush(), ConnectionDevice::recv(), ConnectionDevice::send(), ConnectionDevice::setBaudrate(), and ConnectionDevice::what().
| int URGManualCapture::connectSocket | ( | const char * | host, | |
| short | port | |||
| ) | [virtual] |
ソケットに対して接続
| host | [i] 接続ホスト | |
| port | [i] 接続ポート |
| 0 | 正常終了 | |
| 戻り値 | < 0 エラー |
Implements URGCapture.
Definition at line 76 of file urgManualCapture.cpp.
References ConnectionDevice::connect(), disconnect(), and ConnectionDevice::what().
| void URGManualCapture::disconnect | ( | void | ) | [virtual] |
センサとの接続を切断する
Implements URGCapture.
Definition at line 87 of file urgManualCapture.cpp.
Referenced by connect(), and connectSocket().
| bool URGManualCapture::isConnected | ( | void | ) | [virtual] |
センサと接続されているかを返す
Implements URGCapture.
Definition at line 95 of file urgManualCapture.cpp.
References ConnectionDevice::isConnected().
| void URGManualCapture::set_recvTimeout | ( | int | timeout | ) | [virtual] |
受信時のタイムアウトを指定
| timeout | [i] タイムアウト時間 [msec] |
Implements URGCapture.
Definition at line 500 of file urgManualCapture.cpp.
| void URGManualCapture::setTimestampMode | ( | bool | withTimestamp | ) | [virtual] |
タイムスタンプ取得モードに設定する
| withTimestamp | [i] タイムスタンプが利用できる場合 true |
Implements URGCapture.
Definition at line 108 of file urgManualCapture.cpp.
References enableTimestamp.
| int URGManualCapture::capture | ( | long | length[], | |
| int | first_index, | |||
| int | last_index, | |||
| int | group, | |||
| URGInterface::urgParams_t & | params, | |||
| unsigned long * | raw_timestamp = NULL | |||
| ) | [virtual] |
センサからのデータ取得
配列に格納されるデータと角度の関係(センサ真上より)
| length | [o] 測定データが格納される配列 | |
| first_index | [i] 測定データの要求開始位置 | |
| last_index | [i] 測定データの要求終了位置 | |
| group | [i] グルーピングを行うデータ個数 | |
| params | [i] センサのパラメータ情報 | |
| raw_timestamp | [o] センサのタイムスタンプ値 |
| 戻り値 | > 0 取得したデータ配列の添え字の最大値 | |
| 戻り値 | < 0 エラー |
Implements URGCapture.
Reimplemented in URGAutoCapture.
Definition at line 418 of file urgManualCapture.cpp.
References ConnectionDevice::flush(), ConnectionDevice::send(), and URGInterface::urgParams_t::sense_steps.
| int URGManualCapture::getCaptureTimes | ( | void | ) | [virtual] |
センサからデータを取得した回数を返す
Implements URGCapture.
Reimplemented in URGAutoCapture.
Definition at line 459 of file urgManualCapture.cpp.
| int URGManualCapture::send | ( | const char * | data, | |
| int | size | |||
| ) | [virtual] |
センサに直接コマンドを転送する
| data | [i] 送信データ | |
| size | [i] 送信データサイズ |
| 戻り値 | >= 0 送信バイト数 | |
| 戻り値 | < 0 エラー |
Implements URGCapture.
Definition at line 464 of file urgManualCapture.cpp.
References ConnectionDevice::send().
| int URGManualCapture::recv | ( | char * | data, | |
| int | maxsize, | |||
| long | timeout | |||
| ) | [virtual] |
センサから直接メッセージを受け取る
| data | [o] 受信データ | |
| maxsize | [i] 受信可能サイズ | |
| timeout | [i] タイムアウト [msec] |
| 戻り値 | >= 0 受信バイト数 | |
| 戻り値 | < 0 エラー |
Implements URGCapture.
Definition at line 472 of file urgManualCapture.cpp.
References ConnectionDevice::recv().
| int URGManualCapture::recv_line | ( | char * | data, | |
| int | maxsize, | |||
| long | timeout | |||
| ) | [virtual] |
センサから1行分のメッセージを直接受け取る
| data | [o] 受信データ | |
| maxsize | [i] 受信可能サイズ | |
| timeout | [i] タイムアウト [msec] |
| 戻り値 | >= 0 受信バイト数 | |
| 戻り値 | < 0 エラー |
Implements URGCapture.
Definition at line 480 of file urgManualCapture.cpp.
References ConnectionDevice::recv().
bool URGManualCapture::enableTimestamp [protected] |
1.5.7.1