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
Public Member Functions | Static Public Member Functions | List of all members
Mmap Class Reference

Public Member Functions

void * map (off_t offset, size_t size)
 
void unmap ()
 

Static Public Member Functions

template<typename T >
static int read (off_t offset, T &value)
 
template<typename T >
static int write (off_t offset, const T &value)
 

Member Function Documentation

void* Mmap::map ( off_t  offset,
size_t  size 
)

Map a portion of memory.

Parameters
offsetthe memory offset to start the mapping at. There are no alignment requirements.
sizehow many bytes to map.
Returns
a pointer to the requested memory, or nullptr on failure.
void Mmap::unmap ( )

Discard the existing mapping. This is called automatically by the destructor or when calling map().

template<typename T >
static int Mmap::read ( off_t  offset,
T &  value 
)
inlinestatic

Read the content of the memory at offset into value.

template<typename T >
static int Mmap::write ( off_t  offset,
const T &  value 
)
inlinestatic

Write the content of value into the memory at offser.


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