|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
30 std::string inputCache;
31 std::string outputCache;
35 needInterrupt =
false;
36 inputCache = outputCache =
"";
40 std::cout <<
"Bye bye" << std::endl;
43 bool isOk()
const override {
49 while (needInterrupt) {
50 std::cout <<
"*** INTERRUPT: Please hit enter ***" << std::endl;
51 for (
int i=0; i<10 && needInterrupt; i++) {
86 inputCache = outputCache =
"";
87 std::cout <<
"Stream reset" << std::endl;
91 std::cout <<
"Packet begins" << std::endl;
97 std::cout <<
"Packet ends" << std::endl;
A stream which can be asked to perform bidirectional communication.
bool read(ImageOf< PixelRgb > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
void reset() override
Reset the stream.
virtual void write(char ch)
Write a single byte to the stream.
const yarp::os::Contact & getLocalAddress() const override
Get the address of the local side of the stream.
void beginPacket() override
Mark the beginning of a logical packet.
Simple specification of the minimum functions needed from output streams.
const yarp::os::Contact & getRemoteAddress() const override
Get the address of the remote side of the stream.
static void delaySystem(double seconds)
void endPacket() override
Mark the end of a logical packet (see beginPacket).
A simple abstraction for a block of bytes.
InputStream & getInputStream() override
Get an InputStream to read from.
bool isOk() const override
Check if the stream is ok or in an error state.
An interface to the operating system, including Port based communication.
void interrupt() override
Interrupt the stream.
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
void close() override
Terminate the stream.
OutputStream & getOutputStream() override
Get an OutputStream to write to.