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

USB bus frame clock source: one tick per bus frame - a high resolution OS timer wait toward the frame objective, optionally handing over to yield/spin polling covering user mode jitter for low latency sessions. More...

#include <dx_usb_clock.h>

Inheritance diagram for dx::usb::clock::source< device_t >:
Collaboration diagram for dx::usb::clock::source< device_t >:

Public Types

typedef frame clock_t
typedef dx::event< kernelevent_t

Public Member Functions

 catch (...)
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN catch (const dx::exception &__dx_exception)
 catch (const std::exception &__std_exception)
 dx_catchall_rethrow () virtual ~source()=default
DX_PRAGMA_IGNORE_RETURN_VALUE_END source (device_t &device, typename dx::stream::settings< device_t >::transport &transport)
virtual void sync (const typename clock_t::time_point &now)
void sync (const clock_t::time_point &) override
 aligns the next tick and the frame↔timestamp correlation to the bus frame counter: one tick per frame - a tick behind by less than a round (the slot array's depth) gets every missed frame ticked in turn, one behind by a round or ahead is resynced
superwait (bool=false) override try

Public Attributes

std::atomic< dx::stream::clock::strategystrategy {static_cast<dx::stream::clock::strategy>(static_cast<uint32_t>(transport.sync_strategy))}
 runtime switchable wait mode: the poll modes run only while a low latency session needs them - they occupy a core per group
listener< dx::listen< std::function< void(const uint32_t &)> > > strategy_listener

Protected Attributes

std::condition_variable condition_variable
dx::event< kernelevent
std::mutex mutex
frame::time_point objective
std::atomic< bool > running
os_result status

Detailed Description

template<typename device_t>
class dx::usb::clock::source< device_t >

USB bus frame clock source: one tick per bus frame - a high resolution OS timer wait toward the frame objective, optionally handing over to yield/spin polling covering user mode jitter for low latency sessions.

Member Typedef Documentation

◆ clock_t

typedef frame dx::source< dx::event< kernel >, frame >::clock_t
inherited

◆ event_t

typedef dx::event< kernel > dx::source< dx::event< kernel >, frame >::event_t
inherited

Constructor & Destructor Documentation

◆ source()

template<typename device_t>
DX_PRAGMA_IGNORE_RETURN_VALUE_END dx::usb::clock::source< device_t >::source ( device_t & device,
typename dx::stream::settings< device_t >::transport & transport )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ catch() [1/3]

template<typename device_t>
dx::usb::clock::source< device_t >::catch ( ...)
inline

◆ catch() [2/3]

template<typename device_t>
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::usb::clock::source< device_t >::catch ( const dx::exception & __dx_exception)
inline

◆ catch() [3/3]

template<typename device_t>
dx::usb::clock::source< device_t >::catch ( const std::exception & __std_exception)
inline

◆ dx_catchall_rethrow()

dx::source< dx::event< kernel >, frame >::dx_catchall_rethrow ( )
defaultinherited

◆ sync() [1/2]

virtual void dx::source< dx::event< kernel >, frame >::sync ( const typename clock_t::time_point & now)
inlinevirtualinherited

◆ sync() [2/2]

template<typename device_t>
void dx::usb::clock::source< device_t >::sync ( const clock_t::time_point & )
inlineoverride

aligns the next tick and the frame↔timestamp correlation to the bus frame counter: one tick per frame - a tick behind by less than a round (the slot array's depth) gets every missed frame ticked in turn, one behind by a round or ahead is resynced

Here is the call graph for this function:

◆ wait()

template<typename device_t>
super & dx::usb::clock::source< device_t >::wait ( bool = false)
inlineoverridevirtual

Reimplemented from dx::source< dx::event< kernel >, frame >.

Here is the call graph for this function:

Member Data Documentation

◆ condition_variable

std::condition_variable dx::source< dx::event< kernel >, frame >::condition_variable
protectedinherited

◆ event

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

◆ mutex

std::mutex dx::source< dx::event< kernel >, frame >::mutex
protectedinherited

◆ objective

frame::time_point dx::source< dx::event< kernel >, frame >::objective
protectedinherited

◆ running

std::atomic<bool> dx::source< dx::event< kernel >, frame >::running
protectedinherited

◆ status

os_result dx::source< dx::event< kernel >, frame >::status
protectedinherited

◆ strategy

template<typename device_t>
std::atomic<dx::stream::clock::strategy> dx::usb::clock::source< device_t >::strategy {static_cast<dx::stream::clock::strategy>(static_cast<uint32_t>(transport.sync_strategy))}

runtime switchable wait mode: the poll modes run only while a low latency session needs them - they occupy a core per group

◆ strategy_listener

template<typename device_t>
listener<dx::listen<std::function<void(const uint32_t&)> > > dx::usb::clock::source< device_t >::strategy_listener
Initial value:
{
transport.sync_strategy.listen, {[this](const uint32_t& value){strategy= static_cast<dx::stream::clock::strategy>(value);}}}
std::atomic< dx::stream::clock::strategy > strategy
runtime switchable wait mode: the poll modes run only while a low latency session needs them - they o...
Definition dx_usb_clock.h:103
strategy
Definition dx_stream.h:157
unsigned int uint32_t
Definition wdk/dxd_platform.h:111

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.