#include <subsumptionGraph.h>

Public Member Functions | |
| Edge | GetEdge (Action *pAction) |
| void | AddAction (Action *action, Action *ref_action, positioning_t pos) |
| Action * | GetLowerPriorityAction (Action *action) |
| Action * | GetHighestPriorityAction (Vertex vertex) |
| Action * | ExecuteNext (Action *action) |
| void | Execute (CtrlMsg *firstMsg) |
The SubsumptionGraph is built on top of Boost libraries. It is not on top of the developed in-house abbey threading library. This because function pointers do not easily transfer from C++ (member functions) to C (normal/static functions).
Definition at line 113 of file subsumptionGraph.h.
An Action can be added using the position of a previously added (reference) action.
| action | ||
| ref_action | ||
| pos | Adds action in the form of an edge in a directed acyclic graph. The positioning is in contrast with the reference action. | |
| action | the to be inserted action in the subsumption hierarchy | |
| ref_action | positioning is done using this action as a reference | |
| pos | higher/lower after/before reference action |
Definition at line 85 of file subsumptionGraph.cpp.
References GetEdge().
Referenced by srAlmende::SubsumptionAgent::Initialize().

| void SubsumptionGraph::Execute | ( | CtrlMsg * | firstMsg | ) |
| firstMsg |
Definition at line 252 of file subsumptionGraph.cpp.
References ExecuteNext(), and GetEdge().
Referenced by srAlmende::SubsumptionAgent::ProcessMessage().

Execute the action attached to one of the outgoing edges from the target vertex if the edge attached to the given action parameter. If this execution does result in an IDLE message, the corresponding controller is not operational and a lower priority action is executed if it exists.
| action |
Definition at line 228 of file subsumptionGraph.cpp.
References SubController::Act(), GetEdge(), GetHighestPriorityAction(), and GetLowerPriorityAction().
Referenced by Execute().

| Edge SubsumptionGraph::GetEdge | ( | Action * | pAction | ) |
Returns an edge corresponding to an action.
| pAction |
Returns the proper edge given an action as identifier. The action does not need to have a name or other type of identifier, a reference pointer is enough. So, the same action can be used multiple times using different instances.
Perhaps this can be better done by predicates: action_equals_t < edge_action_map_t > predicate
| pAction |
Definition at line 60 of file subsumptionGraph.cpp.
Referenced by AddAction(), Execute(), ExecuteNext(), and GetLowerPriorityAction().
| Action * SubsumptionGraph::GetHighestPriorityAction | ( | Vertex | vertex | ) |
Get the highest priority action iterating through the outgoing edges of the given vertex parameter.
| vertex |
Definition at line 205 of file subsumptionGraph.cpp.
Referenced by ExecuteNext().
Gets a lower priority action.
| action |
Definition at line 182 of file subsumptionGraph.cpp.
References GetEdge().
Referenced by ExecuteNext().

1.6.1