OpenRTM  1.0.0
SdoServiceAdmin.h
[詳解]
1 // -*- C++ -*-
19 #ifndef RTC_SDOSERVICEADMIN_H
20 #define RTC_SDOSERVICEADMIN_H
21 
22 #include <coil/Mutex.h>
23 #include <coil/Factory.h>
24 
25 #include <rtm/idl/SDOPackageStub.h>
26 #include <rtm/SystemLogger.h>
27 
28 namespace RTC
29 {
30  class RTObject_impl;
31  class SdoServiceProviderBase;
32  class SdoServiceConsumerBase;
33 
149  {
150  public:
171 
187  virtual ~SdoServiceAdmin();
188 
200  SDOPackage::ServiceProfileList* getServiceProviderProfiles();
201 
229  SDOPackage::ServiceProfile* getServiceProviderProfile(const char* id);
230 
258  SDOPackage::SDOService_ptr getServiceProvider(const char* id);
259 
267  bool addSdoServiceProvider(const SDOPackage::ServiceProfile& prof,
268  SdoServiceProviderBase* provider);
269 
277  bool removeSdoServiceProvider(const char* id);
278 
290  bool addSdoServiceConsumer(const SDOPackage::ServiceProfile& sProfile);
291 
303  bool removeSdoServiceConsumer(const char* id);
304 
305 protected:
317  bool isEnabledConsumerType(const SDOPackage::ServiceProfile& sProfile);
318 
330  bool isExistingConsumerType(const SDOPackage::ServiceProfile& sProfile);
331 
332  const std::string getUUID() const;
333 
334  std::string ifrToKey(std::string& ifr);
335 
336 
337  private:
338  RTC::RTObject_impl& m_rtobj;
339  coil::vstring m_consumerTypes;
340  bool m_allConsumerEnabled;
341 
349  std::vector<SdoServiceProviderBase*> m_providers;
350  coil::Mutex m_provider_mutex;
351 
359  std::vector<SdoServiceConsumerBase*> m_consumers;
360  coil::Mutex m_consumer_mutex;
361 
369  ::RTC::Logger rtclog;
370  };
371 
372 
373 };
374 
375 #endif // RTC_SDOSERVICEADMIN_H
RTコンポーネント
Definition: SdoServiceAdmin.h:148
Mutex クラス
Definition: Mutex.h:40
RT component logger class
const std::string getUUID() const
virtual ~SdoServiceAdmin()
仮想デストラクタ
RTコンポーネントクラス
Definition: RTObject.h:89
bool removeSdoServiceProvider(const char *id)
SDO service provider を削除する
SDOPackage::SDOService_ptr getServiceProvider(const char *id)
SDO Service Provider の Service を取得する
bool isEnabledConsumerType(const SDOPackage::ServiceProfile &sProfile)
許可されたサービス型かどうか調べる
std::vector< std::string > vstring
Definition: stringutil.h:37
SdoServiceAdmin(::RTC::RTObject_impl &rtobj)
コンストラクタ
SdoServiceProvider 基底クラス
Definition: SdoServiceProviderBase.h:134
SDOPackage::ServiceProfile * getServiceProviderProfile(const char *id)
SDO Service Provider の ServiceProfile を取得する
std::string ifrToKey(std::string &ifr)
Logger クラス
Definition: SystemLogger.h:99
bool addSdoServiceProvider(const SDOPackage::ServiceProfile &prof, SdoServiceProviderBase *provider)
SDO service provider をセットする
bool addSdoServiceConsumer(const SDOPackage::ServiceProfile &sProfile)
Service Consumer を追加する
SDOPackage::ServiceProfileList * getServiceProviderProfiles()
SDO Service Provider の ServiceProfileList を取得する
bool isExistingConsumerType(const SDOPackage::ServiceProfile &sProfile)
存在するサービス型かどうか調べる
bool removeSdoServiceConsumer(const char *id)
Service Consumer を削除する