dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::test::wasapi::device< super_device_t, engine_t > Class Template Reference

WASAPI client test device: the generic test device plus the endpoint share mode. More...

#include <dx_test_wasapi.h>

Inheritance diagram for dx::test::wasapi::device< super_device_t, engine_t >:
Collaboration diagram for dx::test::wasapi::device< super_device_t, engine_t >:

Public Types

typedef typename super_device_t::group_t engine_t

Public Member Functions

void conclude() noexcept override
 the pins go while their device still stands: their streams reach its pipe on the way out
template<typename ... initializer_t>
 device(decltype(super::driver)& driver, const decltype(super::id)& id, initializer_t... initializer)
void halt() noexcept
virtual void operator <<(argsargs& argsargs)
virtual void operator <<(const argsargs& argsargs)
virtual void quiet(const args &= {}) noexcept
void run()
 starting/stopping the engine's pins is what starts/stops their group's streaming session
void unittest(struct unit_test& unit_test, const class table& table)
 runs the mask-selected rows, each cycling for its duration - a row done leaves the mask, a conclude from another thread (the device leaving its bus) ends it where it stands "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 run

Static Public Member Functions

static std::vector<table::column> unittest_columns()
static void unittest_head(const struct unit_test& unit_test)
 what the unit test runs, ahead of its table
static decltype(parser::dispatch::parameter) unittest_options(struct unit_test& unit_test)
 the options setting a unit test's rows and streaming, the device's and the driver's alike

Public Attributes

uint32_t dropout
engine_t* engine
 this device's streaming engine, the harness's tests run under
uint64_t tick
struct dx::test::stream::device::unit_test unit_test

Protected Types

using args
typedef int32_t io_t
 the sample type the tests compute in: the engine's buffers carry it, stated at launch

Protected Member Functions

void _clocksource(argsargs& argsargs)
void _configuration(const argsargs& argsargs= {})
 the device's configuration: a list of per stream indices sets it, comma separated in stream order (the streams left out keep theirs), what the device runs is printed
void _device_configuration(argsargs& argsargs)
 set/get the device's configuration: the change takes its streaming session and its buffers with it
void _generator(args &)
void _impulse(args &)
void _info(const args &)
 list device information
void _iosize(argsargs& argsargs)
 set/get I/O streaming block size
void _license(const args &)
void _monitor(argsargs& argsargs)
void _reset(const args &= {})
void _safety_offset(argsargs& argsargs, dx::stream::role::role choice_role)
 set/get the streaming group's safety offset of its transport (default: the lead the tick keeps to the device, kept per wait strategy) or of its clients (the ring margin), in clock ticks, per direction
void _samplerate(argsargs& argsargs)
void _source(argsargs& argsargs)
void _strategy(argsargs& argsargs)
 set/get the wait strategies of the streaming group's transport and clients, both unless one is named
void _streaming_reset(const args &= {})
void _string(const argsargs& argsargs= {})
void _sync_reference(argsargs& argsargs)
 set/get I/O streaming block size
void _unittest(argsargs& argsargs)
void clock_monitor(std::chrono::high_resolution_clock::duration duration)
virtual bool head() const noexcept
virtual void help(argsargs& argsargs)
virtual void help_head() const noexcept
virtual void indent(argsargs& argsargs)
virtual void no_args(const argsargs& argsargs)
void notify() noexcept
void process(int64_t) noexcept
auto select(const std::string& id)
void sweep_write(dx::stream::direction::direction direction, uint32_t value)
 writes the swept value to the engine's client safety_offset, or - if sweep_transport - the streaming group's transport lead
virtual void version(const argsargs& argsargs= {})

Static Protected Member Functions

static std::optional<value_t> value(argsargs& argsargs)
static value_t value(argsargs& argsargs, const char* name)
 the next argument as a number of value_t, which the parameter named requires
static value_t value(argsargs& argsargs, value_t dflt)
 the next argument as a number of value_t, the default where it is none

