dxd - dynax driver framework
cross platform open source driver development framework
dxd::multichannel::stream< channel_t >::umap< stream_t > Class Template Reference

stream user mapping More...

#include <dxd_stream.h>

+ Inheritance diagram for dxd::multichannel::stream< channel_t >::umap< stream_t >:
+ Collaboration diagram for dxd::multichannel::stream< channel_t >::umap< stream_t >:

Classes

class  channel
 

Public Member Functions

void free ()
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor, size_t offset=0)
 IOKit kernel map initializer. More...
 
template<typename bus_t >
os_result initialize (unsigned int iosize, unsigned int channels, dx::stream::channel::opened< channel_t > &opened, const dx::stream::channel::open< bus_t > &open)
 kernel streaming channel buffer creator More...
 
 operator const ::IOMemoryMap * () const
 
 operator const dx::circular * () const
 
 operator dx::circular * () const
 
dx::circularoperator-> ()
 
const dx::circularoperator-> () const
 operator to use mapping like pointer More...
 
 operator::IOMemoryMap * ()
 
template<typename reference_t >
int release (reference_t &reference)
 
void retain ()
 
size_t size () const
 kernel mapping size More...
 
os_result start ()
 
os_result stop (bool force=false)
 
void trace_outs () const
 
 umap (client &client, const dx::os_event &os_event, stream_t *&stream)
 
 ~umap ()
 

Public Attributes

struct {
   uint64_t *   channel_map
 
   channel_t **   out [2]
 
cache
 
dxd::multichannel::stream::umap::channelchannel [2]
 kernel out streaming channel double buffers More...
 
dxd::map< dx::user, dx::stream::channel::controlcontrol
 
dxd::abstract::eventreference
 
atomic< int > references =0
 
os_result status
 status of mapping object More...
 

Protected Attributes

dx::circular_vm
 kernel virtual address mapping More...
 
::IOMemoryMap * iokit_memory_map
 
atomic< item_t * > next =nullptr
 
stream *& stream
 auto nulling reference More...
 

Detailed Description

template<typename channel_t = int>
template<typename stream_t = stream>
class dxd::multichannel::stream< channel_t >::umap< stream_t >

stream user mapping

Constructor & Destructor Documentation

◆ umap()

template<typename channel_t = int>
template<typename stream_t = stream>
dxd::multichannel::stream< channel_t >::umap< stream_t >::umap ( client client,
const dx::os_event os_event,
stream_t *&  stream 
)
inline

◆ ~umap()

template<typename channel_t = int>
template<typename stream_t = stream>
dxd::multichannel::stream< channel_t >::umap< stream_t >::~umap ( )
inline
+ Here is the call graph for this function:

Member Function Documentation

◆ free()

template<typename channel_t = int>
template<typename stream_t = stream>
void dxd::multichannel::stream< channel_t >::umap< stream_t >::free ( )
inline

detach from stream out channel array

remove channel array: in: removes user mapping from stream owned channel in buffers out: remove channel array: removes channel buffer and mappings

detach from stream owned channel in buffers

de-allocate channel map;

clear channel traces

+ Here is the caller graph for this function:

◆ initialize() [1/2]

os_result dxd::map< scope_t, dx::circular >::initialize ( ::IOMemoryDescriptor *  iokit_memory_descriptor,
size_t  offset = 0 
)
inlineinherited

IOKit kernel map initializer.

map<kernel> maps an IOMemoryDescriptor (typically cast of a dxd::memory or buffer class) into the kernel address space.

https://developer.apple.com/library/content/qa/qa1197/_index.html

Allows re-initialization.

Checks buffer object,

maps the buffer into the kernel (will fail if offset is given)

and obtains a kernel virtual address (apply offset here instead).

Parameters
iokit_memory_descriptorIOMemoryDescriptor to be mapped into the kernel address space
offsetoffset into memory descriptor to create mapping

◆ initialize() [2/2]

template<typename channel_t = int>
template<typename stream_t = stream>
template<typename bus_t >
os_result dxd::multichannel::stream< channel_t >::umap< stream_t >::initialize ( unsigned int  iosize,
unsigned int  channels,
dx::stream::channel::opened< channel_t > &  opened,
const dx::stream::channel::open< bus_t > &  open 
)
inline

kernel streaming channel buffer creator

Parameters
channelsstream channels
+ Here is the call graph for this function:

◆ operator const ::IOMemoryMap *()

dxd::map< scope_t, dx::circular >::operator const ::IOMemoryMap * ( ) const
inlineinherited

◆ operator const dx::circular *()

dxd::map< scope_t, dx::circular >::operator const dx::circular * ( ) const
inlineinherited

◆ operator dx::circular *()

dxd::map< scope_t, dx::circular >::operator dx::circular * ( ) const
inlineinherited

◆ operator->() [1/2]

dx::circular * dxd::map< scope_t, dx::circular >::operator-> ( )
inlineinherited

◆ operator->() [2/2]

const dx::circular * dxd::map< scope_t, dx::circular >::operator-> ( ) const
inlineinherited

operator to use mapping like pointer

◆ operator::IOMemoryMap *()

dxd::map< scope_t, dx::circular >::operator::IOMemoryMap * ( )
inlineinherited

◆ release()

template<typename reference_t >
int dxd::referenced::release ( reference_t &  reference)
inlineinherited

◆ retain()

void dxd::referenced::retain ( )
inlineinherited

◆ size()

size_t dxd::map< scope_t, dx::circular >::size ( ) const
inlineinherited

kernel mapping size

◆ start()

os_result dxd::stream::umap< stream >::start ( )
inlineinherited

◆ stop()

os_result dxd::stream::umap< stream >::stop ( bool  force = false)
inlineinherited

◆ trace_outs()

template<typename channel_t = int>
template<typename stream_t = stream>
void dxd::multichannel::stream< channel_t >::umap< stream_t >::trace_outs ( ) const
inline

Member Data Documentation

◆ _vm

dx::circular * dxd::map< scope_t, dx::circular >::_vm
protectedinherited

kernel virtual address mapping

◆ 

struct { ... } dxd::multichannel::stream< channel_t >::umap< stream_t >::cache

◆ channel

template<typename channel_t = int>
template<typename stream_t = stream>
dxd::multichannel::stream::umap::channel* dxd::multichannel::stream< channel_t >::umap< stream_t >::channel[2]

kernel out streaming channel double buffers

◆ channel_map

template<typename channel_t = int>
template<typename stream_t = stream>
uint64_t* dxd::multichannel::stream< channel_t >::umap< stream_t >::channel_map

◆ control

template<typename channel_t = int>
template<typename stream_t = stream>
dxd::map<dx::user,dx::stream::channel::control> dxd::multichannel::stream< channel_t >::umap< stream_t >::control

◆ iokit_memory_map

::IOMemoryMap* dxd::map< scope_t, dx::circular >::iokit_memory_map
protectedinherited

◆ next

template<typename item_t >
atomic<item_t*> dxd::linked::item< item_t >::next =nullptr
protectedinherited

◆ out

template<typename channel_t = int>
template<typename stream_t = stream>
channel_t** dxd::multichannel::stream< channel_t >::umap< stream_t >::out[2]

◆ reference

dxd::abstract::event& dxd::doubly::linked::abstract::event::reference
inherited

◆ references

atomic<int> dxd::referenced::references =0
inherited

◆ status

os_result dxd::map< scope_t, dx::circular >::status
inherited

status of mapping object

◆ stream

stream *& dxd::stream::umap< stream >::stream
protectedinherited

auto nulling reference


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

(c) copyright 2009 dynamic acoustics e.U. generated on Fri Jun 18 2021

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.