Go to the documentation of this file.
25 std::cout <<
"[thread_reader ID:" << std::this_thread::get_id()
26 <<
"] Started." << std::endl;
35 cout <<
"RX: " << buf << endl;
41 auto obj = arch.ReadObject();
45 cout <<
"RX pose: " << *ptrPose << endl;
48 printf(
"[thread_reader] Finished.\n");
50 catch (std::exception& e)
52 cerr << e.what() << endl;
60 std::cout <<
"[thread_writer ID:" << std::this_thread::get_id()
61 <<
"] Started." << std::endl;
64 const char* str =
"Hello world!";
65 size_t len = strlen(str);
74 arch.WriteObject(&pose);
76 printf(
"[thread_writer] Finished.\n");
78 catch (std::exception& e)
80 cerr << e.what() << endl;
90 std::unique_ptr<CPipeReadEndPoint> read_pipe;
91 std::unique_ptr<CPipeWriteEndPoint> write_pipe;
93 CPipe::createPipe(read_pipe, write_pipe);
115 catch (std::exception& e)
117 std::cout <<
"MRPT exception caught: " << e.what() << std::endl;
122 printf(
"Untyped exception!!");
void thread_reader(CPipeReadEndPoint &read_pipe)
The read end-point in a pipe created with mrpt::synch::CPipe.
GLsizei GLsizei GLuint * obj
std::shared_ptr< CPose3D > Ptr
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
#define IS_CLASS(ptrObj, class_name)
Evaluates to true if the given pointer to an object (derived from mrpt::rtti::CObject) is of the give...
The write end-point in a pipe created with mrpt::synch::CPipe.
CArchiveStreamBase< STREAM > archiveFrom(STREAM &s)
Helper function to create a templatized wrapper CArchive object for a: MRPT's CStream,...
virtual size_t Read(void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for reading from the stream.
void thread_writer(CPipeWriteEndPoint &write_pipe)
virtual size_t Write(const void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for writing to the stream.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |