CCA
|
PortConfiguration of a CCANode. More...
#include <PortConfiguration.h>
Public Types | |
enum | Transport { CCALocal = 1, CCARemote = 2, CCALocalRemote = 3 } |
Public Member Functions | |
virtual std::string | print () const |
Printing information about this port. | |
void | setQueueSize (unsigned int queuesize=1) |
unsigned int | getQueueSize () const |
void | setKeepLatest (bool keeplatest=true) |
bool | keepLatest () |
virtual rsb::ScopePtr | getScopePtr () const |
Returns the scope of the PortConfiguration. | |
virtual rsb::ParticipantConfig | rsbConfig () const |
Returns the configuration of the port. | |
virtual rsb::ParticipantConfig & | rsbConfigMutable () |
Returns the configuration of the port. | |
virtual bool | isLocalPort () const |
Does this port communicate locally? | |
virtual bool | isRemotePort () const |
Does this port communicate remotely? | |
virtual | ~PortConfiguration () |
Static Public Member Functions | |
static PortConfigurationPtr | DEFAULT (const std::string &scope, unsigned int queuesize=1, bool keeplatest=true) |
Instantiates a local port. | |
static PortConfigurationPtr | LOCAL (const std::string &scope, unsigned int queuesize=1, bool keeplatest=true) |
Instantiates a local port. | |
static PortConfigurationPtr | REMOTE (const std::string &scope, unsigned int queuesize=1, bool keeplatest=true) |
Instantiates a remote port. | |
static PortConfigurationPtr | LOCALREMOTE (const std::string &scope, unsigned int queuesize=1, bool keeplatest=true) |
Instantiates a remote port. | |
static PortConfigurationPtr | PROFILE (const std::string &profile, const std::string &scope, unsigned int queuesize=1, bool keeplatest=true) |
Instantiates a remote port. | |
static PortConfigurationPtr | create (Transport transport, const std::string &scope, unsigned int queuesize=1, bool keeplatest=true) |
static PortConfigurationPtr | create (const std::string &profile, const std::string &scope, unsigned int queuesize=1, bool keeplatest=true) |
Protected Member Functions | |
PortConfiguration (const std::string &scope, unsigned int queuesize=1, bool keeplatest=true) | |
Protected constructor. | |
PortConfiguration (const std::string &scope, bool local, bool remote, unsigned int queuesize=1, bool keeplatest=true) | |
Protected constructor. | |
Protected Attributes | |
bool | local |
PortConfiguration is for local communication. | |
bool | remote |
PortConfiguration is for local communication. | |
bool | keeplatest |
rsb::ScopePtr | scope |
Scope of the port. | |
rsb::ParticipantConfig | rsbconfig |
RSB Participant config for this port. | |
unsigned int | queuesize |
Buffer size for this port. |
Detailed Description
PortConfiguration of a CCANode.
Manages connection, deployment and buffering.
- Todo:
- Comparison operator, matching the Scope
Definition at line 42 of file PortConfiguration.h.
Member Enumeration Documentation
Definition at line 46 of file PortConfiguration.h.
Constructor & Destructor Documentation
cca::PortConfiguration::~PortConfiguration | ( | ) | [virtual] |
Definition at line 229 of file PortConfiguration.cpp.
cca::PortConfiguration::PortConfiguration | ( | const std::string & | scope, |
unsigned int | queuesize = 1 , |
||
bool | keeplatest = true |
||
) | [protected] |
Protected constructor.
- Todo:
- Better handling of exception, when rsb transport for the selected port type is not avaiable.
- Parameters:
-
scope Scope of the port as string. local Select whether port is local or remote (default: local).
Definition at line 144 of file PortConfiguration.cpp.
cca::PortConfiguration::PortConfiguration | ( | const std::string & | scope, |
bool | local, | ||
bool | remote, | ||
unsigned int | queuesize = 1 , |
||
bool | keeplatest = true |
||
) | [protected] |
Protected constructor.
- Todo:
- Better handling of exception, when rsb transport for the selected port type is not avaiable.
- Parameters:
-
scope Scope of the port as string. local Select whether port is local or remote (default: local).
Definition at line 172 of file PortConfiguration.cpp.
Member Function Documentation
PortConfigurationPtr cca::PortConfiguration::create | ( | Transport | transport, |
const std::string & | scope, | ||
unsigned int | queuesize = 1 , |
||
bool | keeplatest = true |
||
) | [static] |
- Parameters:
-
queuesize
Definition at line 88 of file PortConfiguration.cpp.
References CCALocal, CCALocalRemote, CCARemote, LOCAL(), LOCALREMOTE(), and REMOTE().
Referenced by cca::timing::HeartBeat::HeartBeat().
PortConfigurationPtr cca::PortConfiguration::create | ( | const std::string & | profile, |
const std::string & | scope, | ||
unsigned int | queuesize = 1 , |
||
bool | keeplatest = true |
||
) | [static] |
- Parameters:
-
queuesize
Definition at line 103 of file PortConfiguration.cpp.
References PROFILE().
PortConfigurationPtr cca::PortConfiguration::DEFAULT | ( | const std::string & | scope, |
unsigned int | queuesize = 1 , |
||
bool | keeplatest = true |
||
) | [static] |
Instantiates a local port.
Instantiates a local port with the given Scope.
- Parameters:
-
scope Scope of the port as string queuesize Queue size of port buffers (only for input ports) keeplatest Always keeps the latest item in its input buffer (only for input ports)
Definition at line 53 of file PortConfiguration.cpp.
Referenced by cca::Port::configure().
unsigned int cca::PortConfiguration::getQueueSize | ( | ) | const |
- Returns:
- Buffer size
Definition at line 116 of file PortConfiguration.cpp.
rsb::ScopePtr cca::PortConfiguration::getScopePtr | ( | ) | const [virtual] |
Returns the scope of the PortConfiguration.
Definition at line 108 of file PortConfiguration.cpp.
bool cca::PortConfiguration::isLocalPort | ( | ) | const [virtual] |
Does this port communicate locally?
- Returns:
- Does this port communicate locally?
Definition at line 136 of file PortConfiguration.cpp.
bool cca::PortConfiguration::isRemotePort | ( | ) | const [virtual] |
Does this port communicate remotely?
- Returns:
- Does this port communicate remotely?
Definition at line 140 of file PortConfiguration.cpp.
bool cca::PortConfiguration::keepLatest | ( | ) |
- Returns:
Definition at line 124 of file PortConfiguration.cpp.
PortConfigurationPtr cca::PortConfiguration::LOCAL | ( | const std::string & | scope, |
unsigned int | queuesize = 1 , |
||
bool | keeplatest = true |
||
) | [static] |
Instantiates a local port.
Instantiates a local port with the given Scope.
- Parameters:
-
scope Scope of the port as string queuesize Queue size of port buffers (only for input ports) keeplatest Always keeps the latest item in its input buffer (only for input ports)
Definition at line 58 of file PortConfiguration.cpp.
Referenced by create(), cca::Component::createBeatInputPort(), cca::timing::BeatProvider::createBeatOutputPort(), cca::Component::createStateInputPort(), and cca::Component::createStateOutputPort().
PortConfigurationPtr cca::PortConfiguration::LOCALREMOTE | ( | const std::string & | scope, |
unsigned int | queuesize = 1 , |
||
bool | keeplatest = true |
||
) | [static] |
Instantiates a remote port.
Instantiates a remote port with the given Scope.
- Parameters:
-
scope Scope of the port as string queuesize Queue size of port buffers (only for input ports) keeplatest Always keeps the latest item in its input buffer (only for input ports)
Definition at line 70 of file PortConfiguration.cpp.
Referenced by create(), cca::Component::createBeatInputPort(), cca::Component::createStateInputPort(), and cca::Component::createStateOutputPort().
string cca::PortConfiguration::print | ( | ) | const [virtual] |
Printing information about this port.
Definition at line 232 of file PortConfiguration.cpp.
References rsbconfig.
PortConfigurationPtr cca::PortConfiguration::PROFILE | ( | const std::string & | profile, |
const std::string & | scope, | ||
unsigned int | queuesize = 1 , |
||
bool | keeplatest = true |
||
) | [static] |
Instantiates a remote port.
Instantiates a remote port with the given scope and profile. This will load port configuration from a config file (~.config/{profile}.conf).
- Parameters:
-
profile Profile name (~.config/{profile}.conf) scope Scope of the port as string queuesize Queue size of port buffers (only for input ports) keeplatest Always keeps the latest item in its input buffer (only for input ports)
Definition at line 76 of file PortConfiguration.cpp.
Referenced by create().
PortConfigurationPtr cca::PortConfiguration::REMOTE | ( | const std::string & | scope, |
unsigned int | queuesize = 1 , |
||
bool | keeplatest = true |
||
) | [static] |
Instantiates a remote port.
Instantiates a remote port with the given Scope.
- Parameters:
-
scope Scope of the port as string queuesize Queue size of port buffers (only for input ports) keeplatest Always keeps the latest item in its input buffer (only for input ports)
Definition at line 64 of file PortConfiguration.cpp.
Referenced by create(), cca::Component::createBeatInputPort(), cca::Component::createStateInputPort(), and cca::Component::createStateOutputPort().
rsb::ParticipantConfig cca::PortConfiguration::rsbConfig | ( | ) | const [virtual] |
Returns the configuration of the port.
Definition at line 128 of file PortConfiguration.cpp.
rsb::ParticipantConfig & cca::PortConfiguration::rsbConfigMutable | ( | ) | [virtual] |
Returns the configuration of the port.
Definition at line 132 of file PortConfiguration.cpp.
void cca::PortConfiguration::setKeepLatest | ( | bool | keeplatest = true | ) |
- Parameters:
-
keeplatest
Definition at line 120 of file PortConfiguration.cpp.
void cca::PortConfiguration::setQueueSize | ( | unsigned int | queuesize = 1 | ) |
- Parameters:
-
queuesize
Definition at line 112 of file PortConfiguration.cpp.
Member Data Documentation
bool cca::PortConfiguration::keeplatest [protected] |
Definition at line 248 of file PortConfiguration.h.
bool cca::PortConfiguration::local [protected] |
PortConfiguration is for local communication.
Definition at line 238 of file PortConfiguration.h.
Referenced by PortConfiguration().
unsigned int cca::PortConfiguration::queuesize [protected] |
Buffer size for this port.
- Todo:
- Only for input ports?
Definition at line 264 of file PortConfiguration.h.
bool cca::PortConfiguration::remote [protected] |
PortConfiguration is for local communication.
Definition at line 243 of file PortConfiguration.h.
Referenced by PortConfiguration().
rsb::ParticipantConfig cca::PortConfiguration::rsbconfig [protected] |
RSB Participant config for this port.
Definition at line 258 of file PortConfiguration.h.
Referenced by PortConfiguration(), and print().
rsb::ScopePtr cca::PortConfiguration::scope [protected] |
Scope of the port.
Definition at line 253 of file PortConfiguration.h.
The documentation for this class was generated from the following files:
- cca/port/PortConfiguration.h
- cca/port/PortConfiguration.cpp