/home/fwph/code/wurde/rde/mcp/mcp.cpp File Reference

Go to the source code of this file.

Functions

void handleBeat (HeartbeatDataStruct beat)
void handleInfo (HeartbeatInfoStruct info)
void updateModules (Heartbeat &myHeartbeat, CommsManager &myManager)
McpRequestInfoStruct handleRequest (McpRequestInfoStruct request, Heartbeat &myHeartbeat, CommsManager &myManager)
void probeModules (CommsManager &myManager)
 invoke all managed modules with the -r (register) flag
int main (int argc, char *argv[])

Variables

vector< Modulemodules
 The MCP manages and monitors robot modules.


Function Documentation

void handleBeat ( HeartbeatDataStruct  beat  ) 

Definition at line 149 of file mcp.cpp.

References modules, and HeartbeatDataStruct::source.

Referenced by main().

void handleInfo ( HeartbeatInfoStruct  info  ) 

Definition at line 162 of file mcp.cpp.

References HeartbeatInfoStruct::managedType, modules, WURDE::PROC_UNMANAGED, and HeartbeatInfoStruct::source.

Referenced by main().

McpRequestInfoStruct handleRequest ( McpRequestInfoStruct  request,
Heartbeat myHeartbeat,
CommsManager myManager 
)

Definition at line 266 of file mcp.cpp.

References done, WURDE::g_debug(), WURDE::g_warn(), McpRequestInfoStruct::gblname, Writable::getValue(), WURDE::MESSAGE_INFO, WURDE::MESSAGE_REQUEST, HeartbeatInfoStruct::moduleName, modules, McpRequestInfoStruct::mType, HeartbeatInfoStruct::mType, myManager, Capability::publishRequest(), Heartbeat::requests, McpRequestInfoStruct::robotModule, Writable::setValue(), HeartbeatInfoStruct::source, McpRequestInfoStruct::source, WURDE::STAT_FAIL, WURDE::STAT_OKAY, WURDE::STAT_REQUEST, HeartbeatInfoStruct::state, WURDE::STATE_IDLE, WURDE::STATE_REQUEST, WURDE::STATE_RESET, WURDE::STATE_RESTART, WURDE::STATE_RUN, WURDE::STATE_STARTUP, McpRequestInfoStruct::status, WURDE::STRAT_NORMAL, McpRequestInfoStruct::strategy, McpRequestInfoStruct::stream, McpRequestInfoStruct::target, HeartbeatInfoStruct::target, and McpRequestInfoStruct::type.

Referenced by main().

int main ( int  argc,
char *  argv[] 
)

Definition at line 28 of file mcp.cpp.

References CommsManager::cleanUp(), MCPControl::data, WURDE::g_globalConfiguration, WURDE::g_info(), WURDE::g_loginfo, WURDEConfiguration::getConfigDirectory(), WURDEConfiguration::getMCPConfigFile(), Heartbeat::getNextData(), Heartbeat::getNextInfo(), McpRequest::getNextRequest(), WURDEConfiguration::getOption(), handleBeat(), handleInfo(), handleRequest(), WURDEConfiguration::haveOption(), McpRequest::info, modules, myManager, Heartbeat::newData(), MCPControl::newData(), Heartbeat::newInfo(), Capability::newRequest(), MCP::parseConfigFile(), CommsManager::parseOptions(), probeModules(), McpRequest::publishInfo(), CommsManager::registerConsumer(), CommsManager::registerSupplier(), CommsManager::runUpdate(), Capability::setAutoTag(), McpRequest::setGlobalName(), CommsManager::setIdleDataProcessing(), CommsManager::setMcpRequestMode(), CommsManager::setNoHeartbeat(), CommsManager::setPreSleep(), McpRequest::setQueueMode(), Heartbeat::setQueueMode(), CommsManager::setRealName(), CommsManager::setSleep(), McpRequest::setStreamName(), MCPControlDataStruct::state, WURDE::STATE_QUIT, and updateModules().

void probeModules ( CommsManager myManager  ) 

invoke all managed modules with the -r (register) flag

Definition at line 362 of file mcp.cpp.

References WURDE::LOCALE_INTERNAL, modules, myManager, WURDE::PROC_CRITICAL, WURDE::PROC_MANAGED, and WURDE::STATE_INACTIVE.

Referenced by main().

void updateModules ( Heartbeat myHeartbeat,
CommsManager myManager 
)

Definition at line 180 of file mcp.cpp.

References WURDE::g_logwarn, HeartbeatInfoStruct::locale, HeartbeatInfoStruct::managedType, WURDE::MESSAGE_INFO, WURDE::MESSAGE_REQUEST, HeartbeatInfoStruct::moduleName, modules, HeartbeatInfoStruct::mType, myManager, WURDE::PROC_CRITICAL, Capability::publishRequest(), Heartbeat::requests, Writable::setValue(), HeartbeatInfoStruct::source, HeartbeatInfoStruct::state, WURDE::STATE_FAIL, WURDE::STATE_IDLE, WURDE::STATE_INACTIVE, WURDE::STATE_INFO, WURDE::STATE_NULL, WURDE::STATE_RESET, WURDE::STATE_RESTART, WURDE::STATE_RUN, WURDE::STATE_ZOMBIE, and HeartbeatInfoStruct::target.

Referenced by main().


Variable Documentation

vector<Module> modules

The MCP manages and monitors robot modules.

Todo:
Figure out why module restarts aren't happening
Todo:
Module map should be dynamic, allowing us to modify the connections on the fly
Todo:
Publish module status information (make this query-reply)
Todo:
Should keep a global graph of module connections here. Do this by tracking in CommsManager, and periodically sending out a query for updates. A graphical interface can then query the graph, display it w/status of all modules, and allow modifications.

Definition at line 20 of file mcp.cpp.

Referenced by handleBeat(), handleInfo(), handleRequest(), main(), probeModules(), and updateModules().


Generated on Thu Feb 1 15:31:54 2007 for WURDE by  doxygen 1.5.1