AceSmartSoft API Documentation
Public Member Functions | List of all members
SmartACE::ParameterMaster Class Reference

Master part of parameter pattern. More...

#include <smartParameter.hh>

Public Member Functions

 ParameterMaster (SmartComponent *component)
 Constructor. More...
 
virtual ~ParameterMaster ()
 Destructor. More...
 
Smart::StatusCode sendParameterWait (const SmartACE::CommParameterRequest &request, SmartACE::CommParameterResponse &response, const std::string &comp_name, const std::string &service_name="param")
 Blocking call to send a parameter set to a component indicated by the comp_name. More...
 

Detailed Description

Master part of parameter pattern.

Provides a generic port to send configuration sets to components in the system. Typically the master part is used within the sequencer. For each point in time there is a point-to-point connection between one Parameter Master and one Parameter Slave. In total one Parameter Master can send parameter-sets to several Parameter Slaves. There are three different types of parameters (which are encoded in the CommParameterRequest):

TODO: a demonstration component

Constructor & Destructor Documentation

◆ ParameterMaster()

SmartACE::ParameterMaster::ParameterMaster ( SmartComponent component)

Constructor.

Parameters
componentmanagement class of the component

(Currently exception not thrown)

◆ ~ParameterMaster()

virtual SmartACE::ParameterMaster::~ParameterMaster ( )
virtual

Destructor.

Member Function Documentation

◆ sendParameterWait()

Smart::StatusCode SmartACE::ParameterMaster::sendParameterWait ( const SmartACE::CommParameterRequest request,
SmartACE::CommParameterResponse response,
const std::string &  comp_name,
const std::string &  service_name = "param" 
)

Blocking call to send a parameter set to a component indicated by the comp_name.

Connect the ParameterMaster to the ParameterSlave indicated by the comp_name and the optional service_name. Then, send the parameter set stored in the request communication object. After that, await the answer which is written into the response communication object.

Parameters
requestcontains the parameter-set to transfer to the ParameterSlave
responsecontains the response from the ParameterSlave
comp_namename of the ParameterSlave component
service_name(optional) name of the service in component comp_name to connect to
Returns
status code:
  • SMART_OK : everything is ok and the requested connection has been established successfully. An old connection is first removed before a new connection is established.
  • SMART_CANCELLED : blocking is not allowed or is not allowed anymore and therefore blocking call is aborted. The port of the slave component can now be either unchanged, disconnected or properly connected to the specified service provider.
  • SMART_UNKNOWNCOMPONENT : the addressed slave component is either not known or does not provide a Parameter service. The requested connection can not be established.
  • SMART_UNKNOWNPORT : the specified port name is not known at the slave component. The requested connection can not be established.
  • SMART_SERVICEUNAVAILABLE : the slave component can not connect to the specified service of the specified server since the server and/or the service to be connected to from the slave component is not available.
  • SMART_INCOMPATIBLESERVICE : The service behind the specified port is not compatible with the service to be connected to. The requested connection can not be established.
  • SMART_ERROR_COMMUNICATION : communication problems either while connecting to the slave or at the slave component while it tried to establish the requested connection to the requested service provider. The port of the slave component can now either be unchanged, disconnected or already properly connected to the specified service provider.
  • SMART_ERROR : something went completely wrong, see SMART_ERROR_COMMUNICATION

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