RTC::OutPortBase Class Reference

Output base class. More...

#include <OutPortBase.h>

Inheritance diagram for RTC::OutPortBase:

RTC::PortBase RTC::DataPortStatus RTC::OutPort< DataType >

List of all members.

Public Member Functions

 OutPortBase (const char *name, const char *data_type)
 Constructor.
virtual ~OutPortBase (void)
 Destructor.
void init (coil::Properties &prop)
 Initializing properties.
const char * name () const
 Retrieve OutPort name.
coil::Properties & properties ()
 Get properties.
const std::vector
< OutPortConnector * > & 
connectors ()
 Connector list.
ConnectorBase::ProfileList getConnectorProfiles ()
 ConnectorProfile list.
coil::vstring getConnectorIds ()
 ConnectorId list.
coil::vstring getConnectorNames ()
 Connector name list.
bool getConnectorProfileById (const char *id, ConnectorBase::Profile &prof)
 Getting ConnectorProfile by name.
bool getConnectorProfileByName (const char *name, ConnectorBase::Profile &prof)
 Getting ConnectorProfile by name.
bool publishInterfaceProfiles (SDOPackage::NVList &properties)
 Publish interface profile.
virtual void onConnect (const char *id, PublisherBase *publisher)
 Publish interface information.
virtual void onDisconnect (const char *id)
virtual void activateInterfaces ()
 Activate all Port interfaces.
virtual void deactivateInterfaces ()
 Deactivate all Port interfaces.

Public Attributes

DATAPORTSTATUS_ENUM
typedef std::vector
< OutPortConnector * > 
ConnectorList

Protected Member Functions

void configure ()
 Configureing outport.
virtual ReturnCode_t publishInterfaces (ConnectorProfile &connector_profile)
 Publish interface information.
virtual ReturnCode_t subscribeInterfaces (const ConnectorProfile &connector_profile)
 Subscribe to the interface.
virtual void unsubscribeInterfaces (const ConnectorProfile &connector_profile)
 Disconnect the interface connection.
void initProviders ()
 OutPort provider initialization.
void initConsumers ()
 InPort consumer initialization.
OutPortProvidercreateProvider (ConnectorProfile &cprof, coil::Properties &prop)
 OutPort provider creation.
InPortConsumercreateConsumer (const ConnectorProfile &cprof, coil::Properties &prop)
 InPort consumer creation.
OutPortConnectorcreateConnector (const ConnectorProfile &cprof, coil::Properties &prop, InPortConsumer *consumer)
 OutPortPushConnector creation.
OutPortConnectorcreateConnector (const ConnectorProfile &cprof, coil::Properties &prop, OutPortProvider *provider)
 OutPortPullConnector creation.

Protected Attributes

coil::Properties m_properties
std::string m_name
std::vector
< OutPortConnector * > 
m_connectors
std::vector
< InPortConsumer * > 
m_consumers
coil::vstring m_providerTypes
coil::vstring m_consumerTypes
std::vector
< OutPortProvider * > 
m_providers


Detailed Description

Output base class.

The base class of OutPort<T> which are implementations of OutPort

Form a kind of Observer pattern with OutPortBase and PublisherBase. attach(), detach(), notify() of OutPortBase and push() of PublisherBase are methods associated with the Observer pattern.

Since:
0.2.0

Constructor & Destructor Documentation

RTC::OutPortBase::OutPortBase ( const char *  name,
const char *  data_type 
)

Constructor.

Constructor

Parameters:
name Port name

virtual RTC::OutPortBase::~OutPortBase ( void   )  [virtual]

Destructor.

Destructor Detach all subscribed Publishers.


Member Function Documentation

void RTC::OutPortBase::init ( coil::Properties &  prop  ) 

Initializing properties.

This operation initializes outport's properties

const char* RTC::OutPortBase::name (  )  const

Retrieve OutPort name.

Retrieve OutPort name

Returns:
the port name

coil::Properties& RTC::OutPortBase::properties (  ) 

Get properties.

Getting properties of this OutPort

Returns:
OutPort's properties

const std::vector<OutPortConnector*>& RTC::OutPortBase::connectors (  ) 

Connector list.

This operation returns connector list

Returns:
connector list

ConnectorBase::ProfileList RTC::OutPortBase::getConnectorProfiles (  ) 

ConnectorProfile list.

This operation returns ConnectorProfile list

Returns:
connector list

coil::vstring RTC::OutPortBase::getConnectorIds (  ) 

ConnectorId list.

This operation returns ConnectorId list

Returns:
connector list

coil::vstring RTC::OutPortBase::getConnectorNames (  ) 

Connector name list.

This operation returns Connector name list

Returns:
connector name list

bool RTC::OutPortBase::getConnectorProfileById ( const char *  id,
ConnectorBase::Profile prof 
)

Getting ConnectorProfile by name.

This operation returns ConnectorProfile specified by name

Parameters:
id Connector ID
prof ConnectorProfile
Returns:
false specified ID does not exist

