18 #ifndef RTC_RTOBJECT_H
19 #define RTC_RTOBJECT_H
25 #include <rtm/idl/RTCSkel.h>
26 #include <rtm/idl/OpenRTMSkel.h>
38 #define ECOTHER_OFFSET 1000
42 class Configuration_impl;
46 #pragma warning( disable : 4290 )
52 class ExecutionContextBase;
53 typedef ExecutionContextHandle_t
UniqueId;
90 :
public virtual POA_OpenRTM::DataFlowComponent,
91 public virtual PortableServer::RefCountServantBase
134 RTObject_impl(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa);
617 throw (CORBA::SystemException);
665 throw (CORBA::SystemException);
710 virtual ReturnCode_t
exit()
711 throw (CORBA::SystemException);
746 virtual CORBA::Boolean
is_alive(ExecutionContext_ptr exec_context)
747 throw (CORBA::SystemException);
777 throw (CORBA::SystemException);
798 throw (CORBA::SystemException);
819 throw (CORBA::SystemException);
835 virtual ExecutionContextHandle_t
837 throw (CORBA::SystemException);
870 throw (CORBA::SystemException);
916 throw (CORBA::SystemException);
941 throw (CORBA::SystemException);
963 throw (CORBA::SystemException);
1018 throw (CORBA::SystemException);
1045 throw (CORBA::SystemException);
1076 throw (CORBA::SystemException);
1107 throw (CORBA::SystemException);
1136 throw (CORBA::SystemException);
1166 throw (CORBA::SystemException);
1201 throw (CORBA::SystemException);
1247 throw (CORBA::SystemException);
1284 throw (CORBA::SystemException);
1332 throw (CORBA::SystemException);
1378 throw (CORBA::SystemException);
1417 throw (CORBA::SystemException);
1460 throw (CORBA::SystemException,
1461 SDOPackage::NotAvailable, SDOPackage::InternalError);
1500 throw (CORBA::SystemException,
1501 SDOPackage::NotAvailable, SDOPackage::InternalError);
1537 throw (CORBA::SystemException,
1538 SDOPackage::NotAvailable, SDOPackage::InternalError);
1577 throw (CORBA::SystemException,
1578 SDOPackage::NotAvailable, SDOPackage::InternalError);
1617 throw (CORBA::SystemException,
1618 SDOPackage::NotAvailable, SDOPackage::InternalError);
1662 throw (CORBA::SystemException,
1663 SDOPackage::InvalidParameter, SDOPackage::NotAvailable,
1664 SDOPackage::InternalError);
1714 throw (CORBA::SystemException,
1715 SDOPackage::InvalidParameter, SDOPackage::NotAvailable,
1716 SDOPackage::InternalError);
1763 throw (CORBA::SystemException,
1764 SDOPackage::InterfaceNotImplemented, SDOPackage::NotAvailable,
1765 SDOPackage::InternalError);
1811 throw (CORBA::SystemException,
1812 SDOPackage::InterfaceNotImplemented, SDOPackage::NotAvailable,
1813 SDOPackage::InternalError);
1851 throw (CORBA::SystemException,
1852 SDOPackage::NotAvailable, SDOPackage::InternalError);
1886 throw (CORBA::SystemException,
1887 SDOPackage::NotAvailable, SDOPackage::InternalError);
1925 virtual CORBA::Any*
get_status(
const char* name)
1926 throw (CORBA::SystemException,
1927 SDOPackage::InvalidParameter, SDOPackage::NotAvailable,
1928 SDOPackage::InternalError);
2145 void setObjRef(
const RTObject_ptr rtobj);
2250 template <
typename VarType>
2252 const char* def_val,
2255 RTC_TRACE((
"bindParameter(%s (default: %s))", param_name, def_val));
2350 bool addPort(PortService_ptr port);
3234 void setReadAll(
bool read=
true,
bool completion=
false);
3270 void setWriteAll(
bool write=
true,
bool completion=
false);
3383 bool autoclean =
true);
3386 template <
class Listener>
3390 void (Listener::*memfunc)(
UniqueId ec_id))
3396 Noname(Listener& obj,
void (Listener::*memfunc)(
UniqueId))
3397 : m_obj(obj), m_memfunc(memfunc)
3402 (m_obj.*m_memfunc)(ec_id);
3406 typedef void (Listener::*Memfunc)(
UniqueId ec_id);
3409 Noname* listener(
new Noname(obj, memfunc));
3517 bool autoclean =
true);
3519 template <
class Listener>
3523 void (Listener::*memfunc)(
UniqueId ec_id,
3530 Noname(Listener& obj,
void (Listener::*memfunc)(
UniqueId, ReturnCode_t))
3531 : m_obj(obj), m_memfunc(memfunc)
3534 void operator()(
UniqueId ec_id, ReturnCode_t ret)
3536 (m_obj.*m_memfunc)(ec_id, ret);
3540 typedef void (Listener::*Memfunc)(
UniqueId ec_id, ReturnCode_t ret);
3543 Noname* listener(
new Noname(obj, memfunc));
3630 bool autoclean =
true);
3632 template <
class Listener>
3636 void (Listener::*memfunc)(
const RTC::PortProfile&))
3642 Noname(Listener& obj,
3643 void (Listener::*memfunc)(
const RTC::PortProfile&))
3644 : m_obj(obj), m_memfunc(memfunc)
3647 void operator()(
const RTC::PortProfile& pprofile)
3649 (m_obj.*m_memfunc)(pprofile);
3653 typedef void (Listener::*Memfunc)(
const RTC::PortProfile&);
3656 Noname* listener(
new Noname(obj, memfunc));
3743 bool autoclean =
true);
3745 template <
class Listener>
3749 void (Listener::*memfunc)(
UniqueId))
3755 Noname(Listener& obj,
void (Listener::*memfunc)(
UniqueId))
3756 : m_obj(obj), m_memfunc(memfunc)
3761 (m_obj.*m_memfunc)(ec_id);
3765 typedef void (Listener::*Memfunc)(
UniqueId);
3768 Noname* listener(
new Noname(obj, memfunc));
3854 bool autoclean =
true);
3856 template <
class Listener>
3860 void (Listener::*memfunc)(
const char*,
3867 Noname(Listener& obj,
3868 void (Listener::*memfunc)(
const char*, ConnectorProfile&))
3869 : m_obj(obj), m_memfunc(memfunc)
3872 void operator()(
const char* portname, ConnectorProfile& cprofile)
3874 (m_obj.*m_memfunc)(portname, cprofile);
3878 typedef void (Listener::*Memfunc)(
const char*, ConnectorProfile&);
3881 Noname* listener(
new Noname(obj, memfunc));
3970 bool autoclean =
true);
3972 template <
class Listener>
3976 void (Listener::*memfunc)(
const char*,
3984 Noname(Listener& obj,
3985 void (Listener::*memfunc)(
const char*,
3988 : m_obj(obj), m_memfunc(memfunc)
3991 void operator()(
const char* portname,
3992 ConnectorProfile& cprofile,
3995 (m_obj.*m_memfunc)(portname, cprofile, ret);
3999 typedef void (Listener::*Memfunc)(
const char* portname,
4000 ConnectorProfile& cprofile,
4004 Noname* listener(
new Noname(obj, memfunc));
4068 bool autoclean =
true);
4070 template <
class Listener>
4074 void (Listener::*memfunc)(
const char*,
4081 Noname(Listener& obj,
4082 void (Listener::*memfunc)(
const char*,
const char*))
4083 : m_obj(obj), m_memfunc(memfunc)
4086 void operator()(
const char* config_set_name,
4087 const char* config_param_name)
4089 (m_obj.*m_memfunc)(config_set_name, config_param_name);
4093 typedef void (Listener::*Memfunc)(
const char*,
const char*);
4096 Noname* listener(
new Noname(obj, memfunc));
4161 bool autoclean =
true);
4163 template <
class Listener>
4167 void (Listener::*memfunc)
4174 Noname(Listener& obj,
4176 : m_obj(obj), m_memfunc(memfunc)
4181 (m_obj.*m_memfunc)(config_set);
4188 Noname* listener(
new Noname(obj, memfunc));
4255 bool autoclean =
true);
4257 template <
class Listener>
4261 void (Listener::*memfunc)(
const char*))
4267 Noname(Listener& obj,
void (Listener::*memfunc)(
const char*))
4268 : m_obj(obj), m_memfunc(memfunc)
4271 virtual void operator()(
const char* config_set_name)
4273 (m_obj.*m_memfunc)(config_set_name);
4277 typedef void (Listener::*Memfunc)(
const char*);
4280 Noname* listener(
new Noname(obj, memfunc));
4537 return m_id == std::string(prof.id);
4806 return m_name == std::string(nv.name);
4826 if (!::CORBA::is_nil(ecs))
4829 ExecutionContext::_duplicate(ecs));
4844 :
m_ec(ExecutionContext::_duplicate(ec))
4851 if (!::CORBA::is_nil(ecs))
4853 ExecutionContext_var ec;
4854 ec = ExecutionContext::_narrow(ecs);
4855 return m_ec->_is_equivalent(ec);
4879 :
m_comp(RTC::LightweightRTObject::_duplicate(comp))
4884 if (!::CORBA::is_nil(ec) && !ec->_non_existent())
4887 ec->deactivate_component(RTC::LightweightRTObject::_duplicate(
m_comp));
4897 #pragma warning( default : 4290 )
4900 #endif // RTC_RTOBJECT