YARP
Yet Another Robot Platform
yarp::os::impl::PortCoreInputUnit Class Reference

Manager for a single input to a port. More...

#include <yarp/os/impl/PortCoreInputUnit.h>

+ Inheritance diagram for yarp::os::impl::PortCoreInputUnit:

Public Member Functions

 PortCoreInputUnit (PortCore &owner, int index, InputProtocol *ip, bool reversed)
 Constructor. More...
 
virtual ~PortCoreInputUnit ()
 Destructor. More...
 
bool start () override
 Start a thread running to serve this input. More...
 
void run () override
 The body of the thread associated with this input. More...
 
bool isInput () override
 
void close () override
 
bool isFinished () override
 
const std::string & getName ()
 
Route getRoute () override
 
bool interrupt () override
 Interrupt the connection. More...
 
void setCarrierParams (const yarp::os::Property &params) override
 Set arbitrary parameters for this connection. More...
 
void getCarrierParams (yarp::os::Property &params) override
 
InputProtocolgetInPutProtocol ()
 
bool isBusy () override
 
- Public Member Functions inherited from yarp::os::impl::PortCoreUnit
 PortCoreUnit (PortCore &owner, int index)
 Constructor. More...
 
virtual ~PortCoreUnit ()
 Destructor. More...
 
virtual bool isOutput ()
 
bool isDoomed ()
 
void setDoomed ()
 Request that this connection be shut down as soon as possible. More...
 
virtual void * send (const yarp::os::PortWriter &writer, yarp::os::PortReader *reader, const yarp::os::PortWriter *callback, void *tracker, const std::string &envelope, bool waitAfter=true, bool waitBefore=true, bool *gotReply=nullptr)
 Send a message on the connection. More...
 
virtual void * takeTracker ()
 Reacquire a tracker previously passed via send(). More...
 
void setMode ()
 Check the carrier used for the connection, and see if it has a "log" modifier. More...
 
int getIndex ()
 
std::string getMode (bool *hasMode=nullptr)
 Read the "mode" of the connection - basically, whether it is used for logging or not. More...
 
bool isPupped () const
 
std::string getPupString () const
 
void setPupped (const std::string &pupString)
 Tag this connection as having been created by a publisherUpdate message to the port's administrative interface, and record the name of the target it services exactly as described in that message. More...
 
- Public Member Functions inherited from yarp::os::impl::ThreadImpl
virtual ~ThreadImpl ()
 
int join (double seconds=-1)
 
void askToClose ()
 
bool isClosing ()
 
bool isRunning ()
 
virtual void beforeStart ()
 
virtual void afterStart (bool success)
 
virtual bool threadInit ()
 
virtual void threadRelease ()
 
long int getKey ()
 
void notify (bool s)
 
void notifyOpened (bool s)
 
void synchroWait ()
 
void synchroPost ()
 
int setPriority (int priority=-1, int policy=-1)
 
int getPriority ()
 
int getPolicy ()
 
long getTid ()
 

Additional Inherited Members

- Static Public Member Functions inherited from yarp::os::impl::ThreadImpl
static int getCount ()
 
static long int getKeyOfCaller ()
 
static void yield ()
 
- Public Attributes inherited from yarp::os::impl::ThreadImpl
long tid {-1}
 
std::thread::id id
 
- Protected Member Functions inherited from yarp::os::impl::PortCoreUnit
PortCoregetOwner ()
 

Detailed Description

Manager for a single input to a port.

Associated with a PortCore object.

Definition at line 26 of file PortCoreInputUnit.h.

Constructor & Destructor Documentation

◆ PortCoreInputUnit()

PortCoreInputUnit::PortCoreInputUnit ( PortCore owner,
int  index,
InputProtocol ip,
bool  reversed 
)

Constructor.

Parameters
ownerthe port we call home
indexan id for this connection
ipthe protocol object used to read/write to connection
reversedtrue if this input connection was originally an output which was then reversed

Definition at line 32 of file PortCoreInputUnit.cpp.

◆ ~PortCoreInputUnit()

PortCoreInputUnit::~PortCoreInputUnit ( )
virtual

Destructor.

Definition at line 55 of file PortCoreInputUnit.cpp.

Member Function Documentation

◆ close()

void PortCoreInputUnit::close ( )
overridevirtual

Reimplemented from yarp::os::impl::ThreadImpl.

Definition at line 446 of file PortCoreInputUnit.cpp.

◆ getCarrierParams()

void PortCoreInputUnit::getCarrierParams ( yarp::os::Property params)
overridevirtual
Parameters
[out]

Reimplemented from yarp::os::impl::PortCoreUnit.

Definition at line 482 of file PortCoreInputUnit.cpp.

◆ getInPutProtocol()

InputProtocol * PortCoreInputUnit::getInPutProtocol ( )

Definition at line 490 of file PortCoreInputUnit.cpp.

◆ getName()

const std::string & PortCoreInputUnit::getName ( )

Definition at line 456 of file PortCoreInputUnit.cpp.

◆ getRoute()

Route PortCoreInputUnit::getRoute ( )
overridevirtual
Returns
the route (sender, receiver, carrier) associated with this connection

Reimplemented from yarp::os::impl::PortCoreUnit.

Definition at line 520 of file PortCoreInputUnit.cpp.

◆ interrupt()

bool PortCoreInputUnit::interrupt ( )
overridevirtual

Interrupt the connection.

Returns
true on success.

Reimplemented from yarp::os::impl::PortCoreUnit.

Definition at line 461 of file PortCoreInputUnit.cpp.

◆ isBusy()

bool PortCoreInputUnit::isBusy ( )
overridevirtual
Returns
true if the connection is currently in use.

Reimplemented from yarp::os::impl::PortCoreUnit.

Definition at line 542 of file PortCoreInputUnit.cpp.

◆ isFinished()

bool PortCoreInputUnit::isFinished ( )
overridevirtual
Returns
true if no further communication will occur using this connection

Reimplemented from yarp::os::impl::PortCoreUnit.

Definition at line 451 of file PortCoreInputUnit.cpp.

◆ isInput()

bool PortCoreInputUnit::isInput ( )
overridevirtual
Returns
true if this is an input connection

Reimplemented from yarp::os::impl::PortCoreUnit.

Definition at line 441 of file PortCoreInputUnit.cpp.

◆ run()

void PortCoreInputUnit::run ( )
overridevirtual

The body of the thread associated with this input.

Accepts and processes administrative input, and makes sure regular data gets to the user

Reimplemented from yarp::os::impl::ThreadImpl.

Definition at line 85 of file PortCoreInputUnit.cpp.

◆ setCarrierParams()

void PortCoreInputUnit::setCarrierParams ( const yarp::os::Property params)
overridevirtual

Set arbitrary parameters for this connection.

Parameters
paramsthe parameters to set

Reimplemented from yarp::os::impl::PortCoreUnit.

Definition at line 475 of file PortCoreInputUnit.cpp.

◆ start()

bool PortCoreInputUnit::start ( )
overridevirtual

Start a thread running to serve this input.

Reimplemented from yarp::os::impl::ThreadImpl.

Definition at line 65 of file PortCoreInputUnit.cpp.


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