Protected Attributes

std::atomic<bool> concluding
 a conclude from another thread waits for the unit test
std::optional<engine_t> consumer
 the engine where it is not this device's group_t slot
std::map<std::deque<std::string>, dispatch> dictionary
std::deque<sine> generator
std::deque<struct impulse> impulse
std::chrono::seconds load_duration
std::deque<mask> loopback
struct dx::parser:: { ... }  parameter
std::deque<mask> pattern
std::deque<std::string> scenarios
 load: the scenarios the monitor runs its session under in turn, each for load_duration and closed by its own lead probe
uint32_t sweep
 safety_offset ratchet: current in/out offset, raised on every pattern-test dropout for whichever direction's isr overload counted it; 0: off
dx::stream::direction::direction sweep_direction
 sweep scope: any= both directions seeded/ratcheted, out/in= only that one, the other stays at its own current (manually set) value
bool sweep_transport
 sweep target: the transport's lead (kept per wait strategy) if set, else the client's margin
std::recursive_mutex testing
 held by a running unit test: a conclude from another thread stops it and waits until it left
struct dx::test::stream::device:: { ... }  tmp

Static Protected Attributes

static constexpr struct dx::test::stream::device:: { ... }  launch []
static constexpr struct dx::test::stream::device:: { ... }  name []

Detailed Description

template<typename super_device_t, typename engine_t = typename super_device_t::group_t>
class dx::test::wasapi::device< super_device_t, engine_t >

WASAPI client test device: the generic test device plus the endpoint share mode.

Member Typedef Documentation

◆ args

using dx::test::stream::device<super_device_t, typename super_device_t::group_t>::args
protectedinherited

◆ engine_t

typedef typename super_device_t::group_t dx::test::stream::device<super_device_t, typename super_device_t::group_t>::engine_t
inherited

◆ io_t

typedef int32_t dx::test::stream::device<super_device_t, typename super_device_t::group_t>::io_t
protectedinherited

the sample type the tests compute in: the engine's buffers carry it, stated at launch

Constructor & Destructor Documentation

◆ device()

template<typename super_device_t, typename engine_t= typename super_device_t::group_t>
template<typename ... initializer_t>
dx::test::wasapi::device<super_device_t, engine_t>::device(decltype(super::driver)& driver, const decltype(super::id)& id, initializer_t... initializer)
inline
Here is the call graph for this function:

Member Function Documentation

◆ _clocksource()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_clocksource(args& args)
inlineprotectedinherited

◆ _configuration()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_configuration(const args& args= {})
inlineprotectedinherited

the device's configuration: a list of per stream indices sets it, comma separated in stream order (the streams left out keep theirs), what the device runs is printed

◆ _device_configuration()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_device_configuration(args& args)
inlineprotectedinherited

set/get the device's configuration: the change takes its streaming session and its buffers with it

◆ _generator()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_generator(args&)
inlineprotectedinherited

◆ _impulse()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_impulse(args&)
inlineprotectedinherited

< one sample's turn of the sine, none without

◆ _info()

void dx::test::device<super_device_t>::_info(const args&)
inlineprotectedinherited

list device information

◆ _iosize()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_iosize(args& args)
inlineprotectedinherited

set/get I/O streaming block size

◆ _license()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_license(const args&)
inlineprotectedinherited

◆ _monitor()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_monitor(args& args)
inlineprotectedinherited

◆ _reset()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_reset(const args&= {})
inlineprotectedinherited

◆ _safety_offset()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_safety_offset(args& args, dx::stream::role::role choice_role)
inlineprotectedinherited

set/get the streaming group's safety offset of its transport (default: the lead the tick keeps to the device, kept per wait strategy) or of its clients (the ring margin), in clock ticks, per direction

◆ _samplerate()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_samplerate(args& args)
inlineprotectedinherited

◆ _source()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_source(args& args)
inlineprotectedinherited

