dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
Loading...
Searching...
No Matches
dxd::buffer< scope_t, limit_t, alignment_t, contigous_t > Class Template Reference

DriverKit memory buffer w/o alignment and boundary requirements. More...

#include <dxd_memory.h>

Inheritance diagram for dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >:
Collaboration diagram for dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >:

Public Types

enum  direction : uint64_t { in = ::kIOMemoryDirectionIn , out = ::kIOMemoryDirectionOut , both = ::kIOMemoryDirectionIn| ::kIOMemoryDirectionOut }
 direction of memory operation More...
enum  direction
 direction of memory operation More...

Public Member Functions

 buffer ()=default
 DriverKit default buffer constructor.
 buffer ()=default
 WDK buffer default constructor.
 buffer (size_t size, unsigned int limit=limit_t, unsigned int alignment=alignment_t, bool contigous=contigous_t)
 DriverKit buffer constructor.
 buffer (size_t size, unsigned int limit=limit_t, unsigned int alignment=alignment_t, bool contigous=contigous_t)
 WDK buffer constructor.
void free ()
os_result initialize (size_t size, unsigned int limit=limit_t, unsigned int alignment=alignment_t, bool contigous=contigous_t)
os_result initialize (size_t size, unsigned int=limit_t, unsigned int alignment=alignment_t, bool=contigous_t)
 DriverKit buffer initializer.
os_result initialize (::IOMemoryDescriptor *io_memory_descriptor)
 DriverKit memory initializer.
os_result initialize (::IOMemoryDescriptor *io_memory_descriptor, size_t offset, size_t size, direction direction)
 DriverKit memory initializer.
os_result initialize (const ::MDL *mdl)
os_result initialize (const ::MDL *mdl, size_t offset, size_t size)
os_result initialize (const void *data, size_t size)
os_result initialize (const void *data, size_t size)
 operator const ::IOMemoryDescriptor * () const
 DriverKit IOMemoryDescriptor* implicit cast.
 operator const ::IOMemoryDescriptor * () const
 DriverKit IOMemoryDescriptor* implicit cast.
 operator void * () const
 the allocation's kernel address
 operator::IOMemoryDescriptor * ()
 operator::IOMemoryDescriptor * ()
 operator::MDL * () const
 operator::MDL * () const
::IOMemoryDescriptor * retain ()
::IOMemoryDescriptor * retain ()
uint64_t size () const
 DriverKit memory size.
uint64_t size () const
 DriverKit memory size.
virtual ~buffer ()
 WDK buffer memory destructor.

Public Attributes

os_result status = not_initialized
 DriverKit memory status.
os_result status
 DriverKit memory status.

Detailed Description

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
class dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >

DriverKit memory buffer w/o alignment and boundary requirements.

generic WDK buffer class

The dxd::buffer is a DriverKit memory representation with an associated memory backing store allocation. The memory backing store is owned by this DriverKit memory representation and the reference will be released when this object is destroyed.

Member Enumeration Documentation

◆ direction [1/2]

template<dx::scope scope_t = dx::kernel, typename io_memory_descriptor_t = ::IOMemoryDescriptor>
enum dxd::memory::direction : uint64_t
inherited

direction of memory operation

Enumerator
in 
out 
both 

◆ direction [2/2]

enum dxd::memory::direction : uint64_t
inherited

direction of memory operation

Constructor & Destructor Documentation

◆ buffer() [1/4]

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::buffer ( )
default

DriverKit default buffer constructor.

Use this in conjunction with initialize()

◆ buffer() [2/4]

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::buffer ( size_t size,
unsigned int limit = limit_t,
unsigned int alignment = alignment_t,
bool contigous = contigous_t )
inline

DriverKit buffer constructor.

Parameters
sizesize to be alloced by buffer object
limitlimit physical memory address space
alignmentenforce physical memory alignment
contigousenforce contiguos physical memory

◆ buffer() [3/4]

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::buffer ( )
default

WDK buffer default constructor.

◆ buffer() [4/4]

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::buffer ( size_t size,
unsigned int limit = limit_t,
unsigned int alignment = alignment_t,
bool contigous = contigous_t )
inline

WDK buffer constructor.

Parameters
sizesize to be alloced by buffer object
limitlimit physical memory address space
alignmentenforce physical memory alignment
contigousenforce contiguos physical memory

◆ ~buffer()

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
virtual dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::~buffer ( )
inlinevirtual

WDK buffer memory destructor.

Member Function Documentation

◆ free()

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
void dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::free ( )
inline
Here is the caller graph for this function:

◆ initialize() [1/8]

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
os_result dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::initialize ( size_t size,
unsigned int limit = limit_t,
unsigned int alignment = alignment_t,
bool contigous = contigous_t )
inline

Allows re-initialization

Parameters
sizesize to be alloced by buffer object
limitlimit physical memory address space
alignmentenforce physical memory alignment
contigousenforce contiguos physical memory

◆ initialize() [2/8]

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
os_result dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::initialize ( size_t size,
unsigned int = limit_t,
unsigned int alignment = alignment_t,
bool = contigous_t )
inline

DriverKit buffer initializer.

Allows re-initialization.

Creates a buffer and associated memory descriptor.

Parameters
sizesize to be alloced by buffer object
alignmentenforce physical memory alignment
Here is the caller graph for this function:

◆ initialize() [3/8]

