API review

Proposer: Ze'ev Klapow

Present at review:

  • List reviewers

What to Review

cfg Files

It is now possible to put parameters into groups like so:

group = gen.add_group("My Group")
group.add("my_group_param", int_t, 0, "An int within My Group", 0)

Groups can have subgroups:

group2 = group.add_group("My Second Group")

Unfortunately this does not allow parameters to have unique names because in order to preserve backwards compatibility the parameters are still stored directly on the config object as well as within groups.

Python Server API

The config object that is passed to a nodes reconfigure callback now supports dot-syntax, rather than using a dictionary, however the dictionary still works for parameters.


Groups contain 4 main components parameters, subgroups, type and state. All except state are determined by the CFG file and cannot be changed. State allows groups to be disabled which can be done like so:

config.My_Group.state = False

or in cpp

config.my_group.state = false;

Note that in cpp all names are lower case to avoid name conflicts, group names in python are the same as given in the config.

The type field is an extra string in each group description, which is mainly relevant to the client, at the moment I am using it to change the display modes, I currently support "collapse" and "hide", collapse has a button to hide/display the group and hide simply hides/displays based on the state as set by the node.


The client now has a method get_group_descriptions, which returns a tree of groups containing parameters, get_param_descriptions is still available to get a list of all possible params. In order to make changes to the state of a group simply call update group as you would with parameters and add the key groups to the dictionary:

changes = {'groups':{'My_Group':True}}

You can also specify a section of the tree rather than individual groups, as it sometimes easier to simply modify the config object and pass it back to the client.


Reconfigure gui now supports the display of groups. By default groups with no type are simply displayed by a line and label. Additionally the gui now supports 'collapse' groups which have a button that toggle them on and off as well as 'hide' groups which are entirely invisible until activated. The default state for all groups is visible. using the proposed API many more display types could be implemented including tabs.

Question / concerns / comments

Enter your thoughts on the API and any questions / concerns you have here. Please sign your name. Anything you want to address in the API review should be marked down here before the start of the meeting.

Meeting agenda

To be filled out by proposer based on comments gathered during API review period


Package status change mark change manifest)

  • /!\ Action items that need to be taken.

  • {X} Major issues that need to be resolved

Wiki: dynamic reconfigure/Reviews/7/1/11 Groups API review API Review (last edited 2015-07-09 19:49:36 by LucasWalter)