Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | List of all members
SDOPackage::Configuration_impl Class Reference

Configuration implementation class. More...

#include <SdoConfiguration.h>

Inheritance diagram for SDOPackage::Configuration_impl:
Inheritance graph
[legend]

Classes

struct  config_id
 Functor for ConfigurationSet. More...
 
struct  nv_name
 Functor for NVList. More...
 
struct  org_id
 Functor for Organization. More...
 

Public Member Functions

virtual CORBA::Boolean activate_configuration_set (const char *config_id) throw (CORBA::SystemException, InvalidParameter, NotAvailable, InternalError)
 [CORBA interface] Activate ConfigurationSet More...
 
virtual CORBA::Boolean add_configuration_set (const ConfigurationSet &configuration_set) throw (CORBA::SystemException, InvalidParameter, NotAvailable, InternalError)
 [CORBA interface] Add ConfigurationSet More...
 
virtual CORBA::Boolean add_organization (Organization_ptr org) throw (CORBA::SystemException, InvalidParameter, NotAvailable, InternalError)
 [CORBA interface] Add Organization More...
 
virtual CORBA::Boolean add_service_profile (const ServiceProfile &sProfile) throw (CORBA::SystemException, InvalidParameter, NotAvailable, InternalError)
 [CORBA interface] Set SDO's ServiceProfile More...
 
 Configuration_impl (RTC::ConfigAdmin &configAdmin, RTC::SdoServiceAdmin &sdoServiceAdmin)
 Constructor. More...
 
virtual ConfigurationSet * get_active_configuration_set () throw (CORBA::SystemException, NotAvailable, InternalError)
 [CORBA interface] Get active ConfigurationSet More...
 
virtual CORBA::Any * get_configuration_parameter_value (const char *name) throw (CORBA::SystemException, InvalidParameter, NotAvailable, InternalError)
 [CORBA interface] Get the value of configuration parameter More...
 
virtual NVList * get_configuration_parameter_values () throw (CORBA::SystemException, NotAvailable, InternalError)
 [CORBA interface] Get a list of the value of configuration parameters More...
 
virtual ParameterList * get_configuration_parameters () throw (CORBA::SystemException, NotAvailable, InternalError)
 [CORBA interface] Get a list of configuration parameters More...
 
virtual ConfigurationSet * get_configuration_set (const char *config_id) throw (CORBA::SystemException, NotAvailable, InternalError)
 [CORBA interface] Get a ConfigurationSet More...
 
virtual ConfigurationSetList * get_configuration_sets () throw (CORBA::SystemException, NotAvailable, InternalError)
 [CORBA interface] Get a list of ConfigurationSet More...
 
const DeviceProfile getDeviceProfile ()
 Get the DeviceProfile of SDO. More...
 
Configuration_ptr getObjRef ()
 Get object reference. More...
 
const OrganizationList getOrganizations ()
 Get a list of Organization of SDO. More...
 
virtual CORBA::Boolean remove_configuration_set (const char *config_id) throw (CORBA::SystemException, InvalidParameter, NotAvailable, InternalError)
 [CORBA interface] Remove ConfigurationSet More...
 
virtual CORBA::Boolean remove_organization (const char *organization_id) throw (CORBA::SystemException, InvalidParameter, NotAvailable, InternalError)
 [CORBA interface] Remove the reference of Organization More...
 
virtual CORBA::Boolean remove_service_profile (const char *id) throw (CORBA::SystemException, InvalidParameter, NotAvailable, InternalError)
 [CORBA interface] Remove ServiceProfile More...
 
virtual CORBA::Boolean set_configuration_parameter (const char *name, const CORBA::Any &value) throw (CORBA::SystemException, InvalidParameter, NotAvailable, InternalError)
 [CORBA interface] Modify the configuration parameter value More...
 
virtual CORBA::Boolean set_configuration_set_values (const ConfigurationSet &configuration_set) throw (CORBA::SystemException, InvalidParameter, NotAvailable, InternalError)
 [CORBA interface] Set ConfigurationSet More...
 
virtual CORBA::Boolean set_device_profile (const DeviceProfile &dProfile) throw (CORBA::SystemException, InvalidParameter, NotAvailable, InternalError)
 [CORBA interface] Set DeviceProfile of SDO More...
 
