AudioManager
7.5.11
Native Application Runtime Environment
|
Implements an autorouting algorithm for connecting sinks and sources via different audio domains. More...
#include <CAmRouter.h>
Public Member Functions | |
CAmRouter (IAmDatabaseHandler *iDatabaseHandler, CAmControlSender *iSender) | |
~CAmRouter () | |
am_Error_e | getRoute (const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector< am_Route_s > &returnList) |
Finds all possible paths between given source and sink. More... | |
am_Error_e | getRoute (const bool onlyfree, const am_Source_s &aSource, const am_Sink_s &aSink, std::vector< am_Route_s > &listRoutes) |
am_Error_e | getAllPaths (CAmRoutingNode &aSource, CAmRoutingNode &aSink, std::vector< am_Route_s > &resultPath, std::vector< std::vector< CAmRoutingNode * >> &resultNodesPath, const bool includeCycles=false) |
void | getShortestPath (const CAmRoutingNode &source, const CAmRoutingNode &destination, std::vector< CAmRoutingNode * > &resultPath) |
void | getShortestPath (CAmRoutingNode &aSource, CAmRoutingNode &aSink, am_Route_s &resultPath, std::vector< CAmRoutingNode * > &resultNodesPath) |
CAmRoutingNode * | sinkNodeWithID (const am_sinkID_t sinkID) |
Returns a sink node with given sinkID. More... | |
CAmRoutingNode * | sinkNodeWithID (const am_sinkID_t sinkID, const am_domainID_t domainID) |
CAmRoutingNode * | sourceNodeWithID (const am_sourceID_t sourceID) |
Returns a source node with given sourceID. More... | |
CAmRoutingNode * | sourceNodeWithID (const am_sourceID_t sourceID, const am_domainID_t domainID) |
CAmRoutingNode * | converterNodeWithSinkID (const am_sinkID_t sinkID, const am_domainID_t domainID) |
Returns a converter node for given sinkID. More... | |
CAmRoutingNode * | gatewayNodeWithSinkID (const am_sinkID_t sinkID) |
Returns a gateway node for given sinkID. More... | |
void | load (const bool onlyFree) |
void | clear () |
Static Public Member Functions | |
static bool | getAllowedFormatsFromConvMatrix (const std::vector< bool > &convertionMatrix, const std::vector< am_CustomConnectionFormat_t > &listSourceFormats, const std::vector< am_CustomConnectionFormat_t > &listSinkFormats, std::vector< am_CustomConnectionFormat_t > &sourceFormats, std::vector< am_CustomConnectionFormat_t > &sinkFormats) |
static void | listPossibleConnectionFormats (std::vector< am_CustomConnectionFormat_t > &inListSourceFormats, std::vector< am_CustomConnectionFormat_t > &inListSinkFormats, std::vector< am_CustomConnectionFormat_t > &outListFormats) |
static bool | getRestrictedOutputFormats (const std::vector< bool > &convertionMatrix, const std::vector< am_CustomConnectionFormat_t > &listSourceFormats, const std::vector< am_CustomConnectionFormat_t > &listSinkFormats, const am_CustomConnectionFormat_t connectionFormat, std::vector< am_CustomConnectionFormat_t > &listFormats) |
static void | getSourceSinkPossibleConnectionFormats (std::vector< CAmRoutingNode * >::iterator iteratorSource, std::vector< CAmRoutingNode * >::iterator iteratorSink, std::vector< am_CustomConnectionFormat_t > &outConnectionFormats) |
static bool | shouldGoInDomain (const std::vector< am_domainID_t > &visitedDomains, const am_domainID_t nodeDomainID) |
Implements an autorouting algorithm for connecting sinks and sources via different audio domains.
Definition at line 152 of file CAmRouter.h.
am::CAmRouter::CAmRouter | ( | IAmDatabaseHandler * | iDatabaseHandler, |
CAmControlSender * | iSender | ||
) |
Definition at line 56 of file CAmRouter.cpp.
am::CAmRouter::~CAmRouter | ( | ) |
Definition at line 70 of file CAmRouter.cpp.
void am::CAmRouter::clear | ( | ) |
Definition at line 191 of file CAmRouter.cpp.
CAmRoutingNode * am::CAmRouter::converterNodeWithSinkID | ( | const am_sinkID_t | sinkID, |
const am_domainID_t | domainID | ||
) |
Returns a converter node for given sinkID.
sinkID | sink id. |
domainID | domain id. |
Definition at line 248 of file CAmRouter.cpp.
CAmRoutingNode * am::CAmRouter::gatewayNodeWithSinkID | ( | const am_sinkID_t | sinkID | ) |
Returns a gateway node for given sinkID.
sinkID | sink id. |
Definition at line 260 of file CAmRouter.cpp.
|
static |
Definition at line 796 of file CAmRouter.cpp.
am_Error_e am::CAmRouter::getAllPaths | ( | CAmRoutingNode & | aSource, |
CAmRoutingNode & | aSink, | ||
std::vector< am_Route_s > & | resultPath, | ||
std::vector< std::vector< CAmRoutingNode * >> & | resultNodesPath, | ||
const bool | includeCycles = false |
||
) |
Definition at line 627 of file CAmRouter.cpp.
|
static |
Definition at line 837 of file CAmRouter.cpp.
am_Error_e am::CAmRouter::getRoute | ( | const bool | onlyfree, |
const am_sourceID_t | sourceID, | ||
const am_sinkID_t | sinkID, | ||
std::vector< am_Route_s > & | returnList | ||
) |
Finds all possible paths between given source and sink.
returns the best route between a source and a sink
onlyfree | only disconnected elements should be included or not. |
sourceID | starting point. |
sinkID | ending point. |
returnList | list with all possible paths |
onlyfree | if true only free gateways are used |
sourceID | |
sinkID | |
returnList | this list contains a set of routes |
Definition at line 82 of file CAmRouter.cpp.
am_Error_e am::CAmRouter::getRoute | ( | const bool | onlyfree, |
const am_Source_s & | aSource, | ||
const am_Sink_s & | aSink, | ||
std::vector< am_Route_s > & | listRoutes | ||
) |
Definition at line 98 of file CAmRouter.cpp.
void am::CAmRouter::getShortestPath | ( | const CAmRoutingNode & | source, |
const CAmRoutingNode & | destination, | ||
std::vector< CAmRoutingNode * > & | resultPath | ||
) |
void am::CAmRouter::getShortestPath | ( | CAmRoutingNode & | aSource, |
CAmRoutingNode & | aSink, | ||
am_Route_s & | resultPath, | ||
std::vector< CAmRoutingNode * > & | resultNodesPath | ||
) |
|
static |
Definition at line 868 of file CAmRouter.cpp.
|
static |
Definition at line 826 of file CAmRouter.cpp.
void am::CAmRouter::load | ( | const bool | onlyFree | ) |
Definition at line 128 of file CAmRouter.cpp.
|
static |
Definition at line 708 of file CAmRouter.cpp.
CAmRoutingNode * am::CAmRouter::sinkNodeWithID | ( | const am_sinkID_t | sinkID | ) |
Returns a sink node with given sinkID.
sinkID | sink id. |
Definition at line 200 of file CAmRouter.cpp.
CAmRoutingNode * am::CAmRouter::sinkNodeWithID | ( | const am_sinkID_t | sinkID, |
const am_domainID_t | domainID | ||
) |
Definition at line 212 of file CAmRouter.cpp.
CAmRoutingNode * am::CAmRouter::sourceNodeWithID | ( | const am_sourceID_t | sourceID | ) |
Returns a source node with given sourceID.
sourceID | source id. |
Definition at line 224 of file CAmRouter.cpp.
CAmRoutingNode * am::CAmRouter::sourceNodeWithID | ( | const am_sourceID_t | sourceID, |
const am_domainID_t | domainID | ||
) |
Definition at line 236 of file CAmRouter.cpp.