Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
Loading...
Searching...
No Matches
DataFifo.h
1#pragma once
2#include <mqueue.h>
3#include <string>
8class DataFifo
9{
10public:
11 DataFifo();
12 ~DataFifo();
27 int setup(const std::string& name, size_t msgSize, size_t maxMsg, bool blocking, bool recreate = true);
28
37 int send(const char* buf, size_t size);
38
47 int receive(char* buf, double timeoutMs = 0);
48
54 int cleanup();
55 static bool test();
56
57private:
58 mqd_t queue;
59 size_t msgSize;
60 std::string qName;
61};
int setup(const std::string &name, size_t msgSize, size_t maxMsg, bool blocking, bool recreate=true)
int receive(char *buf, double timeoutMs=0)
int send(const char *buf, size_t size)
int cleanup()