Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
Loading...
Searching...
No Matches
Pipe Class Reference

#include <Pipe.h>

Public Member Functions

 Pipe (const std::string &pipeName, size_t size=65536 *128, bool newBlockingRt=false, bool newBlockingNonRt=false)
 Pipe (Pipe &&)=delete
bool setup (const std::string &pipeName=defaultName, size_t size=65536 *128, bool newBlockingRt=false, bool newBlockingNonRt=false)
void cleanup ()
void setBlockingRt (bool blocking)
void setBlockingNonRt (bool blocking)
void setTimeoutMsRt (double timeoutMs)
void setTimeoutMsNonRt (double timeoutMs)
template<typename T>
bool writeNonRt (const T &data)
template<typename T>
bool writeNonRt (T *ptr, size_t count)
template<typename T>
bool writeRt (const T &data)
template<typename T>
bool writeRt (T *ptr, size_t count)
template<typename T>
ssize_t readNonRt (T &dest)
template<typename T>
ssize_t readNonRt (T *dest, size_t count)
template<typename T>
ssize_t readRt (T &dest)
template<typename T>
ssize_t readRt (T *dest, size_t count)

Detailed Description

Member Function Documentation

◆ setup()

bool Pipe::setup ( const std::string & pipeName = defaultName,
size_t size = 65536 * 128,
bool newBlockingRt = false,
bool newBlockingNonRt = false )

Initialise the Pipe.

Parameters
thename of the Pipe. Pipes with the same name share data.
thesize of the Pipe. This is the amount of data that can be stored in the pipe. If the pipe is full, writes will fail.
whetherreads at the RT side should be blocking (can be modified later)
whetherreads at the non-RT side should be blocking (can be modified later)
Returns
true on success, false otherwise
Examples
Communication/Serial/render.cpp.

◆ setBlockingRt()

void Pipe::setBlockingRt ( bool blocking)

Set whether reads at the RT side should be blocking

◆ setBlockingNonRt()

void Pipe::setBlockingNonRt ( bool blocking)

Set whether reads at the non-RT side should be blocking

◆ setTimeoutMsRt()

void Pipe::setTimeoutMsRt ( double timeoutMs)

Set timeout for blocking reads at the RT side.

◆ setTimeoutMsNonRt()

void Pipe::setTimeoutMsNonRt ( double timeoutMs)

Set timeout for blocking reads at the non-RT side.

◆ writeNonRt() [1/2]

template<typename T>
bool Pipe::writeNonRt ( const T & data)

Send data from the non-RT side.

◆ writeNonRt() [2/2]

template<typename T>
bool Pipe::writeNonRt ( T * ptr,
size_t count )

Send data from the non-RT side.

◆ writeRt() [1/2]

template<typename T>
bool Pipe::writeRt ( const T & data)

Send data from the RT side.

◆ writeRt() [2/2]

template<typename T>
bool Pipe::writeRt ( T * ptr,
size_t count )

Send data from the RT side.

◆ readNonRt() [1/2]

template<typename T>
ssize_t Pipe::readNonRt ( T & dest)

Read data from the non-RT side.

◆ readNonRt() [2/2]

template<typename T>
ssize_t Pipe::readNonRt ( T * dest,
size_t count )

Read data from the non-RT side.

◆ readRt() [1/2]

template<typename T>
ssize_t Pipe::readRt ( T & dest)

Read data from the RT side.

◆ readRt() [2/2]

template<typename T>
ssize_t Pipe::readRt ( T * dest,
size_t count )

Read data from the RT side.


The documentation for this class was generated from the following files: