dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::usb::stream::group< device_t > Class Template Reference

USB isoc streaming group: one bus frame aligned tick per USB frame, the one thread running the pipes' request pipelines and moving their data. More...

#include <dx_usb_stream_group.h>

Inheritance diagram for dx::usb::stream::group< device_t >:
Collaboration diagram for dx::usb::stream::group< device_t >:

Public Types

typedef settings< device_t >::client client
typedef dx::clock< clock::source< device_t > > clock
 the one clock of this group, its source freely selectable
typedef dx::source<>::clock_t clock_t
typedef device_t device_t
typedef dx::source<>::event_t event_t
typedef std::conditional_t< store, typename dx::promoted< uint32_t >::template preference< decltype(device_t::preference)>, dx::promoted< uint32_t > > promoted
typedef std::conditional_t< store, typename dx::promoted< uint32_t >::template preference< decltype(device_t::preference)>, dx::promoted< uint32_t > > promoted
typedef device_t::stream_t stream_t
typedef settings< device_t >::transport transport
 the group's two sides, reached as transport::/client:: members

Public Member Functions

 __dx_catchall (std::cerr<< dx::exception(&exception, exception.error, __PRETTY_FUNCTION__, __FILE__, __LINE__)<< std::endl;,) void conclude() noexcept
 dx_catchall_rethrow () virtual ~source()=default
 group (device_t &device)
 the group's clock source ticks off the same device's frame counter, by the transport's wait strategy
void info (std::ostream &os) noexcept override try
realtime & initialize (const std::chrono::high_resolution_clock::duration &resolution)
void initialize (const typename clock_t::duration &duration)
 operator event_t & () noexcept
 operator event_t * () noexcept
virtual void run ()
 create and start clock thread
virtual void sync (const typename clock_t::time_point &now)
virtual sourcewait (bool reset=false) try

Static Public Member Functions

static std::string key (direction::direction direction, uint32_t strategy)
static std::string key (direction::direction direction, uint32_t)

Public Attributes

promoted safety_offset [direction::directions]
promoted safety_offset [direction::directions]
promoted< uint32_tstart
promoted< bool > started
std::map< decltype(stream_t::target.idx()), std::weak_ptr< stream_t > > streams
 shared stream ownership: central weak reference per stream, guarded by device
promoted sync_strategy
promoted sync_strategy

Protected Member Functions

void halt () noexcept override
 ends the session: joins the thread, consumes the pipes' outstanding requests in its place, then resets the group's interfaces to their default alternate setting
virtual void notify () noexcept
 notify change from device requiring streaming reset
void tick () override
 this bus's own transport: an app's consumer group (dx::stream::engine::group) runs it ahead of its own tick

Protected Attributes

std::condition_variable condition_variable
device_tdevice
 also the mutex serializing membership against the tick
_event_t event
std::function< void()> flush_hook
std::function< void()> halt_hook
std::mutex mutex
_clock_t::time_point objective
const super::stream_t::desc * reference {}
 the stream whose advance drives the clock domain: device.sync_reference cached, the tick never reads the promoted
std::function< void()> run_hook
std::atomic< bool > running
os_result status

Detailed Description

template<typename device_t>
class dx::usb::stream::group< device_t >

USB isoc streaming group: one bus frame aligned tick per USB frame, the one thread running the pipes' request pipelines and moving their data.

Member Typedef Documentation

◆ client

◆ clock

the one clock of this group, its source freely selectable

◆ clock_t

typedef dx::source<>::clock_t dx::clock< dx::source<> >::clock_t
inherited

◆ device_t

typedef device_t dx::stream::group< device_t, clock::source< device_t > >::device_t
inherited

◆ event_t

typedef dx::source<>::event_t dx::clock< dx::source<> >::event_t
inherited

◆ promoted [1/2]

typedef std::conditional_t<store, typename dx::promoted<uint32_t>::template preference<decltype(device_t::preference)>, dx::promoted<uint32_t> > dx::stream::settings< device_t, store >::promoted
inherited

◆ promoted [2/2]

typedef std::conditional_t<store, typename dx::promoted<uint32_t>::template preference<decltype(device_t::preference)>, dx::promoted<uint32_t> > dx::stream::settings< device_t, store >::promoted
inherited

◆ stream_t

typedef device_t::stream_t dx::stream::group< device_t, clock::source< device_t > >::stream_t
inherited

◆ transport

the group's two sides, reached as transport::/client:: members

Constructor & Destructor Documentation

◆ group()

template<typename device_t>
dx::usb::stream::group< device_t >::group ( device_t & device)
inline

the group's clock source ticks off the same device's frame counter, by the transport's wait strategy

Member Function Documentation

◆ __dx_catchall()

