dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dxd::streaming::device< base_t, desc_t, clock_server_t > Class Template Reference

generic streaming device: the control interface every bus's clients share More...

#include <dxd_stream_device.h>

Inheritance diagram for dxd::streaming::device< base_t, desc_t, clock_server_t >:
Collaboration diagram for dxd::streaming::device< base_t, desc_t, clock_server_t >:

Classes

class  ring
 the ring one stream streams through, sized by the opening client More...

Public Types

typedef device< base_t, desc_t, clock_server_t > device_t

Public Member Functions

template<typename... args_t>
 device (clock_server_t &&server, args_t &&... args)
template<typename target_t>
int find (const target_t &target) const
 the stream a client addresses, as the desc spells its target
int find (dx::stream::direction::direction direction, unsigned int &pin) const
 the stream carrying the pin of the given direction, that pin's index in pin
auto & format (unsigned int idx)
 the format the given stream's ring runs: a participant assigns its own and reads what was adopted
os_result ioctl (unsigned int ioctl, const void *in, size_t size_in, void *out, size_t size_out, size_t &size) override
os_result open (unsigned int idx, uint32_t linesize, uint32_t buffers)
 creates the stream's ring on the first client opening it

Public Attributes

class domain hw
 the DAW clock: every client rides on it with its own buffer switch event
dxd::streamio [streams] {}
 the shared ring of each stream, allocated with the first client opening it
promoted< uint32_t, iosize_server< device_t > > iosize {iosize_server<device_t>{*this}}
class multichannel::stream<>::clock::monitor monitor
 performance counters, allocated with the first client asking for them
promoted< uint32_t, offset_server< device_t > > safety_offset [dx::stream::direction::directions]
promoted< uint32_t, samplerate_server< device_t > > samplerate {samplerate_server<device_t>{*this}}
promoted< uint32_t, clock_server_t > started
 started streams over all clients: the clock domain runs while this is not zero

Static Public Attributes

static constexpr unsigned int streams = sizeof(desc_t::stream)/ sizeof(desc_t::stream[0])
 the desc's stream capacity, as its array carries it

Protected Member Functions

auto & clock_desc ()
 the desc's single clock domain - the buses served here have exactly one
template<typename promoted_t>
os_result exchange (promoted_t &value, const void *in, size_t size_in, void *out, size_t size_out, size_t &size)
 promoted value as a get (no input) or set-and-read-back IOCTL
uint32_t granularity ()
 samples per clock tick, the unit both the tick and iosize are aligned to

Protected Attributes

desc_t desc {}
char puid [0x80] {}

Friends

struct iosize_server< device_t >
struct offset_server< device_t >
struct samplerate_server< device_t >
template<typename>
class streaming::client

Detailed Description

template<typename base_t, typename desc_t, typename clock_server_t>
class dxd::streaming::device< base_t, desc_t, clock_server_t >

generic streaming device: the control interface every bus's clients share

Answers the device and stream IOCTLs of dx::proxy::stream::device from promoted values, leaving the bus its streams and its clock: base_t is the platform's device (dxd::device or dxd::kmdf::device), clock_server_t the functor running and halting the concrete clock as the start reference count leaves and reaches zero.

Member Typedef Documentation

◆ device_t

template<typename base_t, typename desc_t, typename clock_server_t>
typedef device<base_t, desc_t, clock_server_t> dxd::streaming::device< base_t, desc_t, clock_server_t >::device_t

Constructor & Destructor Documentation

◆ device()

template<typename base_t, typename desc_t, typename clock_server_t>
template<typename... args_t>
dxd::streaming::device< base_t, desc_t, clock_server_t >::device ( clock_server_t && server,
args_t &&... args )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ clock_desc()

template<typename base_t, typename desc_t, typename clock_server_t>
auto & dxd::streaming::device< base_t, desc_t, clock_server_t >::clock_desc ( )
inlineprotected

the desc's single clock domain - the buses served here have exactly one

Here is the caller graph for this function:

◆ exchange()

template<typename base_t, typename desc_t, typename clock_server_t>
template<typename promoted_t>
os_result dxd::streaming::device< base_t, desc_t, clock_server_t >::exchange ( promoted_t & value,
const void * in,
size_t size_in,
void * out,
size_t size_out,
size_t & size )
inlineprotected

promoted value as a get (no input) or set-and-read-back IOCTL

dx::stream::clock_value carries the clock domain alongside the value; the domain is not evaluated - the buses served here have a single one.

Here is the caller graph for this function:

◆ find() [1/2]

template<typename base_t, typename desc_t, typename clock_server_t>
template<typename target_t>
int dxd::streaming::device< base_t, desc_t, clock_server_t >::find ( const target_t & target) const
inline

the stream a client addresses, as the desc spells its target

The target is the bus's own stream address - a direction here, an endpoint on USB - so matching it against the desc is what every bus has in common.

