FBSched and SlaveActivities

All,

Just to be sure: is the following set of (scripting) statements correct for setting up a single slave and adding it to an instance of the FBSched component by Markus?

=====

import(...);
loadComponent("fb", "FBSched");
loadComponent("c1", "Component");

...

setSlaveActivity("c1", 0.0);
setMasterSlaveActivity("c1", "fb");
addPeer("fb", "c1");
c1.start();

...

setActivity("fb", 1, LowestPriority, ORO_SCHED_OTHER);
fb.start();

=====

Particularly the necessity for both 'setSlaveActivity()' and 'setMasterSlaveActivity()' was quite puzzling.

What is an efficient way of finding out how to call certain methods in scripts? Is there a list of functions / methods that I have missed?

thanks for any pointers,

PS: I also found out the hard way that the prototype is 'setMasterSlaveActivity(SLAVE, MASTER)'. If you do it the other way around and then set an Activity on the master, but not the slave, exiting the Deployer results in a segfault.

FBSched and SlaveActivities

Hi g ah,

2012/4/18 g ah <gaohml [..] ...>:
>
> All,
>
> Just to be sure: is the following set of (scripting) statements correct for setting up a single slave and adding it to an instance of the FBSched component by Markus?
>
> =====
>
> import(...);
> loadComponent("fb", "FBSched");
> loadComponent("c1", "Component");
>
> ...
>
> setSlaveActivity("c1", 0.0);

This statement is not necessary, and actually bad. We will most likely
remove this function in the next major release. Use
setMasterSlaveActivity only.

> setMasterSlaveActivity("c1", "fb");
> addPeer("fb", "c1");
> c1.start();
>
> ...
>
> setActivity("fb", 1, LowestPriority, ORO_SCHED_OTHER);
> fb.start();
>
> =====
>
> Particularly the necessity for both 'setSlaveActivity()' and 'setMasterSlaveActivity()' was quite puzzling.

It's not necessary.

>
> What is an efficient way of finding out how to call certain methods in scripts? Is there a list of functions / methods that I have missed?

In the taskbrowser, type 'help setMasterSlaveActivity' or 'help this'
or any other service name.

Peter

FBSched and SlaveActivities

Peter Soetens wrote:
> Hi g ah,
>
> 2012/4/18 g ah <gaohml [..] ...>:
>> All,
>>
>> Just to be sure: is the following set of (scripting) statements correct for setting up a single slave and adding it to an instance of the FBSched component by Markus?
>>
>> =====
>>
>> import(...);
>> loadComponent("fb", "FBSched");
>> loadComponent("c1", "Component");
>>
>> ...
>>
>> setSlaveActivity("c1", 0.0);
>
> This statement is not necessary, and actually bad. We will most likely
> remove this function in the next major release. Use
> setMasterSlaveActivity only.
>
>> setMasterSlaveActivity("c1", "fb");
>> addPeer("fb", "c1");
>> c1.start();
>>
>> ...
>>
>> setActivity("fb", 1, LowestPriority, ORO_SCHED_OTHER);
>> fb.start();
>>
>> =====
>>
>> Particularly the necessity for both 'setSlaveActivity()' and 'setMasterSlaveActivity()' was quite puzzling.
>
> It's not necessary.

ah, you're right (of course).

Seems I had the 'master / slave' arguments reversed as well, which would explain my problems (FBSched complained about not being able to update c1 properly).

To summarise:

=====

setMasterSlaveActivity("fb", "c1"); // note 'fb' first
c1.start();
...
fb.setActivity(...)
fb.start();

=====

is all that seems necessary.

>> What is an efficient way of finding out how to call certain methods in scripts? Is there a list of functions / methods that I have missed?
>
> In the taskbrowser, type 'help setMasterSlaveActivity' or 'help this'
> or any other service name.

Yes, I knew about the help text.

I guess I was trying to find out if there was anything else besides the section on Scripting in the Component Builder's Manual and the built-in help.

thanks for your comments,