Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
DataFifo.h
1 #pragma once
2 #include <mqueue.h>
3 #include <string>
8 class DataFifo
9 {
10 public:
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 
57 private:
58  mqd_t queue;
59  size_t msgSize;
60  std::string qName;
61 };
int cleanup()
Definition: DataFifo.h:8
int receive(char *buf, double timeoutMs=0)
int setup(const std::string &name, size_t msgSize, size_t maxMsg, bool blocking, bool recreate=true)
int send(const char *buf, size_t size)