Definition at line 24 of file mcp.H.
Public Member Functions | |
Module (std::string name) | |
Module (WURDE::HeartbeatInfoStruct &info) | |
Module (WURDE::HeartbeatDataStruct &data) | |
bool | stale () |
WURDE::RunState | getState () |
WURDE::ProcessLocale | getLocale () |
WURDE::ProcessType | getType () |
string | getModuleName () |
string | getBinary () |
void | setState (WURDE::RunState somestate) |
void | setLocale (WURDE::ProcessLocale somelocale) |
void | setType (WURDE::ProcessType sometype) |
void | setTTL (double seconds) |
void | setModuleName (std::string name) |
void | setBinary (std::string bin) |
void | addCommandLineOption (std::string option) |
void | addInterface (std::string interface) |
void | addInterface (std::string interface, std::string name) |
bool | beat (WURDE::HeartbeatDataStruct beat) |
bool | refresh (WURDE::HeartbeatInfoStruct info) |
std::string | findObjectMapping (std::string object, std::string interface, WURDE::ConnectionStrategy strat) |
Search this module for a mapping for some object, or an interface. | |
void | setMappings (std::vector< Mapping > mappings) |
bool | hasSupplier (std::string streamname, std::string type) |
bool | startUp (WURDE::CommsManager &myManager, std::string someArgs) |
Public Attributes | |
int | m_attemptedStarts |
int | m_maxAttempts |
Protected Member Functions | |
Module () | |
Private Attributes | |
WURDE::Time | m_lastTimestamp |
timeval | m_TTL |
WURDE::RunState | m_state |
WURDE::ProcessType | m_managedType |
WURDE::ProcessLocale | m_locale |
std::string | m_moduleName |
std::string | m_binary |
std::vector< std::string > | m_options |
std::vector< WURDE::InterfaceStream > | m_interfaces |
std::vector< Mapping > | m_mappings |
std::vector< Mapping > | m_occupiedResources |
Keeps track of what applications we have connected to the various resources of this module. | |
pid_t | m_process |
Module | ( | std::string | name | ) |
Definition at line 10 of file util.cpp.
References WURDE::g_logdebug, WURDE::LOCALE_NULL, Module::m_attemptedStarts, Module::m_locale, Module::m_managedType, Module::m_maxAttempts, Module::m_moduleName, Module::m_state, Module::m_TTL, WURDE::PROC_NULL, and WURDE::STATE_NULL.
Module | ( | WURDE::HeartbeatInfoStruct & | info | ) |
Definition at line 38 of file util.cpp.
References Module::m_attemptedStarts, Module::m_maxAttempts, Module::refresh(), Module::setModuleName(), and HeartbeatInfoStruct::source.
Module | ( | WURDE::HeartbeatDataStruct & | data | ) |
Definition at line 45 of file util.cpp.
References Module::beat(), Module::m_attemptedStarts, Module::m_maxAttempts, Module::setModuleName(), and HeartbeatDataStruct::source.
Module | ( | ) | [protected] |
Definition at line 26 of file util.cpp.
References WURDE::LOCALE_NULL, Module::m_attemptedStarts, Module::m_lastTimestamp, Module::m_locale, Module::m_managedType, Module::m_maxAttempts, Module::m_moduleName, Module::m_state, Module::m_TTL, WURDE::PROC_NULL, WURDE::STATE_NULL, and Time::zero().
bool stale | ( | ) |
Definition at line 52 of file util.cpp.
References Module::m_lastTimestamp, Module::m_TTL, and Time::now().
WURDE::RunState getState | ( | ) | [inline] |
WURDE::ProcessLocale getLocale | ( | ) | [inline] |
WURDE::ProcessType getType | ( | ) | [inline] |
string getModuleName | ( | ) | [inline] |
string getBinary | ( | ) | [inline] |
void setState | ( | WURDE::RunState | somestate | ) | [inline] |
Definition at line 40 of file mcp.H.
References Module::m_state.
Referenced by MCP::parseConfigFile(), MCP::parseMapFile(), and Module::refresh().
void setLocale | ( | WURDE::ProcessLocale | somelocale | ) | [inline] |
Definition at line 41 of file mcp.H.
References Module::m_locale.
Referenced by MCP::parseConfigFile(), MCP::parseMapFile(), and Module::refresh().
void setType | ( | WURDE::ProcessType | sometype | ) | [inline] |
Definition at line 42 of file mcp.H.
References Module::m_managedType.
Referenced by MCP::parseConfigFile(), MCP::parseMapFile(), and Module::refresh().
void setTTL | ( | double | seconds | ) |
void setModuleName | ( | std::string | name | ) | [inline] |
Definition at line 44 of file mcp.H.
References WURDE::g_logdebug, and Module::m_moduleName.
Referenced by Module::Module().
void setBinary | ( | std::string | bin | ) | [inline] |
Definition at line 45 of file mcp.H.
References Module::m_binary.
Referenced by MCP::parseConfigFile().
void addCommandLineOption | ( | std::string | option | ) | [inline] |
Definition at line 47 of file mcp.H.
References Module::m_options.
Referenced by MCP::parseConfigFile().
void addInterface | ( | std::string | interface, | |
std::string | name | |||
) |
Definition at line 202 of file util.cpp.
References Module::m_interfaces, InterfaceStream::streamname, and InterfaceStream::type.
bool beat | ( | WURDE::HeartbeatDataStruct | beat | ) |
Definition at line 75 of file util.cpp.
References WURDE::g_error(), Module::m_lastTimestamp, Module::m_moduleName, and Module::setTTL().
Referenced by Module::Module().
bool refresh | ( | WURDE::HeartbeatInfoStruct | info | ) |
Definition at line 90 of file util.cpp.
References WURDE::g_debug(), WURDE::g_error(), WURDE::g_logdebug, HeartbeatInfoStruct::interfaces, HeartbeatInfoStruct::locale, Module::m_interfaces, Module::m_moduleName, HeartbeatInfoStruct::managedType, Module::setLocale(), Module::setState(), Module::setType(), HeartbeatInfoStruct::source, HeartbeatInfoStruct::state, WURDE::STATE_INACTIVE, WURDE::STATE_INFO, and WURDE::STATE_QUIT.
Referenced by Module::Module().
string findObjectMapping | ( | std::string | object, | |
std::string | interface, | |||
WURDE::ConnectionStrategy | strat | |||
) |
Search this module for a mapping for some object, or an interface.
Definition at line 126 of file util.cpp.
References WURDE::g_debug(), WURDE::g_logdebug, Module::m_mappings, WURDE::STRAT_ASSIGNED, and WURDE::STRAT_NORMAL.
void setMappings | ( | std::vector< Mapping > | mappings | ) | [inline] |
Definition at line 57 of file mcp.H.
References Module::m_mappings.
Referenced by MCP::parseConfigFile(), and MCP::parseMapFile().
bool hasSupplier | ( | std::string | streamname, | |
std::string | type | |||
) |
Definition at line 210 of file util.cpp.
References WURDE::g_debug(), Module::m_interfaces, and Module::m_moduleName.
bool startUp | ( | WURDE::CommsManager & | myManager, | |
std::string | someArgs | |||
) |
Definition at line 226 of file util.cpp.
References CommsManager::closeConnections(), WURDE::g_globalConfiguration, WURDE::g_logdebug, WURDE::g_logerror, WURDEConfiguration::getBinDirectory(), WURDEConfiguration::getLogDirectory(), Module::m_binary, Module::m_lastTimestamp, Module::m_moduleName, Module::m_options, Module::m_process, Module::m_state, myManager, Time::now(), WURDE::STATE_FAIL, WURDE::STATE_RESET, WURDE::STATE_RESTART, WURDE::STATE_RUN, and WURDE::STATE_STARTUP.
int m_maxAttempts |
WURDE::Time m_lastTimestamp [private] |
Definition at line 67 of file mcp.H.
Referenced by Module::beat(), Module::Module(), Module::stale(), and Module::startUp().
struct timeval m_TTL [private] |
Definition at line 68 of file mcp.H.
Referenced by Module::Module(), Module::setTTL(), and Module::stale().
WURDE::RunState m_state [private] |
Definition at line 69 of file mcp.H.
Referenced by Module::getState(), Module::Module(), Module::setState(), and Module::startUp().
WURDE::ProcessType m_managedType [private] |
Definition at line 70 of file mcp.H.
Referenced by Module::getType(), Module::Module(), and Module::setType().
WURDE::ProcessLocale m_locale [private] |
Definition at line 71 of file mcp.H.
Referenced by Module::getLocale(), Module::Module(), and Module::setLocale().
std::string m_moduleName [private] |
Definition at line 72 of file mcp.H.
Referenced by Module::beat(), Module::getModuleName(), Module::hasSupplier(), Module::Module(), Module::refresh(), Module::setModuleName(), and Module::startUp().
std::string m_binary [private] |
Definition at line 73 of file mcp.H.
Referenced by Module::getBinary(), Module::setBinary(), and Module::startUp().
std::vector<std::string> m_options [private] |
Definition at line 74 of file mcp.H.
Referenced by Module::addCommandLineOption(), and Module::startUp().
std::vector<WURDE::InterfaceStream> m_interfaces [private] |
Definition at line 75 of file mcp.H.
Referenced by Module::addInterface(), Module::hasSupplier(), and Module::refresh().
std::vector<Mapping> m_mappings [private] |
Definition at line 76 of file mcp.H.
Referenced by Module::findObjectMapping(), and Module::setMappings().
std::vector<Mapping> m_occupiedResources [private] |
pid_t m_process [private] |