qrk Namespace Reference

Quick Robot Development Kit. More...

Classes

class  Angle
 角度の型管理 More...
class  CaptureSettings
 Data acquisition setting. More...
class  ConditionVariable
 条件変数 More...
class  Connection
 通信インターフェース More...
class  Coordinate
 座標系 More...
class  DeviceIpManager
 シミュレータ接続用の IP ポート管理 More...
class  DeviceServer
 シミュレーション用のデバイスサーバ More...
class  FindComPorts
 シリアルポートの探索を行う More...
class  IsUsbCom
 USB ポートの判別クラス. More...
class  Lock
 ロッククラス More...
class  LockGuard
 ロックガードクラス More...
class  LogNameHolder
 ログ名の管理 More...
class  mConnection
 モニタ対応の通信インターフェース More...
class  MonitorDataHandler
 モニタデータ管理クラス More...
class  MonitorEventScheduler
 モニタイベント管理 More...
class  MonitorModeManager
class  mUrgCtrl
 モニタ対応の URG 制御 More...
class  Point
 位置の型定義 More...
class  Position
 位置 More...
class  RangeSensor
 Range sensor interface. More...
class  RangeSensorParameter
 class to manage range sensor's parameter More...
class  RingBuffer
 リングバッファ More...
class  Semaphore
 セマフォ管理 More...
class  SerialDevice
 シリアル通信クラス More...
class  TcpipSocket
 TCP/IP 通信. More...
class  Thread
 スレッド処理 More...
class  UrgCtrl
 URG sensor control. More...
class  UrgServer
 シミュレータ用の URG サーバ More...
class  UrgUsbCom
 Search for USB connected port. More...

Enumerations

enum  { ReceiveTimeout = -1, ErrorLastIndex = -2 }
enum  CaptureType {
  TypeUnknown, QT, GD, GS,
  MD, MS, ME, Mx_Reply,
  InvalidData
}
 

Receive data type.

More...
enum  RangeCaptureMode { ManualCapture, AutoCapture, IntensityCapture }
 

The type in which data is acquired.

More...

Functions

Angle deg (int degree)
 degree 角度を Angle に変換
void delay (int msec)
 待機
size_t findFiles (std::vector< std::string > &files, const char *root_path, const boost::xpressive::sregex pattern)
bool isLF (const char ch)
 改行コードかを返す
bool isUsingComDriver (const char *com_port, const char *driver_name)
 指定ドライバを利用している COM ポートが存在するかを返す
int log_printf (const char *format,...)
 ログ記録用
void log_setName (const char *file_name)
 出力ファイル名を変更する
Angle rad (double radian)
 radian 角度を Angle に変換
int readline (Connection *con, char *buf, const size_t count, const int timeout)
 改行までのデータ読み出し
void skip (Connection *con, int total_timeout, int each_timeout=0)
 受信データを読み飛ばす
size_t split (std::vector< std::string > &tokens, const std::string &original, const char *split_pattern=" \t", bool continious_pattern=true)
 指定文字による分割
template<class T >
void swapConnection (T &a, T &b)
 接続オブジェクトの交換
int ticks (void)
 タイムスタンプの取得
template<class T >
long urgSerialId (T *urg)
 Get serial ID.

Detailed Description

Quick Robot Development Kit.

モニタのモード管理

Quick Robot Develoment Kit.

プログラム実行時に渡された引数により、動作モードを決定する。1度決定された動作モードは、変更を許さない。


Enumeration Type Documentation

anonymous enum
Enumerator:
ReceiveTimeout 
ErrorLastIndex 

Definition at line 18 of file Connection.h.

Receive data type.

Enumerator:
TypeUnknown 

Unknown.

QT 

Quit to receive.

GD 

Get Data (each data size: 3 byte).

GS 

Get Short data (each data size: 2 byte).

MD 

Measure Data (each data size: 3 byte).

MS 

Measure Data (each data size: 2 byte).

ME 

Intensity data.

Mx_Reply 

The first response message of Mx command.

InvalidData 

Error response.

Definition at line 21 of file CaptureSettings.h.

The type in which data is acquired.

