24 #include <coil/stringutil.h> 39 "implementation_id",
"",
61 : m_pManager(manager),
62 m_pORB(CORBA::ORB::_duplicate(manager->getORB())),
63 m_pPOA(PortableServer::POA::_duplicate(manager->getPOA())),
64 m_portAdmin(manager->getORB(), manager->getPOA()),
65 m_created(true), m_exiting(false),
66 m_properties(default_conf), m_configsets(m_properties.getNode(
"conf")),
68 m_readAll(false),m_writeAll(false),
69 m_readAllCompletion(false),m_writeAllCompletion(false)
86 PortableServer::POA_ptr poa)
88 m_pORB(CORBA::ORB::_duplicate(orb)),
89 m_pPOA(PortableServer::POA::_duplicate(poa)),
311 throw (CORBA::SystemException)
318 ec_args +=
"rate=" +
m_properties[
"exec_cxt.periodic.rate"];
324 ec->set_rate(atof(
m_properties[
"exec_cxt.periodic.rate"].c_str()));
326 ExecutionContextService_var ecv;
327 ecv = RTC::ExecutionContextService::_duplicate(ec->
getObjRef());
340 for (::CORBA::ULong i(0), len(
m_ecMine.length()); i < len; ++i)
358 throw (CORBA::SystemException)
369 for (CORBA::ULong ic(0), len(
m_ecOther.length()); ic < len; ++ic)
395 throw (CORBA::SystemException)
411 for (CORBA::ULong ic(0), len(
m_ecOther.length()); ic < len; ++ic)
414 RTC::LightweightRTObject_var comp(this->_this());
417 m_ecOther[ic]->remove_component(comp.in());
434 throw (CORBA::SystemException)
437 for (::CORBA::ULong i(0), len(
m_ecMine.length()); i < len; ++i)
439 if (exec_context->_is_equivalent(
m_ecMine[i]))
443 for (::CORBA::ULong i(0), len(
m_ecOther.length()); i < len; ++i)
447 if (exec_context->_is_equivalent(
m_ecOther[i]))
462 throw (CORBA::SystemException)
474 return ExecutionContext::_nil();
485 return ExecutionContext::_duplicate(
m_ecOther[index]);
489 return ExecutionContext::_nil();
500 throw (CORBA::SystemException)
505 ExecutionContextList_var execlist;
509 #else // ORB_IS_RTORB 510 ExecutionContextList_var execlist;
514 for(
int i(0),
j(0); i < n ; ++i)
516 RTC_ExecutionContext ec_mine =
m_ecMine.cobj()->_buffer[i];
520 execlist.length(
j+1);
521 execlist->cobj()->_buffer[
j] = CORBA_Object_dup(ec_mine);
525 #endif // ORB_IS_RTORB 526 return execlist._retn();
537 throw (CORBA::SystemException)
539 RTC_TRACE((
"get_participating_contexts()"));
540 ExecutionContextList_var execlist;
545 return execlist._retn();
558 throw (CORBA::SystemException)
584 throw (CORBA::SystemException)
591 ExecutionContextService_var ecs;
592 ecs = ExecutionContextService::_narrow(exec_context);
593 if (CORBA::is_nil(ecs))
599 for (::CORBA::ULong i(0), len(
m_ecOther.length()); i < len; ++i)
603 m_ecOther[i] = ExecutionContextService::_duplicate(ecs);
627 ExecutionContextService_var ecs;
628 ecs = ExecutionContextService::_narrow(exec_context);
629 if (CORBA::is_nil(ecs))
635 for (::CORBA::ULong i(0), len(
m_ecMine.length()); i < len; ++i)
639 m_ecMine[i] = ExecutionContextService::_duplicate(ecs);
661 throw (CORBA::SystemException)
699 throw (CORBA::SystemException)
704 ComponentProfile_var profile
705 =
new ComponentProfile();
707 profile->instance_name =
708 CORBA::string_dup(
m_properties[
"instance_name"].c_str());
711 profile->description =
720 #else // ORB_IS_RTORB 721 profile->instance_name = (
char *)
m_properties[
"instance_name"].c_str();
722 profile->type_name = (
char *)
m_properties[
"type_name"].c_str();
723 profile->description = (
char *)
m_properties[
"description"].c_str();
724 profile->version = (
char *)
m_properties[
"version"].c_str();
725 profile->vendor = (
char *)
m_properties[
"vendor"].c_str();
726 profile->category = (
char *)
m_properties[
"category"].c_str();
728 profile->port_profiles = ppl._retn();
729 #endif // ORB_IS_RTORB 731 return profile._retn();
749 throw (CORBA::SystemException)
776 throw (CORBA::SystemException)
789 std::string active_set;
812 throw (CORBA::SystemException)
837 throw (CORBA::SystemException)
862 throw (CORBA::SystemException)
887 throw (CORBA::SystemException)
914 throw (CORBA::SystemException)
940 throw (CORBA::SystemException)
965 throw (CORBA::SystemException)
991 throw (CORBA::SystemException)
1017 throw (CORBA::SystemException)
1045 throw (CORBA::SystemException)
1071 throw (CORBA::SystemException)
1099 throw (CORBA::SystemException,
1102 RTC_TRACE((
"get_owned_organizations()"));
1105 SDOPackage::OrganizationList_var org_list;
1107 return org_list._retn();
1111 throw SDOPackage::NotAvailable();
1113 return new SDOPackage::OrganizationList();
1125 throw (CORBA::SystemException,
1131 CORBA::String_var sdo_id;
1132 sdo_id = CORBA::string_dup(
m_profile.instance_name);
1133 return sdo_id._retn();
1137 throw SDOPackage::InternalError(
"get_sdo_id()");
1149 throw (CORBA::SystemException,
1153 CORBA::String_var sdo_type;
1156 sdo_type = CORBA::string_dup(
m_profile.description);
1157 return sdo_type._retn();
1161 throw SDOPackage::InternalError(
"get_sdo_type()");
1164 return sdo_type._retn();
1175 throw (CORBA::SystemException,
1181 SDOPackage::DeviceProfile_var dprofile;
1184 return dprofile._retn();
1188 throw SDOPackage::InternalError(
"get_device_profile()");
1190 return new SDOPackage::DeviceProfile();
1204 throw (CORBA::SystemException,
1209 SDOPackage::ServiceProfileList_var sprofiles;
1213 RTC_DEBUG((
"SDO ServiceProfiles[%d]", sprofiles->length()));
1217 RTC_ERROR((
"Unknown exception cought in get_service_profiles()."));
1218 throw SDOPackage::InternalError(
"get_service_profiles()");
1220 return sprofiles._retn();
1230 SDOPackage::ServiceProfile*
1232 throw (CORBA::SystemException,
1233 SDOPackage::InvalidParameter, SDOPackage::NotAvailable,
1234 SDOPackage::InternalError)
1239 InvalidParameter(
"get_service_profile(): Empty name.");
1241 RTC_TRACE((
"get_service_profile(%s))",
id));
1243 SDOPackage::ServiceProfile_var prof;
1248 catch (SDOPackage::InvalidParameter &e)
1250 RTC_ERROR((
"InvalidParameter exception: name (%s) is not found",
id));
1255 RTC_ERROR((
"Unknown exception cought in get_service_profile(%s).",
id));
1256 throw SDOPackage::InternalError(
"get_service_profile()");
1258 return prof._retn();
1269 throw (CORBA::SystemException,
1270 SDOPackage::InvalidParameter, SDOPackage::NotAvailable,
1271 SDOPackage::InternalError)
1273 RTC_TRACE((
"get_sdo_service(%s))",
id));
1276 throw SDOPackage::InvalidParameter(
"get_service(): Empty name.");
1279 SDOPackage::SDOService_var sdo;
1284 catch (SDOPackage::InvalidParameter &e)
1290 throw SDOPackage::InternalError(
"get_service()");
1303 throw (CORBA::SystemException,
1309 throw SDOPackage::InterfaceNotImplemented();
1313 SDOPackage::Configuration_ptr
config;
1316 #else // ORB_IS_RTORB 1317 SDOPackage::Configuration_var
config;
1319 return config._retn();
1320 #endif // ORB_IS_RTORB 1324 SDOPackage::InternalError(
"get_configuration()");
1326 return SDOPackage::Configuration::_nil();
1337 throw (CORBA::SystemException,
1342 throw SDOPackage::InterfaceNotImplemented();
1343 return SDOPackage::Monitoring::_nil();
1354 throw (CORBA::SystemException,
1361 SDOPackage::OrganizationList_var
org;
1367 throw SDOPackage::InternalError(
"get_organizations()");
1369 return new SDOPackage::OrganizationList(0);
1380 throw (CORBA::SystemException,
1388 return status._retn();
1392 SDOPackage::InternalError(
"get_status_list()");
1405 throw (CORBA::SystemException,
1406 SDOPackage::InvalidParameter, SDOPackage::NotAvailable,
1407 SDOPackage::InternalError)
1413 throw SDOPackage::InvalidParameter(
"get_status(): Not found");
1416 CORBA::Any_var status;
1417 status =
new CORBA::Any(
m_sdoStatus[index].value);
1418 return status._retn();
1422 throw SDOPackage::InternalError(
"get_status()");
1424 return new CORBA::Any();
1440 RTC_TRACE((
"setInstanceName(%s)", instance_name));
1443 #ifndef ORB_IS_RTORB 1445 #else // ORB_IS_RTORB 1447 #endif // ORB_IS_RTORB 1473 m_objref = RTC::RTObject::_duplicate(rtobj);
1501 #ifndef ORB_IS_RTORB 1508 #else // ORB_IS_RTORB 1515 #endif //ORB_IS_RTORB 1540 RTC_TRACE((
"updateParameters(%s)", config_set));
1556 RTC_ERROR((
"addPort(PortBase&) failed."));
1571 RTC_ERROR((
"addPort(PortBase&) failed."));
1575 RTC_TRACE((
"addPort(PortService_ptr)"));
1581 RTC_TRACE((
"registerPort(CorbaPort&)"));
1583 RTC_ERROR((
"addPort(CorbaPort&) failed."));
1589 std::string propkey(
"port.corbaport.");
1609 std::string propkey(
"port.inport.");
1630 RTC_TRACE((
"registerInPort(%s)", name));
1634 RTC_ERROR((
"addInPort(%s) failed.", name));
1650 std::string propkey(
"port.outport.");
1671 RTC_TRACE((
"registerOutPort(%s)", name));
1675 RTC_ERROR((
"addOutPort(%s) failed.", name));
1691 std::vector<InPortBase*>::iterator it =
m_inports.begin();
1724 std::vector<OutPortBase*>::iterator it =
m_outports.begin();
1754 RTC_TRACE((
"removePort(PortService_pt)"));
1768 RTC_ERROR((
"removePort(PortBase&) failed."));
1773 RTC_TRACE((
"deletePort(PortService_pt)"));
1775 RTC_ERROR((
"removePort(PortService_pt) failed."));
1782 RTC_ERROR((
"removePort(CorbaPort) failed."));
1795 RTC_TRACE((
"deletePortByName(%s)", port_name));
1807 ExecutionContext_ptr
1823 if (CORBA::is_nil(ec))
1827 return ec->get_rate();
1841 if (CORBA::is_nil(ec))
1875 if (CORBA::is_nil(ec))
1879 return ec->deactivate_component(::RTC::RTObject::_duplicate(
getObjRef()));
1892 if (CORBA::is_nil(ec))
1896 return ec->activate_component(::RTC::RTObject::_duplicate(
getObjRef()));
1909 if (CORBA::is_nil(ec))
1913 return ec->reset_component(::RTC::RTObject::_duplicate(
getObjRef()));
1979 std::vector<InPortBase*>::iterator it =
m_inports.begin();
1980 std::vector<InPortBase*>::iterator it_end =
m_inports.end();
1983 while( it != it_end )
1986 if (!((*it)->read()))
1988 RTC_DEBUG((
"The error occurred in readAll()."));
2011 std::vector<OutPortBase*>::iterator it =
m_outports.begin();
2012 std::vector<OutPortBase*>::iterator it_end =
m_outports.end();
2016 while( it != it_end )
2018 if (!((*it)->write()))
2020 RTC_DEBUG((
"The error occurred in writeAll()."));
2108 for (
int i(0), len(
m_eclist.size()); i < len; ++i)
2113 PortableServer::ObjectId_var oid
2115 m_pPOA->deactivate_object(oid);
2117 catch (PortableServer::POA::ServantNotActive &e)
2121 catch (PortableServer::POA::WrongPolicy &e)
2128 RTC_ERROR((
"Unknown exception caught."));
2153 preaction_[listener_type].addListener(listener, autoclean);
2172 preaction_[listener_type].removeListener(listener);
2192 postaction_[listener_type].addListener(listener, autoclean);
2211 postaction_[listener_type].removeListener(listener);
2229 portaction_[listener_type].addListener(listener, autoclean);
2247 portaction_[listener_type].removeListener(listener);
2266 ecaction_[listener_type].addListener(listener, autoclean);
2284 ecaction_[listener_type].removeListener(listener);
2300 portconnect_[listener_type].addListener(listener, autoclean);
2315 portconnect_[listener_type].removeListener(listener);
2331 portconnret_[listener_type].addListener(listener, autoclean);
2346 portconnret_[listener_type].removeListener(listener);
2451 PortableServer::ObjectId_var oid1;
2453 PortableServer::ObjectId_var oid2;
2454 oid2 =
m_pPOA->servant_to_id(
this);
2455 m_pPOA->deactivate_object(oid1);
2456 m_pPOA->deactivate_object(oid2);
2458 catch (PortableServer::POA::ServantNotActive &e)
2462 catch (PortableServer::POA::WrongPolicy &e)
2469 RTC_ERROR((
"Unknown exception caught."));
ComponentProfile m_profile
ComponentProfile.
virtual ReturnCode_t onRateChanged(RTC::UniqueId exec_handle)
Callback function to change execution cycle.
PortAdmin m_portAdmin
List of Port Object reference.
PortConnectListenerType
The types of ConnectorDataListener.
Logger rtclog
Logger stream.
virtual ReturnCode_t on_shutdown(UniqueId exec_handle)
[ComponentAction CORBA interface] Shutdown RTC
void onAddPort(const PortProfile &pprof)
void postOnStateUpdate(UniqueId ec_id, ReturnCode_t ret)
#define RTC_ERROR(fmt)
Error log output macro.
void removeConfigurationSetNameListener(ConfigurationSetNameListenerType type, ConfigurationSetNameListener *listener)
Removing ConfigurationSetNameListener.
void postOnReset(UniqueId ec_id, ReturnCode_t ret)
void preOnAborting(UniqueId ec_id)
virtual SDOPackage::ServiceProfileList * get_service_profiles()
[SDO interface] Get SDO ServiceProfile
void finalizeContexts()
The ExecutionContextBase list is deleted.
std::vector< InPortBase * > m_inports
List of InPortBase*.
virtual ComponentProfile * get_component_profile()
[RTObject CORBA interface] Get RTC's profile
void onRemovePort(const PortProfile &pprof)
EXECUTION_HANDLE_TYPE_NATIVE ExecutionContextHandle_t
virtual ExecutionContextHandle_t get_context_handle(ExecutionContext_ptr cxt)
[CORBA interface] Return a handle of a ExecutionContext
PortConnectRetListener class.
virtual char * get_sdo_id()
[SDO interface] Get the SDO ID
PostComponentActionListenerType
The types of ConnectorDataListener.
virtual ReturnCode_t onExecute(RTC::UniqueId exec_handle)
Callback function to execute periodically.
virtual SDOPackage::Monitoring_ptr get_monitoring()
[SDO interface] Get Monitoring object
ExecutionContextServiceList m_ecOther
List of participating ExecutionContextService.
virtual ReturnCode_t onStateUpdate(RTC::UniqueId exec_handle)
Callback function to update the state.
void finalizePorts()
Deactivate all Ports and unregister them.
virtual ReturnCode_t initialize()
[CORBA interface] Initialize the RTC that realizes this interface.
void addConfigurationSetNameListener(ConfigurationSetNameListenerType type, ConfigurationSetNameListener *listener, bool autoclean=true)
Adding ConfigurationSetNameListener.
void clear(CorbaSequence &seq)
Erase all the elements of the CORBA sequence.
bool m_readAllCompletion
flag for readAll()
SDOPackage::Configuration_impl * m_pSdoConfigImpl
The pointer to the SDO Configuration Object.
virtual ReturnCode_t on_activated(UniqueId exec_handle)
[ComponentAction CORBA interface] Activate RTC
void preOnShutdown(UniqueId ec_id)
virtual ReturnCode_t on_startup(UniqueId exec_handle)
[ComponentAction CORBA interface] Startup RTC
UniqueId bindContext(ExecutionContext_ptr exec_context)
ReturnCode_t detach_context(UniqueId exec_handle)
[CORBA interface] Detach ExecutionContext.
void updateParameters(const char *config_set)
Update configuration parameters (by ID)
virtual SDOPackage::OrganizationList * get_owned_organizations()
[SDO interface] Get Organization list
SDOPackage::OrganizationList m_sdoOrganizations
SDO organization.
void onAttachExecutionContext(UniqueId ec_id)
void addPortConnectRetListener(PortConnectRetListenerType listener_type, PortConnectRetListener *listener, bool autoclean=true)
Adding PortConnectRet type listener.
void removeConfigurationSetListener(ConfigurationSetListenerType type, ConfigurationSetListener *listener)
Removing ConfigurationSetListener.
std::vector< std::pair< std::string, std::string > > NVList
void addConfigurationSetListener(ConfigurationSetListenerType type, ConfigurationSetListener *listener, bool autoclean=true)
Adding ConfigurationSetListener.
bool isOwnExecutionContext(RTC::UniqueId ec_id)
[local interface] Checking if the current context is own context
CORBA::ORB_var m_pORB
The pointer to the ORB.
PortActionListenerType
The types of PortActionListener.
void postOnExecute(UniqueId ec_id, ReturnCode_t ret)
void removeConfigurationParamListener(ConfigurationParamListenerType type, ConfigurationParamListener *listener)
Removing ConfigurationParamListener.
void removePortConnectRetListener(PortConnectRetListenerType listener_type, PortConnectRetListener *listener)
Removing PortConnectRet type listener.
void removePortConnectListener(PortConnectListenerType listener_type, PortConnectListener *listener)
Removing PortConnect type listener.
A base class for ExecutionContext.
bool removeInPort(InPortBase &port)
[local interface] Unregister InPort
ReturnCode_t reset(RTC::UniqueId ec_id)
[local interface] Resetting and go to Inactive state
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
PortServiceList * getPortServiceList() const
Get PortServiceList.
void init(coil::Properties &prop)
Initializing properties.
bool m_exiting
RTC Finalize Status Flag.
std::vector< std::string > getNamingNames()
[local interface] Get Naming Server information
bool addSdoServiceProvider(const SDOPackage::ServiceProfile &prof, SdoServiceProviderBase *provider)
[local interface] Set a SDO service provider
SDOPackage::Configuration_var m_pSdoConfig
The pointer to the SDO Configuration Interface.
virtual ~RTObject_impl(void)
Virtual destructor.
ConfigurationSetListener class.
ConfigurationSetNameListener class.
ComponentActionListeners m_actionListeners
ComponentActionListener holder.
void setOwner(RTObject_ptr owner)
Set the owner RTObject of the Port.
vstring split(const std::string &input, const std::string &delimiter, bool ignore_empty)
Split string by delimiter.
ConfigurationParamListener class.
void registerPort(PortBase &port)
[local interface] Register Port
virtual ExecutionContextList * get_participating_contexts()
[CORBA interface] Get participating ExecutionContextList.
ConfigurationSetNameListenerType
The types of ConfigurationSetNameListener.
void addExecutionContextActionListener(ECActionListenerType listener_type, ECActionListener *listener, bool autoclean=true)
Adding ExecutionContextAction type listener.
PreComponentActionListenerType
The types of ConnectorDataListener.
void postOnShutdown(UniqueId ec_id, ReturnCode_t ret)
bool removeSdoServiceProvider(const char *id)
Remove a SDO service provider.
virtual PortServiceList * get_ports()
[RTObject CORBA interface] Get Ports
bool removePort(PortBase &port)
[local interface] Unregister Port
double getExecutionRate(RTC::UniqueId ec_id)
[local interface] Getting current context' execution rate
SDOPackage::SDOService_ptr getServiceProvider(const char *id)
Get ServiceProfile of an SDO Service.
void addConfigurationSetListener(ConfigurationSetListenerType type, ConfigurationSetListener *listener, bool autoclean=true)
Adding ConfigurationSetListener.
void setName(const char *name)
Set suffix of date/time string of header.
void postOnError(UniqueId ec_id, ReturnCode_t ret)
bool m_readAll
flag for readAll()
static const char * default_conf[]
RT-Component default profile.
ReturnCode_t activate(RTC::UniqueId ec_id)
[local interface] Make transition to Active state
void removeConfigurationSetListener(ConfigurationSetListenerType type, ConfigurationSetListener *listener)
Removing ConfigurationSetListener.
Manager * m_pManager
Manager object.
coil::Properties & getProperties()
[local interface] Get RTC property
virtual SDOPackage::Configuration_ptr get_configuration()
[SDO interface] Get Configuration object
static Manager & instance()
Get instance of the manager.
UniqueId attach_context(ExecutionContext_ptr exec_context)
[CORBA interface] Attach ExecutionContext
virtual ReturnCode_t on_reset(UniqueId exec_handle)
[ComponentAction CORBA interface] Resetting RTC
SdoServiceAdmin m_sdoservice
SDO Service Administrator Object.
void addConfigurationSetNameListener(ConfigurationSetNameListenerType type, ConfigurationSetNameListener *listener, bool autoclean=true)
Adding ConfigurationSetNameListener.
bool m_created
Created Status Flag.
SDOPackage::NVList m_sdoStatus
SDO Status.
void preOnRateChanged(UniqueId ec_id)
PreComponentActionListener class.
PortableServer::POA_var m_pPOA
The pointer to the POA.
bool addOutPort(const char *name, OutPortBase &outport)
[local interface] Register DataOutPort
virtual ReturnCode_t on_finalize()
[ComponentAction CORBA interface] Finalize RTC
virtual ReturnCode_t onDeactivated(RTC::UniqueId exec_handle)
Callback function to deactivate.
void activatePorts()
Activate all Port interfaces.
void postOnAborting(UniqueId ec_id, ReturnCode_t ret)
RTComponent manager class.
virtual ReturnCode_t finalize()
[CORBA interface] Finalize the RTC for destruction
#define RTC_PARANOID(fmt)
Paranoid level log output macro.
Functor to copy ExecutionContext.
PortConnectListener class.
std::vector< ExecutionContext * > ExecutionContextList
ReturnCode_t setExecutionRate(RTC::UniqueId ec_id, double rate)
[local interface] Setting current context' execution rate
void preOnError(UniqueId ec_id)
SDOPackage::OrganizationList m_sdoOwnedOrganizations
SDO owned organization list.
void setObjRef(const RTObject_ptr rtobj)
[local interface] Set the object reference
bool removeOutPort(OutPortBase &port)
[local interface] Unregister OutPort
void update(void)
Update the values of configuration parameters (Active configuration set)
void onDetachExecutionContext(UniqueId ec_id)
ExecutionContextHandle_t UniqueId
void notifyFinalized(RTObject_impl *comp)
This method deletes RT-Components.
#define RTC_DEBUG(fmt)
Debug level log output macro.
virtual ReturnCode_t on_deactivated(UniqueId exec_handle)
[ComponentAction CORBA interface] Deactivate RTC
void setPortConnectListenerHolder(PortConnectListeners *portconnListeners)
Setting PortConnectListener holder.
void addPortConnectListener(PortConnectListenerType listener_type, PortConnectListener *listener, bool autoclean=true)
Adding PortConnect type listener.
bool removeSdoServiceProvider(const char *id)
[local interface] Remove a SDO service provider
std::vector< ExecutionContextBase * > m_eclist
List of ExecutionContextBase.
RTObject_impl(Manager *manager)
Constructor.
def j(str, encoding="cp932")
CORBA::Long find(const CorbaSequence &seq, Functor f)
Return the index of CORBA sequence element that functor matches.
const OrganizationList getOrganizations()
Get a list of Organization of SDO.
void addConfigurationParamListener(ConfigurationParamListenerType type, ConfigurationParamListener *listener, bool autoclean=true)
Adding ConfigurationParamListener.
PortProfileList getPortProfileList() const
Get PorProfileList.
virtual ExecutionContext_ptr get_context(UniqueId exec_handle)
[CORBA interface] Get ExecutionContext.
bool removeSdoServiceConsumer(const char *id)
[local interface] Remove a SDO service provider
ExecutionContextServiceList m_ecMine
List of owned ExecutionContextService.
CORBA sequence utility template functions.
bool m_writeAllCompletion
flag for writeAll()
ExecutionContextBase * createContext(const char *ec_args)
Create Context.
void removePortActionListener(PortActionListenerType listener_type, PortActionListener *listener)
Removing PortAction type listener.
void addConfigurationParamListener(ConfigurationParamListenerType type, ConfigurationParamListener *listener, bool autoclean=true)
Adding ConfigurationParamListener.
void init(coil::Properties &prop)
Initializing properties.
ConfigAdmin m_configsets
Configuration Administrator Object.
void preOnReset(UniqueId ec_id)
Functor to deactivate RTC.
virtual ReturnCode_t onAborting(RTC::UniqueId exec_handle)
Callback function to abort.
virtual ReturnCode_t exit()
[CORBA interface]top the RTC's execution context(s) and finalize it along with its contents...
bool addSdoServiceProvider(const SDOPackage::ServiceProfile &prof, SdoServiceProviderBase *provider)
Set a SDO service provider.
virtual SDOPackage::NVList * get_status_list()
[SDO interface] Get SDO Status list
void deletePort(PortBase &port)
[local interface] Unregister Port
void removePostComponentActionListener(PostComponentActionListenerType listener_type, PostComponentActionListener *listener)
Removing PostComponentAction type listener.
virtual SDOPackage::DeviceProfile * get_device_profile()
[SDO interface] Get SDO DeviceProfile list
virtual ReturnCode_t onReset(RTC::UniqueId exec_handle)
Callback function to reset.
void removeConfigurationSetNameListener(ConfigurationSetNameListenerType type, ConfigurationSetNameListener *listener)
Removing ConfigurationSetNameListener.
prop
Organization::get_organization_property ();.
void postOnFinalize(UniqueId ec_id, ReturnCode_t ret)
PortConnectRetListenerType
The types of PortConnectRetListenerType.
void deactivatePorts()
Deactivate all Port interfaces.
virtual ExecutionContextList * get_owned_contexts()
[CORBA interface] Get ExecutionContextList.
void removePreComponentActionListener(PreComponentActionListenerType listener_type, PreComponentActionListener *listener)
Removing PreComponentAction type listener.
bool removePort(PortBase &port)
Unregister the Port registration.
void removeExecutionContextActionListener(ECActionListenerType listener_type, ECActionListener *listener)
Removing ExecutionContextAction type listener.
void preOnStateUpdate(UniqueId ec_id)
Class represents a set of properties.
void postOnActivated(UniqueId ec_id, ReturnCode_t ret)
void shutdown()
Shutdown RTC.
void postOnInitialize(UniqueId ec_id, ReturnCode_t ret)
ExecutionContext_ptr getExecutionContext(RTC::UniqueId ec_id)
[local interface] Getting current execution context
std::vector< IPortService * > PortServiceList
void registerInPort(const char *name, InPortBase &inport)
[local interface] Register DataInPort
virtual ReturnCode_t onError(RTC::UniqueId exec_handle)
Callback function for error handling.
virtual ReturnCode_t on_error(UniqueId exec_handle)
[ComponentAction CORBA interface] Error Processing of RTC
void setWriteAll(bool write=true, bool completion=false)
Set whether to execute the writeAll() method.
void deletePortByName(const char *port_name)
Unregister the Port's registration by its name.
void preOnStartup(UniqueId ec_id)
bool addSdoServiceConsumer(const SDOPackage::ServiceProfile &sProfile)
Add Service Consumer.
SDOPackage::ServiceProfile * getServiceProviderProfile(const char *id)
Get ServiceProfile of an SDO Service Provider.
virtual ReturnCode_t on_initialize()
[RTObject CORBA interface] Get ExecutionContextAdmin
void deletePortByName(const char *port_name)
[local interface] Delete Port by specifying its name
bool addPort(PortBase &port)
[local interface] Register Port
virtual ReturnCode_t onShutdown(RTC::UniqueId exec_handle)
Callback function for shutdown action.
bool addPort(PortBase &port)
Regsiter the Port.
virtual ReturnCode_t onActivated(RTC::UniqueId exec_handle)
Callback function to activate.
virtual ReturnCode_t onInitialize()
Callback function to initialize.
bool writeAll()
The write() method of all OutPort is called.
void push_back(CorbaSequence &seq, SequenceElement elem)
Push the new element back to the CORBA sequence.
virtual SDOPackage::SDOService_ptr get_sdo_service(const char *id)
[SDO interface] Get specified SDO Service's reference
void setInstanceName(const char *instance_name)
[local interface] Set instance name
void setReadAll(bool read=true, bool completion=false)
Set whether to execute the readAll() method.
PortConnectListeners m_portconnListeners
PortConnectListener holder.
Configuration implementation class.
void copyFromProperties(SDOPackage::NVList &nv, const coil::Properties &prop)
Copy the properties to NVList.
SDOPackage::ServiceProfileList * getServiceProviderProfiles()
Get ServiceProfileList of SDO Service Provider.
virtual ReturnCode_t on_aborting(UniqueId exec_handle)
[ComponentAction CORBA interface] Transition to Error State
Properties & getNode(const std::string &key)
Get node of properties.
virtual SDOPackage::OrganizationList * get_organizations()
[SDO interface] Get Organization list
void finalizePorts()
Unregister All Ports.
void init(coil::Properties &prop)
Initializing properties.
void preOnActivated(UniqueId ec_id)
void postOnStartup(UniqueId ec_id, ReturnCode_t ret)
virtual ReturnCode_t on_state_update(UniqueId exec_handle)
[DataFlowComponentAction CORBA interface] Secondary Periodic Operation of RTC
virtual CORBA::Boolean is_alive(ExecutionContext_ptr exec_context)
[CORBA interface] Confirm whether RTC is the alive state
coil::Properties m_properties
Alive Status Flag.
virtual RTC::ExecutionContextService_ptr getObjRef()=0
Get the reference of the object.
ExecutionContextActionListenerType
The types of ExecutionContextActionListener.
virtual ReturnCode_t onStartup(RTC::UniqueId exec_handle)
Callback function for startup action.
void preOnInitialize(UniqueId ec_id)
bool addInPort(const char *name, InPortBase &inport)
[local interface] Register DataInPort
bool m_writeAll
flag for writeAll()
ConfigurationSetListenerType
The types of ConfigurationSetListener.
virtual ReturnCode_t on_execute(UniqueId exec_handle)
[DataFlowComponentAction CORBA interface] Primary Periodic Operation of RTC
RTObject_var m_objref
Object reference.
void addPreComponentActionListener(PreComponentActionListenerType listener_type, PreComponentActionListener *listener, bool autoclean=true)
Adding PreComponentAction type listener.
virtual char * get_sdo_type()
[SDO interface] Get SDO type
void removeConfigurationParamListener(ConfigurationParamListenerType type, ConfigurationParamListener *listener)
Removing ConfigurationParamListener.
Configuration_ptr getObjRef()
Get object reference.
void registerOutPort(const char *name, OutPortBase &outport)
[local interface] Register DataOutPort
PortActionListener class.
bool haveConfig(const char *config_id)
Check the existence of configuration set.
bool addSdoServiceConsumer(const SDOPackage::ServiceProfile &prof)
[local interface] Set a SDO service provider
void addPostComponentActionListener(PostComponentActionListenerType listener_type, PostComponentActionListener *listener, bool autoclean=true)
Adding PostComponentAction type listener.
virtual RTC::ReturnCode_t bindComponent(RTObject_impl *rtc)=0
Bind the component.
std::vector< PortProfile * > PortProfileList
bool readAll()
Readout the value from All InPorts.
std::vector< OutPortBase * > m_outports
List of OutPortBase*.
Functor to find ExecutionContext.
void setProperties(const coil::Properties &prop)
[local interface] Set RTC property
virtual CORBA::Any * get_status(const char *name)
[SDO interface] Get SDO Status
Functor for_each(CorbaSequence &seq, Functor f)
Apply the functor to all CORBA sequence elements.
PostComponentActionListener class.
const DeviceProfile getDeviceProfile()
Get the DeviceProfile of SDO.
RTObject_ptr getObjRef() const
[local interface] Get the object reference
bool removeSdoServiceConsumer(const char *id)
Remove Service Consumer.
virtual SDOPackage::ServiceProfile * get_service_profile(const char *id)
[SDO interface] Get specified ServiceProfile
void postOnDeactivated(UniqueId ec_id, ReturnCode_t ret)
const std::string & getProperty(const std::string &key) const
Search for the property with the specified key in this property.
void preOnFinalize(UniqueId ec_id)
ConfigurationParamListenerType
The types of ConnectorDataListener.
const PortProfile & getPortProfile() const
Get the PortProfile of the Port.
ExecutionContextActionListener class.
virtual ReturnCode_t on_rate_changed(UniqueId exec_handle)
[DataFlowComponentAction CORBA interface] Notify rate changed
void postOnRateChanged(UniqueId ec_id, ReturnCode_t ret)
ReturnCode_t deactivate(RTC::UniqueId ec_id)
[local interface] Make transition to Inactive state
virtual ReturnCode_t onFinalize()
Callback function to finalize.
void preOnDeactivated(UniqueId ec_id)
void preOnExecute(UniqueId ec_id)
void addPortActionListener(PortActionListenerType listener_type, PortActionListener *listener, bool autoclean=true)
Adding PortAction type listener.