dxd - dynax driver framework  2799
cross platform open source driver development framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t > Class Template Reference

#include <dx_test.h>

+ Inheritance diagram for dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >:
+ Collaboration diagram for dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >:

Classes

struct  loopback
 

Public Member Functions

virtual void conclude () noexcept
 
virtual void conclude () noexcept
 
 driver (dx::match match)
 
device_t * find (std::string uid) const noexcept
 Finds the device by guid.
The user is responsible for making sure the device list cannot be modified during find(). More...
 
virtual void launch () throw (exception_t)
 
virtual void launch () throw (exception_t)
 
void operator<< (char *argv[]) throw (os_result)
 
void samplerate (unsigned int samplerate) throw (exception_t)
 
unsigned int samplerate () throw (exception_t)
 

Static Public Member Functions

static void idle (int64_t nsec) throw (exception_t)
 
static void idle (uint64_t timeout) noexcept
 

Public Attributes

unsigned int comperator
 
elements
 STL member. More...
 
typedef::CFDictionaryRef match
 
typedef::GUID match
 
volatile unsigned int * samplerate
 
uint64_t mask =ULLONG_MAX
 
std::chrono::high_resolution_clock::duration stream_duration =0s
 

Protected Types

typedef dx::clock< os_resultclock
 
typedef driver< os_result,
device_t > 
driver
 

Protected Member Functions

virtual void arrived (device_t &) throw (exception_t)
 notify specific device arrival stub More...
 
virtual void clear () noexcept
 replaces non-virtual std::deque::clear to call virtual notification methods More...
 
virtual void clear () noexcept
 replaces non-virtual std::deque::clear to call virtual notification methods More...
 
void clock_monitor (device_t &device, std::chrono::high_resolution_clock::duration duration)
 
virtual void detach () noexcept
 
virtual void exception (const os_result &) const noexcept
 notification exception handler More...
 
virtual void exception (const os_result &) const noexcept
 notification exception handler More...
 
virtual void free () noexcept
 
void halt () noexceptoverride
 
virtual void handle (char *arg) throw (os_result)
 
virtual void help () const noexcept
 
void initialize (const typename clock_t::duration &duration) noexcept
 
void initialize (unsigned int iosize, uint64_t channel_map[2][(channels+63)/64]) throw (exception_t)
 
void notify () noexceptoverride
 notify change from device requiring streaming reset More...
 
virtual void notify (unsigned int) noexcept
 notify sample rate change from device More...
 
virtual void overload () noexcept
 
void process (int64_t) noexceptoverride
 
virtual void removed () noexcept
 notify device removals completed stub More...
 
void run () override throw (exception_t)
 
virtual void sync (const typename clock_t::time_point &now) throw (exception_t)
 

Static Protected Member Functions

static void abort (int)
 
static void sig (int)
 

Protected Attributes

unsigned int cnt = 0
 
std::shared_ptr< device_t > device
 
unsigned int dropout = 0
 
clock_t::duration duration
 
uint64_t frame
 
int ** io [direction][2]
 
unsigned int iosize
 
struct dx::test::driver::loopback loopback
 
dx::stream::clock::monitormonitor
 io[direction][double buffer][channel][sample] More...
 
std::mutex mutex
 
clock_t::time_point objective
 
std::shared_ptr< audio_pin_t > pin [direction]
 
bool quiet = false
 
volatile bool running
 
os_result status
 
uint64_t tick = 0
 
struct {
   uint64_t   mask =ULLONG_MAX
 
