Move shared defs to groups
Nodes connected to the same USB device are currently grouped in a single endpoint, that shares definitions of global events and constants. We need to allow these nodes to be dissociated, because the T2+ uses the same dongle for independent robots. In #17 (closed) the approach is to create a single group for each node. Shared definitions need to be moved to the group.
Unfortunately the representation of shared definitions in groups and in endpoints is not the same, so groups can't be used as a drop-in replacement for endpoints.
- Change
m_defs
to a map from groups to common definitions - Change
set_events_table
andset_shared_variables
to copy group definitions into them_defs
map entry - Add parameter to
get_event
to fetch event from the map
Note that set_events
and set_shared_variables
exist in three classes: app_endpoint calls group, group calls aseba_endpoint