Public Member Functions | Static Public Attributes | Private Attributes | List of all members
OutPortPushConnector::PublisherNewMock Class Reference
Inheritance diagram for OutPortPushConnector::PublisherNewMock:
Inheritance graph
[legend]

Public Member Functions

RTC::PublisherBase::ReturnCode activate ()
 activation More...
 
RTC::PublisherBase::ReturnCode deactivate ()
 deactivation More...
 
RTC::PublisherBase::ReturnCode init (coil::Properties &prop)
 Initializing configuration. More...
 
bool isActive ()
 If publisher is active state. More...
 
 PublisherNewMock ()
 
PublisherBase::ReturnCode setBuffer (RTC::CdrBufferBase *buffer)
 Setting buffer pointer. More...
 
RTC::PublisherBase::ReturnCode setConsumer (RTC::InPortConsumer *consumer)
 Store InPort consumer. More...
 
RTC::PublisherBase::ReturnCode setListener (RTC::ConnectorInfo &info, RTC::ConnectorListeners *listeners)
 Set the listener. More...
 
void setLogger (Logger *logger)
 
RTC::PublisherBase::ReturnCode write (const cdrMemoryStream &data, unsigned long sec, unsigned long usec)
 Write data. More...
 
 ~PublisherNewMock ()
 
- Public Member Functions inherited from RTC::PublisherBase
virtual void release ()
 Release the Publisher. More...
 
virtual DATAPORTSTATUS_ENUM ~PublisherBase (void)
 Destructor. More...
 

Static Public Attributes

static Logger logger
 

Private Attributes

Loggerm_logger
 

Additional Inherited Members

- Public Types inherited from RTC::DataPortStatus
enum  Enum {
  PORT_OK = 0, PORT_ERROR, BUFFER_ERROR, BUFFER_FULL,
  BUFFER_EMPTY, BUFFER_TIMEOUT, SEND_FULL, SEND_TIMEOUT,
  RECV_EMPTY, RECV_TIMEOUT, INVALID_ARGS, PRECONDITION_NOT_MET,
  CONNECTION_LOST, UNKNOWN_ERROR
}
 DataPortStatus return codes. More...
 
- Static Public Member Functions inherited from RTC::DataPortStatus
static const char * toString (DataPortStatus::Enum status)
 Convert DataPortStatus into the string. More...
 

Detailed Description

Definition at line 381 of file OutPortPushConnectorTests.cpp.

Constructor & Destructor Documentation

OutPortPushConnector::PublisherNewMock::PublisherNewMock ( )
inline

Definition at line 385 of file OutPortPushConnectorTests.cpp.

OutPortPushConnector::PublisherNewMock::~PublisherNewMock ( )
inline

Definition at line 389 of file OutPortPushConnectorTests.cpp.

Member Function Documentation

RTC::PublisherBase::ReturnCode OutPortPushConnector::PublisherNewMock::activate ( )
inlinevirtual

activation

This function activates the publisher. By calling this function, this publisher starts the thread that pushes data to InPort. If precondition such as initialization process and so on is not met, the error code PRECONDITION_NOT_MET is returned.

Returns
PORT_OK normal return PRECONDITION_NOT_MET precondition is not met

Implements RTC::PublisherBase.

Definition at line 430 of file OutPortPushConnectorTests.cpp.

RTC::PublisherBase::ReturnCode OutPortPushConnector::PublisherNewMock::deactivate ( )
inlinevirtual

deactivation

This function deactivates the publisher. By calling this function, this publisher stops the thread that pushes data to InPort. If precondition such as initialization process and so on is not met, the error code PRECONDITION_NOT_MET is returned.

Returns
PORT_OK normal return PRECONDITION_NOT_MET precondition is not met

Implements RTC::PublisherBase.

Definition at line 444 of file OutPortPushConnectorTests.cpp.

RTC::PublisherBase::ReturnCode OutPortPushConnector::PublisherNewMock::init ( coil::Properties prop)
inlinevirtual

Initializing configuration.

This operation would be called to configure in initialization. In the concrete class, configuration should be performed getting appropriate information from the given Properties data. This function might be called right after instantiation and connection sequence respectivly. Therefore, this function should be implemented assuming multiple call.

Parameters
propConfiguration information

Implements RTC::PublisherBase.