dx::stream::control< dx::clock< dx::source<> > >::__dx_catchall ( std::cerr<< dx::exception &,.,,, __LINE__<< std::endl; )
inlinenoexceptinherited

◆ dx_catchall_rethrow()

dx::source< _event_t, _clock_t >::dx_catchall_rethrow ( )
defaultinherited

◆ halt()

template<typename device_t>
void dx::usb::stream::group< device_t >::halt ( )
inlineoverrideprotectednoexcept

ends the session: joins the thread, consumes the pipes' outstanding requests in its place, then resets the group's interfaces to their default alternate setting

Here is the call graph for this function:

◆ info()

void dx::stream::control< dx::clock< dx::source<> > >::info ( std::ostream & os)
inlineoverridenoexceptinherited

◆ initialize() [1/2]

realtime & dx::thread::prio::realtime::initialize ( const std::chrono::high_resolution_clock::duration & resolution)
inlineinherited
Todo
dx::thread::prio: replace experimental hardcoded preemption limit with real limit obtained from machine

◆ initialize() [2/2]

void dx::clock< dx::source<> >::initialize ( const typename clock_t::duration & duration)
inlineinherited

◆ key() [1/2]

std::string dx::stream::settings< device_t, store >::transport::key ( direction::direction direction,
uint32_t strategy )
inlinestaticinherited

◆ key() [2/2]

std::string dx::stream::settings< device_t, store >::client::key ( direction::direction direction,
uint32_t  )
inlinestaticinherited

◆ notify()

virtual void dx::clock< dx::source<> >::notify ( )
inlineprotectedvirtualnoexceptinherited

notify change from device requiring streaming reset

◆ operator event_t &()

dx::clock< dx::source<> >::operator event_t & ( )
inlinenoexceptinherited

◆ operator event_t *()

dx::clock< dx::source<> >::operator event_t * ( )
inlinenoexceptinherited

◆ run()

virtual void dx::clock< dx::source<> >::run ( )
inlinevirtualinherited

create and start clock thread

◆ sync()

virtual void dx::source< _event_t, _clock_t >::sync ( const typename clock_t::time_point & now)
inlinevirtualinherited

◆ tick()

template<typename device_t>
void dx::usb::stream::group< device_t >::tick ( )
inlineoverrideprotected

this bus's own transport: an app's consumer group (dx::stream::engine::group) runs it ahead of its own tick

< the reference stream's advance this tick: the clock domain's

Here is the call graph for this function:

◆ wait()

virtual source & dx::source< _event_t, _clock_t >::wait ( bool reset = false)
inlinevirtualinherited

Member Data Documentation

◆ condition_variable

std::condition_variable dx::source< _event_t, _clock_t >::condition_variable
protectedinherited

◆ device

device_t& dx::stream::group< device_t, clock::source< device_t > >::device
protectedinherited

also the mutex serializing membership against the tick

◆ event

_event_t dx::source< _event_t, _clock_t >::event
protectedinherited
Todo
evaluate clock::status replacement (exception?)

◆ flush_hook

std::function<void()> dx::stream::control< dx::clock< dx::source<> > >::flush_hook
protectedinherited

◆ halt_hook

std::function<void()> dx::stream::control< dx::clock< dx::source<> > >::halt_hook
protectedinherited

◆ mutex

std::mutex dx::source< _event_t, _clock_t >::mutex
protectedinherited

◆ objective

_clock_t::time_point dx::source< _event_t, _clock_t >::objective
protectedinherited

◆ reference

template<typename device_t>
const super::stream_t::desc* dx::usb::stream::group< device_t >::reference {}
protected

the stream whose advance drives the clock domain: device.sync_reference cached, the tick never reads the promoted

◆ run_hook

std::function<void()> dx::stream::control< dx::clock< dx::source<> > >::run_hook
protectedinherited

◆ running

std::atomic<bool> dx::source< _event_t, _clock_t >::running
protectedinherited

◆ safety_offset [1/2]

promoted dx::stream::settings< device_t, store >::safety_offset[direction::directions]
inherited

◆ safety_offset [2/2]

promoted dx::stream::settings< device_t, store >::safety_offset[direction::directions]
inherited

◆ start

◆ started

promoted<bool> dx::stream::control< dx::clock< dx::source<> > >::started
inherited

◆ status

os_result dx::source< _event_t, _clock_t >::status
protectedinherited

◆ streams

std::map<decltype(stream_t::target.idx()), std::weak_ptr<stream_t> > dx::stream::group< device_t, clock::source< device_t > >::streams
inherited

shared stream ownership: central weak reference per stream, guarded by device

◆ sync_strategy [1/2]

promoted dx::stream::settings< device_t, store >::sync_strategy
inherited

◆ sync_strategy [2/2]

promoted dx::stream::settings< device_t, store >::sync_strategy
inherited

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.