17 #include <semaphore.h>
34 enum class Type { mutex, producerConsumer };
46 SharedMem(
const Object *parent, std::string name,
size_t size, Type type=Type::mutex);
60 void Write(
const char *buf,
size_t size);
68 bool Read(
char *buf,
size_t size,
Time nsTimeout=TIME_INFINITE)
const;
76 SharedMem_impl *pimpl_;
Base class for all Framework's classes.
Definition: Object.h:83
namespace of the flair Framework
Definition: Ahrs.h:19
void ReaderReady()
This function should be called when reader is ready (in case of a SharedMem of type producerConsumer)...
SharedMem(const Object *parent, std::string name, size_t size, Type type=Type::mutex)
Constructor.
unsigned long long Time
Time definition, in ns.
Definition: Object.h:55
bool Read(char *buf, size_t size, Time nsTimeout=TIME_INFINITE) const
Read.
Class defining a shared memory.
Definition: SharedMem.h:32
Base class for all Framework's classes.
void Write(const char *buf, size_t size)
Write.