#include <ssm.hpp>
Public Member Functions |
| | SSMApiBase () |
| | SSMApiBase (const char *streamName, int streamId=0) |
| | コンストラクタ
|
|
bool | isOpen () const |
| | 開いているかどうかを返す
|
|
bool | isUpdate () |
| | 更新されたかどうかを返す
|
|
void | setVerbose (bool verbose) |
| | エラーメッセージを出力するかどうか
|
| void | setBlocking (bool isBlocking) |
| | ブロッキングするかどうか
|
|
const char * | getStreamName () const |
| | get ssm stream name.
|
|
const char * | getSensorName () const |
|
int | getStreamId () const |
| | get ssm stream id.
|
|
int | getSensorId () const |
|
SSM_sid | getSSMId () const |
| | get ssm id.
|
|
void * | data () |
|
size_t | dataSize () |
|
void * | property () |
|
size_t | propertySize () |
|
virtual size_t | sharedSize () |
| | 共有メモリに確保するデータ構造体のサイズ
|
| bool | create (double saveTime, double cycle) |
| | ストリームの作成
|
| bool | create (const char *streamName, int streamId, double saveTime, double cycle) |
| bool | release () |
| | ストリームの破棄
|
| bool | open (SSM_open_mode openMode=SSM_READ) |
| bool | open (const char *streamName, int streamId=0, SSM_open_mode openMode=SSM_READ) |
| | ストリームを開く
|
| bool | openWait (ssmTimeT timeOut=0.0, SSM_open_mode openMode=SSM_READ) |
| | 開くまで待つ
|
| bool | openWait (const char *streamName, int streamId=0, ssmTimeT timeOut=0.0, SSM_open_mode openMode=SSM_READ) |
| bool | close () |
| | ssmに書き込み読み込みをできなくする
|
| virtual bool | write (ssmTimeT time=gettimeSSM()) |
| | timeを指定して書き込み
|
| virtual bool | read (SSM_tid timeId=-1) |
| | tidを指定して読み込み
|
| bool | readNext (int dt=1) |
| | 前回読み込んだデータの次のデータを読み込む
|
| bool | readBack (int dt=1) |
| | 前回のデータの1つ前のデータを読み込む
|
| bool | readLast () |
| | 最新データの読み込み
|
| bool | readNew () |
| | 新しいデータの読み込み
|
| bool | readTime (ssmTimeT time) |
| | 時間指定読み込み
|
| bool | setProperty () |
| | プロパティの設定
|
| bool | getProperty () |
| | プロパティの取得
|
| void | setBuffer (void *data, size_t dataSize, void *property, size_t propertySize) |
| | バッファの設定
|
Data Fields |
|
SSM_tid | timeId |
| | データのTimeID
|
|
ssmTimeT | time |
| | データのタイムスタンプ
|
Protected Member Functions |
|
void | init () |
| | 初期化
|
|
void | init (const char *streamName, int streamId=0) |
| | 名前の設定
|
| void | setStream (const char *streamName, int streamId=0) |
| | 接続するSSMストリームの設定
|
Protected Attributes |
|
const char * | streamName |
| | ストリームの名前
|
|
int | streamId |
| | 同一ストリーム名を区別するための番号
|
|
SSM_sid | ssmId |
| | SSM管理ID.
|
|
bool | isVerbose |
| | エラーメッセージを出力するかどうか
|
|
bool | isBlocking |
| | ブロッキングするかどうか
|
|
void * | mData |
| | データのポインタ
|
|
size_t | mDataSize |
| | データ構造体のサイズ
|
|
void * | mProperty |
| | プロパティのポインタ
|
|
size_t | mPropertySize |
| | プロパティサイズ
|
Detailed Description
SSMを簡単に扱うためのクラス
これ単体では使用しづらいので、継承して使う
Constructor & Destructor Documentation
| SSMApiBase::SSMApiBase |
( |
| ) |
[inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| SSMApiBase::SSMApiBase |
( |
const char * |
streamName, |
|
|
int |
streamId = 0 |
|
) |
| [inline] |
コンストラクタ
- Parameters:
-
| [in] | streamName | ストリーム名 |
| [in] | streamId | ストリームの番号 |
Member Function Documentation
| bool SSMApiBase::close |
( |
| ) |
[inline] |
| bool SSMApiBase::create |
( |
const char * |
streamName, |
|
|
int |
streamId, |
|
|
double |
saveTime, |
|
|
double |
cycle |
|
) |
| [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- See also:
- create
| bool SSMApiBase::create |
( |
double |
saveTime, |
|
|
double |
cycle |
|
) |
| [inline] |
| bool SSMApiBase::getProperty |
( |
| ) |
[inline] |
| bool SSMApiBase::open |
( |
SSM_open_mode |
openMode = SSM_READ | ) |
[inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- See also:
- open
| bool SSMApiBase::open |
( |
const char * |
streamName, |
|
|
int |
streamId = 0, |
|
|
SSM_open_mode |
openMode = SSM_READ |
|
) |
| [inline] |
ストリームを開く
- Parameters:
-
| [in] | streamName | ストリーム名 |
| [in] | streamId | ストリームの番号 |
| [in] | openMode | ストリームのオープンモード選択フラグ |
open() したら必ず close() すること!
open() では、read,writeのフラグを設定する。
- See also:
- openSSM, openWait
開くまで待つ
- Parameters:
-
| [in] | timeOut | (sec)タイムアウトの時間。0以下だとタイムアウトしない |
- See also:
- open
| bool SSMApiBase::openWait |
( |
const char * |
streamName, |
|
|
int |
streamId = 0, |
|
|
ssmTimeT |
timeOut = 0.0, |
|
|
SSM_open_mode |
openMode = SSM_READ |
|
) |
| [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| virtual bool SSMApiBase::read |
( |
SSM_tid |
timeId = -1 | ) |
[inline, virtual] |
| bool SSMApiBase::readBack |
( |
int |
dt = 1 | ) |
[inline] |
| bool SSMApiBase::readLast |
( |
| ) |
[inline] |
| bool SSMApiBase::readNew |
( |
| ) |
[inline] |
| bool SSMApiBase::readNext |
( |
int |
dt = 1 | ) |
[inline] |
| bool SSMApiBase::readTime |
( |
ssmTimeT |
time | ) |
[inline] |
| bool SSMApiBase::release |
( |
| ) |
[inline] |
| void SSMApiBase::setBlocking |
( |
bool |
isBlocking | ) |
[inline] |
ブロッキングするかどうか
ブロッキングは使用が変更される可能性があるので、使用は上級者向け。 これを設定すると、readNew及びreadNextがブロッキングされる
| void SSMApiBase::setBuffer |
( |
void * |
data, |
|
|
size_t |
dataSize, |
|
|
void * |
property, |
|
|
size_t |
propertySize |
|
) |
| [inline] |
バッファの設定
継承したときなど、ポインタを外部からさわらせたくないときはprivateの中に入れる
Reimplemented in SSMApi< T, P >.
| bool SSMApiBase::setProperty |
( |
| ) |
[inline] |
| void SSMApiBase::setStream |
( |
const char * |
streamName, |
|
|
int |
streamId = 0 |
|
) |
| [inline, protected] |
接続するSSMストリームの設定
- Parameters:
-
| [in] | streamName | ストリーム名 |
| [in] | streamId | ストリームの番号 |
| virtual bool SSMApiBase::write |
( |
ssmTimeT |
time = gettimeSSM( ) | ) |
[inline, virtual] |
The documentation for this class was generated from the following file: