[openrtm-users 01854] ConfigAdmin Callback Functions

2 posts / 0 new
Last post
Marianne Harrison
Offline
Last seen: Never ago
Joined: 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

Undefined
gbiggs
Offline
Last seen: 6 years 9 months ago
Joined: 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

Log in or register to post comments

Download

latest Releases : 2.0.0-RELESE

2.0.0-RELESE Download page

Number of Projects

Choreonoid

Motion editor/Dynamics simulator

OpenHRP3

Dynamics simulator

OpenRTP

Integrated Development Platform

AIST RTC collection

RT-Components collection by AIST

TORK

Tokyo Opensource Robotics Association

DAQ-Middleware

Middleware for DAQ (Data Aquisition) by KEK