   std::chrono::high_resolution_clock::duration   stream_duration =0s
 
unit_test
 

Member Typedef Documentation

typedef dx::clock<os_result > dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::clock
protectedinherited
typedef driver<os_result ,device_t> dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::driver
protectedinherited

Constructor & Destructor Documentation

template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::driver ( dx::match  match)
inline

Member Function Documentation

template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
static void dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::abort ( int  )
inlinestaticprotected
virtual void dx::driver< os_result , device_t >::arrived ( device_t &  )
throw (exception_t
)
inlineprotectedvirtualinherited

notify specific device arrival stub

virtual void dx::driver< os_result , device_t >::clear ( )
inlineprotectedvirtualnoexceptinherited

replaces non-virtual std::deque::clear to call virtual notification methods

Todo:
check if exception catching needed for device::conclude()

+ Here is the call graph for this function:

virtual void dx::driver< os_result , device_t >::clear ( )
inlineprotectedvirtualnoexceptinherited

replaces non-virtual std::deque::clear to call virtual notification methods

Todo:
check if exception catching needed for device::conclude()

+ Here is the call graph for this function:

template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
void dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::clock_monitor ( device_t &  device,
std::chrono::high_resolution_clock::duration  duration 
)
inlineprotected

+ Here is the call graph for this function:

virtual void dx::driver< os_result , device_t >::conclude ( )
inlinevirtualnoexceptinherited

+ Here is the call graph for this function:

virtual void dx::driver< os_result , device_t >::conclude ( )
inlinevirtualnoexceptinherited

+ Here is the call graph for this function:

virtual void dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::detach ( )
inlineprotectedvirtualnoexceptinherited

+ Here is the call graph for this function:

virtual void dx::driver< os_result , device_t >::exception ( const os_result ) const
inlineprotectedvirtualnoexceptinherited

notification exception handler

virtual void dx::driver< os_result , device_t >::exception ( const os_result ) const
inlineprotectedvirtualnoexceptinherited

notification exception handler

device_t* dx::driver< os_result , device_t >::find ( std::string  uid) const
inlinenoexceptinherited

Finds the device by guid.
The user is responsible for making sure the device list cannot be modified during find().

Exceptions
n/athis method does not throw exceptions
virtual void dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::free ( )
inlineprotectedvirtualnoexceptinherited
void dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::halt ( )
inlineoverrideprotectedvirtualnoexceptinherited

Reimplemented from dx::clock< os_result >.

+ Here is the call graph for this function:

template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
virtual void dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::handle ( char *  arg)
throw (os_result
)
inlineprotectedvirtual

+ Here is the call graph for this function:

template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
virtual void dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::help ( ) const
inlineprotectedvirtualnoexcept
static void dx::driver< os_result , device_t >::idle ( int64_t  nsec)
throw (exception_t
)
inlinestaticinherited
static void dx::driver< os_result , device_t >::idle ( uint64_t  timeout)
inlinestaticnoexceptinherited

+ Here is the call graph for this function:

void dx::clock< os_result , clock_t >::initialize ( const typename clock_t::duration &  duration)
inlinenoexceptinherited
void dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::initialize ( unsigned int  iosize,
uint64_t  channel_map[2][(channels+63)/64] 
)
throw (exception_t
)
inlineprotectedinherited
Todo:
clock already runnning with different iosize: check if engine should be initialized with current iosize

+ Here is the call graph for this function:

virtual void dx::driver< os_result , device_t >::launch ( )
throw (exception_t
)
inlinevirtualinherited

+ Here is the call graph for this function:

virtual void dx::driver< os_result , device_t >::launch ( )
throw (exception_t
)
inlinevirtualinherited

+ Here is the call graph for this function:

template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
void dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::notify ( )
inlineoverrideprotectedvirtualnoexcept

notify change from device requiring streaming reset

Reimplemented from dx::stream::engine< audio_stream_t, audio_bus_t, desc_t, os_result, device_t, audio_pin_t >.

virtual void dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::notify ( unsigned  int)
inlineprotectedvirtualnoexceptinherited

notify sample rate change from device

template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
void dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::operator<< ( char *  argv[])
throw (os_result
)
inline
virtual void dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::overload ( )
inlineprotectedvirtualnoexceptinherited
template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
void dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::process ( int64_t  )
inlineoverrideprotectedvirtualnoexcept
virtual void dx::driver< os_result , device_t >::removed ( )
inlineprotectedvirtualnoexceptinherited

notify device removals completed stub

void dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::run ( )
throw (exception_t
)
inlineoverrideprotectedvirtualinherited

Reimplemented from dx::clock< os_result >.

+ Here is the call graph for this function:

void dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::samplerate ( unsigned int  samplerate)
throw (exception_t
)
inlineinherited

+ Here is the call graph for this function:

unsigned int dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::samplerate ( )
throw (exception_t
)
inlineinherited
template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
static void dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::sig ( int  )
inlinestaticprotected
virtual void dx::clock< os_result , clock_t >::sync ( const typename clock_t::time_point &  now)
throw (exception_t
)
inlineprotectedvirtualinherited

Member Data Documentation

template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
unsigned int dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::cnt = 0
protected
unsigned int dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::comperator
inherited
std::shared_ptr<device_t> dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::device
protectedinherited
template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
unsigned int dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::dropout = 0
protected
clock_t::duration dx::clock< os_result , clock_t >::duration
protectedinherited
T std::deque< T >::elements
inherited

STL member.

uint64_t dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::frame
protectedinherited
int** dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::io[direction][2]
protectedinherited
unsigned int dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::iosize
protectedinherited
template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
struct dx::test::driver::loopback dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::loopback
protected
template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
uint64_t dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::mask =ULLONG_MAX
typedef::CFDictionaryRef dx::driver< os_result , device_t >::match
inherited
typedef::GUID dx::driver< os_result , device_t >::match
inherited
dx::stream::clock::monitor* dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::monitor
protectedinherited

io[direction][double buffer][channel][sample]

std::mutex dx::clock< os_result , clock_t >::mutex
protectedinherited
clock_t::time_point dx::clock< os_result , clock_t >::objective
protectedinherited
std::shared_ptr<audio_pin_t > dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::pin[direction]
protectedinherited
template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
bool dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::quiet = false
protected
volatile bool dx::clock< os_result , clock_t >::running
protectedinherited
volatile unsigned int* dx::stream::engine< audio_stream_t , audio_bus_t , desc_t, os_result , device_t, audio_pin_t >::samplerate
inherited
os_result dx::clock< os_result , clock_t >::status
protectedinherited
template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
std::chrono::high_resolution_clock::duration dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::stream_duration =0s
template<typename audio_stream_t , typename audio_bus_t , typename super_device_t , typename desc_t = stream::desc<typename audio_bus_t::target>, typename midi_stream_t = audio_stream_t, typename midi_bus_t = audio_bus_t, typename audio_pin_t = stream::pin<audio_stream_t,audio_bus_t,struct desc_t::stream::pin>, typename midi_pin_t = stream::pin<midi_stream_t,midi_bus_t,struct desc_t::stream::pin>, typename device_t = device<audio_stream_t,audio_bus_t,desc_t,super_device_t,midi_stream_t,midi_bus_t>>
uint64_t dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::tick = 0
protected
struct { ... } dx::test::driver< audio_stream_t, audio_bus_t, super_device_t, desc_t, midi_stream_t, midi_bus_t, audio_pin_t, midi_pin_t, device_t >::unit_test

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

(c) copyright 2009 dynamic acoustics e.U. generated on Thu Sep 19 2019

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.