OpenRTM-aist  2.1.0
SdoServiceAdmin.h
[詳解]
1 // -*- C++ -*-
19 #ifndef RTC_SDOSERVICEADMIN_H
20 #define RTC_SDOSERVICEADMIN_H
21 
22 #include <coil/Factory.h>
23 
24 #include <rtm/idl/SDOPackageStub.h>
25 #include <rtm/SystemLogger.h>
26 
27 #include <string>
28 #include <vector>
29 
30 namespace RTC
31 {
32  class RTObject_impl;
33  class SdoServiceProviderBase;
34  class SdoServiceConsumerBase;
35 
151  {
152  public:
173 
189  virtual ~SdoServiceAdmin();
190 
200  virtual void init(const coil::Properties& prop);
201 
213  SDOPackage::ServiceProfileList* getServiceProviderProfiles();
214 
242  SDOPackage::ServiceProfile* getServiceProviderProfile(const char* id);
243 
271  SDOPackage::SDOService_ptr getServiceProvider(const char* id);
272 
280  bool addSdoServiceProvider(const SDOPackage::ServiceProfile& prof,
281  SdoServiceProviderBase* provider);
282 
290  bool removeSdoServiceProvider(const char* id);
291 
303  bool addSdoServiceConsumer(const SDOPackage::ServiceProfile& sProfile);
304 
316  bool removeSdoServiceConsumer(const char* id);
317 
318 protected:
328  void initProvider(const coil::Properties& prop);
338  void initConsumer(const coil::Properties& prop);
339 
340 
352  bool isEnabledConsumerType(const SDOPackage::ServiceProfile& sProfile);
353 
365  bool isExistingConsumerType(const SDOPackage::ServiceProfile& sProfile);
366 
367  static std::string getUUID() ;
368 
369  static std::string ifrToKey(std::string& ifr);
370 
371 
372  private:
373  RTC::RTObject_impl& m_rtobj;
374  coil::vstring m_consumerTypes;
375  bool m_allConsumerEnabled;
376 
384  std::vector<SdoServiceProviderBase*> m_providers;
385  std::mutex m_provider_mutex;
386 
394  std::vector<SdoServiceConsumerBase*> m_consumers;
395  std::mutex m_consumer_mutex;
396 
404  ::RTC::Logger rtclog;
405  };
406 
407 
408 } // namespace RTC
409 
410 #endif // RTC_SDOSERVICEADMIN_H
RT component logger class
Logger クラス
Definition: SystemLogger.h:101
RTコンポーネントクラス
Definition: RTObject.h:93
Definition: SdoServiceAdmin.h:151
virtual void init(const coil::Properties &prop)
初期化処理
bool isExistingConsumerType(const SDOPackage::ServiceProfile &sProfile)
存在するサービス型かどうか調べる
static std::string getUUID()
static std::string ifrToKey(std::string &ifr)
SdoServiceAdmin(::RTC::RTObject_impl &rtobj)
コンストラクタ
bool addSdoServiceConsumer(const SDOPackage::ServiceProfile &sProfile)
Service Consumer を追加する
bool removeSdoServiceProvider(const char *id)
SDO service provider を削除する
bool removeSdoServiceConsumer(const char *id)
Service Consumer を削除する
void initConsumer(const coil::Properties &prop)
Consumer 初期化処理
SDOPackage::ServiceProfileList * getServiceProviderProfiles()
SDO Service Provider の ServiceProfileList を取得する
bool isEnabledConsumerType(const SDOPackage::ServiceProfile &sProfile)
許可されたサービス型かどうか調べる
void initProvider(const coil::Properties &prop)
Provider 初期化処理
virtual ~SdoServiceAdmin()
仮想デストラクタ
SDOPackage::ServiceProfile * getServiceProviderProfile(const char *id)
SDO Service Provider の ServiceProfile を取得する
SDOPackage::SDOService_ptr getServiceProvider(const char *id)
SDO Service Provider の Service を取得する
bool addSdoServiceProvider(const SDOPackage::ServiceProfile &prof, SdoServiceProviderBase *provider)
SDO service provider をセットする
SdoServiceProvider 基底クラス
Definition: SdoServiceProviderBase.h:136
RTコンポーネント
coil::Properties Properties
Definition: RTC.h:72