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

the bus's command set with the streaming tests: a device with a streaming engine is testable More...

#include <dx_test.h>

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

Public Types

typedef decltype(driver::dictionary) dictionary_t

Public Member Functions

 driver(const typename super::match& match, const char* product_id, const char* name, const typename super::dictionary_t& dictionary= {})
virtual void operator <<(const argsargs& argsargs)
void operator <<(argsargs& argsargs) override
virtual void quiet(const args &= {}) noexcept
bool try_launch()

Protected Types

using args= parser::args
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(const class table& table, size_t size= 0x1000, uint32_t rx= 1, uint32_t tx= 1, const std::chrono::high_resolution_clock::duration& duration= 3s) const
std::string description(const device_t& device) const override
void device_arrival_removal(const args &= {})
void filter(const args& cargs= {})
bool head() const noexcept override
virtual void help(argsargs& argsargs)
void help_head() const noexcept override
virtual void indent(argsargs& argsargs)
void list(const args &= {})
dx::log logged()
 the log of the host or of this client, as –log-level's and –log-pipe's host and client choose
dx::log logged(const dx::log& log)
void loglevel(argsargs& argsargs)
void logpipe(argsargs& argsargs)
 where the lines of the host or of this client go: [<err | log | out> <sink[,sink..] | none>] [..]
parser::dispatch merge(typename parser::dispatch dispatch, const std::weak_ptr<device_t>& weak)
 a device's command as the driver's: each function in it runs on the device held - a removal meanwhile concludes it, the object stays until the function returns
void meta_buffer(const class table& table, size_t size, uint32_t rx, uint32_t tx, const std::chrono::high_resolution_clock::duration& duration) const
virtual void no_args(const argsargs& argsargs)
void removed(device_t& device) noexcept override
void reselect(const device_t* going= {})
 every device's command anew, its place as –info lists it first among its selectors: the places follow the tree, a device going has none; the only device's commands are the driver's own
auto select(const std::string& id)
std::deque<std::string> selectors(const device_t& device) const override
 its model and vendor name it too
bool testable(const device_t& device) const override
 a device the tests may run on
std::shared_ptr<device_t> under_test(const std::string& puid)
 the device a puid names, where it is
void unittest(argsargs& argsargs)
 every selected device runs its unit test on a thread of its own, its rows behind its name; surprise removals come from outside - a device leaving its bus ends its test where it stands, its successor takes up the rows left
void unittest_align(const args &= {})
void unittest_buffer(argsargs& argsargs)
void unittest_format(const args &= {})
void unittest_preference(argsargs& argsargs)
void unittest_preference_erase(decltype(device_t::preference)& preferences, uint32_t& leaves)
void unittest_preference_write(const decltype(device_t::preference)& preferencepreference, const std::chrono::high_resolution_clock::time_point& timeout, uint32_t& leaves, uint32_t depth= 0)
virtual void version(const argsargs& argsargs= {})

Static Protected Member Functions

static std::vector<table::column> buffer_columns()
template<typename value_t= int32_t>
static std::optional<value_t> value(argsargs& argsargs)
template<typename value_t= int32_t>
static value_t value(argsargs& argsargs, const char* name)
 the next argument as a number of value_t, which the parameter named requires
template<typename value_t>
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::map<std::deque<std::string>, dispatch> dictionary
std::chrono::milliseconds launch_time
 < the commands - a bus driver's own dictionary() is its system's matching
std::deque<std::deque<std::string>> merged
const char* name{}
struct dx::test::driver:: { ... }  parameter
std::deque<std::string> selection
std::chrono::milliseconds surprise{}
 a surprise removal every interval, none at 0
struct device_t::unit_test unit_test

Friends

class surprise::asynchronous<driver>

Detailed Description

template<typename super_device_t, typename device_t, typename driver_t>
class dx::test::stream::driver< super_device_t, device_t, driver_t >

the bus's command set with the streaming tests: a device with a streaming engine is testable

Member Typedef Documentation

◆ args

template<typename super_device_t, typename device_t, typename driver_t>
using dx::test::stream::driver<super_device_t, device_t, driver_t>::args= parser::args
protected

◆ desc

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

◆ dictionary_t

template<typename super_device_t, typename device_t, typename driver_t>
typedef decltype(driver::dictionary) dx::test::driver<super_device_t, device_t, driver_t>::dictionary_t
inherited

◆ engine_t

template<typename super_device_t, typename device_t, typename driver_t>
typedef device_t::engine_t dx::test::stream::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::stream::driver<super_device_t, device_t, driver_t>::driver(const typename super::match& match, const char* product_id, const char* name, const typename super::dictionary_t& 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)
inlineoverrideprotectedinherited
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::stream::driver<super_device_t, device_t, driver_t>::buffer(const class table& table, 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_columns()

template<typename super_device_t, typename device_t, typename driver_t>
std::vector<table::column> dx::test::stream::driver<super_device_t, device_t, driver_t>::buffer_columns()
inlinestaticprotected
Here is the caller graph for this function:

◆ description()

template<typename super_device_t, typename device_t, typename driver_t>
std::string dx::test::stream::driver<super_device_t, device_t, driver_t>::description(const device_t& device) const
inlineoverrideprotectedvirtual

◆ 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&= {})
inlineprotectedinherited