◆ _strategy()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_strategy(args& args)
inlineprotectedinherited

set/get the wait strategies of the streaming group's transport and clients, both unless one is named

◆ _streaming_reset()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_streaming_reset(const args&= {})
inlineprotectedinherited

◆ _string()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_string(const args& args= {})
inlineprotectedinherited

◆ _sync_reference()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_sync_reference(args& args)
inlineprotectedinherited

set/get I/O streaming block size

◆ _unittest()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::_unittest(args& args)
inlineprotectedinherited

◆ clock_monitor()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::clock_monitor(std::chrono::high_resolution_clock::duration duration)
inlineprotectedinherited

< sweep: a pattern lock survived the monitor clear settle - dropouts only count while armed

< sweep: isr[tx]/isr[rx] overload snapshot at arming, to attribute the next dropout to a direction

< sweep: time of the last (re)start at the current value - never locking within a timeout escalates too (the never-lock trap: a start below the floor never arms, so the dropout ratchet alone would hang forever)

< samples per tick: the client margins' unit

the least reserve each lead kept: host out/in from their own cells (frames), local out/in from the ring distances at the pipe's fill/take (bytes -> ticks)

< load: the most each lead needed over the scenarios, by its cell

the lead each side needs: what it had, less the least it kept since the last clear, plus a tick - under whatever load the run saw

< load: the running scenario's threads

◆ conclude()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::conclude()
inlineoverridenoexceptinherited

the pins go while their device still stands: their streams reach its pipe on the way out

◆ halt()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::halt()
inlinenoexceptinherited

◆ head()

() const
protectedvirtualinherited

Reimplemented from dx::parser.

◆ help()

virtual void dx::parser::help(args& args)
inlineprotectedvirtualinherited

◆ help_head()

virtual void dx::parser::help_head() const
inlineprotectedvirtualnoexceptinherited

◆ indent()

virtual void dx::parser::indent(args& args)
inlineprotectedvirtualinherited

◆ no_args()

virtual void dx::parser::no_args(const args& args)
inlineprotectedvirtualinherited

◆ notify()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::notify()
inlineprotectednoexceptinherited

◆ operator <<() [1/2]

virtual void dx::parser::operator <<(args& args)
inlinevirtualinherited

◆ operator <<() [2/2]

virtual void dx::parser::operator <<(const args& args)
inlinevirtualinherited

◆ process()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::process(int64_t)
inlineprotectednoexceptinherited

◆ quiet()

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

◆ run()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::run()
inlineinherited

starting/stopping the engine's pins is what starts/stops their group's streaming session

◆ select()

auto dx::parser::select(const std::string& id)
inlineprotectedinherited

◆ sweep_write()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::sweep_write(dx::stream::direction::direction direction, uint32_t value)
inlineprotectedinherited

writes the swept value to the engine's client safety_offset, or - if sweep_transport - the streaming group's transport lead

◆ unittest()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::unittest(struct unit_test& unit_test, const class table& table)
inlineinherited

runs the mask-selected rows, each cycling for its duration - a row done leaves the mask, a conclude from another thread (the device leaving its bus) ends it where it stands "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 run

◆ unittest_columns()

std::vector<table::column> dx::test::stream::device<super_device_t, typename super_device_t::group_t>::unittest_columns()
inlinestaticinherited

◆ unittest_head()

void dx::test::stream::device<super_device_t, typename super_device_t::group_t>::unittest_head(const struct unit_test& unit_test)
inlinestaticinherited

what the unit test runs, ahead of its table

◆ unittest_options()

decltype(parser::dispatch::parameter) dx::test::stream::device<super_device_t, typename super_device_t::group_t>::unittest_options(struct unit_test& unit_test)
inlinestaticinherited

the options setting a unit test's rows and streaming, the device's and the driver's alike

◆ value() [1/3]

std::optional<value_t> dx::parser::value(args& args)
inlinestaticprotectedinherited

