SdoConfiguration.h
Go to the documentation of this file.
1 // -*- C++ -*-
20 #ifndef RTC_SDOCONFIGURATION_H
21 #define RTC_SDOCONFIGURATION_H
22 
23 #include <string>
24 
25 // CORBA header include
26 #include <rtm/RTC.h>
27 #include <coil/Mutex.h>
28 #include <coil/Guard.h>
29 
30 // local includes
31 #include <rtm/idl/SDOPackageSkel.h>
32 #include <rtm/ConfigAdmin.h>
33 #include <rtm/SystemLogger.h>
34 #include <rtm/SdoServiceAdmin.h>
35 
36 // SdoConfiguration with SeqEx 159120
37 // SdoConfiguration with SeqUtil 114504 114224
38 
54 #ifdef WIN32
55 #pragma warning( disable : 4290 )
56 #endif
57 
58 namespace SDOPackage
59 {
155  : public virtual POA_SDOPackage::Configuration,
156  public virtual PortableServer::RefCountServantBase
157  {
160  public:
181  RTC::SdoServiceAdmin& sdoServiceAdmin);
182 
198  virtual ~Configuration_impl(void);
199 
200  //============================================================
201  //
202  // <<< CORBA interfaces >>>
203  //
204  //============================================================
245  virtual CORBA::Boolean set_device_profile(const DeviceProfile& dProfile)
246  throw (CORBA::SystemException,
247  InvalidParameter, NotAvailable, InternalError);
248 
294  virtual CORBA::Boolean add_service_profile(const ServiceProfile& sProfile)
295  throw (CORBA::SystemException,
296  InvalidParameter, NotAvailable, InternalError);
297 
333  virtual CORBA::Boolean add_organization(Organization_ptr org)
334  throw (CORBA::SystemException,
335  InvalidParameter, NotAvailable, InternalError);
336 
379  virtual CORBA::Boolean remove_service_profile(const char* id)
380  throw (CORBA::SystemException,
381  InvalidParameter, NotAvailable, InternalError);
382 
422  virtual CORBA::Boolean remove_organization(const char* organization_id)
423  throw (CORBA::SystemException,
424  InvalidParameter, NotAvailable, InternalError);
425 
458  virtual ParameterList* get_configuration_parameters()
459  throw (CORBA::SystemException,
460  NotAvailable, InternalError);
461 
493  throw (CORBA::SystemException,
494  NotAvailable, InternalError);
495 
536  virtual CORBA::Any* get_configuration_parameter_value(const char* name)
537  throw (CORBA::SystemException,
538  InvalidParameter, NotAvailable, InternalError);
539 
582  virtual CORBA::Boolean set_configuration_parameter(const char* name,
583  const CORBA::Any& value)
584  throw (CORBA::SystemException,
585  InvalidParameter, NotAvailable, InternalError);
586 
621  virtual ConfigurationSetList* get_configuration_sets()
622  throw (CORBA::SystemException,
623  NotAvailable, InternalError);
624 
665  virtual ConfigurationSet* get_configuration_set(const char* config_id)
666  throw (CORBA::SystemException,
667  NotAvailable, InternalError);
668 
717  virtual ConfigurationSet* get_active_configuration_set()
718  throw (CORBA::SystemException,
719  NotAvailable, InternalError);
720 
762  virtual CORBA::Boolean
763  add_configuration_set(const ConfigurationSet& configuration_set)
764  throw (CORBA::SystemException,
765  InvalidParameter, NotAvailable, InternalError);
766 
818  virtual CORBA::Boolean
819  set_configuration_set_values(const ConfigurationSet& configuration_set)
820  throw (CORBA::SystemException,
821  InvalidParameter, NotAvailable, InternalError);
822 
861  virtual CORBA::Boolean remove_configuration_set(const char* config_id)
862  throw (CORBA::SystemException,
863  InvalidParameter, NotAvailable, InternalError);
864 
915  virtual CORBA::Boolean activate_configuration_set(const char* config_id)
916  throw (CORBA::SystemException,
917  InvalidParameter, NotAvailable, InternalError);
918 
919  // end of CORBA interface definition
920  //============================================================
921 
941  Configuration_ptr getObjRef();
942 
962  const DeviceProfile getDeviceProfile();
963 
983  const OrganizationList getOrganizations();
984 
985  protected:
1006  const std::string getUUID() const;
1007 
1015  Configuration_var m_objref;
1016 
1024  DeviceProfile m_deviceProfile;
1026 
1088  ParameterList m_parameters;
1090 
1098  /*
1099  struct ConfigurationSet
1100  {
1101  string id;
1102  string description;
1103  NVList configuration_data;
1104  };
1105  */
1108 
1116  RTC::SdoServiceAdmin& m_sdoservice;
1118 
1126  OrganizationList m_organizations;
1128 
1136  struct nv_name
1137  {
1138  nv_name(const char* name) : m_name(name) {};
1139  bool operator()(const NameValue& nv)
1140  {
1141  return m_name == std::string(nv.name);
1142  }
1143  std::string m_name;
1144  };
1145 
1153  struct org_id
1154  {
1155  org_id(const char* id) : m_id(id) {};
1156  bool operator()(const Organization_ptr& o)
1157  {
1158  CORBA::String_var id(o->get_organization_id());
1159  return m_id == (const char *)id;
1160  }
1161  const std::string m_id;
1162  };
1163 
1171  struct config_id
1172  {
1173  config_id(const char* id) : m_id(id) {};
1174  bool operator()(const ConfigurationSet& c)
1175  {
1176  std::string id(c.id);
1177  return m_id == id;
1178  }
1179  const std::string m_id;
1180  };
1181  }; // class Configuration_impl
1182 }; // namespace SDOPackage
1183 
1184 #ifdef WIN32
1185 #pragma warning( default : 4290 )
1186 #endif
1187 
1188 #endif // RTC_SDOCONFIGURATION_H
virtual CORBA::Boolean add_configuration_set(const ConfigurationSet &configuration_set)
[CORBA interface] Add ConfigurationSet
virtual CORBA::Boolean set_configuration_set_values(const ConfigurationSet &configuration_set)
[CORBA interface] Set ConfigurationSet
virtual NVList * get_configuration_parameter_values()
[CORBA interface] Get a list of the value of configuration parameters
RT-Component.
virtual ConfigurationSet * get_active_configuration_set()
[CORBA interface] Get active ConfigurationSet
Mutex class.
RT component logger class.
std::vector< std::pair< std::string, std::string > > NVList
Definition: IRTC.h:67
ConfigAdmin class.
Definition: ConfigAdmin.h:534
virtual CORBA::Boolean set_configuration_parameter(const char *name, const CORBA::Any &value)
[CORBA interface] Modify the configuration parameter value
const std::string getUUID() const
Generate UUID.
Configuration_impl(RTC::ConfigAdmin &configAdmin, RTC::SdoServiceAdmin &sdoServiceAdmin)
Constructor.
Configuration Administration classes.
virtual CORBA::Boolean remove_organization(const char *organization_id)
[CORBA interface] Remove the reference of Organization
virtual CORBA::Boolean add_organization(Organization_ptr org)
[CORBA interface] Add Organization
virtual CORBA::Boolean add_service_profile(const ServiceProfile &sProfile)
[CORBA interface] Set SDO&#39;s ServiceProfile
virtual CORBA::Any * get_configuration_parameter_value(const char *name)
[CORBA interface] Get the value of configuration parameter
SDO Package.
virtual CORBA::Boolean activate_configuration_set(const char *config_id)
[CORBA interface] Activate ConfigurationSet
SDO service administration class.
const OrganizationList getOrganizations()
Get a list of Organization of SDO.
Configuration_var m_objref
The reference to CORBA object.
OrganizationList m_organizations
SDO OrganizationList with mutex lock.
virtual CORBA::Boolean set_device_profile(const DeviceProfile &dProfile)
[CORBA interface] Set DeviceProfile of SDO
virtual ConfigurationSetList * get_configuration_sets()
[CORBA interface] Get a list of ConfigurationSet
virtual ConfigurationSet * get_configuration_set(const char *config_id)
[CORBA interface] Get a ConfigurationSet
RTC::SdoServiceAdmin & m_sdoservice
SDO Service admin object with mutex lock.
DeviceProfile m_deviceProfile
SDO DeviceProfile with mutex lock.
RTComponent header.
Configuration implementation class.
Guard template class.
Definition: Guard.h:41
ParameterList m_parameters
SDO Parameter.
Configuration_ptr getObjRef()
Get object reference.
RTC::ConfigAdmin & m_configsets
SDO ConfigurationSetList with mutex lock.
bool operator()(const ConfigurationSet &c)
const DeviceProfile getDeviceProfile()
Get the DeviceProfile of SDO.
virtual CORBA::Boolean remove_service_profile(const char *id)
[CORBA interface] Remove ServiceProfile
bool operator()(const Organization_ptr &o)
virtual ParameterList * get_configuration_parameters()
[CORBA interface] Get a list of configuration parameters
virtual ~Configuration_impl(void)
Virtual destractor.
virtual CORBA::Boolean remove_configuration_set(const char *config_id)
[CORBA interface] Remove ConfigurationSet


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Jun 6 2019 19:26:00