There are 2 types of data acquistion. One is "Automatic acquisition" in which data is transmitted continuously once the command is sent to sensor. Other type is "sequential acquisition" in which only one set of data is transmitted when command is sent to sensor.

gd_md_sequence.png

sequential acquisition(GD/GS) and Automatic acquisition(MD/MS)

High intensity data is acquired by "automatic acquisition" type

Enumerator:
ManualCapture 

sequential acquisition

AutoCapture 

Automatic acquisition.

IntensityCapture 

High intensity acquisition.

Definition at line 24 of file RangeCaptureMode.h.


Function Documentation

Angle qrk::deg ( int  degree  ) 

degree 角度を Angle に変換

Parameters:
[in] degree degree 角度
Returns:
Angle オブジェクト
void qrk::delay ( int  msec  ) 

待機

Parameters:
[in] delay 待機時間 [msec]
size_t qrk::findFiles ( std::vector< std::string > &  files,
const char *  root_path,
const boost::xpressive::sregex  pattern 
)

ディレクトリ以下のファイル探索を行う

Parameters:
[out] files 見付かったファイル
[in] root_path 探索のルートディレクトリ
[in] pattern ファイルの検索パターン
Returns:
見付かったファイル数
bool qrk::isLF ( const char  ch  ) 

改行コードかを返す

Return values:
true LF, CR のとき
false 上記以外のとき
bool qrk::isUsingComDriver ( const char *  com_port,
const char *  driver_name 
)

指定ドライバを利用している COM ポートが存在するかを返す

Parameters:
[in] com_port 判定を行う COM ポート
[in] driver_name 判定を行うドライバ名
Return values:
true 指定ドライバの COM ポートが存在する
false 存在しない
Attention:
Windows 環境でなければ常に false を返す
動作確認は、Windows XP のみ。他では未検証
int qrk::log_printf ( const char *  format,
  ... 
)

ログ記録用

Parameters:
[in] format 可変引数
void qrk::log_setName ( const char *  file_name  ) 

出力ファイル名を変更する

Attention:
最初に log_printf() が呼ばれる前に呼び出されなければならない
Angle qrk::rad ( double  radian  ) 

radian 角度を Angle に変換

Parameters:
[in] radian radian 角度
Returns:
Angle オブジェクト
int qrk::readline ( Connection *  con,
char *  buf,
const size_t  count,
const int  timeout 
)

改行までのデータ読み出し

文字列終端に \0 を付加して返す

Parameters:
[in,out] con 通信リソース
[out] buf 受信バッファ
[in] count 受信バッファの最大サイズ
[in] timeout タイムアウト [msec]
Returns:
受信文字数 (受信がなくてタイムアウトした場合は -1)
void qrk::skip ( Connection *  con,
int  total_timeout,
int  each_timeout = 0 
)

受信データを読み飛ばす

Connection::clear() とは、タイムアウト時間を指定して読み飛ばせる点が異なる

Parameters:
[in,out] con 通信リソース
[in] total_timeout タイムアウト時間の上限 [msec]
[in] each_timeout 受信データ間におけるタイムアウト時間の上限 [msec]
size_t qrk::split ( std::vector< std::string > &  tokens,
const std::string &  original,
const char *  split_pattern = " \t",
bool  continious_pattern = true 
)

指定文字による分割

Parameters:
[out] tokens 分割後の文字列
[in] original 分割対象の文字列
[in] split_pattern 分割を行う文字の列
[in] continious_pattern 連続したセパレータを1つのセパレータとして扱う
Returns:
分割後のトークン数
template<class T >
void qrk::swapConnection ( T &  a,
T &  b 
) [inline]

接続オブジェクトの交換

a と b の接続オブジェクトを交換する。

Definition at line 68 of file ConnectionUtils.h.

int qrk::ticks ( void   ) 

タイムスタンプの取得

Return values:
タイムスタンプ [msec]
template<class T >
long qrk::urgSerialId ( T *  urg  )  [inline]

Get serial ID.

Parameters:
[in] urg urg object
Return values:
>= serial id
<0 error

Definition at line 27 of file UrgUtils.h.

 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Defines


libhokuyo_urg
Author(s): Alexander Bubeck
autogenerated on Fri Jan 11 09:14:14 2013