[openrtm-users 00399] Generated template code from RtcTemplate

2 個の投稿 / 0 new
最終投稿
root
オフライン
Last seen: 2日 20時間 前
登録日: 2009-06-23 14:31
[openrtm-users 00399] Generated template code from RtcTemplate

Dear Sir or Madam,
I see that OpenRTM-aist only has several generated RTC classes such as on_initialize, on_finalize, and so on on its template.
If I want to add another RTC class such as the class from RTObject interface or another class from another interface, what should I do?
Should I add it manually or is there a way from RtcTemplate to generate it automatically?

Thank you for your kind attention.

Best regards,

未定義
root
オフライン
Last seen: 2日 20時間 前
登録日: 2009-06-23 14:31
[openrtm-users 00400] Generated template code from RtcTemplate

Hello.

> I see that OpenRTM-aist only has several generated RTC classes such as on_initialize, on_finalize, and so on on its template.
> If I want to add another RTC class such as the class from RTObject interface or another class from another interface, what should I do?

RtcTemplate provides the following interface definitions on the header file.

virtual ReturnCode_t onInitialize ()
virtual ReturnCode_t onFinalize ()
virtual ReturnCode_t onStartup (RTC::UniqueId ec_id)
virtual ReturnCode_t onShutdown (RTC::UniqueId ec_id)
virtual ReturnCode_t onActivated (RTC::UniqueId ec_id)
virtual ReturnCode_t onDeactivated (RTC::UniqueId ec_id)
virtual ReturnCode_t onExecute (RTC::UniqueId ec_id)
virtual ReturnCode_t onAborting (RTC::UniqueId ec_id)
virtual ReturnCode_t onError (RTC::UniqueId ec_id)
virtual ReturnCode_t onReset (RTC::UniqueId ec_id)
virtual ReturnCode_t onStateUpdate (RTC::UniqueId ec_id)
virtual ReturnCode_t onRateChanged (RTC::UniqueId ec_id)

I think these are enough to write your components in most cases.
To use them, uncomment the definition on .h file and implement the function on .cpp file.

> Should I add it manually or is there a way from RtcTemplate to generate it automatically?

If you want to use other interfaces, you have to write them manually.
But, I do not recommend to override virtual interfaces except the above ones
even if they can be overridden, because unexpected troubles might occur.

コメントを投稿するにはログインまたはユーザー登録を行ってください

ダウンロード

最新バージョン : 2.0.1-RELESE

統計

Webサイト統計
ユーザ数:2209
プロジェクト統計
RTコンポーネント307
RTミドルウエア35
ツール22
文書・仕様書2

Choreonoid

モーションエディタ/シミュレータ

OpenHRP3

動力学シミュレータ

OpenRTP

統合開発プラットフォーム

産総研RTC集

産総研が提供するRTC集

TORK

東京オープンソースロボティクス協会

DAQ-Middleware

ネットワーク分散環境でデータ収集用ソフトウェアを容易に構築するためのソフトウェア・フレームワーク