Definition at line 458 of file OutPortPushConnectorTests.cpp.

bool OutPortPushConnector::PublisherNewMock::isActive ( )
inlinevirtual

If publisher is active state.

A Publisher can be activated/deactivated synchronized with the data port. The active state and the non-active state are made transition by the "activate()" and the "deactivate()" functions respectively. This function confirms if the publisher is in active state.

Returns
Result of state confirmation (Active state:true, Inactive state:false)

Implements RTC::PublisherBase.

Definition at line 421 of file OutPortPushConnectorTests.cpp.

PublisherBase::ReturnCode OutPortPushConnector::PublisherNewMock::setBuffer ( RTC::CdrBufferBase buffer)
inlinevirtual

Setting buffer pointer.

This operation sets a buffer that is associated with this object. If the buffer object is NULL, INVALID_ARGS will be returned.

Parameters
bufferA pointer to a CDR buffer object.
Returns
ReturnCode PORT_OK normal return INVALID_ARGS given argument has invalid value

Implements RTC::PublisherBase.

Definition at line 481 of file OutPortPushConnectorTests.cpp.

RTC::PublisherBase::ReturnCode OutPortPushConnector::PublisherNewMock::setConsumer ( RTC::InPortConsumer consumer)
inlinevirtual

Store InPort consumer.

This operation sets a consumer that is associated with this object. If the consumer object is NULL, INVALID_ARGS will be returned.

Parameters
consumerA pointer to a consumer object.
Returns
ReturnCode PORT_OK normal return INVALID_ARGS given argument has invalid value

Implements RTC::PublisherBase.

Definition at line 467 of file OutPortPushConnectorTests.cpp.

RTC::PublisherBase::ReturnCode OutPortPushConnector::PublisherNewMock::setListener ( RTC::ConnectorInfo info,
RTC::ConnectorListeners listeners 
)
inlinevirtual

Set the listener.

This function sets ConnectorListeners listener object to the Publisher. By setting ConnectorListeners containing various listeners objects, these listeners are called at the time of reading and writing of a buffer, and transmission of data etc. Since the ownership of the ConnectorListeners object is owned by Port or RTObject, the Publisher never deletes the ConnectorListeners object. If the given ConnectorListeners' pointer is NULL, this function returns INVALID_ARGS.

Parameters
infoConnectorInfo that is localized object of ConnectorProfile
listenersConnectorListeners that holds various listeners
Returns
PORT_OK Normal return INVALID_ARGS Invalid arguments

Implements RTC::PublisherBase.

Definition at line 511 of file OutPortPushConnectorTests.cpp.

void OutPortPushConnector::PublisherNewMock::setLogger ( Logger logger)
inline

Definition at line 542 of file OutPortPushConnectorTests.cpp.

RTC::PublisherBase::ReturnCode OutPortPushConnector::PublisherNewMock::write ( const cdrMemoryStream &  data,
unsigned long  sec,
unsigned long  usec 
)
inlinevirtual

Write data.

This function writes data into the Publisher. If this function is called without initializing correctly such as a consumer, listeners, etc., error code PRECONDITION_NOT_MET will be returned and no operation of the writing etc. will be performed.

When publisher writes data, if the consumer returns full-status, returns error, is returned with timeout, error codes BUFFER_FULL, BUFFER_ERROR and BUFFER_TIMEOUT will be returned respectively.

In other cases, PROT_ERROR will be returned.

Parameters
dataData to be wrote to the buffer
secTimeout time in unit seconds
nsecTimeout time in unit nano-seconds
Returns
PORT_OK Normal return PRECONDITION_NO_MET Precondition does not met. A consumer, a buffer, listenes are not set properly. SEND_FULL Data was sent but full-status returned SEND_TIMEOUT Data was sent but timeout occurred CONNECTION_LOST detected that the connection has been lost

Implements RTC::PublisherBase.

Definition at line 396 of file OutPortPushConnectorTests.cpp.

Member Data Documentation

Logger OutPortPushConnector::PublisherNewMock::logger
static

Definition at line 546 of file OutPortPushConnectorTests.cpp.

Logger* OutPortPushConnector::PublisherNewMock::m_logger
private

Definition at line 548 of file OutPortPushConnectorTests.cpp.


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


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Jun 6 2019 19:26:03