Slave part of wiring pattern.
More...
#include <smartWiring.hh>
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
◆ WiringSlave()
SmartACE::WiringSlave::WiringSlave |
( |
SmartComponent * |
component, |
|
|
std::string |
slaveaddress = "" |
|
) |
| |
constructor.
(Currently exception not thrown)
◆ ~WiringSlave()
virtual SmartACE::WiringSlave::~WiringSlave |
( |
| ) |
|
|
virtual |
◆ 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
-
port | name of the port for the added client |
tPtr | this pointer of client object (returned to static method) |
cPtr | address of the internalConnect method of the client object |
dPtr | address 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()
◆ remove()
Smart::StatusCode SmartACE::WiringSlave::remove |
( |
const std::string & |
port | ) |
|
Remove port.
- Parameters
-
port | name 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.
◆ WiringHandler
The documentation for this class was generated from the following file: