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

Slave part of wiring pattern. More...

#include <smartWiring.hh>

Public Member Functions

 WiringSlave (SmartComponent *component, std::string slaveaddress="")
 constructor. More...
 
virtual ~WiringSlave ()
 destructor. More...
 
SmartCommWiring handleWiring (const SmartCommWiring &request)
 
Smart::StatusCode add (const std::string &port, void *tPtr, Smart::StatusCode(*cPtr)(void *, const std::string &, const std::string &), Smart::StatusCode(*dPtr)(void *))
 
Smart::StatusCode remove (const std::string &port)
 

Friends

class WiringHandler
 

Detailed Description

Slave part of wiring pattern.

The slave part of the wiring pattern is responsible for changing the port connections within the slave components. It manages the port list of a component.

The user simply needs exactly one instance of the wiring slave per component. The WiringSlave provides no user accessible member functions.

Demonstrated in ninth example

Constructor & Destructor Documentation

◆ WiringSlave()

SmartACE::WiringSlave::WiringSlave ( SmartComponent component,
std::string  slaveaddress = "" 
)

constructor.

(Currently exception not thrown)

◆ ~WiringSlave()

virtual SmartACE::WiringSlave::~WiringSlave ( )
virtual

destructor.

Member Function Documentation

◆ add()

Smart::StatusCode SmartACE::WiringSlave::add ( const std::string &  port,
void *  tPtr,
Smart::StatusCode(*)(void *, const std::string &, const std::string &)  cPtr,
Smart::StatusCode(*)(void *)  dPtr 
)

Add client to the set of ports.

Parameters
portname of the port for the added client
tPtrthis pointer of client object (returned to static method)
cPtraddress of the internalConnect method of the client object
dPtraddress of the internalDisconnect method of the client object
Returns
status code:
  • SMART_OK : everything is ok and client is added as new port. It can now be wired from outside. The connection of the client is not changed when being added to the set of ports.
  • SMART_PORTALREADYUSED : client not added since the portname is already in use.
  • SMART_ERROR : something went wrong

◆ handleWiring()

SmartCommWiring SmartACE::WiringSlave::handleWiring ( const SmartCommWiring request)

◆ remove()

Smart::StatusCode SmartACE::WiringSlave::remove ( const std::string &  port)

Remove port.

Parameters
portname of the port to be removed
Returns
status code:
  • SMART_OK : everything is ok and the client is not wireable from outside anymore. The connection of the client is not changed when being removed from the set of ports.
  • SMART_UNKNOWNPORT : no port with the specified name available.
  • SMART_ERROR : something went wrong.

Friends And Related Function Documentation

◆ WiringHandler

friend class WiringHandler
friend

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