#include <OutPortBase.h>
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. | |
OutPortProvider * | createProvider (ConnectorProfile &cprof, coil::Properties &prop) |
OutPort provider creation. | |
InPortConsumer * | createConsumer (const ConnectorProfile &cprof, coil::Properties &prop) |
InPort consumer creation. | |
OutPortConnector * | createConnector (const ConnectorProfile &cprof, coil::Properties &prop, InPortConsumer *consumer) |
OutPortPushConnector creation. | |
OutPortConnector * | createConnector (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 |
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.
RTC::OutPortBase::OutPortBase | ( | const char * | name, | |
const char * | data_type | |||
) |
Constructor.
Constructor
name | Port name |
virtual RTC::OutPortBase::~OutPortBase | ( | void | ) | [virtual] |
Destructor.
Destructor Detach all subscribed Publishers.
void RTC::OutPortBase::init | ( | coil::Properties & | prop | ) |
Initializing properties.
This operation initializes outport's properties
const char* RTC::OutPortBase::name | ( | ) | const |
coil::Properties& RTC::OutPortBase::properties | ( | ) |
const std::vector<OutPortConnector*>& RTC::OutPortBase::connectors | ( | ) |
Connector list.
This operation returns connector list
ConnectorBase::ProfileList RTC::OutPortBase::getConnectorProfiles | ( | ) |
ConnectorProfile list.
This operation returns ConnectorProfile list
coil::vstring RTC::OutPortBase::getConnectorIds | ( | ) |
ConnectorId list.
This operation returns ConnectorId list
coil::vstring RTC::OutPortBase::getConnectorNames | ( | ) |
Connector name list.
This operation 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
id | Connector ID | |
prof | ConnectorProfile |
bool RTC::OutPortBase::getConnectorProfileByName | ( | const char * | name, | |
ConnectorBase::Profile & | prof | |||
) |
Getting ConnectorProfile by name.
This operation returns ConnectorProfile specified by name
id | Connector ID | |
prof | ConnectorProfile |
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.
properties | itnerface profile |
virtual void RTC::OutPortBase::onConnect | ( | const char * | id, | |
PublisherBase * | publisher | |||
) | [inline, virtual] |
Publish interface information.
Publish interface information.
connector_profile | The connector profile in which interface information is written |
This operation subscribe provided interface in the ConnectorProfile.
connector_profile | The ConnectorProfile that includes provided interface information |
This operation unsubscribe provided interface in the ConnectorProfile.
connector_profile | The ConnectorProfile of unsubscribed connection |
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.
connector_profile | The connection profile information |
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.
connector_profile | The connection profile information |
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.
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.
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] |