virtual ~Configuration_impl (void)
 Virtual destractor. More...
 

Protected Member Functions

const std::string getUUID () const
 Generate UUID. More...
 

Protected Attributes

Mutex m_config_mutex
 
RTC::ConfigAdminm_configsets
 SDO ConfigurationSetList with mutex lock. More...
 
DeviceProfile m_deviceProfile
 SDO DeviceProfile with mutex lock. More...
 
Mutex m_dprofile_mutex
 
Configuration_var m_objref
 The reference to CORBA object. More...
 
Mutex m_org_mutex
 
OrganizationList m_organizations
 SDO OrganizationList with mutex lock. More...
 
ParameterList m_parameters
 SDO Parameter. More...
 
Mutex m_params_mutex
 
RTC::SdoServiceAdminm_sdoservice
 SDO Service admin object with mutex lock. More...
 
Mutex m_sdoservice_mutex
 
::RTC::Logger rtclog
 

Private Types

typedef coil::Guard< MutexGuard
 
typedef coil::Mutex Mutex
 

Detailed Description

Configuration implementation class.

Configuration interface provides operations to add or remove data specified in resource data model. These operations provide functions to change DeviceProfile, ServiceProfile, ConfigurationProfile, and Organization. This SDO specification does not address access control or security aspects.

Different configurations can be stored for simple and quick activation. Different predefined configurations are stored as different ConfigurationSets or configuration profile. A ConfigurationSet stores the value of all properties assigned for the particular configuration along with its unique id and description to identify and describe the configuration respectively. Operations in the configuration interface help manage these ConfigurationSets.

The following functions do processing to ParameterList.

The following functions do processing to active ConfigurationSet

The following functions do processing to ConfigurationSetList

Since
0.4.0

Definition at line 154 of file SdoConfiguration.h.

Member Typedef Documentation

Definition at line 159 of file SdoConfiguration.h.

Definition at line 158 of file SdoConfiguration.h.

Constructor & Destructor Documentation

SDOPackage::Configuration_impl::Configuration_impl ( RTC::ConfigAdmin configAdmin,
RTC::SdoServiceAdmin sdoServiceAdmin 
)

Constructor.

Constructor

Parameters
configAdminConfigurationSetList

Definition at line 102 of file SdoConfiguration.cpp.

SDOPackage::Configuration_impl::~Configuration_impl ( void  )
virtual

Virtual destractor.

Virtual destractor.

Definition at line 116 of file SdoConfiguration.cpp.

Member Function Documentation

