Class managing micro units and units.
More...
#include <fw/UnitManager.h>
Class managing micro units and units.
◆ UnitEntry
◆ UnitList
◆ ~UnitManager()
◆ addThreadGroup()
std::string addThreadGroup |
( |
const ResourceName & |
ns, |
|
|
const std::string & |
name |
|
) |
| |
Adds a thread group with namespace and name.
A thread group forms a parent authority of all enclosed units. These units will share the dispatcher thread of the thread groups authority
◆ addUnit()
void addUnit |
( |
MicroUnitPtr |
unit, |
|
|
const std::string & |
ns, |
|
|
const std::string & |
name, |
|
|
const std::string & |
threadGroup = "" , |
|
|
bool |
startAtInit = true |
|
) |
| |
Adds a unit to list of known ones.
After all units are added they can be initialized, resumed and paused.
- Parameters
-
[in] | unit | The pointer to the micro unit |
[in] | ns | The namespace this unit resides in |
[in] | name | The name of the unit |
[in] | threadGroup | The thread group that contains this unit or empty |
[in] | startAtInit | Flag if unit shall be started after initialization (default=true) |
◆ removeUnit()
void removeUnit |
( |
const std::string & |
id | ) |
|
Remove a known unit by its full id.
◆ getUnit()
Get a unit from the manager by its full id.
- Returns
- pointer to unit or null pointer if not found
◆ initializeUnits()
Initializes (checks in) and starts all known units that are not yet initialized.
◆ startUnits()
Starts/Resumes all known units that are not yet started.
◆ stopUnits()
void stopUnits |
( |
bool |
destruct = false | ) |
|
Stops/Pauses all known units.
◆ mUnits
◆ mThreadGroups
std::map<std::string, boost::shared_ptr<Authority> > mThreadGroups |
|
protected |
◆ mUnitsMutex
The documentation for this class was generated from the following file: