dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::test::driver< super_device_t, device_t, driver_t > Class Template Reference

#include <dx_test.h>

Inheritance diagram for dx::test::driver< super_device_t, device_t, driver_t >:
Collaboration diagram for dx::test::driver< super_device_t, device_t, driver_t >:

Classes

struct  match_helper
struct  match_helper< std::set< std::string > >

Public Types

typedef std::deque< std::string > args

Public Member Functions

 driver (const typename super::match &match, const char *product_id, const char *name, const decltype(dictionary)&dictionary={})
void info (std::ostream &os) noexcept override
virtual void operator<< (const args &args)
void operator<< (args &args) override
virtual void quiet (const args &={}) noexcept
bool try_launch ()
 ~driver () override
 concludes while this harness still stands: the bus driver's own listeners reach its overrides, and those reach the parser - both are gone once a base destructor runs

Protected Types

typedef device_t::desc_t desc
typedef device_t::engine_t engine_t

Protected Member Functions

void arrived (device_t &device) override
template<typename data_t>
void buffer (size_t size=0x1000, uint32_t rx=1, uint32_t tx=1, const std::chrono::high_resolution_clock::duration &duration=3s) const
void buffer_header () const
void device_arrival_removal (const args &={})
void filter (const args &cargs={})
bool head () const noexcept override
virtual void help (args &args)
void help_head () const noexcept override
virtual void indent (args &args)
void list (const args &={})
void loglevel (args &args)
void meta_buffer (size_t size, uint32_t rx, uint32_t tx, const std::chrono::high_resolution_clock::duration &duration) const
virtual void no_args (const args &args)
void removed (device_t &device) noexcept override
auto select (const std::string &id)
void unittest (const args &args)
 runs the mask-selected rows, each cycling for the given duration "reject" only counts a row's own tolerated input rejections: an unsupported iosize/samplerate etc. the driver correctly refuses, or the pin start/stop call itself being not_implemented for the current bus (e.g. ASIO requires a prior device-level attach()/createBuffers() no standalone pin start can provide). any other failure of the operation actually under test is not tolerated - it throws and aborts the whole run
void unittest_align (const args &={})
void unittest_buffer (const args &args={})
void unittest_format (const args &={})
void unittest_mask (args &args)
void unittest_preference (args &args)
void unittest_preference_erase (decltype(device_t::preference)&preferences, uint32_t &leaves)
void unittest_preference_write (const decltype(device_t::preference)&preference, const std::chrono::high_resolution_clock::time_point &timeout, uint32_t &leaves, uint32_t depth=0)
void unittest_stream_duration (args &args)
virtual void version (const args &args={})

Protected Attributes

std::shared_ptr< device_t > device
 the device under test, picked on arrival
std::map< std::deque< std::string >, dispatchdictionary
std::chrono::milliseconds launch_time {}
 longest try_launch() since last reset
const char * name {}
struct { 
   struct { 
      bool   host 
   }   log
parameter
struct { 
   bool   asynchronous {} 
   uint64_t   mask {ULLONG_MAX} 
   std::chrono::high_resolution_clock::duration   stream_duration {0s} 
unit_test

Friends

class surprise::synchronous< driver >

Member Typedef Documentation

◆ args

typedef std::deque<std::string> dx::parser::args
inherited

◆ desc

template<typename super_device_t, typename device_t, typename driver_t>
typedef device_t::desc_t dx::test::driver< super_device_t, device_t, driver_t >::desc
protected

◆ engine_t

template<typename super_device_t, typename device_t, typename driver_t>
typedef device_t::engine_t dx::test::driver< super_device_t, device_t, driver_t >::engine_t
protected

Constructor & Destructor Documentation

◆ ~driver()

template<typename super_device_t, typename device_t, typename driver_t>
dx::test::driver< super_device_t, device_t, driver_t >::~driver ( )
inlineoverride

concludes while this harness still stands: the bus driver's own listeners reach its overrides, and those reach the parser - both are gone once a base destructor runs

◆ driver()

template<typename super_device_t, typename device_t, typename driver_t>
dx::test::driver< super_device_t, device_t, driver_t >::driver ( const typename super::match & match,
const char * product_id,
const char * name,
const decltype(dictionary)& dictionary = {} )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ arrived()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::arrived ( device_t & device)
inlineoverrideprotected
Here is the call graph for this function:

◆ buffer()

template<typename super_device_t, typename device_t, typename driver_t>
template<typename data_t>
void dx::test::driver< super_device_t, device_t, driver_t >::buffer ( size_t size = 0x1000,
uint32_t rx = 1,
uint32_t tx = 1,
const std::chrono::high_resolution_clock::duration & duration = 3s ) const
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ buffer_header()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::buffer_header ( ) const
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ device_arrival_removal()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::device_arrival_removal ( const args & = {})
inlineprotected

◆ filter()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::filter ( const args & cargs = {})
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ head()

template<typename super_device_t, typename device_t, typename driver_t>
bool dx::test::driver< super_device_t, device_t, driver_t >::head ( ) const
inlineoverrideprotectedvirtualnoexcept

Reimplemented from dx::parser.

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

◆ help()

virtual void dx::parser::help ( args & args)
inlineprotectedvirtualinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ help_head()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::help_head ( ) const
inlineoverrideprotectedvirtualnoexcept

Reimplemented from dx::parser.

Here is the call graph for this function:

◆ indent()

virtual void dx::parser::indent ( args & args)
inlineprotectedvirtualinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ info()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::info ( std::ostream & os)
inlineoverridenoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ list()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::list ( const args & = {})
inlineprotected
Todo
: remove obscure cast preventing desc::version and driver::version ambiguity due to single device streaming engine design

◆ loglevel()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::loglevel ( args & args)
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ meta_buffer()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::meta_buffer ( size_t size,
uint32_t rx,
uint32_t tx,
const std::chrono::high_resolution_clock::duration & duration ) const
inlineprotected
Here is the call graph for this function:

◆ no_args()

virtual void dx::parser::no_args ( const args & args)
inlineprotectedvirtualinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<<() [1/2]

virtual void dx::parser::operator<< ( const args & args)
inlinevirtualinherited
Here is the caller graph for this function:

◆ operator<<() [2/2]

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::operator<< ( args & args)
inlineoverridevirtual

Reimplemented from dx::parser.

Here is the call graph for this function:

◆ quiet()

virtual void dx::parser::quiet ( const args & = {})
inlinevirtualnoexceptinherited

◆ removed()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::removed ( device_t & device)
inlineoverrideprotectednoexcept
Here is the call graph for this function:

◆ select()

auto dx::parser::select ( const std::string & id)
inlineprotectedinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ try_launch()

template<typename super_device_t, typename device_t, typename driver_t>
bool dx::test::driver< super_device_t, device_t, driver_t >::try_launch ( )
inline
Here is the caller graph for this function:

◆ unittest()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::unittest ( const args & args)
inlineprotected

runs the mask-selected rows, each cycling for the given duration "reject" only counts a row's own tolerated input rejections: an unsupported iosize/samplerate etc. the driver correctly refuses, or the pin start/stop call itself being not_implemented for the current bus (e.g. ASIO requires a prior device-level attach()/createBuffers() no standalone pin start can provide). any other failure of the operation actually under test is not tolerated - it throws and aborts the whole run

Here is the call graph for this function:

◆ unittest_align()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::unittest_align ( const args & = {})
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unittest_buffer()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::unittest_buffer ( const args & args = {})
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unittest_format()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::unittest_format ( const args & = {})
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unittest_mask()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::unittest_mask ( args & args)
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unittest_preference()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::unittest_preference ( args & args)
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unittest_preference_erase()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::unittest_preference_erase ( decltype(device_t::preference)& preferences,
uint32_t & leaves )
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unittest_preference_write()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::unittest_preference_write ( const decltype(device_t::preference)& preference,
const std::chrono::high_resolution_clock::time_point & timeout,
uint32_t & leaves,
uint32_t depth = 0 )
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unittest_stream_duration()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver< super_device_t, device_t, driver_t >::unittest_stream_duration ( args & args)
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ version()

virtual void dx::parser::version ( const args & args = {})
inlineprotectedvirtualinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ surprise::synchronous< driver >

template<typename super_device_t, typename device_t, typename driver_t>
friend class surprise::synchronous< driver >
friend

Member Data Documentation

◆ asynchronous

template<typename super_device_t, typename device_t, typename driver_t>
bool dx::test::driver< super_device_t, device_t, driver_t >::asynchronous {}

◆ device

template<typename super_device_t, typename device_t, typename driver_t>
std::shared_ptr<device_t> dx::test::driver< super_device_t, device_t, driver_t >::device
protected

the device under test, picked on arrival

◆ dictionary

std::map<std::deque<std::string>, dispatch> dx::parser::dictionary
protectedinherited
Initial value:
{
{{"--continue", "--no-error", "--ignore", "--ignore-error"},
{[this](args& args){parameter.error.ignore= true; no_args(args);}, "ignore errors and continue"}},
{{"--indent", "--tab"}, {std::bind(&parser::indent, this, std::placeholders::_1), "set/get indention width and pattern", "[width [pattern]]", {},{
{{"err", "stderr"}, {[this](args&){this->parameter.log.err= true;}, "select std error"}},
{{"log", "stdlog"}, {[this](args&){this->parameter.log.log= true;}, "select std log"}},
{{"out", "stdout"}, {[this](args&){this->parameter.log.out= true;}, "select std out"}},
}}},
{{"--quiet", "-q"}, {std::bind(&parser::quiet, this, std::placeholders::_1), "quiet!"}},
{{"--version", "-v"}, {std::bind(&parser::version, this, std::placeholders::_1), std::string{"display "}+ name+ " version"}},
}
virtual void no_args(const args &args)
Definition dx_parser.h:227
const char * name
Definition dx_parser.h:64
std::deque< std::string > args
Definition dx_parser.h:60
struct dx::parser::@046247176025362246310022157273031025265032273157 parameter
Definition dx_test.h:138
struct dx::test::driver::@117222032303102347017101026123163316204175055116 parameter

◆ err

bool dx::parser::err
inherited

◆ [struct]

struct { ... } dx::parser::error

◆ host

template<typename super_device_t, typename device_t, typename driver_t>
bool dx::test::driver< super_device_t, device_t, driver_t >::host

◆ ignore

bool dx::parser::ignore
inherited

◆ launch_time

template<typename super_device_t, typename device_t, typename driver_t>
std::chrono::milliseconds dx::test::driver< super_device_t, device_t, driver_t >::launch_time {}
protected

longest try_launch() since last reset

◆ [struct]

struct { ... } dx::test::driver< super_device_t, device_t, driver_t >::log

◆ mask

template<typename super_device_t, typename device_t, typename driver_t>
uint64_t dx::test::driver< super_device_t, device_t, driver_t >::mask {ULLONG_MAX}

◆ name

const char* dx::parser::name {}
protectedinherited

◆ out

bool dx::parser::out
inherited

◆ [struct]

struct { ... } dx::test::driver< super_device_t, device_t, driver_t >::parameter

◆ quiet

bool dx::parser::quiet
inherited

◆ stream_duration

template<typename super_device_t, typename device_t, typename driver_t>
std::chrono::high_resolution_clock::duration dx::test::driver< super_device_t, device_t, driver_t >::stream_duration {0s}

◆ [struct]

struct { ... } dx::test::driver< super_device_t, device_t, driver_t >::unit_test

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

(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.