CORBA::Boolean SDOPackage::Configuration_impl::activate_configuration_set ( const char *  config_id)
throw (CORBA::SystemException,
InvalidParameter,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Activate ConfigurationSet

This operation activates one of the stored ConfigurationSets in the ConfigurationProfile. This operation activates the specified stored ConfigurationSets. This means that the configuration properties of the SDO are changed as the values of these properties specified in the stored ConfigurationSet. In other words, values of the specified ConfigurationSet are now copied to the active configuration.

Parameters
config_idIdentifier of ConfigurationSet to be activated.
Returns
If the operation was successfully completed.
Exceptions
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
InvalidParameterThe argument ("configID") is null or there is no configuration set with identifier specified by the argument.
NotAvailableThe target SDO is reachable but cannot respond.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 645 of file SdoConfiguration.cpp.

CORBA::Boolean SDOPackage::Configuration_impl::add_configuration_set ( const ConfigurationSet &  configuration_set)
throw (CORBA::SystemException,
InvalidParameter,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Add ConfigurationSet

This operation adds a ConfigurationSet to the ConfigurationProfile.

Parameters
configuration_setThe ConfigurationSet that is added.
Returns
If the operation was successfully completed.
Exceptions
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
InvalidParameterThe argument "configurationSet" is null, or one of the attributes defining "configurationSet" is invalid, or the specified identifier of the configuration set already exists.
NotAvailableThe target SDO is reachable but cannot respond.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 583 of file SdoConfiguration.cpp.

CORBA::Boolean SDOPackage::Configuration_impl::add_organization ( Organization_ptr  org)
throw (CORBA::SystemException,
InvalidParameter,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Add Organization

This operation adds reference of an Organization object.

Parameters
orgOrganization to be added.
Returns
If the operation was successfully completed.
Exceptions
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
NotAvailableThe target SDO is reachable but cannot respond.
InvalidParameterThe argument ¡Èorganization¡É is null.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 187 of file SdoConfiguration.cpp.

CORBA::Boolean SDOPackage::Configuration_impl::add_service_profile ( const ServiceProfile &  sProfile)
throw (CORBA::SystemException,
InvalidParameter,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Set SDO's ServiceProfile

This operation adds ServiceProfile to the target SDO that navigates this Configuration interface. If the id in argument ServiceProfile is null, new id is created and the ServiceProfile is stored. If the id is not null, the target SDO searches for ServiceProfile in it with the same id. It adds the ServiceProfile if not exist, or overwrites if exist.

Parameters
sProfileServiceProfile to be added.
Returns
If the operation was successfully completed.
Exceptions
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
NotAvailableThe target SDO is reachable but cannot respond.
InvalidParameterThe argument "sProfile" is null.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 158 of file SdoConfiguration.cpp.

ConfigurationSet * SDOPackage::Configuration_impl::get_active_configuration_set ( )
throw (CORBA::SystemException,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Get active ConfigurationSet

This operation returns the current active ConfigurationSet of an SDO (i.e., if the current configuration of the SDO was set using predefined configuration set). ConfigurationSet cannot be considered active if the:

  • Current configuration of the SDO was not set using any predefined ConfigurationSet, or
  • Configuration of the SDO was changed after it has been active, or
  • ConfigurationSet that was used to configure the SDO was modified.

Empty ConfigurationSet is returned in these cases.

Returns
The active ConfigurationSet.
Exceptions
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
NotAvailableThe target SDO is reachable but cannot respond.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 549 of file SdoConfiguration.cpp.

CORBA::Any * SDOPackage::Configuration_impl::get_configuration_parameter_value ( const char *  name)
throw (CORBA::SystemException,
InvalidParameter,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Get the value of configuration parameter

This operation returns a value of parameter that is specified by argument "name."

Parameters
nameName of the parameter whose value is requested.
Returns
The value of the specified parameter.
Exceptions
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
InvalidParameterThe value of the argument "name" is empty String, or null, or the parameter that is specified by argument "name" does not exist.
NotAvailableThe target SDO is reachable but cannot respond.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 325 of file SdoConfiguration.cpp.

NVList * SDOPackage::Configuration_impl::get_configuration_parameter_values ( )
throw (CORBA::SystemException,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Get a list of the value of configuration parameters

This operation returns all configuration parameters and their values.

Returns
List of all configuration parameters and their values.
Exceptions
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
NotAvailableThe target SDO is reachable but cannot respond.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 297 of file SdoConfiguration.cpp.

ParameterList * SDOPackage::Configuration_impl::get_configuration_parameters ( )
throw (CORBA::SystemException,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Get a list of configuration parameters

This operation returns a list of Parameters. An empty list is returned if the SDO does not have any configurable parameter.

Returns
The list with definitions of parameters characterizing the configuration.
Exceptions
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
NotAvailableThe target SDO is reachable but cannot respond.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 268 of file SdoConfiguration.cpp.

ConfigurationSet * SDOPackage::Configuration_impl::get_configuration_set ( const char *  config_id)
throw (CORBA::SystemException,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Get a ConfigurationSet

This operation returns the ConfigurationSet specified by the parameter configurationSetID.

Parameters
config_idIdentifier of ConfigurationSet requested.
Returns
The configuration set specified by the parameter config_id.
Exceptions
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
InvalidParameterThe parameter 'config_id' is null or there are no ConfigurationSets stored with such id.
NotAvailableThe target SDO is reachable but cannot respond.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 436 of file SdoConfiguration.cpp.

ConfigurationSetList * SDOPackage::Configuration_impl::get_configuration_sets ( )
throw (CORBA::SystemException,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Get a list of ConfigurationSet

This operation returns a list of ConfigurationSets that the ConfigurationProfile has. An empty list is returned if the SDO does not have any ConfigurationSets. This operation returns a list of all ConfigurationSets of the SDO. If no predefined ConfigurationSets exist, then empty list is returned.

Returns
The list of stored configuration with their current values.
Exceptions
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
NotAvailableThe target SDO is reachable but cannot respond.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 387 of file SdoConfiguration.cpp.

const DeviceProfile SDOPackage::Configuration_impl::getDeviceProfile ( )

Get the DeviceProfile of SDO.

Get the DeviceProfile of SDO.

Returns
DeviceProfile of SDO

Definition at line 698 of file SdoConfiguration.cpp.

Configuration_ptr SDOPackage::Configuration_impl::getObjRef ( void  )

Get object reference.

Get the target object reference.

Returns
Object reference

Definition at line 686 of file SdoConfiguration.cpp.

const OrganizationList SDOPackage::Configuration_impl::getOrganizations ( )

Get a list of Organization of SDO.

Get a list of Organization of SDO.

Returns
List of Organization of SDO

Definition at line 710 of file SdoConfiguration.cpp.

const std::string SDOPackage::Configuration_impl::getUUID ( ) const
protected

Generate UUID.

Generate UUID.

Returns
UUID that has been generated

Definition at line 722 of file SdoConfiguration.cpp.

CORBA::Boolean SDOPackage::Configuration_impl::remove_configuration_set ( const char *  config_id)
throw (CORBA::SystemException,
InvalidParameter,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Remove ConfigurationSet

This operation removes a ConfigurationSet from the ConfigurationProfile.

Parameters
config_idThe id of ConfigurationSet which is removed.
Returns
If the operation was successfully completed.
Exceptions
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
InvalidParameterThe arguments "configurationSetID" is null, or the object specified by the argument "configurationSetID" does not exist.
NotAvailableThe target SDO is reachable but cannot respond.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 616 of file SdoConfiguration.cpp.

CORBA::Boolean SDOPackage::Configuration_impl::remove_organization ( const char *  organization_id)
throw (CORBA::SystemException,
InvalidParameter,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Remove the reference of Organization

This operation removes the reference of an Organization object.

Parameters
organization_idUnique id of the organization to be removed.
Returns
If the operation was successfully completed.
Exceptions
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
InvalidParameterThe argument "organizationID" is null, or the object which is specified by argument "organizationID" does not exist.
NotAvailableThe target SDO is reachable but cannot respond.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 238 of file SdoConfiguration.cpp.

CORBA::Boolean SDOPackage::Configuration_impl::remove_service_profile ( const char *  id)
throw (CORBA::SystemException,
InvalidParameter,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Remove ServiceProfile

This operation removes ServiceProfile object to the SDO that has this Configuration interface. The ServiceProfile object to be removed is specified by argument.

Parameters
idserviceID of a ServiceProfile to be removed.
Returns
If the operation was successfully completed.
Exceptions
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
InvalidParameterThe argument "sProfile" is null, or if the object that is specified by argument "sProfile" does not exist.
NotAvailableThe target SDO is reachable but cannot respond.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 214 of file SdoConfiguration.cpp.

CORBA::Boolean SDOPackage::Configuration_impl::set_configuration_parameter ( const char *  name,
const CORBA::Any &  value 
)
throw (CORBA::SystemException,
InvalidParameter,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Modify the configuration parameter value

This operation sets a parameter to a value that is specified by argument "value." The parameter to be modified is specified by argument " name."

Parameters
nameThe name of parameter to be modified.
valueNew value of the specified parameter.
Returns
If the operation was successfully completed.
Exceptions
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
InvalidParameterThe arguments ("name" and/or "value") is null, or the parameter that is specified by the argument "name" does not exist.
NotAvailableThe target SDO is reachable but cannot respond.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 357 of file SdoConfiguration.cpp.

CORBA::Boolean SDOPackage::Configuration_impl::set_configuration_set_values ( const ConfigurationSet &  configuration_set)
throw (CORBA::SystemException,
InvalidParameter,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Set ConfigurationSet

This operation modifies the specified ConfigurationSet of an SDO.

Note: The number of parameters differs between spec and IDL!!

Parameters
config_idThe ID of ConfigurationSet to be modified.
configuration_setConfigurationSet to be replaced.
Returns
A flag indicating if the ConfigurationSet was modified successfully. "true" - The ConfigurationSet was modified successfully. "false" - The ConfigurationSet could not be modified successfully.
Exceptions
InvalidParameterThe parameter 'configurationSetID' is null or there is no ConfigurationSet stored with such id. This exception is also raised if one of the attributes defining ConfigurationSet is not valid.
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
NotAvailableThe target SDO is reachable but cannot respond.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 490 of file SdoConfiguration.cpp.

CORBA::Boolean SDOPackage::Configuration_impl::set_device_profile ( const DeviceProfile &  dProfile)
throw (CORBA::SystemException,
InvalidParameter,
NotAvailable,
InternalError
)
virtual

[CORBA interface] Set DeviceProfile of SDO

This operation sets the DeviceProfile of an SDO. If the SDO does not have DeviceProfile, the operation will create a new DeviceProfile, otherwise it will replace the existing DeviceProfile.

Parameters
dProfileThe device profile that is to be assigned to this SDO.
Returns
If the operation was successfully completed.
Exceptions
SDONotExistsThe target SDO does not exist.(This exception is mapped to CORBA standard system exception OBJECT_NOT_EXIST.)
NotAvailableThe target SDO is reachable but cannot respond.
InvalidParameterThe argument "dProfile" is null.
InternalErrorThe target SDO cannot execute the operation completely due to some internal error.

Definition at line 131 of file SdoConfiguration.cpp.

Member Data Documentation

Mutex SDOPackage::Configuration_impl::m_config_mutex
protected

Definition at line 1107 of file SdoConfiguration.h.

RTC::ConfigAdmin& SDOPackage::Configuration_impl::m_configsets
protected

SDO ConfigurationSetList with mutex lock.

Definition at line 1106 of file SdoConfiguration.h.

DeviceProfile SDOPackage::Configuration_impl::m_deviceProfile
protected

SDO DeviceProfile with mutex lock.

Definition at line 1024 of file SdoConfiguration.h.

Mutex SDOPackage::Configuration_impl::m_dprofile_mutex
protected

Definition at line 1025 of file SdoConfiguration.h.

Configuration_var SDOPackage::Configuration_impl::m_objref
protected

The reference to CORBA object.

Definition at line 1015 of file SdoConfiguration.h.

Mutex SDOPackage::Configuration_impl::m_org_mutex
protected

Definition at line 1127 of file SdoConfiguration.h.

OrganizationList SDOPackage::Configuration_impl::m_organizations
protected

SDO OrganizationList with mutex lock.

Definition at line 1126 of file SdoConfiguration.h.

ParameterList SDOPackage::Configuration_impl::m_parameters
protected

SDO Parameter.

Data structure to define a variable (parameter) independently of implementation technologies. The Parameter structure defines the name and type of a variable. Attributes defined in Parameter.

  • name : Parameter¡Çs name.
  • type : Name of parameter's type. The original value scope of parameter data type can be constrained by definitions allocated in the attribute allowedValues.

allowedValues : Values that the parameter can accept. This attribute is used only when the value scope inherent to the parameter type must be constrained. For example, the values allowed for a string parameter may be constrained by an enumeration, or the values allowed for a numeric parameter may be constrained by a range. The values allowed for a parameter can be defined in enumeration, range, or interval structures. The value of attribute allowedValues is null if there is no constraint on a parameter value, that is, any value can be assigned to the parameter as far as it follows the value scope inherent to the parameter¡Çs type.

struct Parameter { string name; TypeCode type; AllowedValues allowed_values; };

SDO ParameterList with mutex lock

Definition at line 1088 of file SdoConfiguration.h.

Mutex SDOPackage::Configuration_impl::m_params_mutex
protected

Definition at line 1089 of file SdoConfiguration.h.

RTC::SdoServiceAdmin& SDOPackage::Configuration_impl::m_sdoservice
protected

SDO Service admin object with mutex lock.

Definition at line 1116 of file SdoConfiguration.h.

Mutex SDOPackage::Configuration_impl::m_sdoservice_mutex
protected

Definition at line 1117 of file SdoConfiguration.h.

::RTC::Logger SDOPackage::Configuration_impl::rtclog
protected

Definition at line 986 of file SdoConfiguration.h.


The documentation for this class was generated from the following files:


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