template<dx::scope scope_t = dx::kernel, typename io_memory_descriptor_t = ::IOMemoryDescriptor>
os_result dxd::memory< scope_t, io_memory_descriptor_t >::initialize ( ::IOMemoryDescriptor * io_memory_descriptor)
inlineinherited

DriverKit memory initializer.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize() [4/8]

template<dx::scope scope_t = dx::kernel, typename io_memory_descriptor_t = ::IOMemoryDescriptor>
os_result dxd::memory< scope_t, io_memory_descriptor_t >::initialize ( ::IOMemoryDescriptor * io_memory_descriptor,
size_t offset,
size_t size,
direction direction )
inlineinherited

DriverKit memory initializer.

Here is the call graph for this function:

◆ initialize() [5/8]

template<dx::scope scope_t = dx::kernel, typename io_memory_descriptor_t = ::IOMemoryDescriptor>
os_result dxd::memory< scope_t, io_memory_descriptor_t >::initialize ( const ::MDL * mdl)
inlineinherited

in contrast to an IOKit MemoryDescriptor MDLs do not support reference counting. take care when creating a dxd::memory from a dxd::buffer: although the dxd::memory holds an MDL to the buffer the buffer itself is not retained after the dxd::buffer is released!

Here is the call graph for this function:

◆ initialize() [6/8]

template<dx::scope scope_t = dx::kernel, typename io_memory_descriptor_t = ::IOMemoryDescriptor>
os_result dxd::memory< scope_t, io_memory_descriptor_t >::initialize ( const ::MDL * mdl,
size_t offset,
size_t size )
inlineinherited
Here is the call graph for this function:

◆ initialize() [7/8]

template<dx::scope scope_t = dx::kernel, typename io_memory_descriptor_t = ::IOMemoryDescriptor>
os_result dxd::memory< scope_t, io_memory_descriptor_t >::initialize ( const void * data,
size_t size )
inherited
Here is the call graph for this function:

◆ initialize() [8/8]

os_result dxd::memory< dx::kernel >::initialize ( const void * data,
size_t size )
inherited

Allows re-initialization

Parameters
datavirtual read only kernel base address of range to create memory descriptor from
sizesize of range to create memory descriptor from
Here is the call graph for this function:

◆ operator const ::IOMemoryDescriptor *() [1/2]

template<dx::scope scope_t = dx::kernel, typename io_memory_descriptor_t = ::IOMemoryDescriptor>
dxd::memory< scope_t, io_memory_descriptor_t >::operator const ::IOMemoryDescriptor * ( ) const
inlineinherited

DriverKit IOMemoryDescriptor* implicit cast.

◆ operator const ::IOMemoryDescriptor *() [2/2]

dxd::memory< scope_t, ::IOBufferMemoryDescriptor >::operator const ::IOMemoryDescriptor * ( ) const
inlineinherited

DriverKit IOMemoryDescriptor* implicit cast.

◆ operator void *()

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::operator void * ( ) const
inline

the allocation's kernel address

◆ operator::IOMemoryDescriptor *() [1/2]

template<dx::scope scope_t = dx::kernel, typename io_memory_descriptor_t = ::IOMemoryDescriptor>
dxd::memory< scope_t, io_memory_descriptor_t >::operator::IOMemoryDescriptor * ( )
inlineinherited

◆ operator::IOMemoryDescriptor *() [2/2]

dxd::memory< scope_t, ::IOBufferMemoryDescriptor >::operator::IOMemoryDescriptor * ( )
inlineinherited

◆ operator::MDL *() [1/2]

template<dx::scope scope_t = dx::kernel, typename io_memory_descriptor_t = ::IOMemoryDescriptor>
dxd::memory< scope_t, io_memory_descriptor_t >::operator::MDL * ( ) const
inlineinherited

◆ operator::MDL *() [2/2]

dxd::memory< scope_t, ::IOBufferMemoryDescriptor >::operator::MDL * ( ) const
inlineinherited

◆ retain() [1/2]

template<dx::scope scope_t = dx::kernel, typename io_memory_descriptor_t = ::IOMemoryDescriptor>
::IOMemoryDescriptor * dxd::memory< scope_t, io_memory_descriptor_t >::retain ( )
inlineinherited

◆ retain() [2/2]

::IOMemoryDescriptor * dxd::memory< scope_t, ::IOBufferMemoryDescriptor >::retain ( )
inlineinherited

◆ size() [1/2]

template<dx::scope scope_t = dx::kernel, typename io_memory_descriptor_t = ::IOMemoryDescriptor>
uint64_t dxd::memory< scope_t, io_memory_descriptor_t >::size ( ) const
inlineinherited

DriverKit memory size.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ size() [2/2]

uint64_t dxd::memory< scope_t, ::IOBufferMemoryDescriptor >::size ( ) const
inlineinherited

DriverKit memory size.

Here is the caller graph for this function:

Member Data Documentation

◆ status [1/2]

template<dx::scope scope_t = dx::kernel, typename io_memory_descriptor_t = ::IOMemoryDescriptor>
os_result dxd::memory< scope_t, io_memory_descriptor_t >::status = not_initialized
inherited

DriverKit memory status.

status of memory object

◆ status [2/2]

os_result dxd::memory< scope_t, ::IOBufferMemoryDescriptor >::status
inherited

DriverKit memory status.

status of memory object


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

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.