a device that reports its own arrival and removal - the whole body of the arrival/removal watch

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

◆ 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= {})
inlineprotectedinherited
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::test::driver< super_device_t, device_t, driver_t >.

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::stream::driver<super_device_t, device_t, driver_t>::help_head() const
inlineoverrideprotectedvirtualnoexcept

Reimplemented from dx::test::driver< super_device_t, device_t, driver_t >.

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:

◆ 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&= {})
inlineprotectedinherited
Todo
: remove obscure cast preventing desc::version and driver::version ambiguity due to single device streaming engine design
Here is the caller graph for this function:

◆ logged() [1/2]

template<typename super_device_t, typename device_t, typename driver_t>
dx::log dx::test::driver<super_device_t, device_t, driver_t>::logged()
inlineprotectedinherited

the log of the host or of this client, as –log-level's and –log-pipe's host and client choose

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

◆ logged() [2/2]

template<typename super_device_t, typename device_t, typename driver_t>
dx::log dx::test::driver<super_device_t, device_t, driver_t>::logged(const dx::log& log)
inlineprotectedinherited

◆ 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)
inlineprotectedinherited
Here is the call graph for this function:

◆ logpipe()

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

where the lines of the host or of this client go: [<err | log | out> <sink[,sink..] | none>] [..]

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

◆ merge()

template<typename super_device_t, typename device_t, typename driver_t>
parser::dispatch dx::test::driver<super_device_t, device_t, driver_t>::merge(typename parser::dispatch dispatch, const std::weak_ptr<device_t>& weak)
inlineprotectedinherited

a device's command as the driver's: each function in it runs on the device held - a removal meanwhile concludes it, the object stays until the function returns

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::stream::driver<super_device_t, device_t, driver_t>::meta_buffer(const class table& table, 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:
Here is the caller 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)
inlineoverridevirtualinherited

Reimplemented from dx::parser.

Here is the call graph for this function:

◆ quiet()

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

◆ 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)
inlineoverrideprotectednoexceptinherited
Here is the call graph for this function:

◆ reselect()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::driver<super_device_t, device_t, driver_t>::reselect(const device_t* going= {})
inlineprotectedinherited

every device's command anew, its place as –info lists it first among its selectors: the places follow the tree, a device going has none; the only device's commands are the driver's own

Here is the caller 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:

◆ selectors()

template<typename super_device_t, typename device_t, typename driver_t>
std::deque<std::string> dx::test::stream::driver<super_device_t, device_t, driver_t>::selectors(const device_t& device) const
inlineoverrideprotectedvirtual

its model and vendor name it too

Reimplemented from dx::test::driver< super_device_t, device_t, driver_t >.

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

◆ testable()

template<typename super_device_t, typename device_t, typename driver_t>
bool dx::test::stream::driver<super_device_t, device_t, driver_t>::testable(const device_t& device) const
inlineoverrideprotectedvirtual

a device the tests may run on

Reimplemented from dx::test::driver< super_device_t, device_t, driver_t >.

◆ 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

◆ under_test()

template<typename super_device_t, typename device_t, typename driver_t>
std::shared_ptr<device_t> dx::test::stream::driver<super_device_t, device_t, driver_t>::under_test(const std::string& puid)
inlineprotected

the device a puid names, where it is

◆ unittest()

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

every selected device runs its unit test on a thread of its own, its rows behind its name; surprise removals come from outside - a device leaving its bus ends its test where it stands, its successor takes up the rows left

Here is the call graph for this function:

◆ unittest_align()

template<typename super_device_t, typename device_t, typename driver_t>
void dx::test::stream::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::stream::driver<super_device_t, device_t, driver_t>::unittest_buffer(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::stream::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_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)
inlineprotectedinherited
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)
inlineprotectedinherited
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)
inlineprotectedinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ value() [1/3]

template<typename value_t= int32_t>
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

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

◆ value() [2/3]

template<typename value_t= int32_t>
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

Here is the call graph for this function:

◆ value() [3/3]

template<typename value_t>
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

Here is the call 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::asynchronous<driver>

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

Member Data Documentation

◆ dictionary

template<typename super_device_t, typename device_t, typename driver_t>
std::map<std::deque<std::string>, dispatch> dx::parser::dictionary
protectedinherited

◆ 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

< the commands - a bus driver's own dictionary() is its system's matching

longest try_launch() since last reset

◆ merged

template<typename super_device_t, typename device_t, typename driver_t>
std::deque<std::deque<std::string>> dx::test::driver<super_device_t, device_t, driver_t>::merged
protectedinherited

the only device's commands the driver carries

◆ name

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

◆ parameter

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

◆ selection

template<typename super_device_t, typename device_t, typename driver_t>
std::deque<std::string> dx::test::stream::driver<super_device_t, device_t, driver_t>::selection
protected

the devices under test by index or selector, every testable one where none

◆ surprise

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

a surprise removal every interval, none at 0

◆ unit_test

template<typename super_device_t, typename device_t, typename driver_t>
struct device_t::unit_test dx::test::stream::driver<super_device_t, device_t, driver_t>::unit_test
protected

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