[openrtm-users 01854] ConfigAdmin Callback Functions

2 個の投稿 / 0 new
最終投稿
Marianne Harrison
オフライン
Last seen: なし 前
登録日: 2011-06-16 14:20
[openrtm-users 01854] ConfigAdmin Callback Functions

Hello everyone,I would like to set callback functions whenever the configuration parameters update.  However, I am confused about how to add them using the ConfigAdmin class.  The functions to set a callback class are straightforward but since the only instance I can find of the ConfigAdmin class is in a protected variable and is only accessed by the bindParameter function I haven't found a way to call these functions.
Can someone please tell me how to gain access to the ConfigAdmin instance from my program so I can use the callback functions I have written?Thanks in advance,Marianne Harrison

未定義
gbiggs
オフライン
Last seen: 6年 9ヶ月 前
登録日: 2010-08-02 07:51
[openrtm-users 01855] ConfigAdmin Callback Functions

Hi Marianne,

There are member functions in the RTObject_impl class, which all
RT-Components inherit from, for adding and removing callbacks on the
configuration parameters. They are called
addConfigurationParamListener() and removeConfigurationParamListener().

The basic idea is that you create an instance of a callback functor,
which inherits from the ConfigurationParamListener class. You then call
addConfigurationParamListener(), passing in the type of listener and a
pointer to an instance of your functor. When a configuration parameter
is updated, your functor will be called.

Unfortunately, we don't have any examples of doing this in an RTC yet,
but if you look in the ComponentObserverConsumer object from the
observer add-on library (in src/ext/sdo/observer/ in the OpenRTM-aist
source), you can see it doing the same thing via the remote interface.

Geoff

On 26/07/11 10:07, Marianne Harrison wrote:
> Hello everyone,
>
> I would like to set callback functions whenever the configuration
> parameters update. However, I am confused about how to add them using
> the ConfigAdmin class. The functions to set a callback class are
> straightforward but since the only instance I can find of the
> ConfigAdmin class is in a protected variable and is only accessed by the
> bindParameter function I haven't found a way to call these functions.
>
> Can someone please tell me how to gain access to the ConfigAdmin
> instance from my program so I can use the callback functions I have written?
>
> Thanks in advance,
> Marianne Harrison
>
>
> _______________________________________________
> openrtm-users mailing list
> openrtm-users@openrtm.org
> http://www.openrtm.org/mailman/listinfo/openrtm-users
_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

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

ダウンロード

最新バージョン : 2.0.1-RELESE

統計

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

Choreonoid

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

OpenHRP3

動力学シミュレータ

OpenRTP

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

産総研RTC集

産総研が提供するRTC集

TORK

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

DAQ-Middleware

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