OpenRTM-aist  1.2.1
CORBA_RTCUtil.h
Go to the documentation of this file.
1 // -*- C++ -*-
18 #ifndef CORBA_RTCUTIL_H
19 #define CORBA_RTCUTIL_H
20 
21 #include <rtm/RTC.h>
22 #include <rtm/NVUtil.h>
23 #include <rtm/CORBA_SeqUtil.h>
24 #include <rtm/RTObject.h>
25 
26 
27 namespace CORBA_RTCUtil
28 {
163  coil::Properties get_component_profile(const RTC::RTObject_ptr rtc);
175  bool is_existing(const RTC::RTObject_ptr rtc);
187  bool is_alive_in_default_ec(const RTC::RTObject_ptr rtc);
188 
189 
203  RTC::ExecutionContext_var get_actual_ec(const RTC::RTObject_ptr rtc,
204  RTC::UniqueId ec_id = 0);
205 
221  RTC::UniqueId get_ec_id(const RTC::RTObject_ptr rtc,
222  const RTC::ExecutionContext_ptr ec);
223 
239  RTC::ReturnCode_t activate(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id = 0);
240 
256  RTC::ReturnCode_t deactivate(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id = 0);
257 
273  RTC::ReturnCode_t reset(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id = 0);
274 
275 
276 
293  bool get_state(RTC::LifeCycleState &state, const RTC::RTObject_ptr rtc, RTC::UniqueId ec_id = 0);
294 
295 
311  bool is_in_inactive(const RTC::RTObject_ptr rtc, RTC::UniqueId ec_id = 0);
312 
313 
328  bool is_in_active(const RTC::RTObject_ptr rtc, RTC::UniqueId ec_id = 0);
329 
330 
345  bool is_in_error(const RTC::RTObject_ptr rtc, RTC::UniqueId ec_id = 0);
346 
347 
348 
360  CORBA::Double get_default_rate(const RTC::RTObject_ptr rtc);
361 
362 
377  RTC::ReturnCode_t set_default_rate(RTC::RTObject_ptr rtc,
378  const CORBA::Double rate);
379 
380 
394  CORBA::Double get_current_rate(const RTC::RTObject_ptr rtc,
395  RTC::UniqueId ec_id);
396 
413  RTC::ReturnCode_t set_current_rate(RTC::RTObject_ptr rtc,
414  RTC::UniqueId ec_id,
415  const CORBA::Double rate);
416 
417 
432  RTC::ReturnCode_t add_rtc_to_default_ec(const RTC::RTObject_ptr localcomp,
433  const RTC::RTObject_ptr othercomp);
434 
435 
450  RTC::ReturnCode_t remove_rtc_to_default_ec(const RTC::RTObject_ptr localcomp,
451  const RTC::RTObject_ptr othercomp);
452 
453 
466  const RTC::RTCList get_participants_rtc(const RTC::RTObject_ptr rtc);
467 
468 
469 
481  coil::vstring get_port_names(const RTC::RTObject_ptr rtc);
482 
483 
495  coil::vstring get_inport_names(const RTC::RTObject_ptr rtc);
496 
497 
509  coil::vstring get_outport_names(const RTC::RTObject_ptr rtc);
510 
511 
523  coil::vstring get_svcport_names(const RTC::RTObject_ptr rtc);
524 
525 
537  coil::vstring get_connector_names(const RTC::PortService_ptr port);
538 
539 
553  coil::vstring get_connector_names(const RTC::RTObject_ptr rtc,
554  const std::string port_name);
555 
567  coil::vstring get_connector_ids(const RTC::PortService_ptr port);
568 
569 
583  coil::vstring get_connector_ids(const RTC::RTObject_ptr rtc,
584  const std::string port_name);
585 
586 
604  RTC::ConnectorProfile_var create_connector(const std::string name,
605  const coil::Properties prop_arg,
606  const RTC::PortService_ptr port0,
607  const RTC::PortService_ptr port1);
608 
622  bool already_connected(const RTC::PortService_ptr localport,
623  const RTC::PortService_ptr otherport);
624 
643  RTC::ReturnCode_t connect(const std::string name,
644  const coil::Properties prop,
645  const RTC::PortService_ptr port0,
646  const RTC::PortService_ptr port1);
647 
648 
662  RTC::ReturnCode_t disconnect(RTC::ConnectorProfile connector_prof);
663 
664 
679  RTC::ReturnCode_t disconnect_connector_name(const RTC::PortService_ptr port_ref, const std::string conn_name);
680 
681 
682 
697  RTC::ReturnCode_t disconnect_connector_name(const std::string port_name,
698  const std::string conn_name);
699 
700 
715  RTC::ReturnCode_t
716  disconnect_connector_id(const RTC::PortService_ptr port_ref,
717  const std::string conn_id);
718 
719 
734  RTC::ReturnCode_t disconnect_connector_id(const std::string port_name,
735  const std::string conn_id);
736 
749  RTC::ReturnCode_t disconnect_all(const RTC::PortService_ptr port_ref);
750 
751 
764  RTC::ReturnCode_t disconnect_all(const std::string port_name);
765 
778  RTC::PortService_var get_port_by_url(std::string port_name);
779 
796  RTC::ReturnCode_t disconnect_name(const RTC::PortService_ptr localport,
797  const std::string othername);
816  RTC::ReturnCode_t connect_multi(const std::string name,
817  const coil::Properties prop,
818  const RTC::PortService_ptr port,
819  RTC::PortServiceList_var& target_ports);
827  struct find_port
828  {
829  const std::string m_name;
839  find_port(const std::string name) : m_name(name) {};
851  bool operator()(RTC::PortService_var p);
852  };
853 
867  RTC::PortService_var get_port_by_name(const RTC::RTObject_ptr rtc,
868  std::string name);
869 
892  RTC::ReturnCode_t connect_by_name(std::string name, coil::Properties prop,
893  RTC::RTObject_ptr rtc0,
894  const std::string portName0,
895  RTC::RTObject_ptr rtc1,
896  const std::string portName1);
897 
911  coil::Properties get_configuration(const RTC::RTObject_ptr rtc, const std::string conf_name);
912 
913 
930  std::string get_parameter_by_key(const RTC::RTObject_ptr rtc,
931  const std::string confset_name,
932  const std::string value_name);
933 
946  std::string get_active_configuration_name(const RTC::RTObject_ptr rtc);
947 
948 
949 
961  coil::Properties get_active_configuration(const RTC::RTObject_ptr rtc);
962 
963 
981  bool set_configuration(const RTC::RTObject_ptr rtc, const std::string confset_name, const std::string value_name, const std::string value);
982 
983 
984 
1000  bool set_active_configuration(const RTC::RTObject_ptr rtc, const std::string value_name, const std::string value);
1001 
1002 
1021  bool set_configuration_parameter(SDOPackage::Configuration_ptr conf,
1022  SDOPackage::ConfigurationSet* confset,
1023  const std::string value_name,
1024  const std::string value);
1025 
1026 
1027 }; // namespace CORBA_SeqUtil
1028 #endif // CORBA_SEQUTIL_H
RTC::ReturnCode_t reset(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
RTC::PortService_var get_port_by_name(const RTC::RTObject_ptr rtc, std::string name)
RTC::ConnectorProfile_var create_connector(const std::string name, const coil::Properties prop_arg, const RTC::PortService_ptr port0, const RTC::PortService_ptr port1)
coil::vstring get_outport_names(const RTC::RTObject_ptr rtc)
coil::vstring get_connector_names(const RTC::PortService_ptr port)
RTC::ReturnCode_t disconnect_name(const RTC::PortService_ptr localport, const std::string othername)
Definition: CORBA_RTCUtil.h:27
RTC::ReturnCode_t set_current_rate(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id, const CORBA::Double rate)
RTC::ReturnCode_t connect(const std::string name, const coil::Properties prop, const RTC::PortService_ptr port0, const RTC::PortService_ptr port1)
RTC::ReturnCode_t activate(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
bool already_connected(const RTC::PortService_ptr localport, const RTC::PortService_ptr otherport)
bool set_active_configuration(const RTC::RTObject_ptr rtc, const std::string value_name, const std::string value)
coil::vstring get_inport_names(const RTC::RTObject_ptr rtc)
RTC::ReturnCode_t remove_rtc_to_default_ec(const RTC::RTObject_ptr localcomp, const RTC::RTObject_ptr othercomp)
Definition: CORBA_RTCUtil.h:827
bool is_in_error(const RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
RTC::ReturnCode_t add_rtc_to_default_ec(const RTC::RTObject_ptr localcomp, const RTC::RTObject_ptr othercomp)
RTC::PortService_var get_port_by_url(std::string port_name)
bool is_in_inactive(const RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
std::vector< std::string > vstring
Definition: stringutil.h:45
coil::vstring get_connector_ids(const RTC::PortService_ptr port)
RTC::ExecutionContext_var get_actual_ec(const RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
const RTC::RTCList get_participants_rtc(const RTC::RTObject_ptr rtc)
coil::Properties get_active_configuration(const RTC::RTObject_ptr rtc)
std::string get_active_configuration_name(const RTC::RTObject_ptr rtc)
const std::string m_name
Definition: CORBA_RTCUtil.h:829
ExecutionContextHandle_t UniqueId
Definition: ComponentActionListener.h:32
RTC::ReturnCode_t disconnect_connector_id(const RTC::PortService_ptr port_ref, const std::string conn_id)
RTC::ReturnCode_t disconnect(RTC::ConnectorProfile connector_prof)
coil::vstring get_port_names(const RTC::RTObject_ptr rtc)
find_port(const std::string name)
Definition: CORBA_RTCUtil.h:839
NameValue and NVList utility functions.
bool get_state(RTC::LifeCycleState &state, const RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
bool operator()(RTC::PortService_var p)
CORBA sequence utility template functions.
RTC::ReturnCode_t disconnect_all(const RTC::PortService_ptr port_ref)
RTC::ReturnCode_t connect_by_name(std::string name, coil::Properties prop, RTC::RTObject_ptr rtc0, const std::string portName0, RTC::RTObject_ptr rtc1, const std::string portName1)
bool is_alive_in_default_ec(const RTC::RTObject_ptr rtc)
RTC::ReturnCode_t deactivate(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
RTC::ReturnCode_t set_default_rate(RTC::RTObject_ptr rtc, const CORBA::Double rate)
RTC::UniqueId get_ec_id(const RTC::RTObject_ptr rtc, const RTC::ExecutionContext_ptr ec)
Class represents a set of properties.
Definition: Properties.h:101
coil::vstring get_svcport_names(const RTC::RTObject_ptr rtc)
coil::Properties get_configuration(const RTC::RTObject_ptr rtc, const std::string conf_name)
coil::Properties get_component_profile(const RTC::RTObject_ptr rtc)
RTC handling utility functions.
bool set_configuration_parameter(SDOPackage::Configuration_ptr conf, SDOPackage::ConfigurationSet *confset, const std::string value_name, const std::string value)
RTComponent header.
bool is_in_active(const RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
CORBA::Double get_current_rate(const RTC::RTObject_ptr rtc, RTC::UniqueId ec_id)
std::string get_parameter_by_key(const RTC::RTObject_ptr rtc, const std::string confset_name, const std::string value_name)
RTC::ReturnCode_t disconnect_connector_name(const RTC::PortService_ptr port_ref, const std::string conn_name)
bool is_existing(const RTC::RTObject_ptr rtc)
bool set_configuration(const RTC::RTObject_ptr rtc, const std::string confset_name, const std::string value_name, const std::string value)
CORBA::Double get_default_rate(const RTC::RTObject_ptr rtc)
RTC::ReturnCode_t connect_multi(const std::string name, const coil::Properties prop, const RTC::PortService_ptr port, RTC::PortServiceList_var &target_ports)
RT component base class.