OpenRTM-aist  2.0.1
RTObject.h
Go to the documentation of this file.
1 // -*- C++ -*-
18 #ifndef RTC_RTOBJECT_H
19 #define RTC_RTOBJECT_H
20 
21 // CORBA header include
22 #include <coil/Properties.h>
23 #include <coil/Task.h>
24 
25 #include <rtm/RTC.h>
26 #include <rtm/idl/RTCSkel.h>
27 #include <rtm/idl/OpenRTMSkel.h>
28 #include <rtm/PortBase.h>
29 #include <rtm/PortAdmin.h>
30 #include <rtm/InPortBase.h>
31 #include <rtm/OutPortBase.h>
32 #include <rtm/CorbaPort.h>
33 #include <rtm/ConfigAdmin.h>
34 #include <rtm/SystemLogger.h>
36 #include <rtm/SdoServiceAdmin.h>
38 #include <rtm/FsmActionListener.h>
39 
40 #include <string>
41 #include <vector>
42 
43 #define ECOTHER_OFFSET 1000
44 
45 namespace SDOPackage
46 {
47  class Configuration_impl;
48 } // namespace SDOPackage
49 
50 namespace RTC
51 {
52  class Manager;
53  class ExecutionContextBase;
54  using UniqueId = ExecutionContextHandle_t;
55 
91  : public virtual POA_OpenRTM::DataFlowComponent,
92  public virtual PortableServer::RefCountServantBase
93  {
94  public:
113  explicit RTObject_impl(Manager* manager);
114 
135  RTObject_impl(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa);
136 
148  ~RTObject_impl() override;
149 
150  protected:
151  //============================================================
152  // Overridden functions
153  //============================================================
181  // The initialize action (on CREATED->ALIVE transition)
182  // formaer rtc_init_entry()
183  virtual ReturnCode_t onInitialize();
184 
212  // The finalize action (on ALIVE->END transition)
213  // formaer rtc_exiting_entry()
214  virtual ReturnCode_t onFinalize();
215 
247  // The startup action when ExecutionContext startup
248  // former rtc_starting_entry()
249  virtual ReturnCode_t onStartup(RTC::UniqueId ec_id);
250 
282  // The shutdown action when ExecutionContext stop
283  // former rtc_stopping_entry()
284  virtual ReturnCode_t onShutdown(RTC::UniqueId ec_id);
285 
317  // The activated action (Active state entry action)
318  // former rtc_active_entry()
319  virtual ReturnCode_t onActivated(RTC::UniqueId ec_id);
320 
352  // The deactivated action (Active state exit action)
353  // former rtc_active_exit()
354  virtual ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
355 
392  // The execution action that is invoked periodically
393  // former rtc_active_do()
394  virtual ReturnCode_t onExecute(RTC::UniqueId ec_id);
395 
427  // The aborting action when main logic error occurred.
428  // former rtc_aborting_entry()
429  virtual ReturnCode_t onAborting(RTC::UniqueId ec_id);
430 
461  // The error action in ERROR state
462  // former rtc_error_do()
463  virtual ReturnCode_t onError(RTC::UniqueId ec_id);
464 
495  // The reset action that is invoked resetting
496  // This is same but different the former rtc_init_entry()
497  virtual ReturnCode_t onReset(RTC::UniqueId ec_id);
498 
535  // The state update action that is invoked after onExecute() action
536  // no corresponding operation exists in OpenRTm-aist-0.2.0
537  virtual ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
538 
574  // The action that is invoked when execution context's rate is changed
575  // no corresponding operation exists in OpenRTm-aist-0.2.0
576  virtual ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
577 
578  public:
579  //============================================================
580  // RTC::LightweightRTObject
581  //============================================================
617  ReturnCode_t initialize() override;
618 
664  ReturnCode_t finalize() override;
665 
709  ReturnCode_t exit() override;
710 
744  CORBA::Boolean is_alive(ExecutionContext_ptr exec_context) override;
745 
773  ExecutionContext_ptr get_context(UniqueId ec_id) override;
774 
793  ExecutionContextList* get_owned_contexts() override;
794 
813  ExecutionContextList* get_participating_contexts() override;
814 
829  ExecutionContextHandle_t
830  get_context_handle(ExecutionContext_ptr cxt) override;
831 
862  UniqueId attach_context(ExecutionContext_ptr exec_context) override;
863 
864  UniqueId bindContext(ExecutionContext_ptr exec_context);
865 
907  ReturnCode_t detach_context(UniqueId ec_id) override;
908 
909  //============================================================
910  // RTC::RTObject
911  //============================================================
931  ComponentProfile* get_component_profile() override;
932 
952  PortServiceList* get_ports() override;
953 
954  //============================================================
955  // RTC::ComponentAction
956  //============================================================
982  ReturnCode_t on_initialize() override;
983 
1008  ReturnCode_t on_finalize() override;
1009 
1038  ReturnCode_t on_startup(UniqueId ec_id) override;
1039 
1068  ReturnCode_t on_shutdown(UniqueId ec_id) override;
1069 
1096  ReturnCode_t on_activated(UniqueId ec_id) override;
1097 
1125  ReturnCode_t on_deactivated(UniqueId ec_id) override;
1126 
1159  ReturnCode_t on_aborting(UniqueId ec_id) override;
1160 
1204  ReturnCode_t on_error(UniqueId ec_id) override;
1205 
1240  ReturnCode_t on_reset(UniqueId ec_id) override;
1241 
1242  //============================================================
1243  // RTC::DataFlowComponentAction
1244  //============================================================
1287  ReturnCode_t on_execute(UniqueId ec_id) override;
1288 
1332  ReturnCode_t on_state_update(UniqueId ec_id) override;
1333 
1370  ReturnCode_t on_rate_changed(UniqueId ec_id) override;
1371 
1372  //============================================================
1373  // SDOPackage::SdoSystemElement
1374  //============================================================
1412  SDOPackage::OrganizationList* get_owned_organizations() override;
1413 
1414  //============================================================
1415  // SDOPackage::SDO
1416  //============================================================
1450  char* get_sdo_id() override;
1451 
1485  char* get_sdo_type() override;
1486 
1523  SDOPackage::DeviceProfile* get_device_profile() override;
1524 
1561  SDOPackage::ServiceProfileList* get_service_profiles() override;
1562 
1604  SDOPackage::ServiceProfile* get_service_profile(const char* id) override;
1605 
1653  SDOPackage::SDOService_ptr get_sdo_service(const char* id) override;
1654 
1699  SDOPackage::Configuration_ptr get_configuration() override;
1700 
1744  SDOPackage::Monitoring_ptr get_monitoring() override;
1745 
1781  SDOPackage::OrganizationList* get_organizations() override;
1782 
1814  SDOPackage::NVList* get_status_list() override;
1815 
1852  CORBA::Any* get_status(const char* name) override;
1853 
1854  //============================================================
1855  // Local interfaces
1856  //============================================================
1876  const char* getInstanceName()
1877  {
1878  RTC_TRACE(("getInstanceName()"));
1879  return m_profile.instance_name;
1880  }
1881 
1901  void setInstanceName(const char* instance_name);
1902 
1922  const char* getTypeName()
1923  {
1924  RTC_TRACE(("getTypeName()"));
1925  return m_profile.type_name;
1926  }
1927 
1947  const char* getDescription()
1948  {
1949  RTC_TRACE(("getDescription()"));
1950  return m_profile.description;
1951  }
1952 
1973  const char* getVersion()
1974  {
1975  RTC_TRACE(("getVersion()"));
1976  return m_profile.version;
1977  }
1978 
1998  const char* getVendor()
1999  {
2000  RTC_TRACE(("getVendor()"));
2001  return m_profile.vendor;
2002  }
2003 
2023  const char* getCategory()
2024  {
2025  RTC_TRACE(("getCategory()"));
2026  return m_profile.category;
2027  }
2028 
2048  std::vector<std::string> getNamingNames();
2049 
2069  void setObjRef(RTObject_ptr rtobj);
2070 
2090  RTObject_ptr getObjRef() const;
2091 
2117  void setProperties(const coil::Properties& prop);
2118 
2140  coil::Properties& getProperties();
2141 
2174  template <typename VarType>
2175  bool bindParameter(const char* param_name, VarType& var,
2176  const char* def_val,
2177  bool (*trans)(VarType&, const char*) = coil::stringTo)
2178  {
2179  RTC_TRACE(("bindParameter(%s (default: %s))", param_name, def_val));
2180  m_configsets.bindParameter(param_name, var, def_val, trans);
2181  return true;
2182  }
2183 
2251  ConfigAdmin& getConfigService() { return m_configsets; }
2252 
2274  void updateParameters(const char* config_set);
2275 
2309  bool addPort(PortBase& port);
2343  bool addPort(PortService_ptr port);
2377  bool addPort(CorbaPort& port);
2409  void registerPort(PortBase& port);
2441  void registerPort(PortService_ptr port);
2473  void registerPort(CorbaPort& port);
2474 
2503  bool addInPort(const char* name, InPortBase& inport);
2504  const std::vector<InPortBase*>& getInPorts() const { return m_inports; }
2505  const std::vector<OutPortBase*>& getOutPorts() const { return m_outports; }
2532  void registerInPort(const char* name, InPortBase& inport);
2533 
2562  bool addOutPort(const char* name, OutPortBase& outport);
2589  void registerOutPort(const char* name, OutPortBase& outport);
2590 
2612  bool removeInPort(InPortBase& inport);
2613 
2635  bool removeOutPort(OutPortBase& outport);
2636 
2658  bool removePort(PortBase& port);
2680  bool removePort(PortService_ptr port);
2702  bool removePort(CorbaPort& port);
2722  void deletePort(PortBase& port);
2742  void deletePort(PortService_ptr port);
2762  void deletePort(CorbaPort& port);
2763 
2783  void deletePortByName(const char* port_name);
2784 
2835  ExecutionContext_ptr getExecutionContext(RTC::UniqueId ec_id);
2836 
2889  double getExecutionRate(RTC::UniqueId ec_id);
2890 
2944  ReturnCode_t setExecutionRate(RTC::UniqueId ec_id, double rate);
2945 
2998  static bool isOwnExecutionContext(RTC::UniqueId ec_id);
2999 
3038  ReturnCode_t deactivate(RTC::UniqueId ec_id);
3039 
3076  ReturnCode_t activate(RTC::UniqueId ec_id);
3077 
3112  ReturnCode_t reset(RTC::UniqueId ec_id);
3113 
3121  bool addSdoServiceProvider(const SDOPackage::ServiceProfile& prof,
3122  SdoServiceProviderBase* provider);
3123 
3131  bool removeSdoServiceProvider(const char* id);
3132 
3140  bool addSdoServiceConsumer(const SDOPackage::ServiceProfile& prof);
3141 
3149  bool removeSdoServiceConsumer(const char* id);
3150 
3158  void removeSdoServiceConsumerStartThread(const char* id);
3159 
3180  bool readAll();
3181 
3202  bool writeAll();
3203 
3238  void setReadAll(bool read = true, bool completion = false);
3239 
3274  void setWriteAll(bool write = true, bool completion = false);
3275 
3292  void finalizePorts();
3293 
3305  void finalizeContexts();
3306 
3318  void setINSObjRef(RTC::LightweightRTObject_ptr obj);
3319 
3394  void
3395  addPreComponentActionListener(PreCompActionListenerType listener_type,
3396  PreCompActionListener* listener,
3397  bool autoclean = true);
3398 
3399  template <class Listener>
3402  Listener& obj,
3403  void (Listener::*memfunc)(UniqueId ec_id))
3404  {
3405  class Noname
3407  {
3408  public:
3409  Noname(Listener& obj, void (Listener::*memfunc)(UniqueId))
3410  : m_obj(obj), m_memfunc(memfunc)
3411  {
3412  }
3413  void operator()(UniqueId ec_id) override
3414  {
3415  (m_obj.*m_memfunc)(ec_id);
3416  }
3417  private:
3418  Listener& m_obj;
3419  using Memfunc = void (Listener::*)(UniqueId);
3420  Memfunc m_memfunc;
3421  };
3422  Noname* listener(new Noname(obj, memfunc));
3423  addPreComponentActionListener(listener_type, listener, true);
3424  return listener;
3425  }
3426 
3446  void
3447  removePreComponentActionListener(
3448  PreComponentActionListenerType listener_type,
3449  PreComponentActionListener* listener);
3450 
3525  void
3526  addPostComponentActionListener(
3527  PostComponentActionListenerType listener_type,
3528  PostComponentActionListener* listener,
3529  bool autoclean = true);
3530 
3531  template <class Listener>
3534  Listener& obj,
3535  void (Listener::*memfunc)(UniqueId ec_id,
3536  ReturnCode_t ret))
3537  {
3538  class Noname
3540  {
3541  public:
3542  Noname(Listener& obj, void (Listener::*memfunc)(UniqueId, ReturnCode_t))
3543  : m_obj(obj), m_memfunc(memfunc)
3544  {
3545  }
3546  void operator()(UniqueId ec_id, ReturnCode_t ret) override
3547  {
3548  (m_obj.*m_memfunc)(ec_id, ret);
3549  }
3550 
3551  private:
3552  Listener& m_obj;
3553  using Memfunc = void (Listener::*)(UniqueId, ReturnCode_t);
3554  Memfunc m_memfunc;
3555  };
3556  Noname* listener(new Noname(obj, memfunc));
3557  addPostComponentActionListener(listener_type, listener, true);
3558  return listener;
3559  }
3560 
3580  void
3581  removePostComponentActionListener(
3582  PostComponentActionListenerType listener_type,
3583  PostComponentActionListener* listener);
3584 
3638  void
3639  addPortActionListener(PortActionListenerType listener_type,
3640  PortActionListener* listener,
3641  bool autoclean = true);
3642 
3643  template <class Listener>
3646  Listener& obj,
3647  void (Listener::*memfunc)(const RTC::PortProfile&))
3648  {
3649  class Noname
3650  : public PortActionListener
3651  {
3652  public:
3653  Noname(Listener& obj,
3654  void (Listener::*memfunc)(const RTC::PortProfile&))
3655  : m_obj(obj), m_memfunc(memfunc)
3656  {
3657  }
3658  void operator()(const RTC::PortProfile& pprofile) override
3659  {
3660  (m_obj.*m_memfunc)(pprofile);
3661  }
3662 
3663  private:
3664  Listener& m_obj;
3665  using Memfunc = void (Listener::*)(const RTC::PortProfile&);
3666  Memfunc m_memfunc;
3667  };
3668  Noname* listener(new Noname(obj, memfunc));
3669  addPortActionListener(listener_type, listener, true);
3670  return listener;
3671  }
3672 
3692  void
3693  removePortActionListener(PortActionListenerType listener_type,
3694  PortActionListener* listener);
3695 
3751  void addExecutionContextActionListener(ECActionListenerType listener_type,
3752  ECActionListener* listener,
3753  bool autoclean = true);
3754 
3755  template <class Listener>
3758  Listener& obj,
3759  void (Listener::*memfunc)(UniqueId))
3760  {
3761  class Noname
3762  : public ECActionListener
3763  {
3764  public:
3765  Noname(Listener& obj, void (Listener::*memfunc)(UniqueId))
3766  : m_obj(obj), m_memfunc(memfunc)
3767  {
3768  }
3769  void operator()(UniqueId ec_id) override
3770  {
3771  (m_obj.*m_memfunc)(ec_id);
3772  }
3773 
3774  private:
3775  Listener& m_obj;
3776  using Memfunc = void (Listener::*)(UniqueId);
3777  Memfunc m_memfunc;
3778  };
3779  Noname* listener(new Noname(obj, memfunc));
3780  addExecutionContextActionListener(listener_type, listener, true);
3781  return listener;
3782  }
3783 
3803  void
3804  removeExecutionContextActionListener(ECActionListenerType listener_type,
3805  ECActionListener* listener);
3806 
3861  void addPortConnectListener(PortConnectListenerType listener_type,
3862  PortConnectListener* listener,
3863  bool autoclean = true);
3864 
3865  template <class Listener>
3868  Listener& obj,
3869  void (Listener::*memfunc)(const char*,
3870  ConnectorProfile&))
3871  {
3872  class Noname
3873  : public PortConnectListener
3874  {
3875  public:
3876  Noname(Listener& obj,
3877  void (Listener::*memfunc)(const char*, ConnectorProfile&))
3878  : m_obj(obj), m_memfunc(memfunc)
3879  {
3880  }
3881  void operator()(const char* portname, ConnectorProfile& cprofile) override
3882  {
3883  (m_obj.*m_memfunc)(portname, cprofile);
3884  }
3885 
3886  private:
3887  Listener& m_obj;
3888  using Memfunc = void (Listener::*)(const char*, ConnectorProfile&);
3889  Memfunc m_memfunc;
3890  };
3891  Noname* listener(new Noname(obj, memfunc));
3892  addPortConnectListener(listener_type, listener, true);
3893  return listener;
3894  }
3895 
3915  void
3916  removePortConnectListener(PortConnectListenerType listener_type,
3917  PortConnectListener* listener);
3918 
3977  void addPortConnectRetListener(PortConnectRetListenerType listener_type,
3978  PortConnectRetListener* listener,
3979  bool autoclean = true);
3980 
3981  template <class Listener>
3984  Listener& obj,
3985  void (Listener::*memfunc)(const char*,
3986  ConnectorProfile&,
3987  ReturnCode_t))
3988  {
3989  class Noname
3990  : public PortConnectRetListener
3991  {
3992  public:
3993  Noname(Listener& obj,
3994  void (Listener::*memfunc)(const char*,
3995  ConnectorProfile&,
3996  ReturnCode_t))
3997  : m_obj(obj), m_memfunc(memfunc)
3998  {
3999  }
4000  void operator()(const char* portname,
4001  ConnectorProfile& cprofile,
4002  ReturnCode_t ret) override
4003  {
4004  (m_obj.*m_memfunc)(portname, cprofile, ret);
4005  }
4006 
4007  private:
4008  Listener& m_obj;
4009  using Memfunc = void (Listener::*)(const char*, ConnectorProfile&, ReturnCode_t);
4010  Memfunc m_memfunc;
4011  };
4012  Noname* listener(new Noname(obj, memfunc));
4013  addPortConnectRetListener(listener_type, listener, true);
4014  return listener;
4015  }
4016 
4036  void
4037  removePortConnectRetListener(PortConnectRetListenerType listener_type,
4038  PortConnectRetListener* listener);
4039 
4072  void addConfigurationParamListener(ConfigurationParamListenerType type,
4073  ConfigurationParamListener* listener,
4074  bool autoclean = true);
4075 
4076  template <class Listener>
4079  Listener& obj,
4080  void (Listener::*memfunc)(const char*,
4081  const char*))
4082  {
4083  class Noname
4085  {
4086  public:
4087  Noname(Listener& obj,
4088  void (Listener::*memfunc)(const char*, const char*))
4089  : m_obj(obj), m_memfunc(memfunc)
4090  {
4091  }
4092  void operator()(const char* config_set_name,
4093  const char* config_param_name) override
4094  {
4095  (m_obj.*m_memfunc)(config_set_name, config_param_name);
4096  }
4097 
4098  private:
4099  Listener& m_obj;
4100  using Memfunc = void (Listener::*)(const char*, const char*);
4101  Memfunc m_memfunc;
4102  };
4103  Noname* listener(new Noname(obj, memfunc));
4104  addConfigurationParamListener(listener_type, listener, true);
4105  return listener;
4106  }
4107 
4132  void removeConfigurationParamListener(ConfigurationParamListenerType type,
4134  listener);
4135 
4167  void addConfigurationSetListener(ConfigurationSetListenerType type,
4168  ConfigurationSetListener* listener,
4169  bool autoclean = true);
4170 
4171  template <class Listener>
4174  Listener& obj,
4175  void (Listener::*memfunc)
4176  (const coil::Properties& config_set))
4177  {
4178  class Noname
4179  : public ConfigurationSetListener
4180  {
4181  public:
4182  Noname(Listener& obj,
4183  void (Listener::*memfunc)(const coil::Properties& config_set))
4184  : m_obj(obj), m_memfunc(memfunc)
4185  {
4186  }
4187  void operator()(const coil::Properties& config_set) override
4188  {
4189  (m_obj.*m_memfunc)(config_set);
4190  }
4191 
4192  private:
4193  Listener& m_obj;
4194  using Memfunc = void (Listener::*)(const coil::Properties&);
4195  Memfunc m_memfunc;
4196  };
4197  Noname* listener(new Noname(obj, memfunc));
4198  addConfigurationSetListener(listener_type, listener, true);
4199  return listener;
4200  }
4201 
4224  void removeConfigurationSetListener(ConfigurationSetListenerType type,
4225  ConfigurationSetListener* listener);
4226 
4261  void
4262  addConfigurationSetNameListener(ConfigurationSetNameListenerType type,
4263  ConfigurationSetNameListener* listener,
4264  bool autoclean = true);
4265 
4266  template <class Listener>
4269  Listener& obj,
4270  void (Listener::*memfunc)(const char*))
4271  {
4272  class Noname
4274  {
4275  public:
4276  Noname(Listener& obj, void (Listener::*memfunc)(const char*))
4277  : m_obj(obj), m_memfunc(memfunc)
4278  {
4279  }
4280  void operator()(const char* config_set_name) override
4281  {
4282  (m_obj.*m_memfunc)(config_set_name);
4283  }
4284 
4285  private:
4286  Listener& m_obj;
4287  using Memfunc = void (Listener::*)(const char*);
4288  Memfunc m_memfunc;
4289  };
4290  Noname* listener(new Noname(obj, memfunc));
4291  addConfigurationSetNameListener(type, listener, true);
4292  return listener;
4293  }
4294 
4321  void
4322  removeConfigurationSetNameListener(ConfigurationSetNameListenerType type,
4323  ConfigurationSetNameListener* listener);
4324 
4325  //============================================================
4326  // FSM Listener
4399  void
4400  addPreFsmActionListener(PreFsmActionListenerType listener_type,
4401  PreFsmActionListener* listener,
4402  bool autoclean = true);
4403 
4404  template <class Listener>
4407  Listener& obj,
4408  void (Listener::*memfunc)(const char* state))
4409  {
4410  class Noname
4411  : public PreFsmActionListener
4412  {
4413  public:
4414  Noname(Listener& obj, void (Listener::*memfunc)(const char*))
4415  : m_obj(obj), m_memfunc(memfunc)
4416  {
4417  }
4418  void operator()(const char* state) override
4419  {
4420  (m_obj.*m_memfunc)(state);
4421  }
4422 
4423  private:
4424  Listener& m_obj;
4425  using Memfunc = void (Listener::*)(const char*);
4426  Memfunc m_memfunc;
4427  };
4428  Noname* listener(new Noname(obj, memfunc));
4429  addPreFsmActionListener(listener_type, listener, true);
4430  return listener;
4431  }
4432 
4452  void
4453  removePreFsmActionListener(PreFsmActionListenerType listener_type,
4454  PreFsmActionListener* listener);
4455 
4528  void
4529  addPostFsmActionListener(PostFsmActionListenerType listener_type,
4530  PostFsmActionListener* listener,
4531  bool autoclean = true);
4532 
4533  template <class Listener>
4536  Listener& obj,
4537  void (Listener::*memfunc)(const char* state,
4538  ReturnCode_t ret))
4539  {
4540  class Noname
4541  : public PostFsmActionListener
4542  {
4543  public:
4544  Noname(Listener& obj,
4545  void (Listener::*memfunc)(const char*, ReturnCode_t))
4546  : m_obj(obj), m_memfunc(memfunc)
4547  {
4548  }
4549  void operator()(const char* state, ReturnCode_t ret) override
4550  {
4551  (m_obj.*m_memfunc)(state, ret);
4552  }
4553 
4554  private:
4555  Listener& m_obj;
4556  using Memfunc = void (Listener::*)(const char*, ReturnCode_t);
4557  Memfunc m_memfunc;
4558  };
4559  Noname* listener(new Noname(obj, memfunc));
4560  addPostFsmActionListener(listener_type, listener, true);
4561  return listener;
4562  }
4563 
4582  void
4583  removePostFsmActionListener(PostFsmActionListenerType listener_type,
4584  PostFsmActionListener* listener);
4585 
4654  void
4655  addFsmProfileListener(FsmProfileListenerType listener_type,
4656  FsmProfileListener* listener,
4657  bool autoclean = true);
4658 
4659  template <class Listener>
4662  Listener& obj,
4663  void (Listener::*memfunc)(const RTC::PortProfile&))
4664  {
4665  class Noname
4666  : public FsmProfileListener
4667  {
4668  public:
4669  Noname(Listener& obj,
4670  void (Listener::*memfunc)(const RTC::FsmProfile&))
4671  : m_obj(obj), m_memfunc(memfunc)
4672  {
4673  }
4674  void operator()(const RTC::PortProfile& pprofile)
4675  {
4676  (m_obj.*m_memfunc)(pprofile);
4677  }
4678 
4679  private:
4680  Listener& m_obj;
4681  using Memfunc = void (Listener::*)(const RTC::FsmProfile&);
4682  Memfunc m_memfunc;
4683  };
4684  Noname* listener(new Noname(obj, memfunc));
4685  addFsmProfileListener(listener_type, listener, true);
4686  return listener;
4687  }
4688 
4708  void
4709  removeFsmProfileListener(FsmProfileListenerType listener_type,
4710  FsmProfileListener* listener);
4711 
4767  void
4768  addFsmStructureListener(FsmStructureListenerType listener_type,
4769  FsmStructureListener* listener,
4770  bool autoclean = true);
4771 
4772  template <class Listener>
4775  Listener& obj,
4776  void (Listener::*memfunc)(const RTC::PortProfile&))
4777  {
4778  class Noname
4779  : public FsmStructureListener
4780  {
4781  public:
4782  Noname(Listener& obj,
4783  void (Listener::*memfunc)(const RTC::FsmStructure&))
4784  : m_obj(obj), m_memfunc(memfunc)
4785  {
4786  }
4787  void operator()(const RTC::PortProfile& pprofile)
4788  {
4789  (m_obj.*m_memfunc)(pprofile);
4790  }
4791 
4792  private:
4793  Listener& m_obj;
4794  using Memfunc = void (Listener::*)(const RTC::FsmStructure&);
4795  Memfunc m_memfunc;
4796  };
4797  Noname* listener(new Noname(obj, memfunc));
4798  addFsmStructureListener(listener_type, listener, true);
4799  return listener;
4800  }
4801 
4821  void
4822  removeFsmStructureListener(FsmStructureListenerType listener_type,
4823  FsmStructureListener* listener);
4824 
4825  inline void preOnInitialize(UniqueId ec_id)
4826  {
4827  m_actionListeners.notify(PreComponentActionListenerType::PRE_ON_INITIALIZE, ec_id);
4828  }
4829 
4830  inline void preOnFinalize(UniqueId ec_id)
4831  {
4832  m_actionListeners.notify(PreComponentActionListenerType::PRE_ON_FINALIZE, ec_id);
4833  }
4834 
4835  inline void preOnStartup(UniqueId ec_id)
4836  {
4837  m_actionListeners.notify(PreComponentActionListenerType::PRE_ON_STARTUP, ec_id);
4838  }
4839 
4840  inline void preOnShutdown(UniqueId ec_id)
4841  {
4842  m_actionListeners.notify(PreComponentActionListenerType::PRE_ON_SHUTDOWN, ec_id);
4843  }
4844 
4845  inline void preOnActivated(UniqueId ec_id)
4846  {
4847  m_actionListeners.notify(PreComponentActionListenerType::PRE_ON_ACTIVATED, ec_id);
4848  }
4849 
4850  inline void preOnDeactivated(UniqueId ec_id)
4851  {
4852  m_actionListeners.notify(PreComponentActionListenerType::PRE_ON_DEACTIVATED, ec_id);
4853  }
4854 
4855  inline void preOnAborting(UniqueId ec_id)
4856  {
4857  m_actionListeners.notify(PreComponentActionListenerType::PRE_ON_ABORTING, ec_id);
4858  }
4859 
4860  inline void preOnError(UniqueId ec_id)
4861  {
4862  m_actionListeners.notify(PreComponentActionListenerType::PRE_ON_ERROR, ec_id);
4863  }
4864 
4865  inline void preOnReset(UniqueId ec_id)
4866  {
4867  m_actionListeners.notify(PreComponentActionListenerType::PRE_ON_RESET, ec_id);
4868  }
4869 
4870  inline void preOnExecute(UniqueId ec_id)
4871  {
4872  m_actionListeners.notify(PreComponentActionListenerType::PRE_ON_EXECUTE, ec_id);
4873  }
4874 
4875  inline void preOnStateUpdate(UniqueId ec_id)
4876  {
4877  m_actionListeners.notify(PreComponentActionListenerType::PRE_ON_STATE_UPDATE, ec_id);
4878  }
4879 
4880  inline void preOnRateChanged(UniqueId ec_id)
4881  {
4882  m_actionListeners.notify(PreComponentActionListenerType::PRE_ON_RATE_CHANGED, ec_id);
4883  }
4884 
4885  inline void postOnInitialize(UniqueId ec_id, ReturnCode_t ret)
4886  {
4887  m_actionListeners.notify(PostComponentActionListenerType::POST_ON_INITIALIZE, ec_id, ret);
4888  }
4889 
4890  inline void postOnFinalize(UniqueId ec_id, ReturnCode_t ret)
4891  {
4892  m_actionListeners.notify(PostComponentActionListenerType::POST_ON_FINALIZE, ec_id, ret);
4893  }
4894 
4895  inline void postOnStartup(UniqueId ec_id, ReturnCode_t ret)
4896  {
4897  m_actionListeners.notify(PostComponentActionListenerType::POST_ON_STARTUP, ec_id, ret);
4898  }
4899 
4900  inline void postOnShutdown(UniqueId ec_id, ReturnCode_t ret)
4901  {
4902  m_actionListeners.notify(PostComponentActionListenerType::POST_ON_SHUTDOWN, ec_id, ret);
4903  }
4904 
4905  inline void postOnActivated(UniqueId ec_id, ReturnCode_t ret)
4906  {
4907  m_actionListeners.notify(PostComponentActionListenerType::POST_ON_ACTIVATED, ec_id, ret);
4908  }
4909 
4910  inline void postOnDeactivated(UniqueId ec_id, ReturnCode_t ret)
4911  {
4912  m_actionListeners.notify(PostComponentActionListenerType::POST_ON_DEACTIVATED, ec_id, ret);
4913  }
4914 
4915  inline void postOnAborting(UniqueId ec_id, ReturnCode_t ret)
4916  {
4917  m_actionListeners.notify(PostComponentActionListenerType::POST_ON_ABORTING, ec_id, ret);
4918  }
4919 
4920  inline void postOnError(UniqueId ec_id, ReturnCode_t ret)
4921  {
4922  m_actionListeners.notify(PostComponentActionListenerType::POST_ON_ERROR, ec_id, ret);
4923  }
4924 
4925  inline void postOnReset(UniqueId ec_id, ReturnCode_t ret)
4926  {
4927  m_actionListeners.notify(PostComponentActionListenerType::POST_ON_RESET, ec_id, ret);
4928  }
4929 
4930  inline void postOnExecute(UniqueId ec_id, ReturnCode_t ret)
4931  {
4932  m_actionListeners.notify(PostComponentActionListenerType::POST_ON_EXECUTE, ec_id, ret);
4933  }
4934 
4935  inline void postOnStateUpdate(UniqueId ec_id, ReturnCode_t ret)
4936  {
4937  m_actionListeners.notify(PostComponentActionListenerType::POST_ON_STATE_UPDATE, ec_id, ret);
4938  }
4939 
4940  inline void postOnRateChanged(UniqueId ec_id, ReturnCode_t ret)
4941  {
4942  m_actionListeners.notify(PostComponentActionListenerType::POST_ON_RATE_CHANGED, ec_id, ret);
4943  }
4944 
4945  inline void onAddPort(const PortProfile& pprof)
4946  {
4947  m_actionListeners.notify(PortActionListenerType::ADD_PORT, pprof);
4948  }
4949 
4950  inline void onRemovePort(const PortProfile& pprof)
4951  {
4952  m_actionListeners.notify(PortActionListenerType::REMOVE_PORT, pprof);
4953  }
4954 
4956  {
4957  m_actionListeners.
4958  notify(ExecutionContextActionListenerType::EC_ATTACHED, ec_id);
4959  }
4960 
4962  {
4963  m_actionListeners.
4964  notify(ExecutionContextActionListenerType::EC_DETACHED, ec_id);
4965  }
4966 
4970  inline void preOnFsmInit(const char* state)
4971  {
4972  m_fsmActionListeners.notify(PreFsmActionListenerType::PRE_ON_INIT, state);
4973  }
4974  inline void preOnFsmEntry(const char* state)
4975  {
4976  m_fsmActionListeners.notify(PreFsmActionListenerType::PRE_ON_ENTRY, state);
4977  }
4978  inline void preOnFsmDo(const char* state)
4979  {
4980  m_fsmActionListeners.notify(PreFsmActionListenerType::PRE_ON_DO, state);
4981  }
4982  inline void preOnFsmExit(const char* state)
4983  {
4984  m_fsmActionListeners.notify(PreFsmActionListenerType::PRE_ON_EXIT, state);
4985  }
4986  inline void preOnFsmStateChange(const char* state)
4987  {
4988  m_fsmActionListeners.notify(PreFsmActionListenerType::PRE_ON_STATE_CHANGE, state);
4989  }
4993  inline void postOnFsmInit(const char* state, ReturnCode_t ret)
4994  {
4995  m_fsmActionListeners.notify(PostFsmActionListenerType::POST_ON_INIT, state, ret);
4996  }
4997  inline void postOnFsmEntry(const char* state, ReturnCode_t ret)
4998  {
4999  m_fsmActionListeners.notify(PostFsmActionListenerType::POST_ON_ENTRY, state, ret);
5000  }
5001  inline void postOnFsmDo(const char* state, ReturnCode_t ret)
5002  {
5003  m_fsmActionListeners.notify(PostFsmActionListenerType::POST_ON_DO, state, ret);
5004  }
5005  inline void postOnFsmExit(const char* state, ReturnCode_t ret)
5006  {
5007  m_fsmActionListeners.notify(PostFsmActionListenerType::POST_ON_EXIT, state, ret);
5008  }
5009  inline void postOnFsmStateChange(const char* state, ReturnCode_t ret)
5010  {
5011  m_fsmActionListeners.notify(PostFsmActionListenerType::POST_ON_STATE_CHANGE, state, ret);
5012  }
5013 
5017  protected:
5033  void shutdown();
5034 
5040  ReturnCode_t initMineEC();
5046  void startMineEC();
5052  void finalizeMineEC();
5058  void finalizeOtherEC();
5059 
5065  ReturnCode_t getInheritedECOptions(coil::Properties& default_opts);
5066 
5070  ReturnCode_t
5071  getPrivateContextOptions(std::vector<coil::Properties>& ec_args);
5072 
5076  ReturnCode_t
5077  getGlobalContextOptions(coil::Properties& global_ec_props);
5078 
5082  ReturnCode_t
5083  getContextOptions(std::vector<coil::Properties>& ec_args);
5084 
5088  static ReturnCode_t findExistingEC(coil::Properties& ec_arg,
5093  ReturnCode_t createContexts(std::vector<coil::Properties>& ec_args);
5094 
5099  void initSdoService();
5100 
5101  protected:
5109  mutable Logger rtclog;
5118 
5126  CORBA::ORB_var m_pORB;
5127 
5135  PortableServer::POA_var m_pPOA;
5136 
5137  //============================================================
5138  // SDO 関係の変数
5139  //============================================================
5147  SDOPackage::OrganizationList m_sdoOwnedOrganizations;
5148 
5156  struct svc_name
5157  {
5158  explicit svc_name(const char* id) : m_id(id) {}
5159  bool operator()(const SDOPackage::ServiceProfile& prof)
5160  {
5161  return m_id == std::string(prof.id);
5162  }
5163  std::string m_id;
5164  }; // struct svc_name
5165 
5174 
5182  SDOPackage::Configuration_var m_pSdoConfig;
5183 
5191  SDOPackage::OrganizationList m_sdoOrganizations;
5192 
5200  SDOPackage::NVList m_sdoStatus;
5201 
5202  //============================================================
5203  // RTC 関係の変数
5204  //============================================================
5212  ComponentProfile m_profile;
5213 
5221  RTObject_var m_objref;
5222 
5231 
5239  std::vector<InPortBase*> m_inports;
5240 
5248  std::vector<OutPortBase*> m_outports;
5249 
5257  ExecutionContextServiceList m_ecMine;
5258 
5266  std::vector<ExecutionContextBase*> m_eclist;
5267 
5275  ExecutionContextServiceList m_ecOther;
5276 
5285 
5294 
5303 
5312 
5321 
5330 
5339 
5357 
5375 
5390 
5405 
5420 
5422 
5424  : public coil::Task
5425  {
5426  public:
5428  void setSdoServiceConsumer(SdoServiceAdmin * sdoservice, const char* id);
5429  int svc() override;
5430 
5431  private:
5432  SdoServiceAdmin *m_sdoservice;
5433  std::string m_id;
5434  };
5436 
5437  //------------------------------------------------------------
5438  // Functor
5439  //------------------------------------------------------------
5447  struct nv_name
5448  {
5449  explicit nv_name(const char* name) : m_name(name) {}
5450  bool operator()(const SDOPackage::NameValue& nv)
5451  {
5452  return m_name == std::string(nv.name);
5453  }
5454  std::string m_name;
5455  }; // struct nv_name
5456 
5464  struct ec_copy
5465  {
5466  explicit ec_copy(ExecutionContextList& eclist)
5467  : m_eclist(eclist)
5468  {
5469  }
5470  void operator()(ExecutionContextService_ptr ecs)
5471  {
5472  if (!::CORBA::is_nil(ecs))
5473  {
5474  CORBA_SeqUtil::push_back(m_eclist,
5475  ExecutionContext::_duplicate(ecs));
5476  }
5477  }
5478  ExecutionContextList& m_eclist;
5479  }; // struct ec_copy
5487  struct ec_find
5488  {
5489  explicit ec_find(ExecutionContext_ptr& ec)
5490  : m_ec(ExecutionContext::_duplicate(ec))
5491  {
5492  }
5493 #ifdef ORB_IS_ORBEXPRESS
5494  bool operator()(ExecutionContextService_var ecs)
5495  {
5496  try
5497  {
5498  if (!::CORBA::is_nil(ecs.in()))
5499  {
5500  ExecutionContext_var ec;
5501  ec = ExecutionContext::_narrow(ecs.in());
5502  return m_ec->_is_equivalent(ec);
5503  }
5504  }
5505 #else
5506  bool operator()(ExecutionContextService_ptr ecs)
5507  {
5508  try
5509  {
5510  if (!::CORBA::is_nil(ecs))
5511  {
5512  ExecutionContext_var ec;
5513  ec = ExecutionContext::_narrow(ecs);
5514  return m_ec->_is_equivalent(ec);
5515  }
5516  }
5517 #endif
5518  catch (...)
5519  {
5520  return false;
5521  }
5522  return false;
5523  }
5524  ExecutionContext_var m_ec;
5525  }; // struct ec_find
5526 
5535  {
5537  : m_comp(RTC::LightweightRTObject::_duplicate(comp))
5538  {
5539  }
5540  void operator()(ExecutionContextService_ptr ec)
5541  {
5542  if (!::CORBA::is_nil(ec) && !ec->_non_existent())
5543  {
5544  RTC::LifeCycleState state = ec->get_component_state(m_comp);
5545  if (state == RTC::ACTIVE_STATE)
5546  {
5547  ec->deactivate_component(
5548  RTC::LightweightRTObject::_duplicate(m_comp));
5549  }
5550  else if (state == RTC::ERROR_STATE)
5551  {
5552  ec->reset_component(
5553  RTC::LightweightRTObject::_duplicate(m_comp));
5554  }
5555  }
5556  }
5558  }; // struct deactivate_comps
5559  }; // class RTObject_impl
5560 } // namespace RTC
5561 
5562 #endif // RTC_RTOBJECT
ComponentProfile m_profile
ComponentProfile.
Definition: RTObject.h:5212
PortAdmin m_portAdmin
List of Port Object reference.
Definition: RTObject.h:5230
bool operator()(ExecutionContextService_ptr ecs)
Definition: RTObject.h:5506
const char * getVendor()
[local interface] Get vendor
Definition: RTObject.h:1998
Logger rtclog
Logger stream.
Definition: RTObject.h:5109
svc_name(const char *id)
Definition: RTObject.h:5158
RTC&#39;s Port base class.
void onAddPort(const PortProfile &pprof)
Definition: RTObject.h:4945
void postOnStateUpdate(UniqueId ec_id, ReturnCode_t ret)
Definition: RTObject.h:4935
void postOnReset(UniqueId ec_id, ReturnCode_t ret)
Definition: RTObject.h:4925
void preOnAborting(UniqueId ec_id)
Definition: RTObject.h:4855
RTC::ReturnCode_t reset(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
std::vector< InPortBase * > m_inports
List of InPortBase*.
Definition: RTObject.h:5239
void onRemovePort(const PortProfile &pprof)
Definition: RTObject.h:4950
void preOnFsmExit(const char *state)
Definition: RTObject.h:4982
FsmProfileListenerType
The types of FsmProfileListener.
Definition: FsmActionListener.h:574
PortConnectRetListener class.
Definition: PortConnectListener.h:203
void preOnFsmInit(const char *state)
Definition: RTObject.h:4970
std::string m_id
Definition: RTObject.h:5163
coil::Properties get_configuration(RTC::RTObject_ptr rtc, const std::string &conf_name)
const char * getCategory()
[local interface] Get category information
Definition: RTObject.h:2023
void postOnFsmInit(const char *state, ReturnCode_t ret)
Definition: RTObject.h:4993
RT-Component.
PreComponentActionListener * addPreComponentActionListener(PreCompActionListenerType listener_type, Listener &obj, void(Listener::*memfunc)(UniqueId ec_id))
Definition: RTObject.h:3401
RT Conponent CORBA service/consumer Port.
Definition: CorbaPort.h:623
std::string m_name
Definition: RTObject.h:5454
PortConnectRetListenerType
The types of PortConnectRetListenerType.
Definition: PortConnectListener.h:162
PortConnectListenerType
The types of ConnectorDataListener.
Definition: PortConnectListener.h:50
#define RTC_TRACE(fmt)
Trace level log output macro.
Definition: SystemLogger.h:687
ExecutionContextServiceList m_ecOther
List of participating ExecutionContextService.
Definition: RTObject.h:5275
Definition: SdoServiceAdmin.h:150
RTC::LightweightRTObject_var LightweightRTObject_var
Definition: ExecutionContextWorker.h:38
bool m_readAllCompletion
flag for readAll()
Definition: RTObject.h:5356
SDOPackage::Configuration_impl * m_pSdoConfigImpl
The pointer to the SDO Configuration Object.
Definition: RTObject.h:5173
coil::Properties get_component_profile(RTC::RTObject_ptr rtc)
RTC handling utility functions.
void preOnShutdown(UniqueId ec_id)
Definition: RTObject.h:4840
component action listener class
ConfigurationSetListener * addConfigurationSetListener(ConfigurationSetListenerType listener_type, Listener &obj, void(Listener::*memfunc)(const coil::Properties &config_set))
Definition: RTObject.h:4173
ECActionListener * addExecutionContextActionListener(ECActionListenerType listener_type, Listener &obj, void(Listener::*memfunc)(UniqueId))
Definition: RTObject.h:3757
RT component logger class.
deactivate_comps(LightweightRTObject_ptr comp)
Definition: RTObject.h:5536
SDOPackage::OrganizationList m_sdoOrganizations
SDO organization.
Definition: RTObject.h:5191
FsmActionListeners m_fsmActionListeners
ComponentActionListener holder.
Definition: RTObject.h:5419
void onAttachExecutionContext(UniqueId ec_id)
Definition: RTObject.h:4955
PreComponentActionListenerType
The types of ConnectorDataListener.
Definition: ComponentActionListener.h:59
RTC::ReturnCode_t activate(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
ConfigAdmin class.
Definition: ConfigAdmin.h:611
FsmProfileListener * addFsmProfileListener(FsmProfileListenerType listener_type, Listener &obj, void(Listener::*memfunc)(const RTC::PortProfile &))
Definition: RTObject.h:4661
CORBA::ORB_var m_pORB
The pointer to the ORB.
Definition: RTObject.h:5126
void postOnExecute(UniqueId ec_id, ReturnCode_t ret)
Definition: RTObject.h:4930
PostFsmActionListener * addPostFsmActionListener(PostFsmActionListenerType listener_type, Listener &obj, void(Listener::*memfunc)(const char *state, ReturnCode_t ret))
Definition: RTObject.h:4535
A base class for ExecutionContext.
Definition: ExecutionContextBase.h:365
Functor to find from SDOService Profile List by id.
Definition: RTObject.h:5156
bool m_exiting
RTC Finalize Status Flag.
Definition: RTObject.h:5293
RT-Component class.
Definition: RTObject.h:90
PreFsmActionListenerType
The types of PreFsmActionListener.
Definition: FsmActionListener.h:89
SDOPackage::Configuration_var m_pSdoConfig
The pointer to the SDO Configuration Interface.
Definition: RTObject.h:5182
ConfigurationSetListener class.
Definition: ConfigurationListener.h:190
ConfigurationSetNameListener class.
Definition: ConfigurationListener.h:303
ComponentActionListeners m_actionListeners
ComponentActionListener holder.
Definition: RTObject.h:5389
ConfigurationParamListener class.
Definition: ConfigurationListener.h:74
Manager class.
Definition: Manager.h:90
Configuration Administration classes.
FsmProfileListener class.
Definition: FsmActionListener.h:722
PortActionListener * addPortActionListener(PortActionListenerType listener_type, Listener &obj, void(Listener::*memfunc)(const RTC::PortProfile &))
Definition: RTObject.h:3645
void postOnShutdown(UniqueId ec_id, ReturnCode_t ret)
Definition: RTObject.h:4900
PortConnectRetListener * addPortConnectRetListener(PortConnectRetListenerType listener_type, Listener &obj, void(Listener::*memfunc)(const char *, ConnectorProfile &, ReturnCode_t))
Definition: RTObject.h:3983
ExecutionContextList & m_eclist
Definition: RTObject.h:5478
nv_name(const char *name)
Definition: RTObject.h:5449
PostComponentActionListener * addPostComponentActionListener(PostCompActionListenerType listener_type, Listener &obj, void(Listener::*memfunc)(UniqueId ec_id, ReturnCode_t ret))
Definition: RTObject.h:3533
ConfigurationParamListener * addConfigurationParamListener(ConfigurationParamListenerType listener_type, Listener &obj, void(Listener::*memfunc)(const char *, const char *))
Definition: RTObject.h:4078
void postOnError(UniqueId ec_id, ReturnCode_t ret)
Definition: RTObject.h:4920
bool m_readAll
flag for readAll()
Definition: RTObject.h:5329
Manager * m_pManager
Manager object.
Definition: RTObject.h:5117
ConfigurationSetListenerType
The types of ConfigurationSetListener.
Definition: ConfigurationListener.h:160
SdoServiceAdmin m_sdoservice
SDO Service Administrator Object.
Definition: RTObject.h:5320
PortActionListenerType
The types of PortActionListener.
Definition: ComponentActionListener.h:383
RTC::LightweightRTObject_ptr LightweightRTObject_ptr
Definition: ExecutionContextWorker.h:37
bool m_created
Created Status Flag.
Definition: RTObject.h:5284
SDOPackage::NVList m_sdoStatus
SDO Status.
Definition: RTObject.h:5200
void operator()(ExecutionContextService_ptr ecs)
Definition: RTObject.h:5470
void preOnRateChanged(UniqueId ec_id)
Definition: RTObject.h:4880
CorbaPort class.
PreComponentActionListener class.
Definition: ComponentActionListener.h:122
PortableServer::POA_var m_pPOA
The pointer to the POA.
Definition: RTObject.h:5135
SdoServiceConsumerTerminator * m_sdoconterm
Definition: RTObject.h:5435
SDO Package.
Definition: InPortConsumer.h:34
void operator()(ExecutionContextService_ptr ec)
Definition: RTObject.h:5540
void postOnAborting(UniqueId ec_id, ReturnCode_t ret)
Definition: RTObject.h:4915
void postOnFsmStateChange(const char *state, ReturnCode_t ret)
Definition: RTObject.h:5009
FsmStructureListener class.
Definition: FsmActionListener.h:941
PreFsmActionListener * addPreFsmActionListener(PreFsmActionListenerType listener_type, Listener &obj, void(Listener::*memfunc)(const char *state))
Definition: RTObject.h:4406
PortAdmin class.
Definition: PortAdmin.h:54
ConfigurationSetNameListenerType
The types of ConfigurationSetNameListener.
Definition: ConfigurationListener.h:271
SDO service administration class.
Functor to copy ExecutionContext.
Definition: RTObject.h:5464
const char * getTypeName()
[local interface] Get type name
Definition: RTObject.h:1922
PortConnectListener class.
Definition: PortConnectListener.h:83
ConfigAdmin & getConfigService()
Getting configuration service.
Definition: RTObject.h:2251
const std::vector< OutPortBase * > & getOutPorts() const
Definition: RTObject.h:2505
PostFsmActionListenerType
The types of PostFsmActionListener.
Definition: FsmActionListener.h:332
void preOnError(UniqueId ec_id)
Definition: RTObject.h:4860
SDOPackage::OrganizationList m_sdoOwnedOrganizations
SDO owned organization list.
Definition: RTObject.h:5147
void postOnFsmEntry(const char *state, ReturnCode_t ret)
Definition: RTObject.h:4997
void onDetachExecutionContext(UniqueId ec_id)
Definition: RTObject.h:4961
ConfigurationSetNameListener * addConfigurationSetNameListener(ConfigurationSetNameListenerType type, Listener &obj, void(Listener::*memfunc)(const char *))
Definition: RTObject.h:4268
ExecutionContextHandle_t UniqueId
Definition: ComponentActionListener.h:34
ConfigurationParamListenerType
The types of ConnectorDataListener.
Definition: ConfigurationListener.h:45
PortConnectListener * addPortConnectListener(PortConnectListenerType listener_type, Listener &obj, void(Listener::*memfunc)(const char *, ConnectorProfile &))
Definition: RTObject.h:3867
void preOnFsmDo(const char *state)
Definition: RTObject.h:4978
Port base class.
Definition: PortBase.h:129
Functor to find NVList.
Definition: RTObject.h:5447
bool bindParameter(const char *param_name, VarType &var, const char *def_val, bool(*trans)(VarType &, const char *)=coil::stringTo)
Setup for configuration parameters.
Definition: RTObject.h:2175
component action listener class
PortConnectListeners class.
Definition: PortConnectListener.h:486
std::vector< ExecutionContextBase * > m_eclist
List of ExecutionContextBase.
Definition: RTObject.h:5266
ComponentActionListeners class.
Definition: ComponentActionListener.h:1025
ExecutionContext_var m_ec
Definition: RTObject.h:5524
Definition: SdoServiceProviderBase.h:133
void preOnFsmStateChange(const char *state)
Definition: RTObject.h:4986
Output base class.
Definition: OutPortBase.h:227
bool operator()(const SDOPackage::NameValue &nv)
Definition: RTObject.h:5450
ExecutionContextServiceList m_ecMine
List of owned ExecutionContextService.
Definition: RTObject.h:5257
bool m_writeAllCompletion
flag for writeAll()
Definition: RTObject.h:5374
void postOnFsmExit(const char *state, ReturnCode_t ret)
Definition: RTObject.h:5005
const char * getDescription()
[local interface] GetDescription
Definition: RTObject.h:1947
ConfigAdmin m_configsets
Configuration Administrator Object.
Definition: RTObject.h:5311
void preOnReset(UniqueId ec_id)
Definition: RTObject.h:4865
Functor to deactivate RTC.
Definition: RTObject.h:5534
Logger class.
Definition: SystemLogger.h:99
LightweightRTObject_var m_comp
Definition: RTObject.h:5557
const char * getVersion()
[local interface] Get version information
Definition: RTObject.h:1973
Port for InPort.
Definition: InPortBase.h:68
const char * getInstanceName()
[local interface] Get instance name
Definition: RTObject.h:1876
void postOnFinalize(UniqueId ec_id, ReturnCode_t ret)
Definition: RTObject.h:4890
RTC::Port implementation for InPort.
RTC::ReturnCode_t deactivate(RTC::RTObject_ptr rtc, RTC::UniqueId ec_id=0)
InPortBase base class.
void preOnStateUpdate(UniqueId ec_id)
Definition: RTObject.h:4875
RTC::LightweightRTObject_var m_insref
Definition: RTObject.h:5421
ec_find(ExecutionContext_ptr &ec)
Definition: RTObject.h:5489
void postOnActivated(UniqueId ec_id, ReturnCode_t ret)
Definition: RTObject.h:4905
void preOnFsmEntry(const char *state)
Definition: RTObject.h:4974
void postOnInitialize(UniqueId ec_id, ReturnCode_t ret)
Definition: RTObject.h:4885
PreFsmActionListener class.
Definition: FsmActionListener.h:231
void postOnFsmDo(const char *state, ReturnCode_t ret)
Definition: RTObject.h:5001
bool operator()(const SDOPackage::ServiceProfile &prof)
Definition: RTObject.h:5159
void preOnStartup(UniqueId ec_id)
Definition: RTObject.h:4835
FsmActionListeners class.
Definition: FsmActionListener.h:1444
void push_back(CorbaSequence &seq, SequenceElement elem)
Push the new element back to the CORBA sequence.
Definition: CORBA_SeqUtil.h:175
RTComponent header.
FsmStructureListener * addFsmStructureListener(FsmStructureListenerType listener_type, Listener &obj, void(Listener::*memfunc)(const RTC::PortProfile &))
Definition: RTObject.h:4774
PortConnectListeners m_portconnListeners
PortConnectListener holder.
Definition: RTObject.h:5404
Configuration implementation class.
Definition: SdoConfiguration.h:149
const std::vector< InPortBase * > & getInPorts() const
Definition: RTObject.h:2504
PostComponentActionListenerType
The types of ConnectorDataListener.
Definition: ComponentActionListener.h:225
void preOnActivated(UniqueId ec_id)
Definition: RTObject.h:4845
void postOnStartup(UniqueId ec_id, ReturnCode_t ret)
Definition: RTObject.h:4895
coil::Properties m_properties
RTC&#39;s Property.
Definition: RTObject.h:5302
void preOnInitialize(UniqueId ec_id)
Definition: RTObject.h:4825
bool m_writeAll
flag for writeAll()
Definition: RTObject.h:5338
RTObject_var m_objref
Object reference.
Definition: RTObject.h:5221
PortActionListener class.
Definition: ComponentActionListener.h:410
ExecutionContextActionListenerType
The types of ExecutionContextActionListener.
Definition: ComponentActionListener.h:493
coil::Properties Properties
Definition: RTC.h:72
std::vector< OutPortBase * > m_outports
List of OutPortBase*.
Definition: RTObject.h:5248
Functor to find ExecutionContext.
Definition: RTObject.h:5487
port&#39;s internal action listener classes
ec_copy(ExecutionContextList &eclist)
Definition: RTObject.h:5466
FsmStructureListenerType
The types of FsmStructureListener.
Definition: FsmActionListener.h:811
RTC&#39;s Port administration class.
PostComponentActionListener class.
Definition: ComponentActionListener.h:289
PostFsmActionListener class.
Definition: FsmActionListener.h:474
void postOnDeactivated(UniqueId ec_id, ReturnCode_t ret)
Definition: RTObject.h:4910
void preOnFinalize(UniqueId ec_id)
Definition: RTObject.h:4830
ExecutionContextActionListener class.
Definition: ComponentActionListener.h:520
void postOnRateChanged(UniqueId ec_id, ReturnCode_t ret)
Definition: RTObject.h:4940
void preOnDeactivated(UniqueId ec_id)
Definition: RTObject.h:4850
void preOnExecute(UniqueId ec_id)
Definition: RTObject.h:4870