CCA

Port of a CCANode. More...

#include <Port.h>

Inheritance diagram for cca::Port:

List of all members.

Public Member Functions

virtual bool isReady () const
 Returns, if port is configured and ready.
virtual void makeOptional (bool optional)
 Declare this port optional.
virtual bool isOptional () const
 Returns, if port is declared optional.
void configure (const std::string &scope)
 Configure scope.
void configure (PortConfigurationPtr config)
 Set port configuration.
virtual void configureSpecifics ()=0
 Porttype-specific configuration.
virtual PortConfigurationPtr getConfig () const
virtual ::rsb::ScopePtr getScopePtr () const
 Returns scope of the port.
virtual bool isLocalPort ()
virtual bool isRemotePort ()
virtual ~Port ()
virtual std::string print () const =0
 Printing information about this Port.

Static Public Attributes

static const bool MANDATORY = false
static const bool OPTIONAL = true

Protected Member Functions

 Port (bool optional=false)
 Protected constructor.

Protected Attributes

PortConfigurationPtr config
 RSB Participant config for this port.
bool configured
bool optional

Detailed Description

Port of a CCANode.

Definition at line 43 of file Port.h.


Constructor & Destructor Documentation

cca::Port::~Port ( ) [virtual]

Definition at line 45 of file Port.cpp.

cca::Port::Port ( bool  optional = false) [protected]

Protected constructor.

Parameters:
optionalDeclare port to be optional
Todo:
Better handling of exception, when rsb transport for the selected port type is not avaiable.

Definition at line 41 of file Port.cpp.


Member Function Documentation

void cca::Port::configure ( const std::string &  scope)

Configure scope.

Parameters:
scopeScope

Definition at line 60 of file Port.cpp.

References cca::PortConfiguration::DEFAULT().

Referenced by cca::Component::configureBeatInputPort(), cca::timing::BeatProvider::configureBeatOutputPort(), cca::Component::configureStateInputPort(), cca::Component::configureStateOutputPort(), and cca::timing::HeartBeat::HeartBeat().

Here is the call graph for this function:

Here is the caller graph for this function:

Set port configuration.

Parameters:
configPort configuration

Definition at line 64 of file Port.cpp.

References config, configured, and configureSpecifics().

Here is the call graph for this function:

virtual void cca::Port::configureSpecifics ( ) [pure virtual]

Porttype-specific configuration.

Needs to be implemented by child classes. Port configuration is already constructed at this point, but port is not yet considered configured.

Implemented in cca::InputPort< DATATYPE >, cca::InputPort< ComponentState >, cca::InputPort< cca::timing::Tick >, cca::InputPort< DTOTYPE >, cca::OutputPort< DATATYPE >, cca::OutputPort< ComponentState >, cca::OutputPort< DTOTYPE >, cca::OutputPort< Tick >, and cca::InputPortBase.

Referenced by configure().

Here is the caller graph for this function:

Returns:

Definition at line 86 of file Port.cpp.

References config.

Referenced by cca::OutputPort< Tick >::print(), and cca::InputPort< DTOTYPE >::print().

Here is the caller graph for this function:

ScopePtr cca::Port::getScopePtr ( ) const

Returns scope of the port.

Returns:

Definition at line 90 of file Port.cpp.

References config.

Referenced by cca::OutputPort< Tick >::print(), and cca::InputPort< DTOTYPE >::print().

Here is the caller graph for this function:

bool cca::Port::isLocalPort ( ) [virtual]
Returns:
If this port is configured to communicate via local transport.

Definition at line 72 of file Port.cpp.

References config, and configured.

bool cca::Port::isOptional ( ) const [virtual]

Returns, if port is declared optional.

Returns:
Port is optional.

Definition at line 56 of file Port.cpp.

References optional.

bool cca::Port::isReady ( ) const [virtual]

Returns, if port is configured and ready.

Returns:
Port is configured and ready.

Definition at line 48 of file Port.cpp.

References configured.

Referenced by cca::Component::publishState().

Here is the caller graph for this function:

bool cca::Port::isRemotePort ( ) [virtual]
Returns:
If this port is configured to communicate via remote transport.

Definition at line 79 of file Port.cpp.

References config, and configured.

void cca::Port::makeOptional ( bool  optional) [virtual]

Declare this port optional.

Parameters:
optionalPort is optional.

Definition at line 52 of file Port.cpp.

References optional.


Member Data Documentation

const bool cca::Port::MANDATORY = false [static]

Definition at line 47 of file Port.h.

const bool cca::Port::OPTIONAL = true [static]

Definition at line 48 of file Port.h.


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