dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources > Struct Template Reference

device streaming interface descriptor More...

#include <dx_stream.h>

Inheritance diagram for dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >:
Collaboration diagram for dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >:

Classes

struct  clock
 a clock domain of the device: its sources, the rates it serves and everything the streams of that domain are timed by More...
struct  configuration
 the device's configuration, the value the promoted configuration holds: the bus entity selecting it and, per stream, the index of its active stream configuration - one past the stream's configurations: the stream is off More...
struct  firmware
 the device's own: what the bus reports (USB: bcdDevice, iSerialNumber) unless a product knows a vendor way; the serial number is what a license binds to (DSN) More...
struct  name_id
 a name with the bus entity's own id behind it - what a vendor, a model or a selectable source is called and how the bus addresses it More...
struct  stream
 dx::desc::stream interface descriptor More...

Public Member Functions

struct stream* align(struct stream* sync_reference)
 the given stream where it may be the sync reference, else the first one that may - what a stored reference is aligned to when the desc changed under it
uint32_t align(uint32_t sync_reference) const
template<typename align_t, typename bind_t>
configuration bound(configuration value, const configuration& current, align_t&& align, bind_t&& bind) const
uint32_t enumerate(const format& format= any) const
 enumerate typified pins
template<typename stream_t= struct stream>
stream_t* find(const decltype(stream_t::target.idx())& target)
 by the target's index, where the target has one
struct stream* find(const format& format= any, enum direction::direction direction=direction::any)
struct stream* find(const target_t& target)
struct stream* find(uint32_t& pin, const format& format= any, enum direction::direction direction=direction::any)
 finds and returns the stream description and pin idx into this stream
template<typename align_t>
configuration preferred(align_t&& align) const
uint32_t sync_reference(struct stream* sync_reference)
struct stream* sync_reference(uint32_t sync_reference)
 the n-th stream qualifying as sync reference, and the twin below the index of a given one - the two directions of the preference's value

Public Attributes

dx::stream::bus::bus bus{}
 the bus this device hangs on
struct dx::stream::desc::clock clock [max_clocks]
uint32_t clocks{}
bool dflt{}
 can be selected as default (OS audio) device
bool editable{}
 can be edited
struct dx::stream::desc::firmware firmware
bool hidden{}
 hide device
struct dx::stream::desc::name_id model
bool persistence{}
 device has capability to store persistent settings (i.e. sample rate; clock source; etc.)
direction::direction start_stop_order{direction::any}
struct dx::stream::desc::stream stream [max_streams]
uint32_t streams{}
 number of streams
struct dx::stream::desc::name_id vendor
uint32_t version{}

Detailed Description

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >

device streaming interface descriptor

Member Function Documentation

◆ align() [1/2]

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
struct stream* dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::align(struct stream* sync_reference)
inline

the given stream where it may be the sync reference, else the first one that may - what a stored reference is aligned to when the desc changed under it

◆ align() [2/2]

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
uint32_t dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::align(uint32_t sync_reference) const
inline
Here is the caller graph for this function:

◆ bound()

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
template<typename align_t, typename bind_t>
configuration dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::bound(configuration value, const configuration& current, align_t&& align, bind_t&& bind) const
inline

the configuration align(value, current) answers for the wish that the streams carry: bind(idx, config) moves a stream to its aligned stream configuration, one it refuses stands as current has it and the wish is aligned around it again - the result is an answer of align

◆ enumerate()

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
uint32_t dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::enumerate(const format& format= any) const
inline

enumerate typified pins

◆ find() [1/4]

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
template<typename stream_t= struct stream>
stream_t* dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::find(const decltype(stream_t::target.idx())& target)
inline

by the target's index, where the target has one

◆ find() [2/4]

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
struct stream* dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::find(const format& format= any, enum direction::direction direction= direction::any)
inline
Parameters
formatsearch stream format filter
directionsearch stream direction filter

◆ find() [3/4]

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
struct stream* dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::find(const target_t& target)
inline

◆ find() [4/4]

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
struct stream* dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::find(uint32_t& pin, const format& format= any, enum direction::direction direction= direction::any)
inline

finds and returns the stream description and pin idx into this stream

Returns
stream description of indexed pin, pin idx will be altered on return!
Parameters
pinin: global pin index, out: pin index into returned stream description
formatsearch stream format filter
directionsearch stream direction filter
Here is the caller graph for this function:

◆ preferred()

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
template<typename align_t>
configuration dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::preferred(align_t&& align) const
inline

the richest configuration align admits (it returns the candidate as it stands): the largest sum of channels times bits over the streams that run, on a tie the richer stream configuration to the smaller stream index, then the more streams running - streams without channels (MIDI, raw) score nothing - every combination is tried

◆ sync_reference() [1/2]

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
uint32_t dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::sync_reference(struct stream* sync_reference)
inline

◆ sync_reference() [2/2]

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
struct stream* dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::sync_reference(uint32_t sync_reference)
inline

the n-th stream qualifying as sync reference, and the twin below the index of a given one - the two directions of the preference's value

Here is the caller graph for this function:

Member Data Documentation

◆ bus

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
dx::stream::bus::bus dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::bus{}

the bus this device hangs on

◆ clock

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
struct dx::stream::desc::clock dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::clock[max_clocks]

◆ clocks

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
uint32_t dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::clocks{}

number of independent clocks [currenlty only single clock support]

◆ dflt

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
bool dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::dflt{}

can be selected as default (OS audio) device

◆ editable

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
bool dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::editable{}

can be edited

◆ firmware

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
struct dx::stream::desc::firmware dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::firmware

◆ hidden

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
bool dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::hidden{}

hide device

◆ model

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
struct dx::stream::desc::name_id dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::model

◆ persistence

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
bool dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::persistence{}

device has capability to store persistent settings (i.e. sample rate; clock source; etc.)

◆ start_stop_order

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
direction::direction dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::start_stop_order{direction::any}

◆ stream

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
struct dx::stream::desc::stream dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::stream[max_streams]

◆ streams

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
uint32_t dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::streams{}

number of streams

◆ vendor

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
struct dx::stream::desc::name_id dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::vendor

◆ version

template<typename target_t= void_struct, int max_streams= 2, int max_pins= 1, int max_clock_settings= 1, int max_clocks= 1, int max_configurations= 1, int max_sources= 1>
uint32_t dx::stream::desc<target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources>::version{}

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