bool RTC::OutPortBase::getConnectorProfileByName ( const char *  name,
ConnectorBase::Profile prof 
)

Getting ConnectorProfile by name.

This operation returns ConnectorProfile specified by name

Parameters:
id Connector ID
prof ConnectorProfile
Returns:
false specified name does not exist

bool RTC::OutPortBase::publishInterfaceProfiles ( SDOPackage::NVList &  properties  ) 

Publish interface profile.

This operation publish interface profiles of this OutPort to DataOutPort. This operation should be called from DataOutPort.

Parameters:
properties itnerface profile

virtual void RTC::OutPortBase::onConnect ( const char *  id,
PublisherBase publisher 
) [inline, virtual]

Publish interface information.

Publish interface information.

Parameters:
connector_profile The connector profile in which interface information is written
Subscribe interface

This operation subscribe provided interface in the ConnectorProfile.

Parameters:
connector_profile The ConnectorProfile that includes provided interface information
Returns:
Subscription result
Unsubscribe interface

This operation unsubscribe provided interface in the ConnectorProfile.

Parameters:
connector_profile The ConnectorProfile of unsubscribed connection
Returns:
Subscription result

Reimplemented in RTC::OutPort< DataType >.

virtual void RTC::OutPortBase::onDisconnect ( const char *  id  )  [inline, virtual]

Reimplemented in RTC::OutPort< DataType >.

virtual void RTC::OutPortBase::activateInterfaces (  )  [virtual]

Activate all Port interfaces.

This operation activate all interfaces that is registered in the ports.

Implements RTC::PortBase.

virtual void RTC::OutPortBase::deactivateInterfaces (  )  [virtual]

Deactivate all Port interfaces.

This operation deactivate all interfaces that is registered in the ports.

Implements RTC::PortBase.

void RTC::OutPortBase::configure (  )  [protected]

Configureing outport.

This operation configures the outport based on the properties.

virtual ReturnCode_t RTC::OutPortBase::publishInterfaces ( ConnectorProfile &  connector_profile  )  [protected, virtual]

Publish interface information.

This operation is pure virutal function that would be called at the beginning of the notify_connect() process sequence. In the notify_connect(), the following methods would be called in order.

This operation should create the new connection for the new connector_id, and should update the connection for the existing connection_id.

Parameters:
connector_profile The connection profile information
Returns:
The return code of ReturnCode_t type.

Implements RTC::PortBase.

virtual ReturnCode_t RTC::OutPortBase::subscribeInterfaces ( const ConnectorProfile &  connector_profile  )  [protected, virtual]

Subscribe to the interface.

This operation is pure virutal function that would be called at the middle of the notify_connect() process sequence. In the notify_connect(), the following methods would be called in order.

Parameters:
connector_profile The connection profile information
Returns:
The return code of ReturnCode_t type.

Implements RTC::PortBase.

virtual void RTC::OutPortBase::unsubscribeInterfaces ( const ConnectorProfile &  connector_profile  )  [protected, virtual]

Disconnect the interface connection.

This operation is pure virutal function that would be called at the end of the notify_disconnect() process sequence. In the notify_disconnect(), the following methods would be called.

Parameters:
connector_profile The profile information associated with the connection

Implements RTC::PortBase.

void RTC::OutPortBase::initProviders (  )  [protected]

OutPort provider initialization.

void RTC::OutPortBase::initConsumers (  )  [protected]

InPort consumer initialization.

OutPortProvider* RTC::OutPortBase::createProvider ( ConnectorProfile &  cprof,
coil::Properties &  prop 
) [protected]

OutPort provider creation.

InPortConsumer* RTC::OutPortBase::createConsumer ( const ConnectorProfile &  cprof,
coil::Properties &  prop 
) [protected]

InPort consumer creation.

OutPortConnector* RTC::OutPortBase::createConnector ( const ConnectorProfile &  cprof,
coil::Properties &  prop,
InPortConsumer consumer 
) [protected]

OutPortPushConnector creation.

OutPortConnector* RTC::OutPortBase::createConnector ( const ConnectorProfile &  cprof,
coil::Properties &  prop,
OutPortProvider provider 
) [protected]

OutPortPullConnector creation.


Member Data Documentation

DATAPORTSTATUS_ENUM typedef std::vector<OutPortConnector*> RTC::OutPortBase::ConnectorList

coil::Properties RTC::OutPortBase::m_properties [protected]

std::string RTC::OutPortBase::m_name [protected]

std::vector<OutPortConnector*> RTC::OutPortBase::m_connectors [protected]

std::vector<InPortConsumer*> RTC::OutPortBase::m_consumers [protected]

coil::vstring RTC::OutPortBase::m_providerTypes [protected]

coil::vstring RTC::OutPortBase::m_consumerTypes [protected]

std::vector<OutPortProvider*> RTC::OutPortBase::m_providers [protected]


Generated on Sun May 24 14:08:45 2009 for OpenRTM by  doxygen 1.5.3