33 #include <coil/Properties.h> 34 #include <coil/stringutil.h> 35 #include <coil/Signal.h> 36 #include <coil/TimeValue.h> 37 #include <coil/Timer.h> 59 : m_name(comp->getInstanceName())
246 RTC_TRACE((
"Manager::activateManager()"));
252 RTC_ERROR((
"Could not get POA manager."));
260 RTC_ERROR((
"POA Manager activatatin failed."));
264 std::vector<std::string> mods;
267 for (
int i(0), len(mods.size()); i < len; ++i)
293 m_config[
"sdo.service.consumer.available_services"]
301 std::vector<std::string> comp;
303 for (
int i(0), len(comp.size()); i < len; ++i)
322 RTC_TRACE((
"Manager::runManager(): non-blocking mode"));
328 RTC_TRACE((
"Manager::runManager(): blocking mode"));
330 RTC_TRACE((
"Manager::runManager(): ORB was terminated"));
348 RTC_TRACE((
"Manager::load(fname = %s, initfunc = %s)",
350 std::string file_name(fname);
351 std::string init_func(initfunc);
354 if (init_func.empty())
357 init_func = mod[0] +
"Init";
406 RTC_TRACE((
"Manager::getLoadedModules()"));
419 RTC_TRACE((
"Manager::getLoadableModules()"));
437 RTC_TRACE((
"Manager::registerFactory(%s)", profile[
"type_name"].c_str()));
439 factory =
new FactoryCXX(profile, new_func, delete_func);
459 std::vector<coil::Properties> props;
460 for (
int i(0), len(factories.size()); i < len; ++i)
462 props.push_back(factories[i]->profile());
478 RTC_TRACE((
"Manager::registerECFactory(%s)", name));
482 factory =
new ECFactoryCXX(name, new_func, delete_func);
504 RTC_TRACE((
"Manager::getModulesFactories()"));
522 RTC_TRACE((
"Manager::createComponent(%s)", comp_args));
533 if (comp_prop.
findNode(
"exported_ports") != 0)
536 exported_ports =
coil::split(comp_prop[
"exported_ports"],
",");
538 std::string exported_ports_str(
"");
539 for (
size_t i(0), len(exported_ports.size()); i < len; ++i)
542 if (keyval.size() > 2)
544 exported_ports_str += (keyval[0] +
"." + keyval.back());
548 exported_ports_str += exported_ports[i];
551 if (i != exported_ports.size() - 1)
553 exported_ports_str +=
",";
557 comp_prop[
"exported_ports"] = exported_ports_str;
558 comp_prop[
"conf.default.exported_ports"] = exported_ports_str;
569 comp_id[
"implementation_id"].c_str()));
573 RTC_INFO((
"%d loadable modules found", mp.size()));
575 std::vector<coil::Properties>::iterator it;
579 RTC_ERROR((
"No module for %s in loadable modules list",
580 comp_id[
"implementation_id"].c_str()));
583 if (it->findNode(
"module_file_name") == 0)
585 RTC_ERROR((
"Hmm...module_file_name key not found."));
589 RTC_INFO((
"Loading module: %s", (*it)[
"module_file_name"].c_str()))
590 load((*it)[
"module_file_name"].c_str(),
"");
594 RTC_ERROR((
"Factory not found for loaded module: %s",
595 comp_id[
"implementation_id"].c_str()));
601 prop = factory->profile();
603 const char* inherit_prop[] = {
614 "exec_cxt.periodic.type",
615 "exec_cxt.periodic.rate",
616 "exec_cxt.evdriven.type",
625 for (
int i(0); inherit_prop[i][0] !=
'\0'; ++i)
627 const char* key(inherit_prop[i]);
632 comp = factory->create(
this);
636 comp_id[
"implementation_id"].c_str()));
639 RTC_TRACE((
"RTC created: %s", comp_id[
"implementation_id"].c_str()));
657 RTC_TRACE((
"RTC initialization failed: %s",
658 comp_id[
"implementation_id"].c_str()));
660 RTC_TRACE((
"%s was finalized", comp_id[
"implementation_id"].c_str()));
663 RTC_TRACE((
"RTC initialization succeeded: %s",
664 comp_id[
"implementation_id"].c_str()));
686 for (
int i(0), len(names.size()); i < len; ++i)
688 RTC_TRACE((
"Bind name: %s", names[i].c_str()));
709 for (
int i(0), len(names.size()); i < len; ++i)
711 RTC_TRACE((
"Unbind name: %s", names[i].c_str()));
732 RTC_ERROR((
"Factory not found: %s", ec_id.c_str()));
750 RTC_TRACE((
"deleteComponent(RTObject*)"));
760 comp_id[
"implementation_id"].c_str()));
766 comp_id[
"implementation_id"].c_str()));
767 factory->destroy(comp);
771 "YES",
"NO",
true) &&
774 std::vector<RTObject_impl*> comps;
776 if (comps.size() == 0)
785 RTC_TRACE((
"deleteComponent(%s)", instance_name));
790 RTC_WARN((
"RTC %s was not found in manager.", instance_name));
805 RTC_TRACE((
"Manager::getComponent(%s)", instance_name));
900 std::string tick(
m_config[
"timer.tick"]);
903 tm = atof(tick.c_str());
916 const char* s =
m_config[
"manager.auto_shutdown_duration"].c_str();
949 RTC_TRACE((
"Manager::shutdownManager()"));
955 RTC_TRACE((
"Manager::shutdownOnNoRtcs()"));
959 if (comps.size() == 0)
987 std::vector<std::string> logouts;
990 for (
int i(0), len(logouts.size()); i < len; ++i)
992 std::string logfile(logouts[i]);
993 if (logfile ==
"")
continue;
996 if (logfile ==
"STDOUT" || logfile ==
"stdout")
1002 std::filebuf* of =
new std::filebuf();
1007 std::cerr <<
"Error: cannot open logfile: " 1008 << logfile << std::endl;
1025 "enable",
"disable",
false) ?
1030 RTC_INFO((
"Copyright (C) 2003-2010"));
1032 RTC_INFO((
" Intelligent Systems Research Institute, AIST"));
1034 RTC_INFO((
"Starting local logging."));
1048 RTC_TRACE((
"Manager::shutdownLogger()"));
1051 for (
int i(0), len(
m_logfiles.size()); i < len; ++i)
1081 args.insert(args.begin(),
"manager");
1083 int argc(args.size());
1086 m_pORB = CORBA::ORB_init(argc, argv);
1088 CORBA::Object_var obj =
1089 m_pORB->resolve_initial_references((
char*)
"RootPOA");
1090 m_pPOA = PortableServer::POA::_narrow(obj);
1091 if (CORBA::is_nil(
m_pPOA))
1093 RTC_ERROR((
"Could not resolve RootPOA."));
1099 #ifdef ORB_IS_OMNIORB 1100 const char* conf =
"corba.alternate_iiop_addresses";
1106 for (
size_t i(0); i < addr_list.size(); ++i)
1109 if (addr_port.size() == 2)
1111 IIOP::Address iiop_addr;
1112 iiop_addr.host = addr_port[0].c_str();
1115 iiop_addr.port = port;
1116 omniIOR::add_IIOP_ADDRESS(iiop_addr);
1120 #endif // ORB_IS_OMNIORB 1124 RTC_ERROR((
"Exception: Caught unknown exception in initORB()." ));
1139 std::string opt(
m_config[
"corba.args"]);
1140 RTC_DEBUG((
"corba.args: %s", opt.c_str()));
1165 endpoints.insert(endpoints.end(), tmp.begin(), tmp.end());
1171 m_config[
"manager.is_master"].c_str()));
1176 if (mmm.size() == 2)
1178 endpoints.insert(endpoints.begin(), std::string(
":") + mmm[1]);
1182 endpoints.insert(endpoints.begin(),
":2810");
1192 std::string corba(
m_config[
"corba.id"]);
1193 RTC_DEBUG((
"corba.id: %s", corba.c_str()));
1195 for (
size_t i(0); i < endpoints.size(); ++i)
1197 std::string& endpoint(endpoints[i]);
1198 RTC_DEBUG((
"Endpoint is : %s", endpoint.c_str()));
1199 if (endpoint.find(
":") == std::string::npos) { endpoint +=
":"; }
1201 if (corba ==
"omniORB")
1206 #ifdef ORB_IS_OMNIORB 1207 #ifdef RTC_CORBA_CXXMAPPING11 1209 opt +=
" -ORBendPointPublish all(addr)";
1212 opt +=
" -ORBendPointPublishAllIFs 1";
1213 #endif // RTC_CORBA_CXXMAPPING1 1214 #endif // ORB_IS_OMNIORB 1218 opt +=
" -ORBendPoint giop:tcp:" + endpoint;
1221 else if (corba ==
"TAO")
1223 opt +=
"-ORBEndPoint iiop://" + endpoint;
1225 else if (corba ==
"MICO")
1227 opt +=
"-ORBIIOPAddr inet:" + endpoint;
1243 if(CORBA::is_nil(
m_pORB))
1249 while (
m_pORB->work_pending())
1252 if (
m_pORB->work_pending())
1255 RTC_DEBUG((
"No pending works of ORB. Shutting down POA and ORB."));
1259 RTC_ERROR((
"Caught SystemException during perform_work."));
1262 if (!CORBA::is_nil(
m_pPOA))
1268 RTC_DEBUG((
"POA Manager was deactivated."));
1269 m_pPOA->destroy(
false,
true);
1270 m_pPOA = PortableServer::POA::_nil();
1273 catch (CORBA::SystemException& ex)
1275 RTC_ERROR((
"Exception cought during root POA destruction"));
1276 #ifndef ORB_IS_RTORB 1277 RTC_ERROR((
"CORBA::SystemException(minor=%d)", ex.minor()));
1278 #endif // ORB_IS_RTORB 1282 RTC_ERROR((
"Caught unknown exception during POA destruction."));
1286 if (!CORBA::is_nil(
m_pORB))
1294 m_pORB = CORBA::ORB::_nil();
1296 catch (CORBA::SystemException& ex)
1298 RTC_ERROR((
"Exception caught during ORB shutdown"));
1299 #ifndef ORB_IS_RTORB 1300 RTC_ERROR((
"CORBA::SystemException(minodor=%d)", ex.minor()));
1301 #endif // ORB_IS_RTORB 1305 RTC_ERROR((
"Caught unknown exception during ORB shutdown."));
1335 for (
int i(0), len_i(meth.size()); i < len_i; ++i)
1337 std::vector<std::string> names;
1341 for (
int j(0), len_j(names.size());
j < len_j; ++
j)
1343 RTC_TRACE((
"Register Naming Server: %s/%s", \
1344 meth[i].c_str(), names[
j].c_str()));
1354 std::string intr(
m_config[
"naming.update.interval"]);
1357 tm = atof(intr.c_str());
1377 RTC_TRACE((
"Manager::shutdownNaming()"));
1394 RTC_TRACE((
"Manager::initExecContext()"));
1403 RTC_TRACE((
"Manager::initComposite()"));
1411 RTC_TRACE((
"Manager::initFactories()"));
1431 RTC_TRACE((
"Manager::initManagerServant()"));
1438 std::vector<std::string> names(
coil::split(
prop[
"naming_formats"],
","));
1442 for (
int i(0), len(names.size()); i < len; ++i)
1449 std::ifstream otherref(
m_config[
"manager.refstring_path"].c_str());
1450 if (otherref.fail() != 0)
1453 std::ofstream reffile(
m_config[
"manager.refstring_path"].c_str());
1454 RTM::Manager_var mgr_v(RTM::Manager::
1456 CORBA::String_var str_var =
m_pORB->object_to_string(mgr_v);
1462 std::string refstring;
1463 otherref >> refstring;
1466 CORBA::Object_var obj =
m_pORB->string_to_object(refstring.c_str());
1467 RTM::Manager_var mgr = RTM::Manager::_narrow(obj);
1485 RTC_TRACE((
"Manager::shutdownComponents()"));
1486 std::vector<RTObject_impl*> comps;
1488 for (
int i(0), len(comps.size()); i < len; ++i)
1494 p << comps[i]->getProperties();
1504 for (CORBA::ULong i(0), len(
m_ecs.size()); i < len; ++i)
1507 PortableServer::ObjectId_var oid =
m_pPOA->servant_to_id(
m_ecs[i]);
1508 m_pPOA->deactivate_object(oid);
1526 RTC_TRACE((
"Manager::cleanupComponent()"));
1534 RTC_VERBOSE((
"%d components are marked as finalized.",
1545 RTC_TRACE((
"Manager::notifyFinalized()"));
1561 std::vector<std::string> id_and_conf(
coil::split(comp_arg,
"?"));
1564 if (id_and_conf.size() != 1 && id_and_conf.size() != 2)
1566 RTC_ERROR((
"Invalid arguments. Two or more '?' in arg : %s", comp_arg));
1569 if (id_and_conf[0].
find(
":") == std::string::npos)
1571 id_and_conf[0].insert(0,
"RTC:::");
1572 id_and_conf[0] +=
":";
1574 std::vector<std::string>
id(
coil::split(id_and_conf[0],
":"));
1580 RTC_ERROR((
"Invalid RTC id format.: %s", id_and_conf[0].c_str()));
1584 const char* prof[] =
1586 "RTC",
"vendor",
"category",
"implementation_id",
"version" 1589 if (
id[0] != prof[0])
1591 RTC_ERROR((
"Invalid id type: %s",
id[0].c_str()));
1594 for (
int i(1); i < 5; ++i)
1596 comp_id[prof[i]] =
id[i];
1597 RTC_TRACE((
"RTC basic propfile %s: %s", prof[i],
id[i].c_str()));
1600 if (id_and_conf.size() == 2)
1602 std::vector<std::string> conf(
coil::split(id_and_conf[1],
"&"));
1603 for (
int i(0), len(conf.size()); i < len; ++i)
1605 if (conf[i].empty()) {
continue; }
1606 std::vector<std::string> keyval(
coil::split(conf[i],
"="));
1607 if (keyval.size() != 2) {
continue; }
1608 comp_conf[keyval[0]] = keyval[1];
1610 keyval[0].c_str(), keyval[1].c_str()));
1620 std::vector<std::string> id_and_conf(
coil::split(ec_args,
"?"));
1621 if (id_and_conf.size() != 1 && id_and_conf.size() != 2)
1623 RTC_ERROR((
"Invalid arguments. Two or more '?' in arg : %s", ec_args));
1626 if (id_and_conf[0].empty())
1628 RTC_ERROR((
"Empty ExecutionContext's name"));
1631 ec_id =id_and_conf[0];
1633 if (id_and_conf.size() == 2)
1635 std::vector<std::string> conf(
coil::split(id_and_conf[1],
"&"));
1636 for (
int i(0), len(conf.size()); i < len; ++i)
1638 std::vector<std::string> k(
coil::split(conf[i],
"="));
1639 ec_conf[k[0]] = k[1];
1640 RTC_TRACE((
"EC property %s: %s", k[0].c_str(), k[1].c_str()));
1660 std::string type_conf(category +
"." + type_name +
".config_file");
1661 std::string name_conf(category +
"." + inst_name +
".config_file");
1670 std::ifstream conff(
m_config[name_conf].c_str());
1673 name_prop.
load(conff);
1683 std::ifstream conff(
m_config[type_conf].c_str());
1686 type_prop.
load(conff);
1696 type_prop << name_prop;
1701 std::string naming_formats;
1704 naming_formats +=
m_config[
"naming.formats"];
1705 if (comp_prop.findNode(
"naming.formats") != 0)
1707 naming_formats = comp_prop[
"naming.formats"];
1712 std::string naming_names;
1727 if (file_name == NULL)
1729 RTC_ERROR((
"Invalid configuration file name."));
1732 if (file_name[0] !=
'\0')
1734 std::ifstream conff(file_name);
1755 std::string name(naming_format), str(
"");
1756 std::string::iterator it, it_end;
1760 it_end = name.end();
1761 for ( ; it != it_end; ++it)
1767 if (!(count % 2)) str.push_back((*it));
1773 if (*it ==
'{' || *it ==
'(')
1777 for ( ; it != it_end && (*it) !=
'}' && (*it) !=
')'; ++it)
1782 if (envval != NULL) str += envval;
1791 if (count > 0 && (count % 2))
1794 if (c ==
'n') str += prop[
"instance_name"];
1795 else if (c ==
't') str += prop[
"type_name"];
1796 else if (c ==
'm') str += prop[
"type_name"];
1797 else if (c ==
'v') str += prop[
"version"];
1798 else if (c ==
'V') str += prop[
"vendor"];
1799 else if (c ==
'c') str += prop[
"category"];
1800 else if (c ==
'h') str +=
m_config[
"os.hostname"];
1801 else if (c ==
'M') str +=
m_config[
"manager.name"];
1802 else if (c ==
'p') str +=
m_config[
"manager.pid"];
1803 else str.push_back(c);
void setDateFormat(const char *format)
Set date/time format for adding the header.
RTObject_impl *(* RtcNewFunc)(Manager *manager)
#define RTC_ERROR(fmt)
Error log output macro.
static Mutex mutex
The mutex of the pointer to the Manager.
PortableServer::POAManager_ptr getPOAManager()
Get POAManager that Manager has.
std::string normalize(std::string &str)
Erase the head/tail blank and replace upper case to lower case.
void(* ModuleInitProc)(Manager *manager)
RTObject_impl * createComponent(const char *comp_args)
Create RT-Components.
std::string createORBOptions()
Create ORB command options.
Logger rtclog
Logger stream.
bool procContextArgs(const char *ec_args, std::string &ec_id, coil::Properties &ec_conf)
Extracting ExecutionContext's name/properties from the given string.
const char * getCategory()
[local interface] Get category information
void deleteComponent(RTObject_impl *comp)
Unregister RT-Components that have been registered to Manager.
std::vector< coil::Properties > getLoadedModules()
Get a list of loaded modules.
virtual int open(void *args)
ORB activation processing.
Structure for exception handling when file open is failed.
virtual ReturnCode_t initialize()
[CORBA interface] Initialize the RTC that realizes this interface.
Term m_terminate
Synchronous flag for manager termination.
bool stringTo(To &val, const char *str)
Convert the given std::string to object.
PortableServer::POA_ptr getPOA()
Get a pointer to RootPOA held by Manager.
std::vector< coil::Properties > getLoadableModules()
Get the loadable module list.
FactoryManager m_factory
ComponentManager.
factory initialization function
void runManager(bool no_block=false)
Run the Manager.
void terminate()
Termination processing.
RTObject_impl * getComponent(const char *instance_name)
Get RT-Component's pointer.
bool initFactories()
Factories initialization.
void cleanupComponents()
This method deletes RT-Components.
RTM::ManagerServant * m_mgrservant
The pointer to the ManagerServant.
bool registerComponent(RTObject_impl *comp)
Register RT-Component directly without Factory.
Object * find(const Identifier &id) const
Find the object.
std::vector< RTObject_impl * > getObjects()
Get all bound objects.
std::vector< coil::Properties > getLoadableModules()
Get a list of loadable modules.
void shutdown()
Shutdown Manager.
A base class for ExecutionContext.
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
std::vector< std::string > getNamingNames()
[local interface] Get Naming Server information
virtual ExecutionContextBase * create()=0
Pure virtual function to create ExecutionContext.
void terminate()
Terminate manager.
void load(const char *fname, const char *initfunc)
[CORBA interface] Load module
vstring split(const std::string &input, const std::string &delimiter, bool ignore_empty)
Split string by delimiter.
RTC manager configuration.
void bindObject(const char *name, const RTObject_impl *rtobj)
Bind the specified objects to NamingService.
Structure for exception handling when specified symbol cannot be found.
bool initExecContext()
ExecutionContextManager initialization.
void setName(const char *name)
Set suffix of date/time string of header.
vstring unique_sv(vstring sv)
Eliminate duplication from the given string list.
void registerNameServer(const char *method, const char *name_server)
Regster the NameServer.
CORBA::ORB_ptr getORB()
Get the pointer to ORB.
std::string load(const std::string &file_name)
Load the module.
void PeriodicExecutionContextInit(RTC::Manager *manager)
Initialization function to register to ECFactory.
bool initComposite()
PeriodicECSharedComposite initialization.
coil::Timer * m_timer
Timer Object.
coil::Properties & getProperties()
[local interface] Get RTC property
void configure(coil::Properties &prop)
Specify the configuration information to the Property.
ListenerId registerListenerObj(ListenerClass *obj, void(ListenerClass::*cbf)(), TimeValue tm)
Register listener.
std::vector< coil::Properties > getLoadedModules()
Get the module list that has been loaded.
static GlobalFactory< AbstractClass, Identifier, Compare, Creator, Destructor > & instance()
Create instance.
void OpenHRPExecutionContextInit(RTC::Manager *manager)
Initialization function to register to ECFactory.
static Manager & instance()
Get instance of the manager.
NamingManager * m_namingManager
The pointer to the NamingManager.
void(* SignalHandler)(int)
#define RTC_WARN(fmt)
Warning log output macro.
string mgr_name
Get Manager object reference.
RTComponent manager class.
#define RTC_DEBUG_STR(str)
#define RTC_PARANOID(fmt)
Paranoid level log output macro.
virtual int wait(void)
Waiting for the thread terminate.
std::vector< std::string > vstring
const char * getTypeName()
[local interface] Get type name
std::vector< coil::Properties > getFactoryProfiles()
Get profiles of factories.
env
ネームサーバー定義 env = RtmEnv(sys.argv, ["localhost:2809"]) list0 = env.name_space["localhost:2809"].list_obj() env.name_space['localhost:2809'].rtc_handles.keys() ns = env.name_space['localhost:2809']
void stop()
Stop Timer task.
void addStream(streambuf_type *stream, bool cleanup=false)
Destructor.
static Manager * manager
The pointer to the Manager.
void configureComponent(RTObject_impl *comp, const coil::Properties &prop)
Configure RT-Component.
ECFactoryBase abstract class.
std::vector< std::filebuf * > m_logfiles
Files for log output.
Periodic Execution Context Shared Composite Component class.
void notifyFinalized(RTObject_impl *comp)
This method deletes RT-Components.
#define RTC_DEBUG(fmt)
Debug level log output macro.
std::vector< ExecutionContextBase * > m_ecs
ExecutionContext list.
CORBA naming service helper class.
std::string flatten(vstring sv)
Create CSV file from the given string list.
void shutdownNaming()
NamingManager finalization.
LogStreamBuf m_logStreamBuf
Logger buffer.
bool registerObject(Object *obj)
Register the specified object.
void shutdownLogger()
System Logger finalization.
std::vector< std::string > getModulesFactories()
Get the list of all Factories.
def j(str, encoding="cp932")
CORBA::Long find(const CorbaSequence &seq, Functor f)
Return the index of CORBA sequence element that functor matches.
void ExtTrigExecutionContextInit(RTC::Manager *manager)
Register Factory class for this ExecutionContext.
Object * unregisterObject(const Identifier &id)
Unregister the specified object.
static Manager * init(int argc, char **argv)
Initialize manager.
Structure for exception handling when specified module cannot be found.
RTComponent manager servant implementation class.
void initManager(int argc, char **argv)
Manager internal initialization.
char ** toArgv(const vstring &args)
Convert the given string list into the argument list.
coil::Properties m_config
Managaer's configuration Properties.
ExtTrigExecutionContext class.
CORBA::ORB_var m_pORB
The pointer to the ORB.
Loadable modules manager class.
Properties *const findNode(const std::string &key) const
Get node of properties.
bool procComponentArgs(const char *comp_arg, coil::Properties &comp_id, coil::Properties &comp_conf)
Extracting component type/properties from the given string.
ExecutionContextBase * createContext(const char *ec_args)
Create Context.
void load(std::istream &inStream)
Loads property list that consists of key:value from input stream.
void enableLock()
Enable the lock mode.
InstanceName(RTObject_impl *comp)
void createORBEndpoints(coil::vstring &endpoints)
Create Endpoints.
bool unregisterComponent(RTObject_impl *comp)
Unregister RT-Components.
Manager()
Protected Constructor.
void join()
Wait for Manager's termination.
virtual ReturnCode_t exit()
[CORBA interface]top the RTC's execution context(s) and finalize it along with its contents...
void shutdownManager()
Shutdown Manager.
ACE_Sig_Action SignalAction
const char * getInstanceName()
[local interface] Get instance name
Execution context for OpenHRP3.
Pred for_each(Pred p)
Functor for searching object.
bool activateManager()
Activate the Manager.
bool setLevel(const char *level)
Set log level by string.
bool registerECFactory(const char *name, ECNewFunc new_func, ECDeleteFunc delete_func)
Register ExecutionContext Factory.
prop
Organization::get_organization_property ();.
ModuleManager * m_module
The pointer to the ModuleManager.
naming Service helper class
CORBA IOR manipulation utility functions.
ostream_type & level(int level)
Acquire log stream.
Terminator * m_terminator
The pointer to ORB termination helper class.
void unloadAll()
Unload all modules.
bool mergeProperty(coil::Properties &prop, const char *file_name)
Merge property information.
Class represents a set of properties.
void unloadAll()
Unload all modules.
void unload(const char *fname)
Unload module.
char * getenv(const char *name)
Get environment variable.
bool toBool(std::string str, std::string yes, std::string no, bool default_value)
Convert given string into bool value.
void createORBEndpointOption(std::string &opt, coil::vstring &endpoint)
Create a command optional line of Endpoint of ORB.
ExecutionContextBase *(* ECNewFunc)()
void update()
Update information of NamingServer.
std::vector< RTObject_impl * > comps
void setModuleInitProc(ModuleInitProc proc)
Set initial procedure.
PeriodicExecutionContext class.
bool initManagerServant()
ManagerServant initialization.
void shutdownOnNoRtcs()
Shutdown Manager.
bool initLogger()
System logger initialization.
bool initNaming()
NamingManager initialization.
#define RTC_INFO(fmt)
Information level log output macro.
RTM::Manager_ptr getObjRef() const
Get the reference of Manager.
void unload(const std::string &file_name)
Unload the module.
void lock()
Acquire log lock Acquire log lock when the lock mode is set.
void(* RtcDeleteFunc)(RTObject_impl *rtc)
ComponentManager m_compManager
ComponentManager.
bool operator()(RTObject_impl *comp)
void cleanupComponent(RTObject_impl *comp)
Unregister RT-Components.
const char * basename(const char *path)
Get a file name part than a file pass.
Properties & getNode(const std::string &key)
Get node of properties.
PortableServer::POA_var m_pPOA
The pointer to the POA.
std::vector< Object * > getObjects() const
Get a list of obejects that are registerd.
void disableLock()
Disable the lock mode.
void unlock()
Release the log lock Release the log lock when the lock mode is set.
void shutdownORB()
ORB finalization.
ECFactoryManager m_ecfactory
ExecutionContext Manager.
void PeriodicECSharedCompositeInit(RTC::Manager *manager)
bool initTimer()
Timer initialization.
std::string formatString(const char *naming_format, coil::Properties &prop)
Construct registration information when registering to Naming server.
void unbindObject(const char *name)
Unbind the specified objects from NamingService.
void(* ECDeleteFunc)(ExecutionContextBase *ec)
OrbRunner * m_runner
The pointer to ORB helper class.
SDO service consumer base class and its factory.
bool registerFactory(coil::Properties &profile, RtcNewFunc new_func, RtcDeleteFunc delete_func)
Register RT-Component Factory.
void shutdownComponents()
NamingManager finalization.
#define RTC_VERBOSE(fmt)
Verbose level log output macro.
void setProperties(const coil::Properties &prop)
[local interface] Set RTC property
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.
std::vector< RTObject_impl * > getComponents()
Get all RT-Components registered in the Manager.
int usleep(useconds_t usec)
Stop a processing at specified micro second time.
bool initORB()
CORBA ORB initialization.
void unbindAll()
Unbind all objects from NamingService.