29 #include <coil/Mutex.h> 30 #include <coil/Guard.h> 31 #include <coil/Task.h> 173 static Manager* init(
int argc,
char** argv);
365 bool activateManager();
397 void runManager(
bool no_block =
false);
424 void load(
const char* fname,
const char* initfunc);
445 void unload(
const char* fname);
481 std::vector<coil::Properties> getLoadedModules();
502 std::vector<coil::Properties> getLoadableModules();
554 std::vector<coil::Properties> getFactoryProfiles();
582 bool registerECFactory(
const char* name,
603 std::vector<std::string> getModulesFactories();
715 void cleanupComponents();
831 void deleteComponent(
const char* instance_name);
876 std::vector<RTObject_impl*> getComponents();
898 CORBA::ORB_ptr getORB();
917 PortableServer::POA_ptr getPOA();
936 PortableServer::POAManager_ptr getPOAManager();
973 void initManager(
int argc,
char** argv);
990 void shutdownManager();
1008 void shutdownOnNoRtcs();
1053 void shutdownLogger();
1096 std::string createORBOptions();
1130 void createORBEndpointOption(std::string& opt,
coil::vstring& endpoint);
1203 void shutdownNaming();
1223 void shutdownComponents();
1273 bool procComponentArgs(
const char* comp_arg,
1316 bool procContextArgs(
const char* ec_args,
1365 bool initExecContext();
1382 bool initComposite();
1405 bool initFactories();
1441 bool initManagerServant();
1527 std::string formatString(
const char* naming_format,
1697 : m_vendor(
""), m_category(
""), m_impleid(imple_id), m_version(
"")
1701 : m_vendor(prop[
"vendor"]),
1702 m_category(prop[
"category"]),
1703 m_impleid(prop[
"implementation_id"]),
1704 m_version(prop[
"version"])
1708 : m_vendor(factory->profile()[
"vendor"]),
1709 m_category(factory->profile()[
"category"]),
1710 m_impleid(factory->profile()[
"implementation_id"]),
1711 m_version(factory->profile()[
"version"])
1717 if (m_impleid.empty())
return false;
1721 if (m_impleid != prop[
"implementation_id"])
1723 if (!m_vendor.empty() && m_vendor != prop[
"vendor"])
1725 if (!m_category.empty() && m_category != prop[
"category"])
1727 if (!m_version.empty() && m_version != prop[
"version"])
1749 if (m_prop[
"implementation_id"] != prop[
"implementation_id"])
1753 if (!m_prop[
"vendor"].empty() &&
1754 m_prop[
"vendor"] != prop[
"vendor"]) {
return false; }
1755 if (!m_prop[
"category"].empty() &&
1756 m_prop[
"category"] != prop[
"category"]) {
return false; }
1757 if (!m_prop[
"version"].empty() &&
1758 m_prop[
"version"] != prop[
"version"]) {
return false; }
1790 : m_name(factory->name()) {};
1793 return m_name == factory->
name();
1817 std::vector<ExecutionContextBase*>
m_ecs;
2070 Manager::instance().shutdown();
2116 #endif // RTC_MANAGER_H RTObject_impl *(* RtcNewFunc)(Manager *manager)
static Mutex mutex
The mutex of the pointer to the Manager.
LogStreamBuf & getLogStreamBuf()
Get the log buffer.
void(* ModuleInitProc)(Manager *manager)
Logger rtclog
Logger stream.
std::vector< std::string > modlist
LogStreamBuf m_logStreamBuf
virtual coil::Properties & profile()
Get the component profile.
virtual int open(void *args)
ORB activation processing.
Term m_terminate
Synchronous flag for manager termination.
log_streambuf template class
FactoryManager m_factory
ComponentManager.
RT component logger class.
void terminate()
Termination processing.
RTM::ManagerServant * m_mgrservant
The pointer to the ManagerServant.
FactoryPredicate(const char *imple_id)
A base class for ExecutionContext.
std::string & getLogLevel()
Get the log level of the configuration.
ECFactoryPredicate(const char *name)
coil::Timer * m_timer
Timer Object.
NamingManager * m_namingManager
The pointer to the NamingManager.
OrbRunner(CORBA::ORB_ptr orb)
Constructor.
virtual int svc(void)
ORB start processing.
std::vector< std::string > vstring
coil::Properties & getConfig()
Get the manager configuration.
static Manager * manager
The pointer to the Manager.
ECFactoryBase abstract class.
std::vector< std::filebuf * > m_logfiles
Files for log output.
coil::Properties Properties
std::vector< ExecutionContextBase * > m_ecs
ExecutionContext list.
LogStreamBuf m_logStreamBuf
Logger buffer.
ObjectManager< const coil::Properties, FactoryBase, FactoryPredicate > FactoryManager
ComponentFactory.
coil::Properties m_config
Managaer's configuration Properties.
CORBA::ORB_var m_pORB
The pointer to the ORB.
ObjectManager< const char *, ECFactoryBase, ECFactoryPredicate > ECFactoryManager
FactoryPredicate(const coil::Properties &prop)
coil::Guard< Mutex > Guard
prop
Organization::get_organization_property ();.
ECFactoryPredicate(ECFactoryBase *factory)
ModuleManager * m_module
The pointer to the ModuleManager.
virtual int close(unsigned long flags)
ORB close processing.
virtual int open(void *args)
Termination processing activation.
Terminator * m_terminator
The pointer to ORB termination helper class.
Class represents a set of properties.
ExecutionContext Factory class.
ExecutionContextBase *(* ECNewFunc)()
std::vector< RTObject_impl * > comps
coil::Properties & m_prop
FactoryPredicate(FactoryBase *factory)
ObjectManager< std::string, RTObject_impl, InstanceName > ComponentManager
void(* RtcDeleteFunc)(RTObject_impl *rtc)
ComponentManager m_compManager
ComponentManager.
bool operator()(FactoryBase *factory)
bool operator()(coil::Properties &prop)
PortableServer::POA_var m_pPOA
The pointer to the POA.
Terminator(Manager *manager)
Constructor.
virtual const char * name()=0
Pure virtual function to get names of creation target ExecutionContext.
ECFactoryManager m_ecfactory
ExecutionContext Manager.
void(* ECDeleteFunc)(ExecutionContextBase *ec)
OrbRunner * m_runner
The pointer to ORB helper class.
bool operator()(ECFactoryBase *factory)
ModulePredicate(coil::Properties &prop)
PortableServer::POAManager_var m_pPOAManager
The pointer to the POAManager.
ModuleInitProc m_initProc
User's initialization function's pointer.
const std::string & getProperty(const std::string &key) const
Search for the property with the specified key in this property.
void operator()(FactoryBase *f)
virtual int svc(void)
ORB and manager's termination processing.
Common Object Interface Layer.