Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
PortBase::PortBaseMock Class Reference
Inheritance diagram for PortBase::PortBaseMock:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void erase_m_profile (void)
const std::vector< timeval > & getNotifyConnectTimes () const
const std::vector< timeval > & getNotifyDisconnectTimes () const
const std::vector< timeval > & getPublishIfsTimes () const
const std::vector< timeval > & getSubscribeIfsTimes () const
const std::vector< timeval > & getUnsubscribeIfsTimes () const
const std::string getUUID () const
 Generate the UUID.
virtual RTC::ReturnCode_t notify_connect (RTC::ConnectorProfile &connector_profile) throw (CORBA::SystemException)
virtual RTC::ReturnCode_t notify_disconnect (const char *connector_id) throw (CORBA::SystemException)
 [CORBA interface] Notify the Ports disconnection
 PortBaseMock (const RTC::PortProfile &profile)

Protected Member Functions

virtual void activateInterfaces ()
 Activate all Port interfaces.
virtual void deactivateInterfaces ()
 Deactivate all Port interfaces.
virtual RTC::ReturnCode_t publishInterfaces (RTC::ConnectorProfile &connector_profile)
virtual RTC::ReturnCode_t subscribeInterfaces (const RTC::ConnectorProfile &connector_profile)
virtual void unsubscribeInterfaces (const RTC::ConnectorProfile &connector_profile)

Private Member Functions

timeval getNow () const

Private Attributes

std::vector< timeval > _notifyConnectTimes
std::vector< timeval > _notifyDisconnectTimes
std::vector< timeval > _publishIfsTimes
std::vector< timeval > _subscribeIfsTimes
std::vector< timeval > _unsubscribeIfsTimes

Detailed Description

Definition at line 92 of file PortBaseTests.cpp.


Constructor & Destructor Documentation

PortBase::PortBaseMock::PortBaseMock ( const RTC::PortProfile &  profile) [inline]

Definition at line 96 of file PortBaseTests.cpp.


Member Function Documentation

virtual void PortBase::PortBaseMock::activateInterfaces ( ) [inline, protected, virtual]

Activate all Port interfaces.

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

Implements RTC::PortBase.

Definition at line 145 of file PortBaseTests.cpp.

virtual void PortBase::PortBaseMock::deactivateInterfaces ( ) [inline, protected, virtual]

Deactivate all Port interfaces.

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

Implements RTC::PortBase.

Definition at line 148 of file PortBaseTests.cpp.

void PortBase::PortBaseMock::erase_m_profile ( void  ) [inline]

Definition at line 122 of file PortBaseTests.cpp.

const std::vector<timeval>& PortBase::PortBaseMock::getNotifyConnectTimes ( ) const [inline]

Definition at line 171 of file PortBaseTests.cpp.

const std::vector<timeval>& PortBase::PortBaseMock::getNotifyDisconnectTimes ( ) const [inline]

Definition at line 176 of file PortBaseTests.cpp.

timeval PortBase::PortBaseMock::getNow ( ) const [inline, private]

Definition at line 162 of file PortBaseTests.cpp.

const std::vector<timeval>& PortBase::PortBaseMock::getPublishIfsTimes ( ) const [inline]

Definition at line 181 of file PortBaseTests.cpp.

const std::vector<timeval>& PortBase::PortBaseMock::getSubscribeIfsTimes ( ) const [inline]

Definition at line 186 of file PortBaseTests.cpp.

const std::vector<timeval>& PortBase::PortBaseMock::getUnsubscribeIfsTimes ( ) const [inline]

Definition at line 191 of file PortBaseTests.cpp.

const std::string PortBase::PortBaseMock::getUUID ( ) const [inline]

Generate the UUID.

This operation generates UUID.

Returns:
uuid

Reimplemented from RTC::PortBase.

Definition at line 104 of file PortBaseTests.cpp.

virtual RTC::ReturnCode_t PortBase::PortBaseMock::notify_connect ( RTC::ConnectorProfile &  connector_profile) throw (CORBA::SystemException) [inline, virtual]

Definition at line 109 of file PortBaseTests.cpp.

virtual RTC::ReturnCode_t PortBase::PortBaseMock::notify_disconnect ( const char *  connector_id) throw (CORBA::SystemException) [inline, virtual]

[CORBA interface] Notify the Ports disconnection

This operation is invoked between Ports internally when the connection is destroied. Generally it is not premised on calling from application programs or RTC objects except Port object.

According to the template method pattern, the notify_disconnect() calls unsubsctiveInterfaces() function, which are premised on implementing in the subclasses. The processing sequence is as follows.

  • Searching ConnectorProfile
  • Calling notify_disconnect() for the next port
  • Unsubscribing interfaces
  • Deleting ConnectorProfile

notify_disconnect() notifies disconnection to all the ports by cascaded call to the stored ports in the ConnectorProfile::ports in order.

Precondition:
The port shall store the ConnectorProfile having same id with connector_id.
Postcondition:
If ConnectorProfile of same ID with connector_id does not exist, it returns BAD_PARAMETER error.
For the cascaded call, this operation calls noify_disconnect() for the port that is stored in the next of this port in the ConnectorProfile::ports. If the operation call raises exception for some failure, it tries to call notify_disconnect() and skips until the operation succeeded. If none of operation call succeeded, it returns RTC_ERROR.
At the end of notify_disconnect() operation for the first port stored in the ConnectorProfile::ports sequence, the related ports' notify_disconnect() invocations complete.
Parameters:
connector_idThe ID of the ConnectorProfile.
Returns:
ReturnCode_t The return code of ReturnCode_t type.

Reimplemented from RTC::PortBase.

Definition at line 116 of file PortBaseTests.cpp.

virtual RTC::ReturnCode_t PortBase::PortBaseMock::publishInterfaces ( RTC::ConnectorProfile &  connector_profile) [inline, protected, virtual]

Definition at line 129 of file PortBaseTests.cpp.

virtual RTC::ReturnCode_t PortBase::PortBaseMock::subscribeInterfaces ( const RTC::ConnectorProfile &  connector_profile) [inline, protected, virtual]

Definition at line 135 of file PortBaseTests.cpp.

virtual void PortBase::PortBaseMock::unsubscribeInterfaces ( const RTC::ConnectorProfile &  connector_profile) [inline, protected, virtual]

Definition at line 141 of file PortBaseTests.cpp.


Member Data Documentation

std::vector<timeval> PortBase::PortBaseMock::_notifyConnectTimes [private]

Definition at line 154 of file PortBaseTests.cpp.

std::vector<timeval> PortBase::PortBaseMock::_notifyDisconnectTimes [private]

Definition at line 155 of file PortBaseTests.cpp.

std::vector<timeval> PortBase::PortBaseMock::_publishIfsTimes [private]

Definition at line 156 of file PortBaseTests.cpp.

std::vector<timeval> PortBase::PortBaseMock::_subscribeIfsTimes [private]

Definition at line 157 of file PortBaseTests.cpp.

std::vector<timeval> PortBase::PortBaseMock::_unsubscribeIfsTimes [private]

Definition at line 158 of file PortBaseTests.cpp.


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


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Aug 27 2015 14:16:41