 |
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
10 #ifndef YARP_OS_TYPEDREADER_H
11 #define YARP_OS_TYPEDREADER_H
50 virtual T*
read(
bool shouldWait =
true) = 0;
149 #endif // YARP_OS_TYPEDREADER_H
virtual void setReplier(PortReader &reader)=0
If a message is received that requires a reply, use this handler.
A base class for sources of typed data.
virtual void release(void *handle)=0
Return control to YARP of an object previously taken control of with the acquire() method.
virtual T * read(bool shouldWait=true)=0
Read an available object from the port.
virtual void disableCallback()=0
Remove a callback set up with useCallback()
A callback for typed data from a port.
virtual void setTargetPeriod(double period)=0
Try to provide data periodically.
virtual std::string getName() const =0
Get name of port being read from.
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
virtual ~TypedReader()=default
Destructor.
virtual void * acquire()=0
Take control of the last object read.
virtual T * lastRead()=0
Get the last data returned by read()
The main, catch-all namespace for YARP.
virtual void useCallback(TypedReaderCallback< T > &callback)=0
Set an object whose onRead method will be called when data is available.
virtual int getPendingReads()=0
Check how many messages are waiting to be read.
virtual bool isClosed()=0
Returns whether the port associated with this reader has been closed.
virtual void interrupt()=0
Abort any read operation currently in progress.
virtual void setStrict(bool strict=true)=0
Call this to strictly keep all messages, or allow old ones to be quietly dropped.