OpenRTM-aist 2.0.2
Loading...
Searching...
No Matches
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#include <utility>
27
28
30{
165 coil::Properties get_component_profile(RTC::RTObject_ptr rtc);
177 bool is_existing(RTC::RTObject_ptr rtc);
189 bool is_alive_in_default_ec(RTC::RTObject_ptr rtc);
190
191
205 RTC::ExecutionContext_ptr get_actual_ec(RTC::RTObject_ptr rtc,
206 RTC::UniqueId ec_id = 0);
207
223 RTC::UniqueId get_ec_id(RTC::RTObject_ptr rtc,
224 RTC::ExecutionContext_ptr ec);
225
241 RTC::ReturnCode_t activate(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id = 0);
242
258 RTC::ReturnCode_t deactivate(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id = 0);
259
275 RTC::ReturnCode_t reset(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id = 0);
276
277
278
295 bool get_state(RTC::LifeCycleState &state, RTC::RTObject_ptr rtc, RTC::UniqueId ec_id = 0);
296
297
313 bool is_in_inactive(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id = 0);
314
315
330 bool is_in_active(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id = 0);
331
332
347 bool is_in_error(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id = 0);
348
349
350
362 CORBA::Double get_default_rate(RTC::RTObject_ptr rtc);
363
364
379 RTC::ReturnCode_t set_default_rate(RTC::RTObject_ptr rtc,
380 CORBA::Double rate);
381
382
396 CORBA::Double get_current_rate(RTC::RTObject_ptr rtc,
397 RTC::UniqueId ec_id);
398
415 RTC::ReturnCode_t set_current_rate(RTC::RTObject_ptr rtc,
416 RTC::UniqueId ec_id,
417 CORBA::Double rate);
418
419
434 RTC::ReturnCode_t add_rtc_to_default_ec(RTC::RTObject_ptr localcomp,
435 RTC::RTObject_ptr othercomp);
436
437
452 RTC::ReturnCode_t remove_rtc_to_default_ec(RTC::RTObject_ptr localcomp,
453 RTC::RTObject_ptr othercomp);
454
455
468 RTC::RTCList get_participants_rtc(RTC::RTObject_ptr rtc);
469
470
471
483 coil::vstring get_port_names(RTC::RTObject_ptr rtc);
484
485
497 coil::vstring get_inport_names(RTC::RTObject_ptr rtc);
498
499
511 coil::vstring get_outport_names(RTC::RTObject_ptr rtc);
512
513
525 coil::vstring get_svcport_names(RTC::RTObject_ptr rtc);
526
527
539 coil::vstring get_connector_names(RTC::PortService_ptr port);
540
541
555 coil::vstring get_connector_names(RTC::RTObject_ptr rtc,
556 const std::string& port_name);
557
569 coil::vstring get_connector_ids(RTC::PortService_ptr port);
570
571
585 coil::vstring get_connector_ids(RTC::RTObject_ptr rtc,
586 const std::string& port_name);
587
588
606 RTC::ConnectorProfile* create_connector(const std::string& name,
607 const coil::Properties& prop_arg,
608 RTC::PortService_ptr port0,
609 RTC::PortService_ptr port1);
610
624 bool already_connected(RTC::PortService_ptr localport,
625 RTC::PortService_ptr otherport);
626
645 RTC::ReturnCode_t connect(const std::string& name,
646 const coil::Properties& prop,
647 RTC::PortService_ptr port0,
648 RTC::PortService_ptr port1);
649
650
664 RTC::ReturnCode_t disconnect(RTC::ConnectorProfile connector_prof);
665
666
681 RTC::ReturnCode_t disconnect_connector_name(RTC::PortService_ptr port_ref, const std::string& conn_name);
682
683
684
699 RTC::ReturnCode_t disconnect_connector_name(const std::string& port_name,
700 const std::string& conn_name);
701
702
717 RTC::ReturnCode_t
718 disconnect_connector_id(RTC::PortService_ptr port_ref,
719 const std::string& conn_id);
720
721
736 RTC::ReturnCode_t disconnect_connector_id(const std::string& port_name,
737 const std::string& conn_id);
738
751 RTC::ReturnCode_t disconnect_all(RTC::PortService_ptr port_ref);
752
753
766 RTC::ReturnCode_t disconnect_all(const std::string& port_name);
767
780 RTC::PortService_ptr get_port_by_url(const std::string& port_name);
781
798 RTC::ReturnCode_t disconnect_name(RTC::PortService_ptr localport,
799 const std::string& othername);
818 RTC::ReturnCode_t connect_multi(const std::string& name,
819 const coil::Properties& prop,
820 RTC::PortService_ptr port,
821 RTC::PortServiceList& target_ports);
830 {
831 const std::string m_name;
841 find_port(std::string name) : m_name(std::move(name)) {}
853 bool operator()(const RTC::PortService_ptr p);
854 };
855
869 RTC::PortService_ptr get_port_by_name(RTC::RTObject_ptr rtc,
870 const std::string& name);
871
894 RTC::ReturnCode_t connect_by_name(const std::string& name, const coil::Properties& prop,
895 RTC::RTObject_ptr rtc0,
896 const std::string& portName0,
897 RTC::RTObject_ptr rtc1,
898 const std::string& portName1);
899
913 coil::Properties get_configuration(RTC::RTObject_ptr rtc, const std::string& conf_name);
914
915
932 std::string get_parameter_by_key(RTC::RTObject_ptr rtc,
933 const std::string& confset_name,
934 const std::string& value_name);
935
948 std::string get_active_configuration_name(RTC::RTObject_ptr rtc);
949
950
951
963 coil::Properties get_active_configuration(RTC::RTObject_ptr rtc);
964
965
983 bool set_configuration(RTC::RTObject_ptr rtc, const std::string& confset_name, const std::string& value_name, const std::string& value);
984
985
986
1002 bool set_active_configuration(RTC::RTObject_ptr rtc, const std::string& value_name, const std::string& value);
1003
1004
1023 bool set_configuration_parameter(SDOPackage::Configuration_ptr conf,
1024 SDOPackage::ConfigurationSet& confset,
1025 const std::string& value_name,
1026 const std::string& value);
1027
1028
1029} // namespace CORBA_RTCUtil
1030#endif // CORBA_SEQUTIL_H
CORBA sequence utility template functions.
NameValue and NVList utility functions.
RTComponent header.
RT component base class.
Definition CORBA_RTCUtil.h:30
RTC::ReturnCode_t reset(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
RTC::ReturnCode_t connect_by_name(const std::string &name, const coil::Properties &prop, RTC::RTObject_ptr rtc0, const std::string &portName0, RTC::RTObject_ptr rtc1, const std::string &portName1)
std::string get_parameter_by_key(RTC::RTObject_ptr rtc, const std::string &confset_name, const std::string &value_name)
RTC::ConnectorProfile * create_connector(const std::string &name, const coil::Properties &prop_arg, RTC::PortService_ptr port0, RTC::PortService_ptr port1)
bool already_connected(RTC::PortService_ptr localport, RTC::PortService_ptr otherport)
RTC::PortService_ptr get_port_by_name(RTC::RTObject_ptr rtc, const std::string &name)
RTC::ReturnCode_t connect_multi(const std::string &name, const coil::Properties &prop, RTC::PortService_ptr port, RTC::PortServiceList &target_ports)
RTC::ReturnCode_t disconnect_all(RTC::PortService_ptr port_ref)
bool set_active_configuration(RTC::RTObject_ptr rtc, const std::string &value_name, const std::string &value)
RTC::ReturnCode_t deactivate(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
coil::Properties get_configuration(RTC::RTObject_ptr rtc, const std::string &conf_name)
RTC::ReturnCode_t activate(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
CORBA::Double get_default_rate(RTC::RTObject_ptr rtc)
RTC::UniqueId get_ec_id(RTC::RTObject_ptr rtc, RTC::ExecutionContext_ptr ec)
coil::Properties get_component_profile(RTC::RTObject_ptr rtc)
RTC handling utility functions.
coil::vstring get_inport_names(RTC::RTObject_ptr rtc)
RTC::ReturnCode_t set_current_rate(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id, CORBA::Double rate)
bool is_in_active(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
bool set_configuration(RTC::RTObject_ptr rtc, const std::string &confset_name, const std::string &value_name, const std::string &value)
bool is_existing(RTC::RTObject_ptr rtc)
bool is_alive_in_default_ec(RTC::RTObject_ptr rtc)
RTC::ExecutionContext_ptr get_actual_ec(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
RTC::ReturnCode_t disconnect_connector_name(RTC::PortService_ptr port_ref, const std::string &conn_name)
bool is_in_error(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
RTC::ReturnCode_t disconnect_connector_id(RTC::PortService_ptr port_ref, const std::string &conn_id)
coil::Properties get_active_configuration(RTC::RTObject_ptr rtc)
coil::vstring get_port_names(RTC::RTObject_ptr rtc)
coil::vstring get_outport_names(RTC::RTObject_ptr rtc)
bool is_in_inactive(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
RTC::ReturnCode_t disconnect(RTC::ConnectorProfile connector_prof)
CORBA::Double get_current_rate(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id)
bool set_configuration_parameter(SDOPackage::Configuration_ptr conf, SDOPackage::ConfigurationSet &confset, const std::string &value_name, const std::string &value)
bool get_state(RTC::LifeCycleState &state, RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
std::string get_active_configuration_name(RTC::RTObject_ptr rtc)
RTC::ReturnCode_t set_default_rate(RTC::RTObject_ptr rtc, CORBA::Double rate)
coil::vstring get_svcport_names(RTC::RTObject_ptr rtc)
RTC::PortService_ptr get_port_by_url(const std::string &port_name)
coil::vstring get_connector_names(RTC::PortService_ptr port)
RTC::ReturnCode_t remove_rtc_to_default_ec(RTC::RTObject_ptr localcomp, RTC::RTObject_ptr othercomp)
RTC::ReturnCode_t connect(const std::string &name, const coil::Properties &prop, RTC::PortService_ptr port0, RTC::PortService_ptr port1)
RTC::RTCList get_participants_rtc(RTC::RTObject_ptr rtc)
RTC::ReturnCode_t disconnect_name(RTC::PortService_ptr localport, const std::string &othername)
coil::vstring get_connector_ids(RTC::PortService_ptr port)
RTC::ReturnCode_t add_rtc_to_default_ec(RTC::RTObject_ptr localcomp, RTC::RTObject_ptr othercomp)
ExecutionContextHandle_t UniqueId
Definition ComponentActionListener.h:34
Definition CORBA_RTCUtil.h:830
find_port(std::string name)
Definition CORBA_RTCUtil.h:841
const std::string m_name
Definition CORBA_RTCUtil.h:831
bool operator()(const RTC::PortService_ptr p)