◆ find() [2/2]

template<typename base_t, typename desc_t, typename clock_server_t>
int dxd::streaming::device< base_t, desc_t, clock_server_t >::find ( dx::stream::direction::direction direction,
unsigned int & pin ) const
inline

the stream carrying the pin of the given direction, that pin's index in pin

◆ format()

template<typename base_t, typename desc_t, typename clock_server_t>
auto & dxd::streaming::device< base_t, desc_t, clock_server_t >::format ( unsigned int idx)
inline

the format the given stream's ring runs: a participant assigns its own and reads what was adopted

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

◆ granularity()

template<typename base_t, typename desc_t, typename clock_server_t>
uint32_t dxd::streaming::device< base_t, desc_t, clock_server_t >::granularity ( )
inlineprotected

samples per clock tick, the unit both the tick and iosize are aligned to

Here is the call graph for this function:

◆ ioctl()

template<typename base_t, typename desc_t, typename clock_server_t>
os_result dxd::streaming::device< base_t, desc_t, clock_server_t >::ioctl ( unsigned int ioctl,
const void * in,
size_t size_in,
void * out,
size_t size_out,
size_t & size )
inlineoverride

dx::ioctl::stream::enumerate: the device's whole desc_t

dx::ioctl::stream::desc: the desc as a settable value - the enumerated topology stands

dx::ioctl::stream::puid: persistent device UID

dx::ioctl::stream::clock::start/stop: the clock domain as a whole, one participant

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

◆ open()

template<typename base_t, typename desc_t, typename clock_server_t>
os_result dxd::streaming::device< base_t, desc_t, clock_server_t >::open ( unsigned int idx,
uint32_t linesize,
uint32_t buffers )
inline

creates the stream's ring on the first client opening it

Here is the call graph for this function:

◆ iosize_server< device_t >

template<typename base_t, typename desc_t, typename clock_server_t>
friend struct iosize_server< device_t >
friend

◆ offset_server< device_t >

template<typename base_t, typename desc_t, typename clock_server_t>
friend struct offset_server< device_t >
friend

◆ samplerate_server< device_t >

template<typename base_t, typename desc_t, typename clock_server_t>
friend struct samplerate_server< device_t >
friend

◆ streaming::client

template<typename base_t, typename desc_t, typename clock_server_t>
template<typename>
friend class streaming::client
friend

Member Data Documentation

◆ desc

template<typename base_t, typename desc_t, typename clock_server_t>
desc_t dxd::streaming::device< base_t, desc_t, clock_server_t >::desc {}
protected

◆ hw

template<typename base_t, typename desc_t, typename clock_server_t>
class domain dxd::streaming::device< base_t, desc_t, clock_server_t >::hw

the DAW clock: every client rides on it with its own buffer switch event

◆ io

template<typename base_t, typename desc_t, typename clock_server_t>
dxd::stream* dxd::streaming::device< base_t, desc_t, clock_server_t >::io[streams] {}

the shared ring of each stream, allocated with the first client opening it

◆ iosize

template<typename base_t, typename desc_t, typename clock_server_t>
promoted<uint32_t, iosize_server<device_t> > dxd::streaming::device< base_t, desc_t, clock_server_t >::iosize {iosize_server<device_t>{*this}}

◆ monitor

template<typename base_t, typename desc_t, typename clock_server_t>
class multichannel::stream<>::clock::monitor dxd::streaming::device< base_t, desc_t, clock_server_t >::monitor

performance counters, allocated with the first client asking for them

◆ puid

template<typename base_t, typename desc_t, typename clock_server_t>
char dxd::streaming::device< base_t, desc_t, clock_server_t >::puid[0x80] {}
protected

◆ safety_offset

template<typename base_t, typename desc_t, typename clock_server_t>
promoted<uint32_t, offset_server<device_t> > dxd::streaming::device< base_t, desc_t, clock_server_t >::safety_offset[dx::stream::direction::directions]
Initial value:
{
@ in
Definition dx_stream.h:315
@ out
Definition dx_stream.h:315
Definition dxd_stream_device.h:64

◆ samplerate

template<typename base_t, typename desc_t, typename clock_server_t>
promoted<uint32_t, samplerate_server<device_t> > dxd::streaming::device< base_t, desc_t, clock_server_t >::samplerate {samplerate_server<device_t>{*this}}

◆ started

template<typename base_t, typename desc_t, typename clock_server_t>
promoted<uint32_t, clock_server_t> dxd::streaming::device< base_t, desc_t, clock_server_t >::started

started streams over all clients: the clock domain runs while this is not zero

◆ streams

template<typename base_t, typename desc_t, typename clock_server_t>
unsigned int dxd::streaming::device< base_t, desc_t, clock_server_t >::streams = sizeof(desc_t::stream)/ sizeof(desc_t::stream[0])
staticconstexpr

the desc's stream capacity, as its array carries it


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.