the next argument where it is a number of value_t, consumed: $ and 0x hexadecimal, decimal otherwise - none where it is no number or outside value_t

◆ value() [2/3]

value_t dx::parser::value(args& args, const char* name)
inlinestaticprotectedinherited

the next argument as a number of value_t, which the parameter named requires

◆ value() [3/3]

value_t dx::parser::value(args& args, value_t dflt)
inlinestaticprotectedinherited

the next argument as a number of value_t, the default where it is none

◆ version()

virtual void dx::parser::version(const args& args= {})
inlineprotectedvirtualinherited

Member Data Documentation

◆ concluding

std::atomic<bool> dx::test::stream::device<super_device_t, typename super_device_t::group_t>::concluding
protectedinherited

a conclude from another thread waits for the unit test

◆ consumer

std::optional<engine_t> dx::test::stream::device<super_device_t, typename super_device_t::group_t>::consumer
protectedinherited

the engine where it is not this device's group_t slot

◆ dictionary

std::map<std::deque<std::string>, dispatch> dx::parser::dictionary
protectedinherited

◆ dropout

uint32_t dx::test::stream::device<super_device_t, typename super_device_t::group_t>::dropout
inherited

◆ engine

engine_t* dx::test::stream::device<super_device_t, typename super_device_t::group_t>::engine
inherited

this device's streaming engine, the harness's tests run under

◆ generator

std::deque<sine> dx::test::stream::device<super_device_t, typename super_device_t::group_t>::generator
protectedinherited

◆ impulse

std::deque<struct impulse> dx::test::stream::device<super_device_t, typename super_device_t::group_t>::impulse
protectedinherited

◆ launch

struct { ... } dx::test::stream::device<super_device_t, typename super_device_t::group_t>::launch[]

◆ load_duration

std::chrono::seconds dx::test::stream::device<super_device_t, typename super_device_t::group_t>::load_duration
protectedinherited

◆ loopback

std::deque<mask> dx::test::stream::device<super_device_t, typename super_device_t::group_t>::loopback
protectedinherited

◆ name

struct { ... } dx::test::stream::device<super_device_t, typename super_device_t::group_t>::name[]

◆ parameter

struct { ... } dx::parser::parameter

◆ pattern

std::deque<mask> dx::test::stream::device<super_device_t, typename super_device_t::group_t>::pattern
protectedinherited

◆ scenarios

std::deque<std::string> dx::test::stream::device<super_device_t, typename super_device_t::group_t>::scenarios
protectedinherited

load: the scenarios the monitor runs its session under in turn, each for load_duration and closed by its own lead probe

◆ sweep

uint32_t dx::test::stream::device<super_device_t, typename super_device_t::group_t>::sweep
protectedinherited

safety_offset ratchet: current in/out offset, raised on every pattern-test dropout for whichever direction's isr overload counted it; 0: off

◆ sweep_direction

dx::stream::direction::direction dx::test::stream::device<super_device_t, typename super_device_t::group_t>::sweep_direction
protectedinherited

sweep scope: any= both directions seeded/ratcheted, out/in= only that one, the other stays at its own current (manually set) value

◆ sweep_transport

bool dx::test::stream::device<super_device_t, typename super_device_t::group_t>::sweep_transport
protectedinherited

sweep target: the transport's lead (kept per wait strategy) if set, else the client's margin

◆ testing

std::recursive_mutex dx::test::stream::device<super_device_t, typename super_device_t::group_t>::testing
protectedinherited

held by a running unit test: a conclude from another thread stops it and waits until it left

◆ tick

uint64_t dx::test::stream::device<super_device_t, typename super_device_t::group_t>::tick
inherited

◆ tmp

struct { ... } dx::test::stream::device<super_device_t, typename super_device_t::group_t>::tmp

◆ unit_test

struct dx::test::stream::device::unit_test dx::test::stream::device<super_device_t, typename super_device_t::group_t>::unit_test
inherited

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