24 #include <coil/stringutil.h> 43 "implementation_id",
"",
65 : m_pManager(manager),
66 m_pORB(CORBA::ORB::_duplicate(manager->getORB())),
67 m_pPOA(PortableServer::POA::_duplicate(manager->getPOA())),
68 m_portAdmin(manager->getORB(), manager->getPOA()),
69 m_created(true), m_exiting(false),
70 m_properties(default_conf), m_configsets(m_properties.getNode(
"conf")),
72 m_readAll(false),m_writeAll(false),
73 m_readAllCompletion(false),m_writeAllCompletion(false)
90 PortableServer::POA_ptr poa)
92 m_pORB(CORBA::ORB::_duplicate(orb)),
93 m_pPOA(PortableServer::POA::_duplicate(poa)),
315 throw (CORBA::SystemException)
322 ec_args +=
"rate=" +
m_properties[
"exec_cxt.periodic.rate"];
328 ec->set_rate(atof(
m_properties[
"exec_cxt.periodic.rate"].c_str()));
330 ExecutionContextService_var ecv;
331 ecv = RTC::ExecutionContextService::_duplicate(ec->
getObjRef());
344 for (::CORBA::ULong i(0), len(
m_ecMine.length()); i < len; ++i)
362 throw (CORBA::SystemException)
373 for (CORBA::ULong ic(0), len(
m_ecOther.length()); ic < len; ++ic)
399 throw (CORBA::SystemException)
415 for (CORBA::ULong ic(0), len(
m_ecOther.length()); ic < len; ++ic)
418 RTC::LightweightRTObject_var comp(this->_this());
421 m_ecOther[ic]->remove_component(comp.in());
438 throw (CORBA::SystemException)
441 for (::CORBA::ULong i(0), len(
m_ecMine.length()); i < len; ++i)
443 if (exec_context->_is_equivalent(
m_ecMine[i]))
447 for (::CORBA::ULong i(0), len(
m_ecOther.length()); i < len; ++i)
451 if (exec_context->_is_equivalent(
m_ecOther[i]))
466 throw (CORBA::SystemException)
478 return ExecutionContext::_nil();
489 return ExecutionContext::_duplicate(
m_ecOther[index]);
493 return ExecutionContext::_nil();
504 throw (CORBA::SystemException)
509 ExecutionContextList_var execlist;
513 #else // ORB_IS_RTORB 514 ExecutionContextList_var execlist;
518 for(
int i(0), j(0); i < n ; ++i)
520 RTC_ExecutionContext ec_mine =
m_ecMine.cobj()->_buffer[i];
524 execlist.length(j+1);
525 execlist->cobj()->_buffer[j] = CORBA_Object_dup(ec_mine);
529 #endif // ORB_IS_RTORB 530 return execlist._retn();
541 throw (CORBA::SystemException)
543 RTC_TRACE((
"get_participating_contexts()"));
544 ExecutionContextList_var execlist;
549 return execlist._retn();
562 throw (CORBA::SystemException)
588 throw (CORBA::SystemException)
595 ExecutionContextService_var ecs;
596 ecs = ExecutionContextService::_narrow(exec_context);
597 if (CORBA::is_nil(ecs))
603 for (::CORBA::ULong i(0), len(
m_ecOther.length()); i < len; ++i)
607 m_ecOther[i] = ExecutionContextService::_duplicate(ecs);
631 ExecutionContextService_var ecs;
632 ecs = ExecutionContextService::_narrow(exec_context);
633 if (CORBA::is_nil(ecs))
639 for (::CORBA::ULong i(0), len(
m_ecMine.length()); i < len; ++i)
643 m_ecMine[i] = ExecutionContextService::_duplicate(ecs);
665 throw (CORBA::SystemException)
703 throw (CORBA::SystemException)
708 ComponentProfile_var profile
709 =
new ComponentProfile();
711 profile->instance_name =
712 CORBA::string_dup(
m_properties[
"instance_name"].c_str());
715 profile->description =
724 #else // ORB_IS_RTORB 725 profile->instance_name = (
char *)
m_properties[
"instance_name"].c_str();
726 profile->type_name = (
char *)
m_properties[
"type_name"].c_str();
727 profile->description = (
char *)
m_properties[
"description"].c_str();
728 profile->version = (
char *)
m_properties[
"version"].c_str();
729 profile->vendor = (
char *)
m_properties[
"vendor"].c_str();
730 profile->category = (
char *)
m_properties[
"category"].c_str();
732 profile->port_profiles = ppl._retn();
733 #endif // ORB_IS_RTORB 735 return profile._retn();
753 throw (CORBA::SystemException)
780 throw (CORBA::SystemException)
793 std::string active_set;
816 throw (CORBA::SystemException)
841 throw (CORBA::SystemException)
866 throw (CORBA::SystemException)
891 throw (CORBA::SystemException)
918 throw (CORBA::SystemException)
944 throw (CORBA::SystemException)
969 throw (CORBA::SystemException)
995 throw (CORBA::SystemException)
1021 throw (CORBA::SystemException)
1049 throw (CORBA::SystemException)
1075 throw (CORBA::SystemException)
1103 throw (CORBA::SystemException,
1106 RTC_TRACE((
"get_owned_organizations()"));
1109 SDOPackage::OrganizationList_var org_list;
1111 return org_list._retn();
1115 throw SDOPackage::NotAvailable();
1117 return new SDOPackage::OrganizationList();
1129 throw (CORBA::SystemException,
1135 CORBA::String_var sdo_id;
1136 sdo_id = CORBA::string_dup(
m_profile.instance_name);
1137 return sdo_id._retn();
1141 throw SDOPackage::InternalError(
"get_sdo_id()");
1153 throw (CORBA::SystemException,
1157 CORBA::String_var sdo_type;
1160 sdo_type = CORBA::string_dup(
m_profile.description);
1161 return sdo_type._retn();
1165 throw SDOPackage::InternalError(
"get_sdo_type()");
1168 return sdo_type._retn();
1179 throw (CORBA::SystemException,
1185 SDOPackage::DeviceProfile_var dprofile;
1188 return dprofile._retn();
1192 throw SDOPackage::InternalError(
"get_device_profile()");
1194 return new SDOPackage::DeviceProfile();
1208 throw (CORBA::SystemException,
1213 SDOPackage::ServiceProfileList_var sprofiles;
1217 RTC_DEBUG((
"SDO ServiceProfiles[%d]", sprofiles->length()));
1221 RTC_ERROR((
"Unknown exception cought in get_service_profiles()."));
1222 throw SDOPackage::InternalError(
"get_service_profiles()");
1224 return sprofiles._retn();
1234 SDOPackage::ServiceProfile*
1236 throw (CORBA::SystemException,
1237 SDOPackage::InvalidParameter, SDOPackage::NotAvailable,
1238 SDOPackage::InternalError)
1243 InvalidParameter(
"get_service_profile(): Empty name.");
1245 RTC_TRACE((
"get_service_profile(%s))",
id));
1247 SDOPackage::ServiceProfile_var prof;
1252 catch (SDOPackage::InvalidParameter &e)
1254 RTC_ERROR((
"InvalidParameter exception: name (%s) is not found",
id));
1259 RTC_ERROR((
"Unknown exception cought in get_service_profile(%s).",
id));
1260 throw SDOPackage::InternalError(
"get_service_profile()");
1262 return prof._retn();
1273 throw (CORBA::SystemException,
1274 SDOPackage::InvalidParameter, SDOPackage::NotAvailable,
1275 SDOPackage::InternalError)
1277 RTC_TRACE((
"get_sdo_service(%s))",
id));
1280 throw SDOPackage::InvalidParameter(
"get_service(): Empty name.");
1283 SDOPackage::SDOService_var sdo;
1288 catch (SDOPackage::InvalidParameter &e)
1294 throw SDOPackage::InternalError(
"get_service()");
1307 throw (CORBA::SystemException,
1313 throw SDOPackage::InterfaceNotImplemented();
1317 SDOPackage::Configuration_ptr
config;
1320 #else // ORB_IS_RTORB 1321 SDOPackage::Configuration_var
config;
1323 return config._retn();
1324 #endif // ORB_IS_RTORB 1328 SDOPackage::InternalError(
"get_configuration()");
1330 return SDOPackage::Configuration::_nil();
1341 throw (CORBA::SystemException,
1346 throw SDOPackage::InterfaceNotImplemented();
1347 return SDOPackage::Monitoring::_nil();
1358 throw (CORBA::SystemException,
1365 SDOPackage::OrganizationList_var
org;
1371 throw SDOPackage::InternalError(
"get_organizations()");
1373 return new SDOPackage::OrganizationList(0);
1384 throw (CORBA::SystemException,
1392 return status._retn();
1396 SDOPackage::InternalError(
"get_status_list()");
1409 throw (CORBA::SystemException,
1410 SDOPackage::InvalidParameter, SDOPackage::NotAvailable,
1411 SDOPackage::InternalError)
1417 throw SDOPackage::InvalidParameter(
"get_status(): Not found");
1420 CORBA::Any_var status;
1421 status =
new CORBA::Any(
m_sdoStatus[index].value);
1422 return status._retn();
1426 throw SDOPackage::InternalError(
"get_status()");
1428 return new CORBA::Any();
1444 RTC_TRACE((
"setInstanceName(%s)", instance_name));
1447 #ifndef ORB_IS_RTORB 1449 #else // ORB_IS_RTORB 1451 #endif // ORB_IS_RTORB 1477 m_objref = RTC::RTObject::_duplicate(rtobj);
1505 #ifndef ORB_IS_RTORB 1512 #else // ORB_IS_RTORB 1519 #endif //ORB_IS_RTORB 1544 RTC_TRACE((
"updateParameters(%s)", config_set));
1560 RTC_ERROR((
"addPort(PortBase&) failed."));
1575 RTC_ERROR((
"addPort(PortBase&) failed."));
1579 RTC_TRACE((
"addPort(PortService_ptr)"));
1585 RTC_TRACE((
"registerPort(CorbaPort&)"));
1587 RTC_ERROR((
"addPort(CorbaPort&) failed."));
1593 std::string propkey(
"port.corbaport.");
1613 std::string propkey(
"port.inport.");
1634 RTC_TRACE((
"registerInPort(%s)", name));
1638 RTC_ERROR((
"addInPort(%s) failed.", name));
1654 std::string propkey(
"port.outport.");
1675 RTC_TRACE((
"registerOutPort(%s)", name));
1679 RTC_ERROR((
"addOutPort(%s) failed.", name));
1695 std::vector<InPortBase*>::iterator it =
m_inports.begin();
1728 std::vector<OutPortBase*>::iterator it =
m_outports.begin();
1758 RTC_TRACE((
"removePort(PortService_pt)"));
1772 RTC_ERROR((
"removePort(PortBase&) failed."));
1777 RTC_TRACE((
"deletePort(PortService_pt)"));
1779 RTC_ERROR((
"removePort(PortService_pt) failed."));
1786 RTC_ERROR((
"removePort(CorbaPort) failed."));
1799 RTC_TRACE((
"deletePortByName(%s)", port_name));
1811 ExecutionContext_ptr
1827 if (CORBA::is_nil(ec))
1831 return ec->get_rate();
1845 if (CORBA::is_nil(ec))
1879 if (CORBA::is_nil(ec))
1883 return ec->deactivate_component(::RTC::RTObject::_duplicate(
getObjRef()));
1896 if (CORBA::is_nil(ec))
1900 return ec->activate_component(::RTC::RTObject::_duplicate(
getObjRef()));
1913 if (CORBA::is_nil(ec))
1917 return ec->reset_component(::RTC::RTObject::_duplicate(
getObjRef()));
1983 std::vector<InPortBase*>::iterator it =
m_inports.begin();
1984 std::vector<InPortBase*>::iterator it_end =
m_inports.end();
1987 while( it != it_end )
1990 if (!((*it)->read()))
1992 RTC_DEBUG((
"The error occurred in readAll()."));
2015 std::vector<OutPortBase*>::iterator it =
m_outports.begin();
2016 std::vector<OutPortBase*>::iterator it_end =
m_outports.end();
2020 while( it != it_end )
2022 if (!((*it)->write()))
2024 RTC_DEBUG((
"The error occurred in writeAll()."));
2112 for (
int i(0), len(
m_eclist.size()); i < len; ++i)
2117 PortableServer::ObjectId_var oid
2119 m_pPOA->deactivate_object(oid);
2121 catch (PortableServer::POA::ServantNotActive &e)
2125 catch (PortableServer::POA::WrongPolicy &e)
2132 RTC_ERROR((
"Unknown exception caught."));
2157 preaction_[listener_type].addListener(listener, autoclean);
2176 preaction_[listener_type].removeListener(listener);
2196 postaction_[listener_type].addListener(listener, autoclean);
2215 postaction_[listener_type].removeListener(listener);
2233 portaction_[listener_type].addListener(listener, autoclean);
2251 portaction_[listener_type].removeListener(listener);
2270 ecaction_[listener_type].addListener(listener, autoclean);
2288 ecaction_[listener_type].removeListener(listener);
2304 portconnect_[listener_type].addListener(listener, autoclean);
2319 portconnect_[listener_type].removeListener(listener);
2335 portconnret_[listener_type].addListener(listener, autoclean);
2350 portconnret_[listener_type].removeListener(listener);
2455 PortableServer::ObjectId_var oid1;
2457 PortableServer::ObjectId_var oid2;
2458 oid2 =
m_pPOA->servant_to_id(
this);
2459 m_pPOA->deactivate_object(oid1);
2460 m_pPOA->deactivate_object(oid2);
2462 catch (PortableServer::POA::ServantNotActive &e)
2466 catch (PortableServer::POA::WrongPolicy &e)
2473 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)
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
PortProfileList getPortProfileList() const
Get PorProfileList.
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.
PortServiceList * getPortServiceList() const
Get PortServiceList.
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.
const std::string & getProperty(const std::string &key) const
Search for the property with the specified key in this property.
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.
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.
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.
RTObject_ptr getObjRef() const
[local interface] Get the object reference
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.
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)
void preOnFinalize(UniqueId ec_id)
ConfigurationParamListenerType
The types of ConnectorDataListener.
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.
const PortProfile & getPortProfile() const
Get the PortProfile of the Port.